Remote-processing BASIC 52 Uživatelský manuál Strana 108

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 163
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 107
RPBASIC-52 PROGRAMMING GUIDE
2-89
PRINT
PRINT #,
P.
?
Syntax: PRINT expr
P. expr
? expr
PRINT#port,expr
P.#port,expr
?#port,expr
Where: expr = any string, mathematical number, or calculation
port = serial output port 0 or 1. Your card may have m ore ports.
Function: Prints value of expr to a serial port
Mode: Command, run
Use: PRINT "String",$(0),AIN(0)*.00214
Cards: PRINT#, P.#, and ?# only on RPC-320, RPC-330.
DESCRIPTION
PRINT is used to send serial data to any port. Default is COM 0. Use port or UO to re-direct output to COM
1 or others.
If there is no expr, a carria ge retu rn - line feed com binatio n is sent. expr is any combination of
instructions/operators and variables, strings, or literal values. More than one expr may be output by
separating them with commas. Values are printed with a leading and trailing space; a list of positive values
separated by commas will thus print with two intervening blanks. A "+" is implied. The "-" symbol precedes
negative values and takes the place of the normal preceding space. Strings and literals are output with no
added blanks. If a comma is the last character in the list then the normal <CR><LF> is suppressed.
The shorthand versions P. and ? are converted to PRINT after each program line is entered, so a P. or ? is
never listed.
The PRINT#port, instruction functions exactly like the PRINT instruction, but it directs output to the
designated serial port. When using this syntax, any output directed by the UO comm and is bypassed.
P.# and ?# are shorthand for PRINT#.
RELATED UO, CONFIG BAUD
EXAMPLE
100 STRING 200,20 : $(0)="String" : B=PI*5
110 PRINT $(0),B,AIN(0)*.00215
>run
String 15.707963 0
Zobrazit stránku 107
1 2 ... 103 104 105 106 107 108 109 110 111 112 113 ... 162 163

Komentáře k této Příručce

Žádné komentáře