Creating More Read Only Variables

The use of read only variables, or constants, instead of hard-coded constants in PCI source code is a big help for clarity and readability.

Authors of PCI operations can create their own read only variables using the %CALC statement. This will work as for normal variables, but the value of the read only variable cannot be reassigned. An example is shown here:

 

%CALC=#TOOLDIAMETER=47

 
A range of read only variables cover the popular identifiers used with %INITCOMMAND, %SETMODIFER directives. These are referred to as verb, noun and modifier identifiers. A unique verb and noun combination identifies an EdgeCAM command. Modifier identifiers may be duplicated, but not within the same command.

Read only variables for verbs, nouns and modifiers begin #VERB, #NOUN and #MOD respectively. The full definition of all verbs, nouns and modifiers are given in the EdgeCAM include files verb.def, noun.def and modifier.def. Each constant from these files will be included as read only variables.

This will not give an exhaustive list as not all identifiers are included in these files.

The PCI Command Save will use these constants wherever possible.