There are two fundamental types for variables ('real' and 'array') and an additional one ('string').
'Real' is the only elementary numeric type that is floating-point type and is equivalent to a 'double' type in C. Note that one can use integer constants but they are treated as a subclass of the same floating-point type; there is no explicit Boolean type but in the relational operators the floating-point value '0.' is treated as 'false', and other values are treated as 'true'.
No declarations for floating-point variables are needed.
Array consisting of elements of numerical real (floating-point) type is the only structured type in the HyperFun. The declarations for arrays are necessary and have the following general form:
'array' <arrayName> '['<size>']' ';'
where 'size' is a constant representing a number of elements of the array. The array's elements are indexed from 1 to size. So one can access the i-th element as
Examples of declarations of arrays with names 'xx' and 'pz':
array xx, pz;
The first element of 'xx' will be xx, and the forth element of 'pz' will be pz.
There are three special arrays with reserved names:
So, expressions inside a program can contain the elements of these arrays (for example: x, a, s). It is supposed that 'x' and 'a' are input parameters, and 's' is input/output parameter. This means that the actual values for both 'x' and 'a' arrays' elements are defined outside the program, and that the actual values for 's' can be defined both outside and inside the program. The declarations for these arrays must be given in the head of a program.
This type has a limited usage only as a constant being substituted instead of a corresponding library function's argument. A string is represented as a sequence of characters surrounded by double quotation marks. The most typical usage of this type is to reference to a file name. Example: