The OpenD Programming Language

BigInt.opOpAssign

Implements assignment operators from built-in integers of the form BigInt op= integer.

  1. BigInt opOpAssign(T y)
    struct BigInt
    pure nothrow @safe return scope
    opOpAssign
    (
    string op
    T
    )
    (
    T y
    )
    if (
    (
    op == "+" ||
    op == "-"
    ||
    op == "*"
    ||
    op == "/"
    ||
    op == "%"
    ||
    op == ">>"
    ||
    op == "<<"
    ||
    op == "^^"
    ||
    op == "|"
    ||
    op == "&"
    ||
    op == "^"
    )
    &&
    )
  2. BigInt opOpAssign(T y)

Examples

auto b = BigInt("1_000_000_000");

b += 12345;
assert(b == BigInt("1_000_012_345"));

b /= 5;
assert(b == BigInt("200_002_469"));

Meta