integer

File integer.str
Author unknown
Since unknown

Integer arithmetic and comparison.




Statistics


General
Lines of code 396
Stratego
Module number 1 (100% documented)
Constructor number 1 (0% documented)
Overlay number 0
Strategy number 80 (48% documented)
Rule number 6 (0% documented)
DynamicRule number 1 (0% documented)



Constructor summary


Infinite(ATerm ) n/a integer.str

Strategy summary


abs n/a integer.str
add Adds two numbers (integer or real) integer.str
add-inf n/a integer.str
addi Adds two integers integer.str
addr Adds two reals integer.str
addS n/a integer.str
apply-int-to-str-tuple(Strategy s) n/a integer.str
bin-chars-to-int n/a integer.str
bin-string-to-int n/a integer.str
comp-comp(Strategy s1, Strategy s2) n/a integer.str
dec Decrements a number integer.str
dec-chars-to-int n/a integer.str
dec-string-to-int n/a integer.str
div Divides two numbers (integer or real) integer.str
divi Divides two integers integer.str
divr Divides two reals integer.str
divS n/a integer.str
even n/a integer.str
gcd n/a integer.str
generic-chars-to-int n/a integer.str
generic-string-to-int n/a integer.str
geq n/a integer.str
geqS n/a integer.str
get-counter n/a integer.str
get-random-max Gets the maximum random number that will be returned by the next-random number generator integer.str
gt n/a integer.str
gti n/a integer.str
gtr n/a integer.str
gtS n/a integer.str
hex-chars-to-int n/a integer.str
hex-string-to-int n/a integer.str
inc Increments a number integer.str
int n/a integer.str
int-add(ATerm y) Adds two integers integer.str
int-dec Decrements an integer integer.str
int-gt(ATerm y) n/a integer.str
int-inc Increments an integer integer.str
int-leq(ATerm y) n/a integer.str
int-lt(ATerm y) n/a integer.str
int-subt(ATerm y) Subtracts two integers integer.str
int-to-string n/a integer.str
is-int n/a integer.str
leq n/a integer.str
leq-leq n/a integer.str
leq-lt n/a integer.str
leqS n/a integer.str
log2 n/a integer.str
lt n/a integer.str
lt-inf n/a integer.str
lt-leq n/a integer.str
lt-lt n/a integer.str
ltS n/a integer.str
max n/a integer.str
maxS n/a integer.str
min n/a integer.str
minS n/a integer.str
mod Returns the modulo (remainder after division) of two integers or reals integer.str
modi Returns the modulo (remainder after division) of two integers integer.str
modr Returns the modulo (remainder after division) of two floats integer.str
modS n/a integer.str
mul Multiplies two numbers (integer or real) integer.str
muli Multiplies two integers integer.str
mulr Multiplies two reals integer.str
mulS n/a integer.str
neg n/a integer.str
new-counter n/a integer.str
next-counter n/a integer.str
next-random Returns a random number between 0 and get-random-max integer.str
oct-chars-to-int n/a integer.str
oct-string-to-int n/a integer.str
pos n/a integer.str
pos-chars-to-int n/a integer.str
reset-counter n/a integer.str
set-counter n/a integer.str
set-random-seed Sets a seed for the following sequence of next-random calls integer.str
string-to-int n/a integer.str
subt Subtracts two numbers (integer or real) integer.str
subti Subtracts two integers integer.str
subtr Subtracts two reals integer.str
subtS n/a integer.str

Rule summary


char-to-digit n/a integer.str
char-to-digit n/a integer.str
char-to-digit n/a integer.str
neg-chars-to-int n/a integer.str



Strategy details


ATerm add
File integer.str
Author unknown
Since unknown
 

Adds two numbers (integer or real)



 
ATerm addi
File integer.str
Author unknown
Since unknown
 

Adds two integers



 
ATerm addr
File integer.str
Author unknown
Since unknown
 

Adds two reals



 
ATerm bin-chars-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type List(Char) -> Int

 
ATerm bin-string-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type String -> Int

 
ATerm dec
File integer.str
Author unknown
Since unknown
 

Decrements a number.


type Int -> Int

 
ATerm dec-chars-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type List(Char) -> Int

 
ATerm dec-string-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type String -> Int

 
ATerm div
File integer.str
Author unknown
Since unknown
 

Divides two numbers (integer or real)



 
ATerm divi
File integer.str
Author unknown
Since unknown
 

Divides two integers



 
ATerm divr
File integer.str
Author unknown
Since unknown
 

Divides two reals



 
ATerm even
File integer.str
Author unknown
Since unknown
 

No information available.


type Int -> fail?

 
ATerm generic-chars-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type List(Char) * Int -> Int

 
ATerm generic-string-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type String * Int -> Int

 
ATerm get-random-max
File integer.str
Author unknown
Since unknown
 

Gets the maximum random number that will be returned by the next-random number generator.Corresponds to RAND_MAX in C.


type _ -> Int()

 
ATerm hex-chars-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type List(Char) -> Int

 
ATerm hex-string-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type String -> Int

 
ATerm inc
File integer.str
Author unknown
Since unknown
 

Increments a number.


type Int -> Int

 
ATerm int-add(ATerm y)
File integer.str
Author unknown
Since unknown
 

Adds two integers



 
ATerm int-dec
File integer.str
Author unknown
Since unknown
 

Decrements an integer.


type Int -> Int

 
ATerm int-gt(ATerm y)
File integer.str
Author unknown
Since unknown
 

No information available.


type Int -> Int

 
ATerm int-inc
File integer.str
Author unknown
Since unknown
 

Increments an integer


type Int -> Int

 
ATerm int-leq(ATerm y)
File integer.str
Author unknown
Since unknown
 

No information available.


type Int -> Int

 
ATerm int-lt(ATerm y)
File integer.str
Author unknown
Since unknown
 

No information available.


type Int -> Int

 
ATerm int-subt(ATerm y)
File integer.str
Author unknown
Since unknown
 

Subtracts two integers



 
ATerm max
File integer.str
Author unknown
Since unknown
 

No information available.


type (Int, Int) -> Int

 
ATerm mod
File integer.str
Author unknown
Since unknown
 

Returns the modulo (remainder after division) of two integers or reals.



 
ATerm modi
File integer.str
Author unknown
Since unknown
 

Returns the modulo (remainder after division) of two integers



 
ATerm modr
File integer.str
Author unknown
Since unknown
 

Returns the modulo (remainder after division) of two floats



 
ATerm mul
File integer.str
Author unknown
Since unknown
 

Multiplies two numbers (integer or real)



 
ATerm muli
File integer.str
Author unknown
Since unknown
 

Multiplies two integers



 
ATerm mulr
File integer.str
Author unknown
Since unknown
 

Multiplies two reals



 
ATerm next-random
File integer.str
Author unknown
Since 0.9.4
 

Returns a random number between 0 and get-random-max.

For a given seed, this strategy always returns the same sequence of numbers.If no seed value has been set using set-random-seed, then the seed is 1, which means that the sequence of random numbers will always be the same if you set no seed.


see man rand
type _ -> Int

 
ATerm oct-chars-to-int
File integer.str
Author unknown
Since unknown
 

No information available.


type List(Char) -> Int

 
ATerm pos
File integer.str
Author unknown
Since unknown
 

No information available.


type Int -> Int

 
ATerm set-random-seed
File integer.str
Author unknown
Since 0.9.4
 

Sets a seed for the following sequence of next-random calls.Typically, the seed is set to the Unix time (the result of the strategy time).


see man srand
type Int -> ()

 
ATerm subt
File integer.str
Author unknown
Since unknown
 

Subtracts two numbers (integer or real)



 
ATerm subti
File integer.str
Author unknown
Since unknown
 

Subtracts two integers



 
ATerm subtr
File integer.str
Author unknown
Since unknown
 

Subtracts two reals