Futurebasic/Language/Reference/library

Description
Libraries are routines that are stored either in the Extensions folder of the System Folder or in the folder with the compiled application. Libraries are accessed through FB's standard toolbox assignment mechanism. Libraries may be dragged into the project window and included in the compiled application.

The first syntax:  tells FB to begin using toolbox calls from. Only one library at a time is ever accessible. When the toolbox statements have been set up using  and , the second syntax is used to return to the default library.

The  command is a mechanism that establishes links to a precompiled library. It doesn't matter who created the library (Apple's libraries are most common) or what language it was written in. It's just a file full of subroutines. The creator of the library will usually provide a set of function calls that may be used after the library is opened. Each of these is made available to your FB application with a  or  command.

Example:

The following example is already part of the FB headers and does not need to be entered. It is offered here as an example only.

Checking For Available Library Commands After executing a  statement, you may wish to determine if a particular routine is available. The following example shows how that can be accomplished. A source code example for a library written in C is included on your CD. Our simple shared library creates a toolbox call named