Brother International TJ-4520TN FBPL Command Reference - Page 167
INT, Description, Syntax, Example, See Also
View all Brother International TJ-4520TN manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 167 highlights
10.35 INT() Description Truncate a floating point number. Syntax INT(n) Parameter n Description Positive or negative integer, floating point number or mathematical expression Example Sample code Result DOWNLOAD "DEMO.BAS" SIZE 4,1 GAP 0,0 DIRECTION 1 INPUT "Number: ",Num CLS REM **** To round up or down**** N=INT(Num+0.5) IF N>Num THEN TEXT 50,100, "3",0,1,1, "To round up= " +STR$(N) ELSE TEXT 50,100, "3",0,1,1, "To round down= " +STR$(N) ENDIF PRINT 1 EOP 56.2 See Also DOWNLOAD, EOP, END, ABS(), ASC(), STR$() 162
162
10.35 INT()
Description
Truncate a floating point number.
Syntax
INT(n)
Parameter
Description
n
Positive or negative integer, floating point number or mathematical expression
Example
Sample code
DOWNLOAD "DEMO.BAS"
SIZE 4,1
GAP 0,0
DIRECTION 1
INPUT "Number: ",Num
CLS
REM **** To round up or down****
N=INT(Num+0.5)
IF N>Num THEN
TEXT 50,100, "3",0,1,1, "To round up= "
+STR$(N)
ELSE
TEXT 50,100, "3",0,1,1, "To round down= "
+STR$(N)
ENDIF
PRINT 1
EOP
56.2
Result
See Also
DOWNLOAD, EOP, END, ABS(), ASC(), STR$()