User Tools

Site Tools


jvs:fscan:manual:chapter2:if

Differences

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

Link to this comparison view

jvs:fscan:manual:chapter2:if [2011/03/31 14:49]
127.0.0.1 external edit
jvs:fscan:manual:chapter2:if [2023/02/23 18:43]
Line 1: Line 1:
-**fScan Reference Manual, Chapter 2 (CmdLineOptions): if** 
-===== If -- Test some condition before executing commands ===== 
-**usage:** -if EXPR { COMMANDS }\\ 
-**or:** -if ! EXPR { COMMANDS } 
-===== ===== 
-The EXPR argument to IF must be an expression that will yield a numerical value. 
  
-If EXPR > 0, the COMMANDS string inside the curly brackets will be executed next.\\ 
-If EXPR <= 0, the COMMANDS string will be ignored. 
- 
-EXPR can be a single number, an arithmetic expression, or a [[jvs:fscan:manual:chapter1:status|status query]]. The EXPR argument must not contain any spaces within it. Examples of valid EXPR arguments are: 
-  $xdim                - data set image width 
-  ?taskname            - query whether the TASKNAME variable is set for the current data set 
-  $zdim-30             - true if there more than 30 slices (ZDIM) 
-  exists(param.tmp)    - true if file "param.tmp" exists 
- 
-If '!' appears before the EXPR argument, the IF condition is true if EXPR is 0.\\ 
-Note: the '!' must be separated from IF and EXPR by spaces. 
- 
-**See Also:**\\ 
-[[jvs:fscan|fScan Home]],  
-[[jvs:fscan:manual|fScan Manual]],  
-[[jvs:fscan:manual:chapter2|CmdLineOptions]],  
-[[jvs:fscan:manual:help|Manual Help]] 
jvs/fscan/manual/chapter2/if.txt · Last modified: 2023/02/23 18:43 (external edit)