xHarbour Reference Documentation > Command Reference |
Executes a function or procedure.
DO <ProcedureName> [WITH <params,...>]
The DO command exists for compatibility reasons. It executes the function or procedure having the symbolic name <ProcedureName> and passes the parameters specified as <params,...> on to it.
Note: it is recommended to use the execution operator instead of the DO command.
See also: | ( ), FUNCTION, PROCEDURE |
Category: | Statements |
Source: | vm\do.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates two possibilities of calling // a subroutine. The first uses the DO command while the // second uses the () execution operator. PROCEDURE Main // Procedural syntax DO Test WITH "Hello", "World" // Functional syntax Test( "Hi", "There" ) RETURN PROCEDURE Test( c1, c2 ) ? c1, c2 RETURN
http://www.xHarbour.com