[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 METHOD (definition)

 Synopsis

         Begin definition of a method (after a class specification)

 Syntax

         METHOD [FUNCTION|PROCEDURE] <method name>
              [ ( [<parameter list>] ) ]

 Arguments

         <method name> is the name of the method being defined. It must
         be a valid Clipper function name.

         <parameter list> is the optional list of parameters expected
         by the method. If included, it must be surrounded by parentheses.

 Description

         This command is used to begin the definition of a method (the
         actual code of a method). It is usually included in the same
         module (.PRG file) as the class specification. Use of this command
         ensures that the self variable is properly initialized and
         that the method is not directly visible from other modules.

         Methods defined with this METHOD definition command must also
         be declared inside the class specification, using the METHOD
         declarationcommand (see previous entry).

         By default, a method defined with the METHOD definition
         command, without the FUNCTION or PROCEDURE specifier, will
         behave like a Clipper function, in that it must return a value
         using the Clipper RETURN statement. To declare a method which
         does not return a value, the optional PROCEDURE specifier can
         be used. However, it has become a convention to return self
         from methods which have no other return value, eliminating the
         need for the PROCEDURE specifier in most cases.

 Notes

         The METHOD (definition) command also has an extended form
         which is used when defining initializer methods, discussed in
         the Usage Reference.

         Methods declared with this command are internally represented as
         static Clipper functions, so cannot be accessed directly outside
         the module in which they are defined and will not conflict with
         methods or functions declared in other modules.

 See Also

         METHOD (declaration), Initializer Methods


See Also: METHOD (declaration) Initializer Methods
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson