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:39]
voyvodic
jvs:fscan:manual:chapter1:stringsubst [2023/02/23 18:43] (current)
Line 19: Line 19:
   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
  
  
jvs/fscan/manual/chapter1/stringsubst.1544643596.txt.gz · Last modified: 2018/12/12 19:39 by voyvodic