bas7ex.hlp (Topic list)
CINT, FIX, and INT Programming Example
                       Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
'This example compares output from INT, CINT, and FIX, the three
'functions that convert numeric data to integers.
 
CLS                'Clear screen.
PRINT "  N","INT(N)","CINT(N)","FIX(N)" : PRINT
FOR I% = 1 TO 6
    READ N
    PRINT N, INT(N), CINT(N), FIX(N)
NEXT
DATA  99.3, 99.5, 99.7, -99.3, -99.5, -99.7
 
'Sample Output
'
'  N           INT(N)        CINT(N)       FIX(N)
'
' 99.3          99            99            99
' 99.5          99            100           99
' 99.7          99            100           99
'-99.3         -100          -99           -99
'-99.5         -100          -100          -99
'-99.7         -100          -100          -99