Procedure Block

More Blocks

Description

Procedure Blocks represent a list of blocks with a single block having a new name. Most languages call this type of abstraction "Procedures".

New Blocks can be defined in any Form Workspace available. The most commonly used form is the "Main" project form but others can be chosen from the drop down list in the upper left corner of the Blocks page.

Each list of blocks described as a procedure has a corresponding block listed under "More Blocks". This block can be used like any other block to perform all of the blocks in its list:

Using Procedure Blocks

Selecting the "More Blocks" category provides a "Define a Procedure Block" button.

Clicking this button presents an editor where a name can be provided:

After clicking "Ok" two new figures are shown:

On the right is a top style block where blocks can be attached to describe the desired actions. On the left is a block listed that can be used to invoke those actions somewhere else in the project.

Additional blocks have been added to produce the desired behavior:

This new block can now be used in a bigger program to represent and perform all of the steps described in the procedure block list:

Accessing Procedure Blocks in Packages

Procedure blocks defined in other packages can be accessed with the lower list in the More Blocks catagory. Consider a software package named "Stop Watch" that has been brought into a project with the Add button on the Console tab:

Click the "Blocks" tab to return to blocks and click the "More Blocks" category:

The top list shows that the current form workpage is "Main". The lower list selects the source for more blocks and is shown to be "Stopwatch". Listed below are the procedure blocks available in Stopwatch. Note that these blocks might be defined in stopwatch using blocks or using text. In either case the function is available as a block and shown in the list. When viewed from the "Main" form the "Stopwatch" blocks are shown with the package name "Stopwatch" prefix. Procedure blocks available in other packages might have the same names but are distinct because of the package prefix which discriminates between them.