GPC Developer Guides

Definitions

the sole purpose of a definition is to assign a value to a word and therefore make a script easier for a human to read they do not use any bytecode space in a script when a script is compiled the words are changed to their assigned value syntax define \<name> = \<value or expression>; gpc \<name> the name of the constant \<value or expression> the value or expression assigned to the constant info the value of the definition must be possible to compute during compilation meaning you can use math but not math functions once a word is defined and given a value, that word can be used anywhere in the script where a value is valid, as shown below gpc define my value = 50; main { if(get val(xb1 lt)) { set val(xb1 rt, my value); } } if you wish to assign a value to a word and change its value during run time, you would use a variable instead of a define