Home    Reference > D Types > int
prev next

Description

The @x:Act int type is based on the Java long type and hold 64-bit 2's complement values.

Type int

@x:type int

@x:type @x:func sys:Add(a~int,b~int)~int
@x:type @x:func sys:Sub(a~int,b~int)~int
@x:type @x:func sys:Minus(a~int)~int
@x:type @x:func sys:Mult(a~int,b~int)~int
@x:type @x:func sys:Div(a~int,b~int)~int
@x:type @x:func sys:Rem(a~int,b~int)~int
@x:type @x:func sys:Eq(a~int,b~int)~boolean
@x:type @x:func sys:Ne(a~int,b~int)~boolean
@x:type @x:func sys:Less(a~int,b~int)~boolean
@x:type @x:func sys:LessEq(a~int,b~int)~boolean
@x:type @x:func sys:Greater(a~int,b~int)~boolean
@x:type @x:func sys:GreaterEq(a~int,b~int)~boolean
@x:self @x:func sys:Init(a~TypeOr[int,float,string])~void
@x:self @x:func toString()~string

Type Function sys:Add

@x:func sys:Add(a~int,b~int)~int
a first parameter
b second parameter

Semantics

The result is the integer sum of a and b.

Type Function sys:Sub

@x:func sys:Sub(a~int,b~int)~int
a first parameter
b second parameter

Semantics

The result is the integer value from subtracting b from a.

Type Function sys:Minus

@x:func sys:Minus(a~int)~int
a first parameter

Semantics

The result is the integer value from subtracting a from 0.

Type Function sys:Mult

@x:func sys:Mult(a~int,b~int)~int
a first parameter
b second parameter

Semantics

The result is the integer product of a and b.

Type Function sys:Div

@x:func sys:Div(a~int,b~int)~int
a first parameter
b second parameter

Semantics

The result is the integer value from dividing a by b.

Type Function sys:Rem

@x:func sys:Rem(a~int,b~int)~int
a first parameter
b second parameter

Semantics

The result is the integer value of the remainder from dividing a by b.

Type Function sys:Eq

@x:func sys:Eq(a~int,b~int)~boolean
a first parameter
b second parameter

Semantics

If a and b have the same integer value, then the result is
true, else the result is false.

Type Function sys:Ne

@x:func sys:Ne(a~int,b~int)~boolean
a first parameter
b second parameter

Semantics

If a and b have the same integer value, then the result is
false, else the result is true.

Type Function sys:Less

@x:func sys:Less(a~int,b~int)~boolean
a first parameter
b second parameter

Semantics

If a is less than b, then the result is
true, else the result is false.

Type Function sys:LessEq

@x:func sys:LessEq(a~int,b~int)~boolean
a first parameter
b second parameter

Semantics

If a is less than or equal to b, then the result is
true, else the result is false.

Type Function sys:Greater

@x:func sys:Greater(a~int,b~int)~boolean
a first parameter
b second parameter

Semantics

If a is greater than b, then the result is
true, else the result is false.

Type Function sys:GreaterEq

@x:func sys:GreaterEq(a~int,b~int)~boolean
a first parameter
b second parameter

Semantics

If a is greater than or equal to b, then the result is
true, else the result is false.

Self Function sys:Init

@x:func sys:Init(a~TypeOr[int,float,string])~void
a first parameter

Semantics

When a satisfies the constraint in the first column, then the object is initialized as specified in the second column.
a?int The object is initialized to that integer value.
a?float The object is initialized to the integer part of the floating point value.
a?string Here the string must represent an integer. The object is initialized to the integer value that the string represents.

Self Function toString

@x:func toString()~string

Semantics

The result is a string representation of the integer value.