I know that SB has a Code Library, but what I would like to know is, does SB have the capability to 'include' libraries like qbasic and sdlbasic?

I did not see 'include' in the 'language reference' but I did notice 'chain'. Can chain be used as a kind of 'include'? (of course I'm assuming that SB's chain command behaves like the old basic's chain command)... Thoughts?


Hi J,

Libraries are called UNITs here. CHAIN is used to compile and run some code, a line, an array, or a file (I think).

Shian had started several UNITs, see Code Library: Units Section

The INCLUDE statement is still available. For details, see:

There is also another lesser known feature, it's possible to write a DLL (or .so) 'module' to extend SmallBASIC.

There are some very old examples in the source code tree for mysql and flite (a text to speech module). I had a funny idea that a maths module could be written as a module to provide vectorised matrix functions, then it would be possible to write machine learning code in SmallBASIC.

It would be good if it was easier to use ready made units in SmallBASIC. Other scripting languages have a package manager concept where you can download and install packages from the command line.