<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Data-Block Commands > Data-Block Commands |
MiniRobotLanguage (MRL)
SIB. Command
Set In Block
Intention
This command can be used to set successive elements of an data-block to values in one strike. It saves you a bit typing compared to SBE.
When using SIB. there is no need to specify the Block-Variable. SIB. will automatically remember and use the last used block variable. Also the index (the first element number) is fix - the first parameter will set element 1.
A short example, using GFB. and SIB. is:
CNB.$$BLO|6
SIB.Element 01|Element 02|Element 03
GFB.$$EL1|$$EL2|$$EL3
DBP.$$EL1$crlf$$$EL2$crlf$$$EL3
ENR.
SIB. will not create a new block, use CNB. for this purpose.
Syntax
SIB.P1[|P2][|P3]...[|PX]
Parameter Explanation
P1- content, the first block element will be set to this value
P2 ... Px (optional) more variables, they will set all successive
Block-Elements to these values.
If the number of parameters is higher then the actual number of blocks in the data-block, then the data-block is automatically extended (blocks are added) to match that number of blocks.
Example
'**********************************************
' GFB./ SIB. - Sample
'**********************************************
CNB.$$BLO|6
SIB.Element 01|Element 02|Element 03
GFB.$$EL1|$$EL2|$$EL3
DBP.$$EL1$crlf$$$EL2$crlf$$$EL3
ENR.
'**********************************************
' GFB./ SIB. - Sample
'**********************************************
CNB.$$BLO|1
SIB.Hallo|Thomas|Lange
GBN.$$BLO|$$RES
'GBE.$$BLO|3|$$E01
DBP.Blo hat $$RES Elemente
GFB.$$E01|$$E02|$$E03
DBP.$$E01- $$E02 - $$E03
MBX.Blo hat $$RES Elemente
ENR.
Remarks
Blocks are internally checked for authenticity. This is done to prevent hard to track error.
If you change bytes or the length of a block variable externally, the block will not be unpacked anymore.
Data blocks can contain all 256 ASC Characters (even binary files) and are binary-compatible. Therefore whether special folders nor system variables are resolved inside blocks. Variables are resolved one time.
Limitations:
There is no explicit limit on data-items per block. However timing considerations may set you a limit at around 10000 Items, depending on your available hardware. For a larger number of non-binary items, Member-Operations, using SBD. FEM. and SBM. may be significantly faster.
See also:
• 1.5.1.5. Organizing data items in blocks