It is a little bit weird how X++ compiler handles the case when macros with the same name are defined in the class declaration of a class and in the one of its methods. The expected behavior for me is to either not allow to do that or to have a macro from class declaration to be applicable everywhere except for the method where it is redefined. But in AX the value defined in the method will overwrite the value defined in the class declaration and will be the same in all methods.
Example:
class TestDefine
{
#define.A(‘A’)
}
public void method1()
{
;
info(#A);
}
public void method2()
{
#define.A(‘B’)
;
info(#A);
}
If method1 or method2 will be called the ‘B’ will be received in the infolog and not ‘A’.
The next question will be what if define is overwritten in several methods. The answer is that the result is undetermined. It depends on X++ compiler internal flow and cannot be predicted. So, just avoid such constructions and even better avoid defines at all.
canada goose, bottega veneta, ghd, hollister, moncler, ugg, canada goose outlet, north face outlet, ugg boots, soccer shoes, canada goose, chi flat iron, uggs outlet, insanity workout, canada goose uk, new balance shoes, iphone 6 cases, north face jackets, babyliss pro, lululemon outlet, air max, beats by dre, marc jacobs, moncler, asics running shoes, moncler outlet, giuseppe zanotti, valentino shoes, jimmy choo outlet, celine handbags, p90x, birkin bag, mcm handbags, reebok outlet, ugg australia, wedding dresses, canada goose, soccer jerseys, ugg boots, rolex watches, mont blanc, nfl jerseys, instyler, ugg pas cher, moncler, timberland boots, herve leger, baseball bats, canada goose jackets, ferragamo shoes
ReplyDeletesac louis vuitton
ReplyDeletereplica rolex watches
ray ban sunglasses outlet
coach outlet online
true religion outlet
ralph lauren outlet
patriots jerseys
bulls jerseys
michael kors handbags
canada goose sale
201612.10chenjinyan
Embedded system training in chennai
ReplyDeleteBest Embedded system training in chennai
Embedded training in chennai
Embedded system training institute in chennai
Embedded system
Embedded training
Embedded system courses in chennai
Matlab training in chennai
Arduino training in chennai
Autocad training in chennai
Best embedded training in chennai