TODO Comments for X++ Developer Tasks
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
The Microsoft Dynamics AX X++ language compiler recognizes the string TODO when it occurs at the start of a comment. The TODO string prompts the X++ compiler to report the rest of the comment text on the Tasks tab, which is located in the Compiler output window of the client. The Tasks tab also reports the line number in the code where the TODO comment can be found.
Rules for Using TODO
The rules for using TODO in comments are as follows:
The TODO string can appear in either the // or the /* */ style of comment.
The TODO string must be the very first non-white space string in the comment. White space is considered to be a carriage return, a line feed, a tab, or a space.
No white space is required between the start of the comment and the TODO.
The TODO string is case insensitive. However, the convention is to write TODO in all uppercase letters, instead of ToDo or another variation.
The TODO string can have any characters appended to it, but the convention is to either append a colon, or for a white space to follow.
The rest of the comment after the TODO string is reported as the task description. If the comment is longer than 200 characters, it might display truncated in the Tasks tab.
The TODO task description can be spread over multiple lines when the /* */ comment style is used.
Examples
The following table shows examples of using TODO in the // or the /* */ style of comment.
// TODO |
/* TODO */ |
---|---|
public boolean isLate() { // TODO: Finish this stub. return true; } |
public boolean isLate() { /* TODO Finish this stub. */ return true; } |
See also
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.