13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

c H A p T E R 5<strong>Turbo</strong> <strong>Basic</strong> Reference Directory<strong>Turbo</strong> <strong>Basic</strong>'s 200-odd commands can be grouped according to their syntacticalclass as functions, statements, system variables, and metastatements.Functions (predefined, as opposed to user-defined) return a value and musttherefore be used within expressions. Most require one or more arguments; forexample:t = C05(3.1) 1 numeric function wI 1 numeric argumentt$ = LEFT$(ICat".2) 1 string function wI 1 string and 1 numeric argumentStatements are the indivisible building blocks that makeup programs. Statementsmust appear on a line all by themselves or with delimiting colons betweenadjacent statements; for example:CIRCLE (160.100). 50 1 draw a circleCALL My5ub (x.y.z) 1 call a procedurea = a + 1,I do an assignment (see LET statement)System variables are predefined identifiers for accessing and controlling certainsystem information; for example:a$ = DATE$ 1 read system dateTIME$ = "00:00" 1 set system timeMetastatements are compiler directives. Strictly speaking they aren't part of thelanguage, but instead operate· at a different level, controlling the behavior of thecompiler; for example:$INCLUDE I module1.tbs"$5TACK &H1000IIload and-process include fileset stack size115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!