CompileErrors/C0005

From Compost Wiki
Revision as of 23:05, 25 March 2015 by Danielr (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

C0005 - Sub defined within an argument (missing closing parenthesis?)

Description

C0005 is issued when a subroutine definition is encountered but the compiler is expecting an argument to a previous command.

C0005 is often accompanied by A0001 when the cause is a missing closing parenthesis, but may be encountered alone when permissive parenthesis mode is enabled.

Example of Cause

SetFlag expects a single literal argument.

ASubroutine:
SetFlag

NewSubroutine: { C0005 - Sub defined within an argument (missing closing parenthesis?) }
RETURN

Resolution

Add the missing arguments or missing parenthesis, and any necessary RETURN statements to avoid C0006.

ASubroutine:
SetFlag('X')
RETURN

NewSubroutine: { No error }
RETURN