Jaa


X++ Language Programming Guide

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

X++ is an object-oriented language with similarities to C#. X++ is part of the MorphX development platform that you use to construct accounting and business management systems.

The memory management model of X++ is simple. Objects are created with a new operator. There are no explicit programmer-defined pointer data types, and there is no pointer arithmetic.

X++ provides system classes for a broad range of system programming areas, a few of which are as follows:

  • File input and output.

  • Reflection on classes and tables.

  • Manipulation of user interface items such as forms and reports.

  • Dynamic array support.

  • Collections of objects.

  • XML building and parsing.

In addition to its system classes, Microsoft Dynamics AX also provides application classes for managing many types of business processes. For reference information about the system and application classes in Microsoft Dynamics AX, see Classes.

X++ programmers can access the relational tables in Microsoft Dynamics AX. X++ includes keywords that match most of the keywords in standard SQL. For information about X++ SQL keywords, see Data Selection and Manipulation and the table of contents underneath it. For reference information about the tables in Microsoft Dynamics AX, see Tables.

X++ code is checked for syntax errors during compile time. The compile process also performs best practice checks. Violations of best practices can generate compiler messages. For more information, see Best Practices for Microsoft Dynamics AX Development.

The X++ runtime execution engines have automatic mechanisms to discard objects that are no longer referenced, so that their memory space can be reused.

Microsoft Dynamics AX supports interoperability between classes written in X++ and in C# (or other .NET Framework languages). For more information, see .NET Interop from X++ and Proxy Classes for .NET Interop to X++.

In This Section

Variables and Data Types

Statements and Loops

Operators

Data Selection and Manipulation

Attributes on X++ Types and Methods

Classes and Methods

Event Terminology and Keywords

X++, C# Comparisons

Functions and Macros

X++ Syntax

X++ Compiled to .NET CIL

X++ Scenarios that are Not Supported in CIL

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.