[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DO

    To execute a procedure.

Syntax

    DO <procedure> [WITH <parameter list>]

Arguments

    <procedure> is the name of the procedure to execute.  This can be a
    procedure written in Clipper, C, or assembly language.

Option

    With: Specifies a <parameter list> of up to 128 items allowing you
    to pass memory variables or the results of expressions as parameters.
    Memory variables can either be passed by reference or value.

Usage

    Passing parameters: Using the WITH clause passes parameters to the
    specified procedure evaluating each expression before branching.  To
    optionally capture the passed parameters in a Clipper procedure, there
    must be a PARAMETERS statement followed by the list of variables to
    receive the passed references or values.  If the passed parameter is an
    expression, field, or memory variable bounded by parentheses, it is
    evaluated and its value passed to the called procedure.  If the
    parameter is a memory variable not bounded by parentheses, it is passed
    by reference and any changes to the receiving variable are reflected in
    the source variable when the calling procedure terminates.  Note that
    fields can only be passed by value and not be reference.

    See PARAMETERS for a more detailed discussion of passing parameters.

    Compiling: When Clipper encounters a DO statement and the specified
    procedure is not already known, it searches the current directory for a
    (.prg) file  with the same name and compiles it if it is found.
    Otherwise the called procedure is assumed to be an external.  Note that
    when you link, the linker will expect to resolve this external
    reference.

See Also: PARAMETERS PRIVATE PROCEDURE PUBLIC RETURN SET PROCEDURE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson