DATE |
Date is used to declare Date type variables.
[ Local | Global | Extern ] Date list_var_dim
|
Element |
Description |
Restrictions |
|
list_var_dim |
List ofvar_dim separated by the character ','. |
None. |
|
var_dim |
Name of a variable expressed
in one of the following forms: |
None. |
|
nom_var |
nom_de_variable. |
None. |
|
list_dim |
List of exp_dim separated by ',' |
Number limited to 4 |
|
exp_dim |
Integer expression
representing the number of elements of the variable (from 0 to exp_dim-1) or
2 integer expressions separated by the 2 characters '..' representing the
range of |
The number of elements must
belong to [1,65535]. If a range is given the starting index must belong to |
# Declaration of local variableLocal Date LOCDAT
# Declaration of an 8 element table (numbered I to I+7)I = 3
Date TABDAT( I .. I+7 )
# Declaration and calculations on a date type variable Date DTE
DTE = date$+1-dayn(Date$) Infbox "The first day of the week is "-DTE # Declaration of a 4-dimensional matrixDate DDDD(D1, D2, D3, D4)
Date is used to declare date type variables, sizing them as required.
If Local is used, the variables will be local to the routine or sub-programme, and deleted when the sub-programme or routine is completed.
If Extern is used, the variable is not created, but its existence and type are checked.
If Extern is not used, a declaration of a variable already existing in class [V] or [L] will cause this variable to be deleted, followed by its recreation with the dimensions and type given. After a declaration, the variable is always initialised (that is, set to [0/0/0] for a variable of type Datefor all indices of the variable).
The dates are between the 1st January 1600 and the 31 December 9999; the null date is permitted.
|
Error |
Description |
|
ERDIM (55) |
Too many dimensions are given (>4). |
|
ERVARI ( 6) |
Non-existent variable (Extern). |
|
ERMODE (10) |
- The dimensions given are not
numerical. |
|
ERCLAS ( 7) |
Non-existent or prohibited class (for example, declaration of a variable in a mask). |
|
ERINDI ( 8) |
One of the dimensions is null. |
|
ERDOM (50) |
The dimensions are not between -32768 and +32767. |
LIBELLE - SHORTINT - INTEGER - CHAR - DECIMAL - GLOBAL - LOCAL - EXTERN
|
|