LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Miss types in Help.

    Employee
    Posted 05-26-2011 04:19

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Papazol

    Functions->Numeric Operators->subtract:
    Example(s): subtract(5, 7) # value: -12 (has to be 2)
    subtract(7, long(5), -10) # value: -12 (has to be 2) (long)


  • 2.  RE: Miss types in Help.

    Employee
    Posted 05-26-2011 05:16

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Actually, the first entry should be:

    subtract(5, 7)	# value: -2
    The second entry is correct, as it will return 12 (it actually says 12 in the documentation I'm looking at, not -12).

    subtract(a, b, c)
    Equates to a - b -c

    So
    subtract(5,7) = 5 -7 = -2.
    subtract(7, (long)5, -10) = 7 - 5 - (-10) = 2 + 10 = 12
    I'll raise a doc bug about the first example.
    Tim.