Subroutines and functions

<< Click to Display Table of Contents >>

Subroutines and functions

You can define your own functions and subroutines and use them like the built-in functions and statements that SoftMaker Basic already has. Furthermore, it is possible to call functions that reside in DLLs.

User-defined subroutines can be defined with the Sub statement.

User-defined functions can be defined with the Function statement.

Functions in DLLs can be declared with the Declare statement (see the section Calling functions in DLLs).

Notes on naming subroutines and functions

Names for subroutines and functions may contain the letters A-Z and a-z, underscores (_) and the digits 0-9. The name must begin with a letter. The length of a name may not exceed 40 characters. It may not consist of a SoftMaker Basic keyword.