×
Menu
Index

CONST Keyword

 
Usage:
CONST name = value
 
Description:
Defines a constant symbol.
 
Constants are similar to variables except a) They are defined in your script outside of any subroutines, and b) Their value cannot be changed. Constants are useful, for example, when you write a script that uses a value in several places, but you want to be able to easily change that value at one location.
 
There are also default constants:
    TBSVER contains the version string of the script engine;
    TBSENV contains "DOS", "LINUX", "WINDOWS", or "UEFI" depending on which type of environment the script is running on;
    TBSAPPPATH contains the path name to the folder containing the main application.
 
Example:
const A = 100
 
sub main()
   printl("The value of A is ", A)
end sub