Basicprogramming(.org) > Tutorials and articles

Small Basic Notes

(1/2) > >>

B+:
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:
http://smallbasic.sourceforge.net

ScriptBasic:
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.




B+:
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: ---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

--- End code ---

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.

B+:
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.

B+:
Click the Files menu and you see normal file maintenance options:

But for running or editing files, use the first navigation screen.

Navigation

[0] Message Index

[#] Next page

Go to full version