How to: Use the #linenumber Directive [AX 2012]
Updated: October 29, 2009
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
You can use the #linenumber directive during your development and debugging of code. It is replaced by the physical line number in the code file.
For this topic, you must understand the information in How to: Use a Macro Value.
The following X++ code sample shows the behavior of the #linenumber directive.
static void LinenumberPhysicalJob(Args _args)
{
;
#define.Debug(light)
#if.Debug
info("Physical Line 8: # linenumber == "
+ int2Str(#linenumber));
#endif
/****************** Actual Infolog output
Message (08:55:26 pm)
Physical Line 8: # linenumber == 8
******************/
}
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.
Community Additions
ADD
Show: