GETCOLTIME action


Function
The action retrieves the values' times in given column of structured local variable (i.e. local variable of the Record type).
Declaration
 GETCOLTIME   _srcRec^Col, _dstRec^DateTimeCol
Parameters
_srcRecinRow identifier of local variable of the Record type - source column used to acquire times of individual values.
_dstRecoutRow identifier of local variable of the Record type - target column used to write the times in.
Description

For each item in the column DateTimeCol of the structure _dstRec, the action sets a value of the Absolute time type, which represents a time of the value occurrence in corresponding row and given column of the structure _srcRec. There must be the same number of rows in both the structures.

The action represents a substitution of the following loop:

 
RECORD (SD.Def) _srcRec
 RECORD (SD.Def) _dstRec
 
 BEGIN
   REDIM _srcRec[10]
   REDIM _dstRec[10]
 
 
 ; Execution of the action GETCOLTIME
   IF _srcRec\DIM # _dstRec\DIM THEN
     ; The error_ERR_RANGE_ERROR
     END
   ENDIF
 
   INT _row
   _row := 1
   DO_LOOP
     EXIT_LOOP _row > _srcRec\DIM
     _dstRec[_row]^DateTimeCol := _srcRec[_row]^Col\TIM
     _row := _row + 1
   END_LOOP
 ; Action end
 
 END 
 

The column DateTimeCol used in the example must be of the Absolute time type.

Example

The following example executes the loop described above using the GETCOLTIME action.

 
GETCOLTIME _srcRec^Col, _dstRec^DateTimeCol

Related pages:

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .