Amos Professional Manual  Contents  Index

Advanced Control Panels


ArraySize
Interface function: return the size of an array
size=address AS

The ArraySize function is used to return the number of elements in an AMOS Professional array, stored at the specified address. The address is the location of the array in memory which has been loaded from the ARRAY function.

Displaying items on the screen
After an item array has been entered into the Interface, it can be displayed on the screen using the powerful ActiveList command.

ActiveList
Interface instruction: display an active list window
AL zone number,x,y,width,height,address,index,flag,paper,pen;[changes]

This command displays an active window for an AMOS Professional string array. Each string can be individually selected with the mouse, and returned to the main program by the RDIALOG$ function. An ActiveList command can be linked to a set of slider bars or an edit zone, so that the bars move the list up and down through the array, and the edit zone changes the value that has been selected on screen.

The parameters for this instruction must be given in the following order:

The zone number to be allocated to the selector, followed by the x,y-coordinates to set the position of the selection box on screen. Because a normal window is used for this display, the location of the x-coordinate will be rounded down to the nearest multiple of 16. If the coordinate base has been set to a new value with a BAse instruction, this will be added to the x-coordinate before it is rounded down, so the final screen coordinate will always be an exact multiple of 16.

The width and height of the window are specified next, in the number of characters required.

These parameters are followed by the address of the string array to be displayed in the selector box, and this array must have been previously defined in the program. The address of the array can now be grabbed with the ARRAY function from the AMOS Professional main program, and loaded into an appropriate Interface variable with VDIALOG. It can then be entered directly into the AList command. This system is explained in detail below.

The next parameter is the index number of the first item to be displayed in the selector box. If this number goes past the end of the array, the selector will be filled with blank lines.

The flag parameter is a bit-map that is used to trigger a range of useful features, as follows:

Bit 0 If this is set to one, each string will be preceded by a number representing its position in the array. The count normally starts from zero, but this can be changed as explained next.

Back    Next
09.03.10