INCLAN: set: Difference between revisions

From CYANA Wiki
Jump to navigation Jump to search
(Created page with 'Usage: eval ''variable'' = ''expression'' show ''variable'' ... set ''variable'' ... set ''variable'' = ''value'' unset ''variable'' ... ''vari…')
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Usage: eval ''variable'' = ''expression''
== Synopsis ==
      show ''variable'' ...
      set ''variable'' ...
      set ''variable'' = ''value''
      unset ''variable'' ...
      ''variable'' = ''expression''
      ''variable'' := ''expression''
      external ''variable'' = ''expression''
      external ''variable'' := ''expression''


The "eval" statement evaluates the Fortran-77 ''expression'' and assigns the
'''set''' ''variable'' '''=''' ''value''<br>
result to the ''variable''.
''variable'' ''':''' '''=''' ''value''


The statement "show" without parameters lists the names and values of all
== Description ==
global variables that do not have the value "NULL"; with parameters, "show"
lists the names and values of the given variables. Global variables that are
hidden by a local variable with the same name are identified by the attribute
"hidden".


The statement "set" without parameters lists the names and values of all
The statement "set" without parameters lists the names and values of all
Line 26: Line 14:
''value''.
''value''.


The statement "unset" the given variables. System variables cannot be unset.
== Examples ==


"''variable'' = ''expression''" and "''variable'' := ''expression''" are shorthand
set i=456
notations for "eval ''variable'' = ''expression''" and "set ''variable'' =
j := 2 + i #Short form of set assigns a string value
''expression''", respectively.
k = 2 + i #Short form of eval evaluates an expression
 
set i j k
"external ''variable'' := ''value''" or "external ''variable'' = ''value''" assign
i = 456
a value (i. e. a string) or the result of an expression to an external
j = 2 + i
(non-local) variable even if a local variable with the same name exists.
k = 458
This command can be used to return values from a macro to the calling macro.

Latest revision as of 10:15, 17 August 2009

Synopsis

set variable = value
variable : = value

Description

The statement "set" without parameters lists the names and values of all variables that do not have the value "NULL"; with parameters, "set" lists the names and values of the given variables. In contrast to "show", local variables are listed too.

"set variable = value" gives the variable variable the string value value.

Examples

set i=456
j := 2 + i	#Short form of set assigns a string value
k = 2 + i	#Short form of eval evaluates an expression
set i j k
i = 456
j = 2 + i
k = 458