CompileErrors/A0021

From Compost Wiki
Jump to navigation Jump to search

A0021 - Expected closing parenthesis before RETURN.

Description

A0021 is issued when the end of a subroutine is encountered before all opening parentheses are matched.

Example of Cause

Any file which contains more opening parentheses than closing parentheses will exhibit either this error or A0011.

MySub:
   SetVar#('X', 1
RETURN  { A0021 - Expected closing parenthesis before RETURN. }

Resolution

Add a matching end parenthesis for each start parenthesis, or remove the extra start parenthesis.

MySub:
   SetVar#('X', 1)
RETURN  { No error }