Date: Thu, 28 Mar 2024 10:46:15 +0100 (CET) Message-ID: <1723440896.110978.1711619175898@srvdoc.doc.ipesoft.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_110977_1016214974.1711619175898" ------=_Part_110977_1016214974.1711619175898 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
INT _cntHandle INT _key INT _idx INT _nr TEXT _valueStr BOOL _bFound RECORD NOALIAS (SD.Data) _rec RECORD NOALIAS (SD.Data) _rec2 =20 BEGIN =20 REDIM _rec[10] ; creating a container CNT_CREATE _cntHandle =20 CNT_DEBUG _cntHandle, "CNT1" ; filling the container _key :=3D 1 _idx :=3D 1 =20 DO_LOOP ; if _key is an even number, then inserts a text, otherwise a structur= ed variable row IF %Mod(_key, 2) =3D 0 THEN _valueStr :=3D %IToStr(_key) CNT_INSERT _cntHandle, _key, _valueStr ELSE CNT_INSERT _cntHandle, _key, _rec[_idx] _idx :=3D _idx + 1 EXIT_LOOP _idx > _rec\DIM ENDIF _key :=3D _key + 1 END_LOOP =20 ; reading value from the container CNT_FIND _cntHandle, 5, _rec[2], _bFound IF _bFound THEN ; there must be the value ENDIF ; REDIM _rec2[5] CNT_FIND _cntHandle, 5, _rec[2], _bFound IF _bFound THEN ; there must be the value ENDIF ; ; going over all values of the container CNT_GETNR _cntHandle, _nr CNT_CNVTOARRAY _cntHandle ; FOR _idx=3D1 TO _nr DO_LOOP ; what value type is in the container? IF %Mod (_idx, 2) =3D 0 THEN CNT_GETITEM _cntHandle, _idx, _valueStr ELSE CNT_GETITEM _cntHandle, _idx, _rec2[3] ENDIF END_LOOP ; =20 CNT_DEBUG _cntHandle ; destroying the container CNT_DESTROY _cntHandle =20 END
Related pages: