Variable Names
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
The name, or identifier, for a variable points to a memory location where information of a specific data type is stored. The syntax rules for variable names are as follows:
Names must be limited to ASCII letters, digits, and the underscore character (_), all with hex values of 0x7F or less.
Letters can be either uppercase or lowercase.
Names are not case sensitive. For example, aa and AA are treated as the same name.
The first character must be either a letter or the underscore character.
Variable names can be thousands of characters long.
The following four variables that are declared in the myMethod method have valid names in X++:
private void myMethod(int _, str _myParameter2)
{
str I;
str XppAllowsVeryLongVariableNamesWhichTireOurFingers;
…
}
According to convention, variable names should begin with a lowercase letter. Variables of specialized types should be named like these examples:
CustInvoiceJour custInvoiceJour;
CustTable custTable;
For more information, see Naming Conventions: Variables.
See also
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.