CompileErrors/A0017

From Compost Wiki
Revision as of 02:09, 14 January 2015 by Danielr (talk | contribs) (Created page with "{{CompileError |errortext = A0017 - Subroutine '<subroutine>' is already defined. |description = A0017 is issued when a duplicate subroutine definition is encountered. Subrou...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A0017 - Subroutine '<subroutine>' is already defined.

Description

A0017 is issued when a duplicate subroutine definition is encountered. Subroutine overloading is not allowed: each subroutine must have a unique name.

Example of Cause

The following two subroutines are defined in the same file.

SomeSubroutine?:
    ReturnBool TRUE
RETURN

SomeSubroutine?[Bool:Input]: { A0017 - Subroutine 'SomeSubroutine?' is already defined. }
   ReturnBool GetArgument?('Input')
RETURN

Resolution

Change the name of one or both of the subroutines.

AlwaysTrue?:
    ReturnBool TRUE
RETURN

SometimesTrue?[Bool:Input]: { No error }
   ReturnBool GetArgument?('Input')
RETURN