PERMANENT: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
MikeO (talk | contribs)
No edit summary
MikeO (talk | contribs)
No edit summary
Line 1: Line 1:
{{Command|syntax=PERMANENT <nowiki><var name>, <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.


|param1=<nowiki><var name></nowiki>|param1_desc={{var name}}
|param1=<nowiki><var name></nowiki>|param1_desc={{define var name}}
|param2=<nowiki><var name></nowiki>|param2_desc={{var name}}
|param2=<nowiki><var name></nowiki>|param2_desc={{define var name}}
|param3=<nowiki><var name></nowiki>|param3_desc={{var name}}
 
|
A maximum of 50 variable names may be defined, each separetd by a comma.
|A maximum of 50 variables may be defined, each separated by a comma.
}}
}}


===Example===
===Example===
:PERMANENT y, aa, abc$
:PERMANENT iref1
:PERMANENT ToolList(20), OpList(100), Notes$(5), Counter, ToolNum


[[Category:Variable_Definitions]]
[[Category:Variable_Definitions]]

Revision as of 21:41, 29 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