beautypg.com

Rpbasic-52 programming guide, Using u – Remote Processing BASIC 52 User Manual

Page 136

background image

RPBASIC-52 PROGRAMMING GUIDE

2-117

USING
U.

Syntax:

P R I N T U SI N G (format)
PRIN T U.( format)
Where: format

USING(Fn) n is the numb er of significant digits. A m inimum of 3 significant digits are

always printed. Maximum value of n is 8.

USING(#.#) The number of # symbols determines how many significant figures of the

output value will be displayed before and after the decimal point. The
maxim um total num ber of "#" sym bols is 8. Integers (decim als truncated) are
printed when there are no "#" symbols after the decimal point or if no decimal
p o in t is g iv e n . I f a v a lu e c an n o t b e p ri n te d in t he r eq u e st e d f o rm a t , R P B A S I C -
52 outputs a "?" and prints the value in USING (0) format.

USING(0)

The default output format for RPBASIC-52 floating-point values. Displayed
as a decim al integer and fraction if the value is betw een +/- 99999 999 and +/-
0.1.

Function:

Used with PR INT to format subsequen t expressions.

Mode:

Comm and, run

Use:

PRIN T US ING (F3),A

Cards:

All

D E S C R IP T I ON

The s ame forma tting ca pabilit y is ava ilable using th e ST R(10 ,...) functio n.

Formatting is "remembered" until it is reset or changed.

RELATED STR

ERRORS

BAD SYNT AX - M issing # to the left of the dec imal point or a sp ace betw een USIN G and the le ft
parentheses.

EXAMPLE

110 PRINT USING(F3),PI*100

>run

3.14 E+2