HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file data.SignedInt by barry
expand copy to clipboardexpand
/* { "description" : "An object to represent and manipulate signed 32-bit integers (Dana primitive integers are all unsigned)." } */

interface SignedInt {
	/* { "@description" : "Creates a new signed integer instance, initialised either from an absolute value (val) or from a positive value which should be made negative (neg)." } */
	SignedInt(opt int val, opt int neg)
	
	/* { "@description" : "Subtract a given signed integer value from this instance's current value." } */
	int subtract(int val)
	
	/* { "@description" : "Add a given signed integer value to this instance's current value." } */
	int add(int val)

	/* { "@description" : "Multiply this instance's current value by a given signed integer value." } */
	int multiply(int val)

	/* { "@description" : "Divide this instance's current value by a given signed integer value." } */
	int divide(int val)

	/* { "@description" : "Get the value of this signed integer, as an int4, suitable for use as a parameter to other SignedInt4 instances." } */
	int getValue()

	/* { "@description" : "Set the value of this signed integer." } */
	void setValue(int v)

	/* { "@description" : "Test is this signed integer instance currently holds a negative value." } */
	bool isNegative()

	/* { "@description" : "Invert the sign of this signed integer instance, changing it from positive to negative, or vice-versa." } */
	void invert()
	
	/* { "@description" : "Get the raw bytes of this signed integer instance." } */
	byte[] getBytes()
	
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n data.SignedInt -m "reason for update" -u yourUsername
Version 3 by barry
Version 2 by barry
Version 1 (this version) by barry
Notes for this version: New compiler components