2.2.1) Intype types

Intypes are simple input types. Follows the description of all the intypes:

Intype Description Examples
int
integer
Signed integer
Does automatic format conversion via nat.
-1
0x10
-0b111
nat
natural
Unsigned integer
Does automatic format conversion:
  • 0b... , 0B... - binary number
  • 0o... , 0O... - octal number
  • 0x... , 0X... - hex number
  • 0c... , 0C... - compact number
23
0b1100
0o34734
0x33ef
0cEf20
compact Unsigned integer as compact number Ae03^
hex Unsigned integer as hex number 4ef
octal Unsigned integer as octal number 3526
binary Unsigned integer as binary number 3526
110111
irange(el, .. ,el)
where el is:
  1. int
  2. int .. int
  3. int .. int step nat
Specified signed integer range
where:
  1. specified integer
  2. integer range (border included)
  3. integers starting from first int with step nat and less than or equal the second int
irange(1,2,3,4)

3
but not 5

irange(7 .. 23)

11
but not 24

irange(1 .. 5 step 2,4)

3
but not 2


real Floating point number
Does automatic format conversion:
  • from integer
  • 0f... - floating point number in binary format
3e12
34
-1.34
0f00011101
rrange(el, .. el)
where el is:
  1. real:real
  2. real .. real
  3. real .. real step real:real
Specified real range (floating range)
where:
  1. specified real +- toleration
    i.e. [real1*(1-real2)] .. [real1*(1+real2)]
  2. real range (border included)
  3. reals +- toleration starting from first real with step third real and less than or equal the second real
rrange(5:0.1)

5.5
but not 4.49

rrange(1.2 .. 3.4)

2.3
but not 0.5

rrange(1.0 .. 5.0 step 0.5:0.01)

2.52
but not 1.52


intreal Similar to real, but rounded to an integer
Can be used as a very large integer
3.4e12
irrange(el, .. ,el)
where el is:
  1. intreal
  2. intreal .. intreal
  3. intreal .. intreal step intreal
Specified intreal range
where:
  1. specified intreal
  2. intreal range (border included)
  3. integers starting from first intreal with step third intreal and less than or equal the second intreal
irrange(1e9,2e9,3e9)

3e9
but not 2.9e9

irrange(7e2 .. 7e3)

1e3
but not 1e2

irrange(1e12 .. 5e12 step 1e11)

2.1e12
but not 2.11e12


pointer Internal pointer
System dependent format
  1. string
  2. string(nat)
  3. string(nat,nat)
Variable length string
  1. any size
  2. up to nat chars
  3. at least first nat chars and ant most second nat chars
string(5)

"ab de"
but not "abcsedf"

string(5,10)

"aa bb dd"
but not "aa"


  1. set(el, .. ,el)
  2. iset(el, .. ,el)
where el is:
  1. string:int
  2. string
Unordered set of strings
  1. case sensitive
  2. case insensitive
where:
  1. associate int to the string
  2. associate 0 to the string
set("abc":1, "def":b)

"abc"
but not "Def"

iset("abc")

"Abc"


char One character "a"
crange(el, .. ,el)
where el is:
  1. char
  2. char .. char
Specified character range
where:
  1. specified char
  2. range of chars (border included)
crange("a","b","c")

"a"
but not "d"

crange("a" .. "e")

"b"
but not "f"


bool
boolean
Boolean value
  • True/False (case insensitive)
  • T/F (case insensitive)
  • >0/0
True
f
12
user deffunc freefunc User defined format

User must suply:

  • deffunc(char *in_str, void **out_ptr)
    returns (and alocates) a user pointer from the input string
  • freefunc(void *ptr)
    disposes the user pointer


Back to main page.
Send comments to: Igor Sfiligoi