10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VariablesBy referencing a column, you can work with one attribute across all theobjects. The syntax is:arrayname[*].columnnamewhere arrayname is the name of the array and columnname is the name of thecolumn. References to array columns are most commonly used to detectevents, such as Entry or Exit events, on the column when the array isdisplayed in a table field, for example:on entry movies[*].title...To reference an individual element of an array, use the following syntax:arrayname[n].columnnamewhere arrayname is the name of the array, n is the number of the row, andcolumnname is the name of the column.An individual element of an array can be a reference variable or an array. Thismeans that arrays can contain nested objects or arrays. You can also referencethe individual elements of these nested objects or arrays in your 4GL code. Fora nested object, the syntax is:arrayname[n].nestedobject.attributewhere arrayname is the name of the object, n is the number of the row,nestedobject is the name of the nested object, and attribute is any attribute ofthat nested object.For a nested array, the syntax is:arrayname[n].nestedarrayname[x].attributewhere arrayname is the name of the outer array, n is the row number in thatarray, nestedarrayname is the name of the nested array, x is the number ofthe row within the nested array, and attribute is any attribute of the nestedarray.Field and Menu Item VariablesField and menu item variables are variables that are associated with the valuein a field or menu item. These variables are not associated with the objectrepresented by the field or menu item. When you create a field or menu itemin the OpenROAD Workbench, you generally specify a variable name on theProperty Inspector. This variable is associated with the data displayed in thefield. You can reference this variable in your 4GL code whenever you need toaccess the data in the field.Language Elements 33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!