User Tools

Site Tools


jvs:fscan:manual:chapter1:stringsubst

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:chapter1:stringsubst [2018/12/12 19:38]
voyvodic
jvs:fscan:manual:chapter1:stringsubst [2023/02/23 18:43] (current)
Line 10: Line 10:
  
 Set USER variables using the [[jvs:fscan:manual:chapter2:set|SET]] command as:\\ Set USER variables using the [[jvs:fscan:manual:chapter2:set|SET]] command as:\\
-   -set varb1 = value1 +   set varb1 = value1 
-   -set varb2 value2 +   set varb2 value2 
-   -set accept varb3 "Enter VARB3 value"+   set accept varb3 "Enter VARB3 value"
  
 For example:\\ For example:\\
-   set myname "Henry" +  set myname "Henry" 
-   - set fullname "Henry Higgens" +  set fullname "Henry Higgens" 
-   - set myage 42+  set myage 42
  
-Variable names are identified by an initial '$' or '_' character. Either prefix can be used for any variable; the variable is replaced by its string value in both cases. For single-valued variables '$' and '_' behave identically. But if the variable contains multiple words (separated by spaces) then a single '$' variable argument in a command will be converted to multiple single-word arguments, whereas a '_' multi-word variable argument remains a single argument.+Variable names are identified by an initial '$' or '_' character. Either prefix can be used for any variable; the variable is replaced by its string value in both cases. The '_' identifier is recommended if you are specifying a string variable on a fScan command line because the '$' character means something different to shell command interpreters. Otherwise the '$' and '_' identifiers behave identically for single-valued variables. But if the variable contains multiple words (separated by spaces) then a single '$' variable argument in a command will be converted to multiple single-word arguments, whereas a '_' multi-word variable argument remains a single argument.
  
 To perform simple arithmetic simply follow a variable name with '+', '-', '*', or '/' and a number value (no spaces). For example To perform simple arithmetic simply follow a variable name with '+', '-', '*', or '/' and a number value (no spaces). For example
-   \-set newage $myage+3 +   set newage $myage+3 
-   \-echo Image center is $xdim/2 $ydim/2 $zdim/2+   echo "Image center location is:" $xdim/2 $ydim/2 $zdim/2
  
  
 **See Also:**\\ **See Also:**\\
 +[[jvs:fscan:manual:chapter2:set|SET command]] 
  
 [[jvs:fscan|fScan Home]],  [[jvs:fscan|fScan Home]], 
jvs/fscan/manual/chapter1/stringsubst.1544643525.txt.gz · Last modified: 2018/12/12 19:38 by voyvodic