Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>procedure</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PROCEDURE


Syntax:     PROCEDURE <procedure>
               <statements>...
            [RETURN]

Purpose:    To identify the beginning of a procedure.

Argument:   <procedure> is the name of the procedure.  The name can
            be up to 10 characters in length and must begin with an
            alphabetic character.

            Each name must be unique from all other procedures,
            functions, programs, and formats within the same
            application.

Usage:      A PROCEDURE is any executable block of code beginning with
            the statement PROCEDURE <procedure name> and can occur
            anywhere in a program file, but cannot be nested within
            other procedures.

            To terminate execution and branch back to the calling
            procedure, execute a RETURN.  When compiling, Clipper
            assigns all statements to the specified procedure until it
            encounters another PROCEDURE or FUNCTION, or the end of the
            source file is reached.

Library:    CLIPPER.LIB


----------------------------------- Example --------------------------------

   The following demonstrates a main procedure calling two subprocedures
   that follow within the same program file:

   * Main.prg
   DO Proc1
   DO Proc2
   RETURN


   PROCEDURE Proc1
   ? "Proc one"            && Result: Proc one
   RETURN


   PROCEDURE Proc2
   ? "Proc two"            && Result: Proc two
   RETURN


See Also: DO FUNCTION SET PROCEDURE

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson