Interface SignedInt
access this type via: data.SignedInt (provides, requires or uses)
An object to represent and manipulate signed host-size integers (Dana primitive integers are all unsigned).
Functions
SignedInt(optional int val, int neg)
int subtract(int val)
int add(int val)
int multiply(int val)
int divide(int val)
int getValue()
void setValue(int v)
bool isNegative()
void invert()
byte[] getBytes()
SignedInt(optional int val, int neg)
Creates a new signed integer instance, initialised either from an absolute value (val) or from a positive value which should be made negative (neg).
int subtract(int val)
Subtract a given signed integer value from this instance's current value.
int add(int val)
Add a given signed integer value to this instance's current value.
int multiply(int val)
Multiply this instance's current value by a given signed integer value.
int divide(int val)
Divide this instance's current value by a given signed integer value.
int getValue()
Get the value of this signed integer, as an int4, suitable for use as a parameter to other SignedInt4 instances.
void setValue(int v)
Set the value of this signed integer.
bool isNegative()
Test is this signed integer instance currently holds a negative value.
void invert()
Invert the sign of this signed integer instance, changing it from positive to negative, or vice-versa.
byte[] getBytes()
Get the raw bytes of this signed integer instance.