79
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
The examples provided herein may not work on your platform -- they are given for
reference only.
Statements
Statements are used for directing the machine to perform a specific operation. A
statement is the smallest possible unit of code which would compile by itself. You
could say they are the programming-language equivalent of a sentence in human
speech.
Statements are built into Tibbo Basic itself, and are not platform-specific.
Const Statement
Function:
Declares constants for use in place of literal values.
Syntax:
const name = value
Scope:
Global, HTML and local
See Also:
Part
Description
name
The name of the constant, later used to refer to this
constant in code.
value
The value for the constant; this can be an expression.
Details
This statement defines an identifier, and binds a constant value to it. During
compilation, when the compiler finds an identifier, it substitutes the identifier with
the value given for the constant.
When defining a constant, you can use any valid constant expression; this can be
another constant, a string, or a mathematical expression. Of course, constant
expressions cannot include variables, functions, or other elements of code which
are not constant (and, hence, cannot be resolved during compilation).
Global constants are usually declared in the
.
Examples
const
foo =
"abc"
+
"fddf"
const
bar =
123
+
56
*
56
const
foobar =
"dfdffgfg"
Declare Statement
Function:
Declares a function or a subroutine or a variable for later
use.
84
15