View source code
Display the source code in std/bigint.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Function std.bigint.BigInt.opCmp
Implements 3-way comparisons of BigInt
with BigInt
or BigInt
with
built-in integers.
int opCmp
(
ref const(BigInt) y
) pure nothrow @nogc const;
int opCmp(T)
(
T y
) const pure nothrow @nogc
if (isIntegral!T);
int opCmp(T)
(
const T y
) const pure nothrow @nogc;
Example
auto x = BigInt("100");
auto y = BigInt("10");
int z = 50;
const int w = 200;
assert(y < x);
assert(x > z);
assert(z > y);
assert(x < w);
Authors
Don Clugston
License
Copyright © 1999-2018 by the D Language Foundation | Page generated by ddox.