New (MarksStoreArray constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 16: Line 16:
==Examples==
==Examples==
<ol><li><var>New</var> is a constructor and as such can be called with no object, with an explicit class name, or with an object variable, even if that object is null:
<ol><li><var>New</var> is a constructor and as such can be called with no object, with an explicit class name, or with an object variable, even if that object is null:
<p class="code%ma = new                                   
<p class="code" %ma = new                                   
%ma = %(marksStoreArray of string len 1):new
%ma = %(marksStoreArray of string len 1):new
%ma = %ma:new                               
%ma = %ma:new                               

Revision as of 09:47, 18 February 2011

Create new MarksStoreArray instance (MarksStoreArray class)


Syntax

%marksStoreArray = [%(MarksStoreArray Of itemType):]New

Syntax terms

%marksStoreArrayMarksStoreArray object.
(MarksStoreArray) The class name in parentheses denotes a shared method. New can also be invoked via a MarksStoreArray object variable, which may be null.

Usage notes

  • All errors in New result in request cancellation.

Examples

  1. New is a constructor and as such can be called with no object, with an explicit class name, or with an object variable, even if that object is null: <p class="code" %ma = new %ma = %(marksStoreArray of string len 1):new %ma = %ma:new

  2. Specifying an image name on the New method is identical to using a simple New with no parameters followed by a BindImage method on the new object:

    %list = new('IMAGENAME')

    is equivalent to

    %list = new %list:bindImage('IMAGENAME')

See also