New (Arraylist constructor): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Template:Arraylist:New subtitle}} | {{Template:Arraylist:New subtitle}} | ||
==Syntax== | ==Syntax== | ||
{{Template:Arraylist:New syntax}} | {{Template:Arraylist:New syntax}} |
Revision as of 23:40, 26 July 2011
Create a new Arraylist object (Arraylist class)
Syntax
%al = [%(Arraylist Of itemType):]New
Syntax terms
%al | An Arraylist object variable that is set to a new Arraylist object reference. |
---|---|
%(Arraylist) | The optional class name in parentheses denotes a Constructor. See "Usage notes," below, for more information about invoking a collection Constructor. |
Usage notes
- As described in "Using New or other Constructors", New can be invoked with no object, with an explicit class name, or with an object variable, even if that object is Null:
%al = new %al = %(Arraylist of float):new %al = %al:new
Note: As shown above, when explicitly indicating the class, both the collection and the item datatype must be specified just as they are on the collection variable's declaration:
%arrayl is collection Arraylist of longstring %arrayl = %(Arraylist of longstring):new