SmallBASIC GuideThe language | Programming Tips | Commands | System | Graphics & Sound | Miscellaneous | File system | Mathematics | 2D Algebra | Strings | Console | Glossary |
Single-line Functions

There is also an alternative FUNC/DEF syntax (single-line functions). This is actually a macro for compatibility with the BASIC's DEF FN command, but quite useful. Syntax:
FUNC name[(par1[,...])] = expression
or
DEF name[(par1[,...])] = expression
DEF MySin(x) = SIN(x)
? MySin(pi/2)


[Prev] [Next]