The OpenD Programming Language

muls

Multiply two signed integers, checking for overflow.

The overflow is sticky, meaning a sequence of operations can be done and overflow need only be checked at the end.

  1. int muls(int x, int y, bool overflow)
    nothrow @safe @nogc pure pragma(inline, true)
    int
    muls
    (
    int x
    ,
    int y
    ,
    scope ref bool overflow
    )
  2. long muls(long x, long y, bool overflow)
  3. cent muls(cent x, cent y, bool overflow)

Parameters

x int

left operand

y int

right operand

overflow bool

set if an overflow occurs, is not affected otherwise

Return Value

Type: int

the product

Meta