div Mod frac Microsoft Dynamics AX X++

 

static void POR_div_Mod(Args _args)

{

    Real    i = 550;

    Real    x = 100;

    Real    j,s,k;


    j = i/x;

    s = i div x;

    k = i mod x;


    info(strfmt("%1 / %2  = %3 ",i,x,j));

    info(strfmt("div %1 ",s));

    info(strfmt("frac %1 ",frac(j) ));

    info(strfmt("Mod %1 ", k));


    /*

    550.00 / 100.00  = 5.50

    div 5.00

    frac 0.50

    Mod 50.00

    */

}

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

เริ่ม ต้นเขียนโปรแกรมกับ กับ X++

date Functions Axapta X++