PI1X Basic Programming Manual Ver. 1.10
15/156
Purpose
:
To return the largest integer that is less than or equal to the
giver numeric expression.
Syntax
:
A% = INT(N%) or A% = INT(N!)
Example
:
A% = INT(9.86)
PRINT A%
B% = INT(-5.68)
PRINT B%
Description
:
A%
is an integer variable to be assigned to the result.
N% or N!
is a numeric expression,it can be an integer or a
real number.
Purpose
:
To insert explanatory remarks in a program.
Syntax
:
REM remark or 'remark
Example
:
REM This is function
' This is BASIC program
Description
:
remark
may be any sequence of characters. BASIC
interpreter will ignore whatever follows the REM or ‘ until
end of the line’.
Purpose
:
To set the precision of the decimal points for printing real
number expression.
Syntax
:
SET_PRECISION(N%)
Example
:
A! = 3.141592654
SET_PRECISION(6)
PRINT "A = ", A! ' A = 3.141593
Description
:
N%
is a numeric expression in the rang of 0 to 6.
The precision default setting is two digits.