Author Topic: Small Basic Notes  (Read 4638 times)


  • Guest
Small Basic Notes
« on: January 16, 2016, 07:51:46 PM »
The main thing to remember about SmallBASIC is that it is NOT MS Small Basic. (note the different spellings)

MS Small Basic is basically a trainer for VB programming.

SmallBASIC is very compatible to old style Basic programming, but has plenty of modern updates. Not the most powerful or sophisticated, the interpreter (only) is general purpose and good for quick program applications.

Here is link for downloads, language reference, forum, Code Library and more:


  • Guest
Re: Small Basic Notes
« Reply #1 on: January 17, 2016, 04:59:20 AM »
Hi Mark,

The latest version of SmallBASIC for Linux 64 bit seems to work this time for me. A couple examples screen shots from the package. Cool to see your stuff as part of the distribution. From what I have read, the GUI is based on FLTK for forms and SDL for graphics.

I'm actually hoping to pickup a few SDL tips from SmallBASIC to enhance what I have going with the Script BASIC SDL_gfx extension module.

« Last Edit: January 17, 2016, 09:11:35 AM by ScriptBasic »


  • Guest
Re: Small Basic Notes
« Reply #2 on: January 17, 2016, 02:45:24 PM »
Hi Scriptbasic,

Thanks for screen shots, I am happy to get feed back from Linux users as I don't have direct access (yet?). I think Chris the developer of SmallBASIC has moved from FLTK as it has been discontinued. I am not clear on tech details but I can pass questions on to Chris. I do know the Windows FLTK editor and samples have been removed from Download board and his goal is to get all platforms working from one version of SmallBASIC currently at 0.12.2 (or as close to one version as possible).

A couple more notes:

You will find 2 constants xmax and ymax that give you your screen dimensions (in pixels) you have to work within. Unlike other Basics you don't set the screen size or mode, its all from the same screen, so a newbie is saved from those details getting started with SmallBASIC. Check with this
Code: [Select]
print "My screen width is ";xmax
? "My screen height is "; ymax         '<= comment is common symbol and at least on other BASIC uses ? as PRINT shortcut

There is a built in editor or you can use plain text files with .bas (and I think .txt) extensions, say from Windows Notepad.
From command line, use -e or -r switches for edit or run.

In Windows, at least, you can drag drop files onto SmallBASIC application icon and of course register .bas in Windows to SmallBASIC and just click the .bas file (not recommended unless SmallBASIC is your main BASIC)

The built in editor is rather quirky (and new). The general rule is whenever it seems hung, like after a help or run and syntax error found, PRESS esc to get 'focus' back into main part of editor.
+ Errors from runs are posted in top right corner of screen and until you press esc, you can't start editing the error.
+ Language reference help including keyboard shortcuts are accessed ctrl+h, until you press esc the 'focus' is in help, the right side of the screen.


  • Guest
Re: Small Basic Notes
« Reply #3 on: April 27, 2017, 11:38:39 PM »
For most recent update of SmallBASIC, 0.12.9, if you have the exe pinned to toolbar, click it and this screen will come up.

I call it the navigation screen. Folders are shown in brackets and files list is below folders listing (no brackets).
Click a file to run or edit it, click a folder to change directory to it...

On the navigation screen there is also a [File] menu, an [On-line] samples menu and an [About] menu.

File maintenance can be done from the [File] menu.
« Last Edit: April 28, 2017, 02:43:33 AM by B+ »


  • Guest
Re: Small Basic Notes
« Reply #4 on: April 27, 2017, 11:42:21 PM »
Click the Files menu and you see normal file maintenance options:

But for running or editing files, use the first navigation screen.
« Last Edit: April 27, 2017, 11:44:42 PM by B+ »


  • Guest
Re: Small Basic Notes
« Reply #5 on: April 27, 2017, 11:58:04 PM »
I personally have this (screenshot) setup on my desktop and use Windows 10 to do my file maintenance (and navigation).
I just click a bas file and I am in the SmallBASIC editor. Right click and I have Cut/Copy/Paste along with Run option and more.

Before 0.12.9 there was no Save As menu option under Files menu, I did not like the label for new files so I coded my own versions.

New bas file.bas
Save As bas file.bas

Eval.bas, I use for quick calculator
Tab2Space, I use to detab a file, say from Geany

Quick test.bas, I use to try out code (Copy/Paste) and do allot of Save As from that file.
Full factor.bas, factors a number
Handy.bas, some of my most reusable subs and functions to Copy/Paste from

You can get very use to running code from right clicking mouse and then clicking RUN.
2nd screen shot, I have Full factor.bas loaded in editor and right clicked mouse to show the menu to RUN it.
« Last Edit: April 28, 2017, 01:16:40 AM by B+ »


  • Guest
Re: Small Basic Notes
« Reply #6 on: April 28, 2017, 12:37:28 AM »
If the quick (and very terse) help from the editor is not enough, I have written an extended help file that has help from Language Reference board at the SmallBASIC site. It has similarities to SmallBASIC's help when the IDE was more conventional working with FLTK.

Screenshot is of Index button pressed and a full listing of keywords displayed, click one for reference and maybe code examples.
« Last Edit: April 28, 2017, 12:40:10 AM by B+ »