CompileErrors/A0022

From Compost Wiki
Revision as of 02:31, 14 January 2015 by Danielr (talk | contribs) (Created page with "{{CompileError |errortext = A0022 - Unexpected RETURN at argument depth <depth>: <subroutine> |description = A0022 is issued when a RETURN statement is encountered within an a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A0022 - Unexpected RETURN at argument depth <depth>: <subroutine>

Description

A0022 is issued when a RETURN statement is encountered within an argument stack. Normally this means that a prior command did not get enough arguments.

Example of Cause

Num# takes a single parameter, but a RETURN is found instead.

SomeSubroutine: 
    Num#
RETURN  { A0022 - Unexpected RETURN at argument depth 2. }

Resolution

Ensure that all argument stacks are complete before the sub declaration.

SomeSubroutine:
    Num#('100')
RETURN  { No error }