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.

ArraysArrayComponentColumn fieldReference Syntax and Examplearrayname[*].attributeExample:on childexit custtable[*].acctbalanceThis syntax is usable only if custtable is a table field.Individualattributearrayname[n].attributeExample:custtable[3].custzip = zip;This syntax refers to an individual attribute. If we hadtablefield[n]. attribute, it would refer to an individualtable field cell.To refer to elements of an array underlying a dynamically created table field,use a dynamic expression (DynExpr). For more information about creating atable field dynamically, see Creating Dynamic Frames (see page 363).References to nested arrays and objects proceed left to right from the general(outermost array row) to the specific (innermost array, row, or data item). Forexample, the order of precedence for the following reference:custtable[4].vid_rent[5].titleis:1. Row 4 in the custtable array2. The attribute vid_rent (itself an array) in row 43. Row 5 of the vid_rent array4. The attribute title (of the vid_rent array)You cannot change the order of precedence in nested syntax.Restrictions on Array StructureBecause each row in an array points to an object of a given system or userclass, an array cannot consist of a single attribute whose data type is simple,such as an integer or varchar. To create a single-column array that containsintegers, for example, you must use the IntegerObject system class. To accessthe value of the IntegerObject, use its Value attribute.Working with Arrays, Table Fields, and Collections 211

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

Saved successfully!

Ooh no, something went wrong!