10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ArraysThe following graphic illustrates a nested array. The outermost array has twoattributes, shown by the headings Vendorno Col and Pricetbl. The attributethat appears in the table under the heading Pricetbl is an array of threeattributes, Partno_col, Catno_col, and Price_col.How You Can Declare an ArrayIf the array variable is not associated with a table field, you must declare it inyour application before you can reference the variable (or its component parts)in the 4GL code. The syntax for declaring an array variable is:arrayname = array of classname [default null]The class can be any system class or user class. The following statementdeclares an array of user class VIDEO_ROW. The video_list reference variabledefaults to null:video_list = array of VIDEO_ROW default null;If the array's class is not known until runtime, declare the type of the array tobe Object. For an example of using an array generically, see How You Can SortTable Field Data Generically (see page 252). For more information aboutspecifying the default null clause, see How You Can Reference Objects (seepage 114).Working with Arrays, Table Fields, and Collections 209

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

Saved successfully!

Ooh no, something went wrong!