Products Downloads


French version


 

 

ADELIA

VADELIA

SADELIA

WADELIA

MADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(I) (C/S)

 

Section for use

All

 

Syntax

REDO

 

Description

This instruction marks the end of a processing block of an iteration.

 

For each DO_WHILE instruction you must have a corresponding REDO instruction.

When the program finds a REDO instruction, it returns control to the associated DO_WHILE instruction.

 

Important note: Although it is possible to use the END instruction in place of the REDO instruction in ADELIA programs, for greater clarity and coherence, we recommend using the END instruction in conjunction with the IF instruction, and the REDO instruction in conjunction with the DO_WHILE instruction.

 

Example

a) Simple expression:

*

READ_EQUAL ORDERS

DO_WHILE CODE START_WITH 'S'

PRINT_VIEWS LINE_FORMAT

READ_EQUAL ORDERS

REDO

 

b) Complex expression:

*

DO_WHILE CODE = 'S' AND ( EMPLOY_CATEGORY > 300 OR PAY_TYPE = 'D' )

TOTAL_AMOUNT = TOTAL_AMOUNT + ( SALARY_AMNT * 12 )

TOTAL_DAYS = TOTAL_DAYS + EMPLOYEE_DAYS

REDO

 

c) Condition using nested loops:

*

POSITION_BEFORE ORDER_HEADING

DO_WHILE ORDER_HEADING EXISTS

PRINT_VIEWS HEADER

*

POSITION_BEFORE ORDER_DETAIL

DO_WHILE ORDER_DETAIL EXISTS

PRINT_VIEWS DETAIL

READ_EQUAL ORDER_DETAIL

REDO

*

READ_EQUAL ORDER_HEADING

REDO

 

↑ Top of page


  • Aucune étiquette