gmplMethodStatement

Method Statement Summary

Method is a nonterminal, declaration statement that occurs within Class statements and within the refactoring statement Migclass. It is also used within metalanguage class declarations and has some attributes that are only used in that context. A method is a coded procedure that may have arguments associated with it and that may return a value. The role of the declaration here is to specify those arguments, return value type. and any other needed migration/metalanguage information. What the method actually does, the code associated with its implementation, is not of interest here.

The attributes of the Method statement are as follows:

Attribute Description
Id This attribute is the identifier of the method. It must be unique within the scope of the class containing the method. The identifier is not case-sensitive.
Type This attribute is a Type attribute as discussed on the Declaration page. It specifies the return type of the method. Subprograms, methods that return no value, have a type Void.
Status This attribute is the Status attribute as discussed on the Declaration page. It specifies the various context flags to be associated with the method.
NetName This attribute is the identifier of the method to be used when declaring or referring to it in the target language.
MigName This attribute is identical to NetName. If both are used in the declaration the Migname takes precedence.
MigStatus This attribute is a MigStatus attribute as discussed on the Declaration page. It contains generalized migration settings for the component
MigComment This deprecated string attribute associates a comment with the method. This comment does not trigger the gmNI event handlers and can interfere with the MigStatus attribute.
MigPattern This string attribute associates a surface pattern string with code references to the method. See the Patterns page for details on the content of pattern strings. It is equivalent to the All pattern.
CshPattern This string attribute associates a surface pattern string with code references to the method. See the Patterns page for details on the content of pattern strings. It is equivalent to the Csh pattern.
VbnPattern This string attribute associates a surface pattern string with code references to the method. See the Patterns page for details on the content of pattern strings. It is equivalent to the Vbn pattern.
Npram This integer attribute specifies the number of parameters associated with the surface pattern strings.
Role This attribute contains an optional keyword describing the overall role of the operation being authored via the surface pattern strings: Unknown, Property, Method, Define, Utility, Command, Constant, Function, Event, Control, Collection, Resource, Index, or Migclass. The default is None.
Patstatus An optional keyword describing the overall status of the operation authored via the surface pattern strings: Ok, Delete, Deprecated, NotImplemented, MustCorrect, NotIdent, Postfix, or NeedsPren. The default is Ok.
OverrideUser This is an On/Off flag attribute. The On setting sets the OverrideUser status flag On. For components that are used to satisfy Implementation requirements, this flag forces the component to have the attributes as specified in the interface as opposed to as specified in the user code.
Overload This is an On/Off flag attribute. The On setting sets the Overload context flag On. The method needs to be explicitly given the Overload adornment when declared.
Overridecall This is an On/Off flag attribute. The On setting sets the CastType status flag On. This means that the method does not require type casts when setting its values.
Canbenull This is a On/Off flag attribute. The On setting sets the CanbeNull status flag On. This means that checks of the return value for being empty can be Null as well. References to them in the intermediate code have to be checked if they are they are Null or Empty.
Opcode This attribute is only used with metalanguage declarations. It specifies the actual opcode.subcode byte pair to be issued by references to the method as opposed to the normal call operations.
Syntax This attribute indicates that the method uses special syntax for specifying its arguments. The syntax types are Line, Pset, Scale, Print, and Event.

The declarations within the Method statement are as follows:

Substatement Description
Argument Defines one of the method arguments.

The script errors associated with the Method statement are as follows:

Error Description
1130 Method command missing required id attribute.
1131 Unable to store METHOD vector: %1d
1132 The syntax cannot be found.
1133 The subprogram type is undefined.
1134 Encountered following when expecting 'argument': %1d


Table of Contents