Loop Utility Expression Tokens

 

Loop utility expression tokens are expressions that are available for use inside any loop construct, and allow you to test things relating to the status of the current loop.

The loop utility expressions are:

Expression

Description

<IF FIRST>

The first iteration of the loop is currently being processed.

<IF LAST>

The last iteration of the loop is currently being processed.

<IF MORE>

There are more loop iterations to be processed.

<IF NOMORE>

There are no more loop iterations to be processed (same as <IF LAST>).

<IF PROCESSED_EXCLUSIVE_op_n>

 

Evaluates the number of items already processed by a loop (EXCLUDING the item currently being processed) using a comparison operator and numeric literal value represented here by n. Possible values for op are:

 

  EQ    Equal to

  NE    Not equal to

  LT    Less than

  GT    Greater than

  LE    Less than or equal to

  GE    Greater than or equal to

  DB    Divisible by

 

An example of using this expression is:

 

  <IF PROCESSED_EXCLUSIVE_EQ_10>

     template code

  </IF>

 

<IF PROCESSED_INCLUSIVE_op_n>

 

Evaluates the number of items already processed by a loop (INCLUDING the item currently being processed) using a comparison operator and numeric literal value. For more information on how to use this expression refer to <IF PROCESSED_EXCLUSIVE_op_n>.

 

<IF REMAINING_EXCLUSIVE_op_n>

 

Evaluates the number of items still to be processed by a loop (EXCLUDING the item currently being processed) using a comparison operator and numeric literal value. For more information on how to use this expression refer to <IF PROCESSED_EXCLUSIVE_op_n>.

 

<IF REMAINING_INCLUSIVE_op_n>

 

Evaluates the number of items still to be processed by a loop (INCLUDING the item currently being processed) using a comparison operator and numeric literal value. For more information on how to use this expression refer to <IF PROCESSED_EXCLUSIVE_op_n>.

 

<IF TOTAL_ITEMS_op_n>

 

Evaluates the total number of items that will be processed by a loop (INCLUDING the item currently being processed) using a comparison operator and numeric literal value. For more information on how to use this expression refer to <IF PROCESSED_EXCLUSIVE_op_n>.

 

 

 

Copyright © 2012  Synergex International, Inc.