PERMANENT: Difference between revisions
From Macros Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
[[:Category:Variable_Definitions|{{Up}}]] | |||
{{Command|syntax=PERMANENT <nowiki><var name>, <var name> (max 50 variables)</nowiki> | {{Command|syntax=PERMANENT <nowiki><var name>, <var name> (max 50 variables)</nowiki> | ||
|description=:Once a macro has completed execution, all of the variables used by that macro are normally removed from memory. However, any variables defined using the PERMANENT command will remain active and their values can be obtained by any macro that is subsequently used in the same session of GibbsCAM. | |description=:Once a macro has completed execution, all of the variables used by that macro are normally removed from memory. However, any variables defined using the PERMANENT command will remain active and their values can be obtained by any macro that is subsequently used in the same session of GibbsCAM. | ||
Revision as of 22:38, 30 July 2010
Command
- PERMANENT <var name>, <var name> (max 50 variables)
- Once a macro has completed execution, all of the variables used by that macro are normally removed from memory. However, any variables defined using the PERMANENT command will remain active and their values can be obtained by any macro that is subsequently used in the same session of GibbsCAM.
Parameters
- <var name>
- The name of the variable to be defined.
- For a string variable, the name must end with a dollar sign "$".
- For an array variable, you must specify the number of elements in the array.
- For example MyNumericArray(10) or MyStringArray$(15).
- When using arrays, the first element is always 1.
- <var name>
- The name of the variable to be defined.
- For a string variable, the name must end with a dollar sign "$".
- For an array variable, you must specify the number of elements in the array.
- For example MyNumericArray(10) or MyStringArray$(15).
- When using arrays, the first element is always 1.
A maximum of 50 variable names may be defined, each separetd by a comma.
Example
- PERMANENT iref1
- PERMANENT ToolList(20), OpList(100), Notes$(5), Counter, ToolNum