5.3.16. If List
Purpose:
Depending on the given condition, it runs the first
or second list of instructions. It can be used inside List
instructions. It is used to build tables from lists.
Syntax:
If [not] List <condition>
<list_of_instructions>
[Else [<list_of_instructions>]]
EndIf [List]
where
<condition>= | row <table_item_values> |column <table_item_values> |index <table_item_values> |start |end |
<table_item_values> = odd|even|<number_list>
Example:
<!** If List row odd>
Odd row
<!** Else>
Even row
<!** EndIf>
<!** If List row 1 4 5>
Row is 1, 4 or 5
<!** Else>
Row is 2, 3 or bigger than 5
<!** EndIf>
<!** If List start>
Draw table head
<!** Else>
Draw table row
<!** EndIf>
Building a table:
<!** List columns 3 ... >
<!** If List start> <-- start table --> <table> <!** EndIf>
<!** If List column 1> <-- start new row --> <tr> <!** EndIf>
<td> write text/data here </td>
<!** If List column 3> <-- close row --> </tr> <!** EndIf>
<!** If List end> <-- end table --> </table> <!** EndIf>
<!** EndList>
Constraints:
Can only be used only inside List statements.
There are no user contributed notes for this page.