Jul.10.2018 -- CAlive to introduce /% : divide-modulo operator

10 views
Skip to first unread message

Rick C. Hodgin

unread,
Jul 10, 2018, 2:41:13 PM7/10/18
to CAlive Programming Language
CAlive will introduce the /% : operator, which performs a divide and returns the divide value, and also separately stores the modulo remainder.

    s32 a, b, c, remainder;

    // Store the result of a/b to c, and store the remainder
    c = a /% b : remainder;

    // The above is the equivalent to this code:
    c         = a / b;
    remainder = a % b;

-- 
Rick C. Hodgin

Reply all
Reply to author
Forward
0 new messages