FutureBasic Logo

<<    Index    >> FutureBasic 5

Constant declaration   statement



Syntax:
_constantName = staticExpr

Description:
This is a non-executable statement which assigns the value of staticExpr to the symbolic constant indicated by _constantName. The _constantName should indicate a name which was not defined anywhere previously in the program, and which is different from all pre-defined FutureBasic symbolic constant names. The name must be preceded by an underscore '_' character. The staticExpr must be a "static integer expression"; it cannot contain variables or function references.

An error occurs if you attempt to assign a different value to an existing constant name, without preceding the new assignment by override. It is not an error to reassign the same value to an existing constant name.

Another way to assign values to symbolic constant names is with the begin enum statement.

See Also:
override; begin enum; Appendix C - Data Types and Data Representation