Print

Short notation for Uartn.Print
This description is also valid for SoftUart.Print
Print is on of the the most comprehensive output functions. Use Print to write data to a serial port:

Value separation

Values are separated by the Semicolon and then printed in their order from left to right:

If the last character is a semicolon, then the automatic new line function ASCII 13 and ASCII 10 (CRLF) is suppressed.

Print will print an empty new line:

This expression will print nothing:

Every expression is interpreted for itself and then the results are printed one after the other:

This will print the result of a mathematical expression and the string „Hello“ and stringVar (no extra memory required). Dabei ist zu beachten, dass die ergebnisse der mathematischen Ausdrücke bei Addition und Multiplikation den nächst größeren Datentyp ergeben. Möchte man also aus einer Berechnung den binären Byte-Wert ausgeben statt eines Word, teilt man dies dem Compiler durch explizite Anweisung über eine Typkonvertierung mit:

Output Variables

Print Variable or indexed Array elements:

Constants print their typed values :

Print the return value of (Objekt/Interface-) Methods or properties:

Example:

  dim var,c(4),a,b as byte
  var=97 ' ASCII-character "a"
  c(0)=asc("H")
  c(1)=asc("e")
  c(2)=asc("l")
  c(3)=asc("l")
  c(4)=asc("o")
  a=100
  b=5
  Print "Hello World ";str(12345)  ' output: "Hello World 12345"
  Print "Hello World ";65          ' output: "Hello World A"
  Print "Hello World ";Str(65)     ' output: "Hello World 65"
  Print "Hello World ";c(4)        ' output: "Hello World o"
  Print "Hello World ";str(a/b)    ' output: "Hello World 20"
  Print var                        ' output: "a"