The Hyper Programming Language |
home | language reference | compiler | hyper on launchpad |
This is the class reference of built-in type int.
sealed class int : object
This class represents a signed native integer.
procedure new()
Default constructor. Creates an int with value 0.
procedure new(i : * int)
Copy constructor.
implicit procedure new(b : byte)
Implicit conversion constructor.
implicit procedure new(i : int16)
Implicit conversion constructor.
implicit procedure new(i : int32)
Implicit conversion constructor.
implicit procedure new(n : nat16)
Implicit conversion constructor.
const procedure abs() : nat
Returns the absolute value of the signed number.
procedure turnSign()
Turns the sign of this number. A negative number becomes positive and a positive number becomes negative.
Warning: this is preliminary syntax with the purpose of documenting the operators of this class. Nothing official yet!
const operator+() : int
Unary plus.
const operator-() : int
Unary minus.
const operator++() : int
Successor.
const operator--() : int
Predecessor.
not yet documented
operator++()
Increment operator.
operator--()
Decrement operator.
operator=(i : int)
Simple assignment operator.
operator+=(i : int)
Add-assign operator.
operator-=(i : int)
Subtract-assign operator.
operator*=(i : int)
Multiply-assign operator.
operator/=(i : int)
Divide-assign operator.
operator%=(i : int)
Modulo-assign operator.