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

 Synopsis

         Declare method(s) with same named message(s)
         (inside class specification)

 Syntax

         METHOD <method name list> [CONSTRUCTOR | CTOR]

 Arguments

         <method name list> is a list of methods to be declared. Each
         such method should be defined later in the same module using the
         METHOD definition command.

 Description

         This command is used within a class specification to declare one
         or more methods for that class. Once a method has been declared
         using this command, the actual code of the method must be defined
         using the METHOD definition command (see next entry).

         Methods declared and defined in this way can be invoked by sending
         a message of the same name as the method to an instance of the
         class.

         With Class(y), the name of a message and the name of the
         associated method is usually the same, and the METHOD command
         assumes this. See the MESSAGE...METHOD command for information
         about declaring messages whose methods have a different name.

         It is strongly recommended that methods declared using this syntax
         are defined in the same program module as the class specification.
         See the section External Methods for alternatives.

         If the optional CONSTRUCTOR clause is included (or its
         abbreviation CTOR), then the message is flagged as a
         constructor message. See Constructor Messages for more
         information.

 Note

         This form of the METHOD command is referred to as a method
         declaration command, and is only valid inside a class
         specification. After the class specification, the METHOD
         command is treated as a method definition command (described
         in the following entry).

 See Also

         MESSAGE...METHOD, METHOD (definition), External
         Methods, Constructor Messages


See Also: MESSAGE...METHOD METHOD (definition) External Methods Constructor Messages
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson