The Hyper Programming Language

Class ‘nat16’

This is the class reference of built-in type nat16.

Class

sealed class nat16 : object

This class represents an unsigned 16-bit integer (natural number).

Constructors

procedure new()

Default constructor. Creates a nat16 with value 0.

procedure new(n : * nat16)

Copy constructor.

implicit procedure new(b : byte)

Implicit conversion constructor.

Procedures

const procedure truncateToSigned() : int16

Converts the unsigned number to a signed version. The most significant bit is lost.

Operators

Warning: this is preliminary syntax with the purpose of documenting the operators of this class. Nothing official yet!

Unary Operators

const operator+() : nat16

Unary plus.

const operator-() : int32

Unary minus.

const operator++() : nat16

Successor.

const operator--() : nat16

Predecessor.

Binary Operators

not yet documented

Increment/decrement operators

operator++()

Increment operator.

operator--()

Decrement operator.

Assignment Operators

operator=(n : nat16)

Simple assignment operator.

operator+=(n : nat16)

Add-assign operator.

operator-=(n : nat16)

Subtract-assign operator.

operator*=(n : nat16)

Multiply-assign operator.

operator/=(n : nat16)

Divide-assign operator.

operator%=(n : nat16)

Modulo-assign operator.

See also


Valid HTML 4.01 Strict Valid CSS!