ProLinga-4GL Reference Manual |
---|
LET — Assign a value to a data reference.
LET
dest_data_ref
=
src_data_ref
[src_data_ref
...]
LET
dest_data_ref
=
num_data_ref
[calculation-operator/function num_data_ref
...]
LET
dest_data_ref
=
CALL
logic_name
[logic_argument
...]
LET
dest_data_ref
=
CALCDATE
src_data_date_ref1
DIFF
src_data_date_ref2
LET
dest_data_date_ref
=
CALCDATE
src_data_date_ref
{ +
| -
}
{ DAYS
| WEEKS
| MONTHS
}
num_data_ref
LET
dest_data_ref
=
CALCDATE
src_data_date_ref
{ DOW
| WEEKNUM
}
The LET command assigns a value to a data reference. This can be a simple copy, the result of a (date) calculation, a concatenation or the return value from a called logic block.
Date calculations can be initiated by using the CALCDATE argument. The following calculations are possible:
DIFF: This gives the number of days between 2 dates. 0 means the dates are the same, < 0 means the left date is earlier than the right date and > 0 means the left date is later than the right date.
+/- DAYS/WEEKS/MONTHS: add/subtract n number of DAYS/WEEKS/MONTHS from the given date and return the result as a date.
DOW: Returns the Day Of Week (0=Sunday, 6=Saturday).
WEEKNUM: Returns the number of the week of the year of the date given.
| Data item which will get a value assigned to. This can either be a simple copy from another data reference, or this can be the result of a calculation. The data item has to be an existing data item and can not be a read-only item like a string for instance. | ||||||||||||||||||
| Data item which will get a date value assigned to. This will be the result of a date calculation. The data item has to be an existing data item and can not be a read-only item like a string for instance. | ||||||||||||||||||
| Data item where the value will be copied from. The data item can either be an existing data item, a string or a numeric value. | ||||||||||||||||||
| Data item being a valid date in a date format where the value will be copied from. The data item can either be an existing data item, a string or a numeric value. | ||||||||||||||||||
| Numeric data item where the value will be used in a (date) calculation. The data item can either be an existing data item or a numeric value. | ||||||||||||||||||
|
Name or single data reference holding a name of a logic block to
be called. The returned value of this logic block will be moved
into the dest_data_ref .
| ||||||||||||||||||
| Optional argument(s) of the called logic block. | ||||||||||||||||||
|
| ||||||||||||||||||
|
| ||||||||||||||||||
Notecalculation functions values need to be surrounded by round brackets. ie: sin(1234) |
<< IF Command | LIST Command >> |