This shows you the differences between two versions of the page.
jvs:fscan:manual:chapter1:stringsubst [2018/12/12 19:38] voyvodic |
jvs:fscan:manual:chapter1:stringsubst [2023/02/23 18:43] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | **fScan Reference Manual, Chapter 1 (Topics): stringsubst** | ||
- | ===== string substitution -- Using string variables in fScan commands ===== | ||
- | |||
- | Character string variables are identified by preceding the variable name with a ' | ||
- | |||
- | There are 3 types of string variables: | ||
- | * preset global variables - fScan control variables (e.g. $fscanhome, $opsys) | ||
- | * data descriptor variables - current image meta-data (e.g. $tr, $xdim) | ||
- | * user-defined variables - obvious | ||
- | |||
- | Set USER variables using the [[jvs: | ||
- | -set varb1 = value1 | ||
- | -set varb2 value2 | ||
- | -set accept varb3 "Enter VARB3 value" | ||
- | |||
- | For example:\\ | ||
- | - set myname " | ||
- | - set fullname "Henry Higgens" | ||
- | - set myage 42 | ||
- | |||
- | Variable names are identified by an initial ' | ||
- | |||
- | To perform simple arithmetic simply follow a variable name with ' | ||
- | \-set newage $myage+3 | ||
- | | ||
- | |||
- | |||
- | **See Also:**\\ | ||
- | |||
- | |||
- | [[jvs: | ||
- | [[jvs: | ||
- | [[jvs: | ||
- | [[jvs: | ||