Macros as Array in Dynamics Ax 2009


static void Job1(Args _args)
{
    #define.new(1)
    #define.new(10)
    #define.new(65)
    #define.new(20)
    #define.new(66)
    str s = ‘ABCD’;
    int len;
    int i;
    int num;
    Array   arr = new Array(Types::String);
    str s1;
    ;

    len = strlen(s);
    for(i = 1; i<=len; i++)
    {
        s1  = substr(s,i,1);
        num = char2num(s1,1);
        if(num == #new)
        {
            arr.value(num,s1);
        }
    }
}