CompileErrors/C0005: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{CompileError |errortext = C0005 - Sub defined within an argument (missing closing parenthesis?) |description = C0005 is issued when a subroutine definition is encountered bu..." |
No edit summary |
||
| Line 3: | Line 3: | ||
|description = C0005 is issued when a subroutine definition is encountered but the compiler is expecting an argument to a previous command. | |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| | C0005 is often accompanied by [[CompileErrors/A0001|A0001]] when the cause is a missing closing parenthesis, but may be encountered alone when permissive parenthesis mode is enabled. | ||
|exampletext = SetFlag expects a single literal argument. | |exampletext = SetFlag expects a single literal argument. | ||
|examplecode = </code> | |examplecode = </code> | ||
| Line 11: | Line 11: | ||
NewSubroutine: { C0005 - Sub defined within an argument (missing closing parenthesis?) }<code> | NewSubroutine: { C0005 - Sub defined within an argument (missing closing parenthesis?) }<code> | ||
RETURN | RETURN | ||
|resolutiontext = Add the missing arguments or missing parenthesis, and any necessary RETURN statements to avoid [[C0006| | |resolutiontext = Add the missing arguments or missing parenthesis, and any necessary RETURN statements to avoid [[CompileErrors/C0006|C0006]]. | ||
|resolutioncode = </code> | |resolutioncode = </code> | ||
ASubroutine: | ASubroutine: | ||
Latest revision as of 23:05, 25 March 2015
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