Vidíte historickú verziu tejto stránky. Pozrite si aktuálnu verziu.

Porovnať s aktuálnou verziou Zobraziť históriu stránky

Verzia 1 Aktuálny »

SETCOLTIME action


Function
The action allows to define a time of values in defined structure column.
Declaration
 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 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:


 
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.


 
SETCOLTIME _srcRec^TimeCol, _dstRec, 2


Related pages:

  • Žiadne štítky