Trunc

Family: Core · One form

What it does

Trunc takes a (a float), and answers an integer.

Syntax

Trunc(a float) → integer

Parameters

NameType
afloat

Every form returns

integer

Example · generated

DO  Print(Trunc(1.0))  Sync()LOOP

Trunc is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

Related commands

200 commands in Core