[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.8 LM:Block Array

Once a block definition has been created (see section LM:Block Definition), entire arrays can be added to the block with the LM:Block Array module. If all block items are not filled at run time, it says EMPTY.

Enter the Bunao expression in the Data field. Remember to enclose any literal string constants in double quotes (`"') or they will be interpreted. See Soft vs. Hard Newlines, for notes on entering line breaks in text boxes.

All elements of the array(s) will be inserted in the block. The first array encountered will be used as the "standard".

Use the Location radiobutton to specify where in the block the array elements should go. Select Random to position the elements randomly in any available space. To allow random placement with restrictions, enter a Buano/Tcl expression in the Restrictions field. Two predelcared variables are available for use in this field: `LOC' refers to the position that item is to occupy, and `BLKE' is the number of the last position. So, for example, an entry of `LOC <= (BLKE/2)' will ensure that array elements are positioned in the top half of the list.

The Separation field can be set to an integer which specifies a minimum distance between array elements. By default it is `1', which allows multiple lines to be immediately adjacent.

Alternatively, the Specific radiobutton can be selected to position the elements in precise (ie, non-random) locations. An array with pre-defined locations goes here. This array must be at least the same size as the "standard" array, with no repeated location.

The Save Loc field takes the name of an array to store the final position of all block elements in. The first element of this array is the location in the Block where the first element in the Data field was stored, the second element in the array is the location in the Block where the second element in the Data field was stored, etc. Note that if the location type was `Specific', this array will have the same values as the array in the `Specific' field.

LM:Block Array user interface:

images/lm-blockarray

module attribute list:
Attribute Type Default Description
data expression (blank) data to insert in the block
sep integer `1' minimum separation between inserts
loctype random
specific
`random' insert randomly or at specified position
loc array (blank) locations to insert elements, if specific
restr expression (blank) restrictions on random locations
storloc array (blank) variable to store location used


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October, 28 2005 using texi2html