MSIR.0807 Can't declare (meth) after (meth) already invoked: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "A <tt>Constructor</tt> or <tt>Disallow</tt> statement in a <tt>Public</tt> or <tt>Private</tt> block specified a <tt>New</tt> or <tt>Discard</tt> method, after such a method had ...")
 
(Automatically generated page update)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
A <tt>Constructor</tt> or <tt>Disallow</tt> statement in a <tt>Public</tt> or <tt>Private</tt> block specified a <tt>New</tt> or <tt>Discard</tt> method, after such a method had already been explicitly invoked. Since these methods exist for all classes, whether or not they're declared, it is possible to use them before they are declared. However, as this message indicates. such a use is invalid. Make sure the class's Public or Private block is declared before any code that uses a <tt>New</tt> or <tt>Discard</tt> message. <blockquote>An <tt>Auto New</tt> setting on a variable declaration is considered an invocation of the <tt>New</tt> method so an <tt>Auto New</tt> object should be declared after the Public and Private blocks for its class.</blockquote>
A <var>Constructor</var> or <var>Disallow</var> statement in a <var>Public</var> or <var>Private</var> block specified a <var>New</var> or <var>Discard</var> method after such a method had already been explicitly invoked. Since these methods exist for all classes, whether or not they're declared, it is possible to use them before they are declared. However, as this message indicates, such a use is invalid.  


[[Category:Sirius Mods Messages]]
Make sure the class's <var>Public</var> or <var>Private</var> block is declared before any code that uses a <var>New</var> or <var>Discard</var> message.
<p class="note"><b>Note:</b> An <var>Auto New</var> setting on a variable declaration is considered an invocation of the <var>New</var> method, so an <var>Auto New</var> object should be declared after the <var>Public</var> and <var>Private</var> blocks for its class.
</p>
 
{{Template:MSIR.0807 footer}}
[[Category:MSIR.0800 - MSIR.0999]]

Latest revision as of 23:35, 3 March 2017

A Constructor or Disallow statement in a Public or Private block specified a New or Discard method after such a method had already been explicitly invoked. Since these methods exist for all classes, whether or not they're declared, it is possible to use them before they are declared. However, as this message indicates, such a use is invalid.

Make sure the class's Public or Private block is declared before any code that uses a New or Discard message.

Note: An Auto New setting on a variable declaration is considered an invocation of the New method, so an Auto New object should be declared after the Public and Private blocks for its class.


Message attributes:

RETCODEO=0Sets online return code
RETCODEB=4Sets batch (single user) return code
CLASS=EError class; the message can be suppressed with the X'04' bit setting of the MSGCTL parameter
AUDITERWrites the message with line type ER to the audit trail
COUNTIncrements the error count (ERCNT) parameter
ECHODisplays the line that caused the error

Back to list of messages