DO

Function

Invokes the specified procedure.

Syntax

DO procedure_name[(arg1[, argi]...)]

Arguments

procedure_name

Name of the procedure to execute.

arg1 [, argi ]

Arguments to pass to the procedure. Arguments can be any type of variable or constant value.

Description

When the procedure ends, processing continues with the command following DO. You can use arguments to send values to or receive values from a procedure.

Arguments passed by DO to a procedure must match in number:

When a field in DO receives a value back from a procedure (a colon indicates it is a back value—that is, a value that’s being returned), it must be a string, numeric, or date variable, depending on the procedure argument; however, a date can be returned to a string variable and vice versa.

When a date is passed to a string, the date is converted to a string according to the following rules:

Examples

do get_names
do add_to_list ($name)
do print_list ('A', #total, &co_name, $name)

See Also

BEGIN-PROCEDURE for information on passing arguments