New (MarksStoreArray constructor): Difference between revisions
Jump to navigation
Jump to search
m (→Usage notes) |
m (→Examples) |
||
Line 15: | Line 15: | ||
==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: | |||
<p class="code">%sl = new | |||
%sl = %(Stringlist):new | |||
%sl = %sl:new | |||
</p> | |||
<li>Specifying an image name on the <var>New</var> method is identical to using a simple <var>New</var> with no parameters followed by a <var>[[BindImage (Stringlist subroutine)|BindImage]]</var> method on the new object: | |||
<p class="code">%list = new('IMAGENAME') | |||
</p> | |||
is equivalent to | |||
<p class="code">%list = new | |||
%list:bindImage('IMAGENAME') | |||
</p> | |||
</ol> | |||
==See also== | ==See also== | ||
{{Template:MarksStoreArray:New footer}} | {{Template:MarksStoreArray:New footer}} |
Revision as of 09:42, 18 February 2011
Create new MarksStoreArray instance (MarksStoreArray class)
Syntax
%marksStoreArray = [%(MarksStoreArray Of itemType):]New
Syntax terms
%marksStoreArray | MarksStoreArray 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
- 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:
%sl = new %sl = %(Stringlist):new %sl = %sl:new
- 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')