FIRST function
Returns a TRUE value if the current iteration of a DO, FOR EACH, or REPEAT . . . BREAK block is the first iteration of that block.
Syntax
break-group
ExampleThe
r-first.p
procedure displays the order number, OrderLines on the Order, the extended price of each OrderLine, and a total order value for each Order record:
Because the inner FOR EACH block iterates until the AVM reads all the order-lines, the procedure must set the order-value variable to 0 each time a new order is used in that block. The FIRST function uses the (
qty * price
) expression as thebreak-group
to keep track of whether or not the current iteration is the first iteration of the FOR EACH block.See alsoDO statement, FIRST-OF function, FOR statement, LAST function, LAST-OF function, REPEAT statement
OpenEdge Release 10.2B
|