How to: Use the #linenumber Directive
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.
Prerequisites
For this topic, you must understand the information in How to: Use a Macro Value.
Code Sample for #linenumber
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
******************/
}
See also
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.