Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
SETCOLTIME action
Function
The action allows to define defining a time of values in the defined structure column.
Declaration
Blok kódu | ||||
---|---|---|---|---|
| ||||
SETCOLTIME _srcRec^DateTimeCol, _dstRec, _dstRecColIdx |
Parameters
_srcRec | in | Column identifier determining a target column used for acquiring times. |
_dstRec | out | Local structure identifier determining a target structure used for setting the times. |
_dstRectColIdx | in | Identifier of the Int type. |
Description
The action sets a time for each value in the local structure _dstRec - the column with the serial number _dstRecCol, according to the time of a value in corresponding column _srcRec^DateTimeCol. The structures _dstRec and _srcRec must have the same number of rows.
The action represents a substitution for the following loop:
Blok kódu | ||||
---|---|---|---|---|
| ||||
RECORD (SD.Def) _srcRec RECORD (SD.Def) _dstRec BEGIN REDIM _srcRec[10] REDIM _dstRec[10] ; Activity of SETCOLTIME action IF _srcRec\DIM # _dstRec\DIM THEN ; The error _ERR_RANGE_ERROR END ENDIF INT _row _row := 1 DO_LOOP EXIT_LOOP _row > _srcRec\DIM IF ! _srcRec[_row]^TimeCol\VLD THEN ; Error END ENDIF _dstRec[_row]^ValueCol := _dstRec[_row]^ValueCol TIME _srcRec[_row]^TimeCol _row := _row + 1 END_LOOP ; End of the action END |
The type of the column TimeCol used in the example must be Absolute time.
Example
The following example executes the loop described above using the action SETCOLTIME. It assumes, that the serial number of the column ValueColje is 2.
Blok kódu | ||||
---|---|---|---|---|
| ||||
SETCOLTIME _srcRec^TimeCol, _dstRec, 2 |