Result - i.e. a function call

RESULT statement
RESULT is used to exit from the current process (or procedure) and to return a status report.

This status report can correspond to:

a value.

several values. See Multiple return values for more details.

 

The RESULT statement can be used in:

The closing code of project,

The closing code of window or page,

The closing code of report,

A procedure (conditional test, FOR, FOR EACH, LOOP or WHILE loop, ...).

Example

// Call to a procedure that returns NOTHING if a problem occurs

// Different process according to the return value

Control_Value is string

Control_Value = MyProcess(Control_Name)

IF Control_Value = "Nothing" THEN

Info("No value was calculated")

ELSE

Info("Value of control: " + Control_Value)

END

// -- MyProcess procedure

PROCEDURE MyProcess(Control)

IF Control..Type = typInputText THEN

RESULT Control..Value

ELSE

RESULT "Nothing"

END

Syntax

Procedure

PROCEDURE <Procedure name> ([<Parameter>])

IF <Condition> THEN

   RESULT <Value(s) to Return>

ELSE

   RESULT <Value(s) to Return>

END