CompileErrors/A0016
A0016 - <Message>.
Description
A0016 is issued when a subroutine definition fails to parse. A variety of messages may be issued by this error; read the message for details.
Possible messages:
- Purported sub definition is not really a sub definition
- This is an internal error and likely indicates a bug in the compiler.
- Sub definition is syntactically invalid
- The subroutine definition failed to parse. Currently, a subroutine definition must match the following case-insensitive regular expression:
(^[\w_]+[\?\#\$]?)\s*(?:\[\s*(?:(\w*)\s*\:\s*([\w_]+)[\s\,]*)+\])?\:
- The subroutine definition failed to parse. Currently, a subroutine definition must match the following case-insensitive regular expression:
- Could not identify sub name in sub definition
- The subroutine name was missing or failed to parse.
- Sub definition must have the same number of argument type declarations as arguments
- The subroutine had a different number of argument types than arguments. Each argument must have exactly one associated argument type.
- Only NUM and BOOL type sub arguments are supported (requested: <format>)
- An argument type other than NUM or BOOL was specified.
- Messages related to low-level exceptions thrown during the parsing attempt.
Example of Cause
The following subroutine definition is malformed because it contains a # in the name.
Some#Subroutine[Num: Arg1]: { A0016 - Sub definition is syntactically invalid: Some#Subroutine[Num: Arg1]: }
RETURN
Resolution
Correct the syntax of the subroutine definition.
SomeSubroutine[Num: Arg1]: { No error }
RETURN