FutureBasic Logo

<<    Index    >> FutureBasic 5

toolbox   statement



Syntax:
toolbox [fn] functionName [(arg1 [,arg2...])] [= returnedValueType]

Description:
The toolbox statement declares a function to the FBtoC translator. It effectively provides a forward definition for accessing either Carbon 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 Carbon framework or FutureBasic version 5 runtime. Xcode documentation is the best source for finding the correct case-sensitive spelling of Carbon calls and the FutureBasic version 5 runtime source is included with the FutureBasic version 5 package.