A function can be forward declared, this is similar to specifications in a C header file. That way the compiler knows that a function will be made available later on.
Without forward declarations the function MUST be declared before it's called in the
code. The forward declaration consists of the FUNCTION
specification (function name, return type and parameter data types and order). If the forward declaration doesn't match the actual function the compiler will produce errors and the code will fail to run.
FUNCTION dividableByThree LOGICAL (piNumber AS INTEGER) FORWARD.
DISPLAY dividableByThree(9).
FUNCTION dividableByThree LOGICAL (piNumber AS INTEGER):
IF piNumber MODULO 3 = 0 THEN
RETURN TRUE.
ELSE
RETURN FALSE.
END.