How To Call Procedures

How To Call Procedures

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

How To Call Procedures

The syntax of a call to a procedure is

procname («expression»)

Parameters

procname

The name assigned to the procedure in its PROCEDURE or LOCALPROCEDURE command.

expression

Any value expression.

Comments

The list of expressions must be enclosed in parentheses; even when no expressions are required, the parentheses must still appear.

At the prompt level, you can issue a call to the main procedure of any procedure program.

Within a procedure program, you can issue a call to

  • any local procedure in the current program

  • the main procedure in the current program

  • the main procedure in any other procedure program

Any procedure in a procedure program can issue a call to itself.

In a call to a procedure, you must supply one expression for each parameter specified in the PROCEDURE or LOCALPROCEDURE command that describes the called procedure. The number and type of expressions listed in the call to a particular procedure must match the number and type of parameters in the PROCEDURE command in order for the procedure to execute. The value of expression can be assigned to the corresponding parameter (IN parameters), or expression can take on the value of the corresponding parameter when the procedure ends (OUT parameters), or both (INOUT parameters).

When you specify more than one expression, each must be separated from the next by a comma.

 

See Also

Conventions

LOCALPROCEDURE

PROCEDURE

TRANSFORM

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese