User Tools

Site Tools


jvs:fscan:manual:chapter4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
jvs:fscan:manual:chapter4 [2021/12/15 22:15]
voyvodic
jvs:fscan:manual:chapter4 [2023/02/23 18:43] (current)
Line 13: Line 13:
 ==== Accessing data variables ==== ==== Accessing data variables ====
 In general, data variable values can be accessed by specifying the name of the variable, preceded by the '$' character (or '_' character to make command-line scripting easier).  To get the status of a variable, substitute '?' for '$'; the status is -1 if the named variable is not defined, it is 0 if it is defined but empty, and it is a positive value (the size of the variable) if it is defined and not empty. In general, data variable values can be accessed by specifying the name of the variable, preceded by the '$' character (or '_' character to make command-line scripting easier).  To get the status of a variable, substitute '?' for '$'; the status is -1 if the named variable is not defined, it is 0 if it is defined but empty, and it is a positive value (the size of the variable) if it is defined and not empty.
- 
-For example:\\ 
-  * -echo Window: $thiswin WorkSpace $wsnum         ; display name and workspace of current active window 
-  * -echo Varb: ?curdir ?thiswin ?myvarb            ; test whether these variables are defined 
  
 Variable operators:                Variable operators:               
   * $varbname - the value of the named variable (_varbname works the same)   * $varbname - the value of the named variable (_varbname works the same)
   * ?varbname - the status of the named variable (0=undefined, 1=defined)   * ?varbname - the status of the named variable (0=undefined, 1=defined)
 +
 +For example:\\
 +  * -echo Window: $thiswin WorkSpace $wsnum         ; display name and workspace of current active window
 +  * -echo Varb: ?curdir ?thiswin ?myvarb            ; test whether these variables are defined
  
 The '$' character is also used to identify fScan special functions of the form: $funcname(). Examples are: The '$' character is also used to identify fScan special functions of the form: $funcname(). Examples are:
jvs/fscan/manual/chapter4.1639606548.txt.gz · Last modified: 2021/12/15 22:15 by voyvodic