INCLAN: var: Difference between revisions

From CYANA Wiki
Jump to navigation Jump to search
m (1 revision)
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Synopsis ==


Usage: var ''variable'' ...
'''var''' ''variable'' ...


The "var" statement declares variables as local variables of the current  
== Description ==
macro or user-defined command. In contrast to normal (global) variables,  
 
local variables are only visible within the macro where they are declared
Declares ''variables'' as local variables of the current macro. In contrast to normal (global) variables, local variables are only visible within the macro where they are declared and within macros that are called via that macro (except when such a macro declares itself a local variable with the same name). The '''var''' command must precede any other commands in a macro (except the '''parameter''' command) and cannot be used interactively.
and within macros that are called through that macro (except when such a  
macro declares a local variable with the same name). The "var" command must
precede any other commands in a macro (except the "parameter" command) and  
cannot be used interactively.

Latest revision as of 12:02, 17 August 2009

Synopsis

var variable ...

Description

Declares variables as local variables of the current macro. In contrast to normal (global) variables, local variables are only visible within the macro where they are declared and within macros that are called via that macro (except when such a macro declares itself a local variable with the same name). The var command must precede any other commands in a macro (except the parameter command) and cannot be used interactively.