Export (0) Print
Expand All

Variable Names [AX 2012]

Updated: September 23, 2011

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.


Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show:
© 2014 Microsoft