Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Macro name changed from html to html-bobswift during server to cloud migration processing.

...

Statement

Description

if

Adds conditional branching of UDM commands.
 
An if statement consists of:

Html bobswift
<ol>
<li> Comparison operation.
<li> Series of UDM commands that are carried out if the comparison operation evaluates to true.
<li> *end* statement that indicates the end of the 
if
Html bobswift
.
</ol>
A comparison consists of three parts:
<ol>
<li> Left\-hand value
<li> Comparator (see 
if Statement Comparators
Html bobswift
)
<li> Right\-hand value
</ol>
The left\-hand and right\-hand values can be either:
<ul>
<li> Variable reference
<li> Variable attribute
<li> Constant
</ul>

The syntax is:
 

Panel

Html bobswift

<pre>
if comparison
   ...
   UDM commands
   ...
end
</pre>

 
If the comparison does not evaluate to true, UDM picks up execution from the line after the end statement.

else

Provides an alternate path, when used as part of an if statement, if the comparison evaluates to false.
 
The syntax is:
 

Panel

Html bobswift

<pre>
if expression
...
[else
...]
end
</pre>

 
In this if statement, the parameter for if is an expression.
 
If the expression evaluates to a value that is not equal to zero, the positive branch is taken; otherwise, the negative else statement branch is taken.

while

Implements a simple while loop.
 
The syntax is:
 

Panel

Html bobswift

<pre>
while expression
...
end
</pre>

 
In this case, the loop iterates (executing the commands between the while and end statements) as long as the expression evaluates to a value that is not zero.
 
If the expression evaluates to a value of zero, code execution picks up at the point immediately following the end of the while loop.

fordata

Iterates through a data element, once for each line.
 
For each iteration, a variable provided by the user is set to hold the contents of the line in the data element corresponding to the current iteration.
 
The syntax is:
 

Panel

Html bobswift

<pre>
fordata variable-name=data-element
...
end
</pre>

forfiles

Iterates through a series of statements for each file found that matches a given file specification.
 
The syntax is:
 

Panel

Html bobswift

<pre>
forfiles logical_name=file_spec
         [sortby=attribute-name[,ascending|descending]]
   ...
   UDM commands
   ...
end
</pre>

subroutine

Names a subroutine and defines the script code that becomes associated with that subroutine name.
 
The syntax is:
 

Panel

Html bobswift

<pre>
subroutine name
[script line 1]
...
[script line 2]
endsub
</pre>

callsub

Carries out the work of lines of script associated with a subroutine.
 
The syntax is:
 

Panel

Html bobswift

<pre>
callsub name
</pre>

Table Cell (td)

Table Row (tr)

...