62
Programming with TIDE
©2000-2008 Tibbo Technology Inc.
"\t" for ASCII code 9 (&h9)
"\n" for ASCII code 10 (&hA, LF character)
"\v" for ASCII code 11 (&hB)
"\f" for ASCII code 12 (&hC)
"\r" for ASCII code 13 (&hD, CR character)
"\e" for ASCII code 27 (&h1B, ESC character)
Any ASCII character, printable or unprintable, can be defined using its HEX code.
The following format should be used: "\x00" where "00" is the HEX code of the
character. Notice, that two digits should be present on the code, for example:
"\x0A" -- leading zero must not be omitted.
\
Introduction to Procedures
A procedure is a named piece of code, which performs a designated task, and can
be called (used) by other parts of the program. In Tibbo Basic, there are two types
of procedures:
Function Procedures
A function is defined using the
. Functions can optionally
have one or several arguments. Functions always return a single value. They can,
however, change the value of the arguments passed to them using
and
thus indirectly return more than one value. This would be an example of a
function:
function
multiply(a
as
integer
, b
as
integer
)
as
integer
multiply = a * b
end
function
Note how the function above returns a value: via a local variable with the same
name as the function itself. Such a variable is automatically created by the
compiler for each function.
Sub Procedures
Sub is short for subroutine; just like a function, a sub procedure can optionally
accept one or more arguments. However, unlike functions, sub procedures do not
return a value. It is defined using the
. This would be an example
of a sub:
87
64
93