LOCAL: Difference between revisions
From Macros Wiki
Jump to navigationJump to search
New page: {{Command|syntax=LOCAL <var name>, <var name>, <var name> (max 50 variables) |description=*DESCRPTION* |param1=<var name>|param1_desc={{var name}} |param2=<var name>|param2_desc={{var nam... |
No edit summary |
||
(19 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | [[:Category:Variable_Definitions|{{Up}}]] | ||
| | {{Command|syntax=LOCAL <nowiki><var name>, <var name>, <var name> (max 50 variables)</nowiki> | ||
|description=:Define variables to be used in the current macro only. These variables will not be available to any macro that calls this macro, or any macro that this macro calls. | |||
| | |||
|param1=<nowiki><var name></nowiki>|param1_desc={{define var name}} | |||
A maximum of 50 variable names may be defined by one LOCAL command, each separated by a comma. | |||
}} | }} | ||
===Example=== | ===Example=== | ||
: | :LOCAL iref1 | ||
:LOCAL ToolList(20), OpList(100), Notes$(5), Counter, ToolNum | |||
<br> | |||
:For an example macro see [[Modify_Op_Path]] [[Modify_op_path2]] [[Check_Point_Data]] [[Check_Line_Data]] [[Check_Circle_Data]] [[Check_Arc_Data]] [[Get_Op_Tool_Path]] [[Global_Local]] [[GlobalLocal_Sub.mac]] [[Solid_Type]] | |||
[[Category:Variable_Definitions]] | [[Category:Variable_Definitions]] |
Latest revision as of 00:11, 15 January 2011
Command
- LOCAL <var name>, <var name>, <var name> (max 50 variables)
- Define variables to be used in the current macro only. These variables will not be available to any macro that calls this macro, or any macro that this macro calls.
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.
A maximum of 50 variable names may be defined by one LOCAL command, each separated by a comma.
Example
- LOCAL iref1
- LOCAL ToolList(20), OpList(100), Notes$(5), Counter, ToolNum