CompileErrors/A0018

From Compost Wiki
Jump to navigation Jump to search

A0018 - Unexpected subroutine declaration at argument depth <depth>: <subroutine>

Description

A0018 is issued when a subroutine declaration 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 subroutine definition is found instead.

Num#

SomeSubroutine: { A0018 - Unexpected subroutine declaration at argument depth 2: SOMESUBROUTINE }

RETURN

Resolution

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

Num#('100')

SomeSubroutine: { No error }

RETURN