background image
<< Visual Basic scripts | Adding a Block >>
<< Visual Basic scripts | Adding a Block >>

Why Use Blocks

Blocks
8-5
For example, in the VU language:
http_header_recv ["BlockName002"] 200;
When you end a block, command IDs are constructed as they were before you
started the block. For example, if the last command ID before the block was
Script025
, the next command ID after the block is
Script026
.
A block ends with a
stop_time
command plus a comment. For example, in
the VU language:
stop_time ["BlockName"]; /* Stop_Block */
A script can have up to 50 blocks.
When you end a block, Robot automatically ends the current block. In other words,
blocks can be nested, but they cannot be overlapped. For example:
You cannot extend a block over multiple scripts. If you attempt to split a script in the
middle of a block, Robot ends the block when it ends the initial script.
Why Use Blocks?
You might use blocks for the following reasons:
To associate the block and timer names with the emulation command that
performs the transaction.
To include the block name in TestManager reports, thus enabling you to filter
the reports with the block name.
To make the script easier to read.
To provide an immediate context for a line within the block through command
IDs.
Valid Blocks
Invalid Blocks
Block1Start
Block1Start
Block2Start
Block2Start
Block2Stop
Block1Stop
Block1Stop
Block2Stop