call

The call command calls a function in the program.

Syntax

call function-name ( [ expression [,...] ] )
  1. function-name is the name of the function to call.
  2. expression is a combination of variables, constants and operators.

Usage

The call command invokes a function of the program and returns the control to the debugger.

The return values of the function are printed as a comma-separated list delimited by curly brackets.

Example

MAIN
  DEFINE i INTEGER

  LET i = 1 
  DISPLAY i 
END MAIN
 
FUNCTION hello ()
  RETURN "hello", "world"
END FUNCTION
(fgldb) br main 
Breakpoint 1 at 0x00000000: file t.4gl, line 4.
(fgldb) run 
Breakpoint 1, main() at t.4gl:4 
4         LET i = 1
(fgldb) call hello()
$1 =  { "hello" , "world" }
(fgldb)