Skip to content

gmplFieldStatement

Field is a terminal declaration statement that occurs within Class statements. They appear only in LocalDecriptionFiles — descriptions of external references whose source was a VB6 project within the code set being processed. The source of fields are global class variables. In the source code they are referenced in exactly the same way as InOut properties. There are two important differences, however, between variables and properties. .NET does not allow settable properties to be passed ByRef and does not allow fields to belong to interfaces. The Field statement declares these global variables and stubs them as global variables so that they can be passed ByRef. In interfaces, however, and in every other context they are treated as InOut properties.

The attributes of the Field statement are as follows:

AttributeDescription
IdThis attribute is the identifier of the field. It must be unique within the scope of the class
containing it. The identifier is not case-sensitive.
TypeThis attribute is a Type attribute as discussed on the Declaration page. It
specifies the type of the field.
StatusThis attribute is the Status attribute as discussed on the Declaration page. It
specifies the various context flags to be associated with the field.
NetNameThis attribute is the identifier of the field to be used when declaring or referring to it
in the target language.
MigNameThis attribute is identical to NetName. If both are used in the declaration the Migname
takes precedence.
MigStatusThis attribute is a MigStatus attribute as discussed on the Declaration page. It
contains generalized migration settings for the field.
MigCommentThis deprecated string attribute associates a comment with the field. This comment does not
trigger the gmNI event handlers and can interfere with the MigStatus attribute.
MigPatternThis string attribute associates a surface pattern string with code references to the field. See
the Patterns page for details on the content of pattern strings. It is equivalent to the All
pattern.
CshPatternThis string attribute associates a surface pattern string with code references to the field. See
the Patterns page for details on the content of pattern strings. It is equivalent to the Csh
pattern.
VbnPatternThis string attribute associates a surface pattern string with code references to the field. See
the Patterns page for details on the content of pattern strings. It is equivalent to the Vbn
pattern.
NpramThis integer attribute specifies the number of parameters associated with the surface pattern strings.
RoleThis 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.
PatstatusAn 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.
CanbenullThis is an On/Off flag attribute. The On setting sets the CanbeNull status flag
On. This means that checks of the field value for being empty can be Null as well.
References to them in the intermediate code have to be checked if they are Null or Empty.
ExternalThis is an On/Off flag attribute. The On setting sets the External status
flag On. This means that the field is external to the class in the target implementation to
which it was assigned in the source implementation. Therefore, when authoring the identifier
of the field do not precede it with its source parent membership information. The use of this
attribute assumes that the MigName attribute was used as well to supply a qualified
target language name.

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

ErrorDescription
1141Property command missing required id attribute.
1142Unable to store property vector: %1d