gmplFieldStatement

Field Statement Summary

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:

Attribute Description
Id This 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.
Type This attribute is a Type attribute as discussed on the Declaration page. It specifies the type of the field.
Status This attribute is the Status attribute as discussed on the Declaration page. It specifies the various context flags to be associated with the field.
NetName This attribute is the identifier of the field 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 field.
MigComment This 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.
MigPattern This 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.
CshPattern This 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.
VbnPattern This 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.
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.
Canbenull This 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.
External This 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:

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


Table of Contents