Programmer Guide > Statement Types > Function Declaration Statement
  

Function Declaration Statement
DECLARE FUNC, name1, name2, ..., namen
You can declare a function in the program unit in which the function appears. Forward declaration of the function (a declaration that occurs before the function definition) allows the compiler to distinguish between function calls and array element references, which have a similar syntax. As a result, compiling is more efficient for that particular program unit.
A backward declaration (a declaration that occurs after the function definition) allows the compiler to recognize recursive calls to a function that is defined later in the program unit.
The first call to a function also declares that function and increases the efficiency of the compiler for consecutive calls to that function.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.