Using libraries

In order to call functions in libraries, first the library needs to be included in the script you are doing. This is done by using the include directive. The include directive is used in the following manner:

1. Put a 2 character combination " '# ".

2. Write the word include after the " # " sign and the library name between two double quotes.


'#include “myLibrary”

This will sort of virtually paste the code in "myLibrary" at the start of the script and thus all function in "myLibrary" will become available the script that is currently being developed.


This is the library (saved in a filename called “library”):

Function Ver

Ver = "1.0"

End Function

Above is a library that contains a single function called "Ver" that returns a string "1.0"

This is the script that uses the library declared above:

'#include "library"

Function Main

Dim libraryver As String

libraryver = Ver()

echo libraryver

End Function

This script simply uses the function stored in the library to retrieve a string and then displays the returned value.