SmallBASIC
Stable release
12.33 (Windows/Linux/Android)[1] / March 5, 2026; 3 months ago (2026-03-05)[1]
Implementation languageBASIC
LicenseGPL 3
Filename extensions.bas
Websitesmallbasic.github.io

SmallBASIC is a BASIC programming language dialect with interpreters released as free software under the GNU General Public License version 3 for Windows, Linux and Android.

Description

edit

The dialect is described by the authors as a second generation BASIC, and has a lot in common with QBasic. SmallBASIC includes trigonometric, matrices and algebra functions, a built in IDE, a string library, system, sound, and graphic commands along with structured programming syntax.

Intended application

edit

The "Small" prefix in the name SmallBASIC reflects the project's original intention of being used with the Palm, a small hand-held device. SmallBASIC was designed for portability, and is written in C with separate modules containing any code that is unique to a particular platform.[2][3]

SmallBASIC is intended to support the same sorts of applications supported by GW-BASIC and QBasic on the IBM PC, with support for drawing geometric primitives, playing sounds, String Manipulation, and displaying text in various fonts. SmallBASIC also adds functions such as "File Save", "Save As", "Close File", and "Open File" to the Palm, a device with no native filesystem. SmallBASIC is also intended as a tool for mathematics, with built-in functions for Unit conversion, Algebra, Matrix math, Trigonometry, Statistics, and for two and three dimensional Equation Graphing.[2][3]

History

edit

SmallBASIC was designed to run on minimal hardware. One of the primary platforms supported was Palm OS,[4] where memory, CPU cycles, and screen space were limited. The SmallBASIC graphics engine could use ASCII graphics (similar to ASCII art) and therefore ran many programs on pure text devices. SmallBASIC runs even on Palm OS wristwatches made by Fossil, Inc.

Platforms

edit

SmallBASIC is available for all POSIX-Compliant operating systems (including Linux, BSD, and UNIX),[5] MS-DOS/DJGPP,[6] Win32,[7] FLTK,[8] VTOS,[8] Franklin eBookMan,[9] Cygwin/MingW,[10] Helio/VT-OS,[11] Android,[12] the Nokia N770 Internet Tablet.,[13] and on any system that supports SDL, FLTK, SVGALib, Linux framebuffer, or Windows GUI.

Syntax

edit

The syntax of SmallBASIC has a lot in common with QBasic. Line numbers are not required, and statements are terminated by newlines. Multiple statements may be written on a single line by separating each statement with a colon (:)

An example "Hello, World!" program is:

PRINT "Hello, World!"

An example of how SmallBASIC allows to load an image file and display the image:

I = IMAGE("image_name.png")  'Loads a png file
I.SHOW(100,100) 'shows the image on screen at the coordinates 100,100

Loadable modules

edit

External modules can be written in C to extend the functionality provided by SmallBASIC.[14] Since version 12.20 modules for Raylib, Nuklear and WebSockets are included in the release.[15] Additionally a loadable module to access the GPIO connector of the Raspberry Pi exists.[16]

Reception

edit
  • Tech Republic calls it "an excellent tool to begin programming with."[17]
  • ASCII-World says "SmallBASIC is an excellent tool for mathematics"[2]
  • David Mertz, Ph.D. and Andrew Blais, Ph.D. of Gnosis Software say "SmallBASIC has one of the better development interfaces [we have] reviewed. "[3]

See also

edit

References

edit
  1. ^ a b "Browse Files for SmallBASIC". 5 March 2026. Retrieved 11 March 2026.
  2. ^ a b c "About SmallBASIC". ASCII-World. 22 February 1999. Archived from the original on 12 November 2007. Retrieved 19 January 2011.
  3. ^ a b c PalmOS Hosted Programming Languages: Using the Palm as a Development Environment
  4. ^ Freshmeat.net: Editing text on PalmOS using SmallBASIC.
  5. ^ "SourceForge.net Repository - Unix". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  6. ^ "SourceForge.net Repository - DOS-DJGPP". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  7. ^ "SourceForge.net Repository - WIN32". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  8. ^ a b Gordon McComb (2002). Robot builder's sourcebook. McGraw-Hill Professional. p. 411. ISBN 0-07-140685-9. Retrieved 19 January 2011. SmallBASIC.
  9. ^ "SourceForge.net Repository - EBM". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  10. ^ "Sigwin/MinG". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  11. ^ "SourceForge.net Repository - Helio". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  12. ^ "SourceForge.net Repository - Android". Smallbasic.svn.sourceforge.net. Retrieved 2011-01-22.
  13. ^ "SmallBASIC - N770 at". Sourceforge.net. Retrieved 2011-01-22.
  14. ^ "SmallBASIC plugins". GitHub. Retrieved 22 March 2022.
  15. ^ "SmallBASIC Home Page". Retrieved 22 March 2022.
  16. ^ "SmallBASIC PiGPIO Home Page". Retrieved 22 March 2022.
  17. ^ McPherson, James (4 June 2001). "Development in the palm of your hand, part 2". Articles.techrepublic.com.com. Retrieved 19 January 2011.{{cite web}}: CS1 maint: deprecated archival service (link)
edit

📚 Artikel Terkait di Wikipedia

Microsoft Small Basic

Meijer on SmallBasic Introduction to Small Basic Archived 2010-07-11 at the Wayback Machine discussion with Vijaye Raji and Robert Hess on SmallBasic Microsoft

Hello, world

Framework Ruby Rust SAKO SARL Scala Scilab Scratch Self Shakespeare Simula SmallBASIC Smalltalk Standard ML Standard Widget Toolkit Swift TeX TI-990 TI‑BASIC

BASIC

ported to Microsoft Windows as XBLite, and cross-platform variants such as SmallBasic, yabasic, Bywater BASIC, nuBasic, MyBasic, Logic Basic, Liberty BASIC

QBasic

PC DOS, OS/2, eComStation, ArcaOS License Proprietary Influenced by QuickBASIC Interpreter, QuickBASIC, GW-BASIC Influenced FreeBASIC, QB64, SmallBasic

Integer (computer science)

values representable with a given integer type. Names for these include SmallBASIC: MAXINT Java: java.lang.Integer.MAX_VALUE, java.lang.Integer.MIN_VALUE

List of integrated development environments

Basic NetLogo Open Roberta PascalABC.NET Raptor Scratch ScratchJr Sense SmallBASIC Snap! StarLogo Swift Playgrounds Thonny Toolbox ToonTalk Turtlestitch

Filename extension

shared by GrabIt scripts and Game Boy Advance ROM images; .sb, used for SmallBasic and Scratch; and .dts, being used for Dynamix Three Space and DTS. In

List of compilers

9000 Proprietary Yabasic Marc-Oliver Ihm Yes Yes Haiku MIT License SmallBASIC SmallBASIC Yes Yes Android, macOS GPLv3+ SuperBASIC Jan Jones No No Sinclair