Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 186

Advertising
background image

Publication 1746-RM001A-US-P

12-36 Output Functions

Use the PRINT CR expression to output a carriage return without a line feed.

>1

REM EXAMPLE PROGRAM

>10 PRINT “A”, CR,

>20 PRINT “B”

READY

>RUN

B

READY

>

The A was printed and then overwritten by the B.

Use the PRINT SPC( ) expression to output a specified number of spaces.

>1

REM EXAMPLE PROGRAM

>10 PRINT “A”, SPC(10), “B”

READY

>RUN

A

B

Use the PRINT TAB( ) expression to output a specified number of tab characters.

>1

REM EXAMPLE PROGRAM

>10 PRINT “A”, TAB(1), “B”

READY

>RUN

A

B

Use the PRINT USING(Fx) expression to output all numeric values in scientific
notation. The x represents the total number of digits of the mantissa that are
displayed. One digit is displayed before the decimal point. The value of x is a
minimum of three and a maximum of eight. The value displayed is adjusted
according to these limits.

>1

REM EXAMPLE PROGRAM

>10 PRINT USING(F4), 123.45678

READY

>RUN

1.234 E+2

Use the PRINT USING(#.#) expression to output all numeric values in decimal
notation according to the format specified by the instruction.

Advertising