Notes on Porting Classic BASIC Programs to C

** INT()

The BASIC function INT() returns the greatest integer less than
(absolutely, as in leftward on the number line) or equal to the
argument. This is different from the common C truncation technique of
casting to integer type, which produces the integer closer to zero or
equal to the argument.

The math.h function floor() (or floorf() for float values) is
equivalent to INT().

** math.h

Using functions from the math.h library requires the program to be
compiled/linked with the option -lm .

** TAB()

The TAB() function can be used in PRINT and similar statements to
advance the printing position to the column indicated by the
argument.

C does not have an equivalent feature, but TAB() arguments can be
interpreted as offsets into a line print buffer.