toolbox [fn] functionName [
) ] [
= returnedValueType ]
The toolbox statement declares a function to FB's translator. It effectively provides a forward definition for accessing either Apple frameworks calls (what we traditionally refer to as Apple toolbox calls - hence the name) or FutureBasic version 5 or later runtime functions. Toolbox statements are non-executable. They typically reside in Headers files whose names begin with "Tlbx". The location and naming convention is not an absolute requirement and toolbox statements may be placed anywhere before the calls that use them. Toolbox statements may declare either a function with a return value or a procedure with no return value. A function is defined with 'toolbox fn xxxxx' and a procedure omits the 'fn' to simply read as 'toolbox xxxxx'.
Function Name (or Procedure name if there is no return variable)
Unlike most FutureBasic coding, the name of a toolbox function is case sensitive and must match exactly the name in either the Apple framework or FutureBasic version 5 runtime. Xcode documentation is the best source for finding the correct case-sensitive spelling of the function and the FutureBasic version 5 runtime source is included with the FutureBasic version 5 package.