Jump to content

SmallBASIC: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
GreenC bot (talk | contribs)
Rescued 1 archive link; remove 1 link. Wayback Medic 2.1
 
(15 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{about|the GPL programming language|the Microsoft programming language|Microsoft Small Basic}}
{{Short description|BASIC programming language dialect with interpreters released as free software}}
{{About|the GPL programming language|the Microsoft programming language|Microsoft Small Basic}}
{{Infobox programming language
{{Infobox programming language
| name = SmallBASIC
| name = SmallBASIC
| logo = [[File:Smallbasic-screenshot-3spiros.png|320px|SmallBASIC Screenshot]]
| logo = [[File:Smallbasic-screenshot-3spiros.png|320px|SmallBASIC Screenshot]]
| caption =
| paradigm =
| paradigm =
| designer =
| designer =
Line 11: Line 11:
| dialects =
| dialects =
| influenced =
| influenced =
| license = [[GPL2|GPL 2]]
| license = [[GPL3|GPL 3]]
| website = [[SourceForge:projects/smallbasic|sf.net/projects/smallbasic]]
| website = [https://smallbasic.github.io smallbasic.github.io]
| file_ext = .bas
| file_ext = .bas
| year = <!-- Use {{Start date|YYYY}} -->
| year = <!-- Use {{Start date|YYYY}} -->
| latest_release_version = 0.12.12 (Windows/Linux/Android)<ref name="sf-files">{{cite web | url = http://sourceforge.net/projects/smallbasic/files/ | title = Browse Files for SmallBASIC | work = [[SourceForge.net]] | date = 30 December 2008 | accessdate = 2 July 2009 }}</ref>
| latest_release_version = 12.27 (Windows/Linux/Android)<ref name="sf-files">{{cite web |url = https://smallbasic.github.io |title = Browse Files for SmallBASIC | date = 26 April 2024 | access-date = 23 May 2024 }}</ref>
| latest_release_date = {{Start date and age|2018|2|04}}<ref name="sf-files" />
| latest_release_date = {{Start date and age|2024|4|26}}<ref name="sf-files" />
| latest_test_version =
| latest_test_version =
| latest_test_date =
| latest_test_date =
Line 25: Line 25:
}}
}}


'''SmallBASIC''' is a [[BASIC]] [[programming language]] [[Dialect (computing)|dialect]] with [[Interpreter (computing)|interpreter]]s released as [[free software]] under the [[GNU General Public License]] version 2.
'''SmallBASIC''' is a [[BASIC]] [[programming language]] [[Dialect (computing)|dialect]] with [[Interpreter (computing)|interpreter]]s released as [[free software]] under the [[GNU General Public License]] version 3 for [[Microsoft Windows]], [[Linux]] and [[Android (operating system)|Android]].


==Description==
==Description==
The dialect is described by the authors as a second generation BASIC, and has a lot in common with [[QBasic]]. It is a structured BASIC, and contains the most advanced math functions and operators found on graphing calculators such as matrices and Gauss-Jordan method.
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==
==Intended application==
The "Small" prefix in the name smallBASIC reflects the project's original intention of being used with the [[Palm (PDA)|Palm]], a small hand-held device. SmallBASIC was designed for portability, and is written in [[C (programming language)|C]] with separate modules containing any code that is unique to a particular platform.<ref name="ascii-world">{{cite web |url=http://www.ascii-world.com/about-smallbasic |archive-url=https://web.archive.org/web/20071112084122/http://www.ascii-world.com/about-smallbasic |dead-url=yes |archive-date=12 November 2007 |title=About SmallBASIC |publisher=ASCII-World |date=22 February 1999 |accessdate=19 January 2011 }}</ref><ref name="gnosis.cx">[http://gnosis.cx/publish/programming/palm_languages.html PalmOS Hosted Programming Languages]: Using the Palm as a Development Environment</ref>
The "Small" prefix in the name SmallBASIC reflects the project's original intention of being used with the [[Palm (PDA)|Palm]], a small hand-held device. SmallBASIC was designed for portability, and is written in [[C (programming language)|C]] with separate modules containing any code that is unique to a particular platform.<ref name="ascii-world">{{cite web |url=http://www.ascii-world.com/about-smallbasic |archive-url=https://web.archive.org/web/20071112084122/http://www.ascii-world.com/about-smallbasic |url-status=dead |archive-date=12 November 2007 |title=About SmallBASIC |publisher=ASCII-World |date=22 February 1999 |access-date=19 January 2011 }}</ref><ref name="gnosis.cx">[http://gnosis.cx/publish/programming/palm_languages.html PalmOS Hosted Programming Languages]: Using the Palm as a Development Environment</ref>


SmallBASIC is intended to support the same sorts of applications supported by [[GW-BASIC]] and [[QBasic]] on the [[IBM Personal Computer|IBM PC]], with support for drawing [[Geometric primitive|Graphic Primitives]] to the screen, creating sounds, [[String (computer science)|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 [[Conversion of units|Unit conversion]], [[Algebra]], [[Matrix math]], [[Trigonometry]], [[Statistics]], and for two and three dimensional [[Graph of a function|Equation Graphing]].<ref name="ascii-world" /><ref name="gnosis.cx" />
SmallBASIC is intended to support the same sorts of applications supported by [[GW-BASIC]] and [[QBasic]] on the [[IBM Personal Computer|IBM PC]], with support for drawing [[Geometric primitive|Graphic Primitives]] to the screen, creating sounds, [[String (computer science)|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 [[Conversion of units|Unit conversion]], [[Algebra]], [[Matrix math]], [[Trigonometry]], [[Statistics]], and for two and three dimensional [[Graph of a function|Equation Graphing]].<ref name="ascii-world" /><ref name="gnosis.cx" />


==History==
Other programming languages for Palm OS that are written in SmallBASIC include Exclamation and [[Brainfuck]].<ref name="esoteric">{{cite web|url=http://esoteric.sange.fi/archive/2002-q1-2 |title=Esoteric Language Mailing List |date= |accessdate=19 January 2011}}</ref>

SmallBASIC was designed to run on minimal hardware. One of the primary platforms supported was [[Palm OS]],<ref name="freshmeat">[http://freshmeat.net/articles/palmos-software Freshmeat.net]: Editing text on PalmOS using SmallBASIC.</ref> 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==
==Platforms==


SmallBASIC is available for all [[POSIX]]-Compliant operating systems (including [[Linux]], [[BSD]], and [[UNIX]]),<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/unix/ |title=SourceForge.net Repository - Unix |publisher=Smallbasic.svn.sourceforge.net |access-date=2011-01-22}}</ref> [[DOS]]/[[DJGPP]],<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/dos-djgpp/ |title=SourceForge.net Repository - DOS-DJGPP |publisher=Smallbasic.svn.sourceforge.net |access-date=2011-01-22}}</ref> [[Windows API|Win32]],<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/win32/ |title=SourceForge.net Repository - WIN32 |publisher=Smallbasic.svn.sourceforge.net |access-date=2011-01-22}}</ref> [[FLTK]],<ref name="McComb">{{cite book|url=https://archive.org/details/robotbuilderssou00mcco |url-access=registration |page=[https://archive.org/details/robotbuilderssou00mcco/page/411 411] |quote=SmallBASIC. |title=Robot builder's sourcebook |publisher=McGraw-Hill Professional|author=Gordon McComb| isbn=0-07-140685-9 |year=2002 |access-date=19 January 2011}}</ref> VTOS,<ref name="McComb" /> [[Franklin eBookMan]],<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/ebm/ |title=SourceForge.net Repository - EBM |publisher=Smallbasic.svn.sourceforge.net |access-date=2011-01-22}}</ref> [[Cygwin]]/[[MingW]],<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/mingw/ |title=Sigwin/MinG |publisher=Smallbasic.svn.sourceforge.net |access-date=2011-01-22}}</ref> Helio/VT-OS,<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/helio/ |title=SourceForge.net Repository - Helio |publisher=Smallbasic.svn.sourceforge.net |access-date=2011-01-22}}</ref> [[Android (operating system)|Android]],<ref>{{cite web|url=https://play.google.com/store/apps/details?id=net.sourceforge.smallbasic |title=SourceForge.net Repository - Android |publisher=Smallbasic.svn.sourceforge.net |access-date=2011-01-22}}</ref> the [[Nokia]] N770 Internet Tablet.,<ref>{{cite web|url=http://sourceforge.net/projects/smallbasic/files/n770/ |title=SmallBASIC - N770 at |publisher=Sourceforge.net |access-date=2011-01-22}}</ref> and on any system that supports [[Simple DirectMedia Layer|SDL]], [[FLTK]], [[SVGALib]], [[Linux framebuffer]], or [[Graphics Device Interface|Windows GUI]].
SmallBASIC was designed to run on minimal hardware. One of the primary platforms supported is [[Palm OS]],<ref name="freshmeat">[http://freshmeat.net/articles/palmos-software Freshmeat.net]: Editing text on PalmOS using SmallBASIC.</ref> where memory, CPU cycles, and screen space are limited. The SmallBASIC graphics engine can use ASCII graphics (similar to [[ASCII art]]) and therefore run many programs on pure text devices. SmallBASIC runs even on Palm OS wristwatches made by [[Fossil, Inc.]]


== Syntax ==
It is available for all [[POSIX]]-Compliant operating systems (including [[Linux]], [[BSD]], and [[UNIX]]),<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/unix/ |title=SourceForge.net Repository - Unix |publisher=Smallbasic.svn.sourceforge.net |date= |accessdate=2011-01-22}}</ref> [[DOS]]/[[DJGPP]],<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/dos-djgpp/ |title=SourceForge.net Repository - DOS-DJGPP |publisher=Smallbasic.svn.sourceforge.net |date= |accessdate=2011-01-22}}</ref> [[Windows API|Win32]],<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/win32/ |title=SourceForge.net Repository - WIN32 |publisher=Smallbasic.svn.sourceforge.net |date= |accessdate=2011-01-22}}</ref> [[FLTK]],<ref name="McComb">{{cite book|url=https://books.google.com/books?id=jBEE84ddA0MC&pg=PA411&dq=%22SmallBASIC%22#v=onepage&q=%22SmallBASIC%22&f=false |title=Robot builder's sourcebook |publisher=McGraw-Hill Professional|author=Gordon McComb| ISBN=0-07-140685-9 |year=2002 |accessdate=19 January 2011}}</ref> VTOS,<ref name="McComb" /> [[Franklin eBookMan]],<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/ebm/ |title=SourceForge.net Repository - EBM |publisher=Smallbasic.svn.sourceforge.net |date= |accessdate=2011-01-22}}</ref> [[Cygwin]]/[[MingW]],<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/mingw/ |title=Sigwin/MinG |publisher=Smallbasic.svn.sourceforge.net |date= |accessdate=2011-01-22}}</ref> Helio/VT-OS,<ref>{{cite web|url=http://smallbasic.svn.sourceforge.net/viewvc/smallbasic/trunk/smallbasic/src/helio/ |title=SourceForge.net Repository - Helio |publisher=Smallbasic.svn.sourceforge.net |date= |accessdate=2011-01-22}}</ref> [[Android (operating system)|Android]],<ref>{{cite web|url=https://play.google.com/store/apps/details?id=net.sourceforge.smallbasic |title=SourceForge.net Repository - Android |publisher=Smallbasic.svn.sourceforge.net |date= |accessdate=2011-01-22}}</ref> the [[Nokia]] N770 Internet Tablet.,<ref>{{cite web|url=http://sourceforge.net/projects/smallbasic/files/n770/ |title=SmallBASIC - N770 at |publisher=Sourceforge.net |date= |accessdate=2011-01-22}}</ref> and on any system that supports [[Simple DirectMedia Layer|SDL]], [[FLTK]], [[SVGALib]], [[Linux framebuffer]], or [[Graphics Device Interface|Windows GUI]].

The syntax of SmallBASIC has a lot in common with [[QBasic]]. [[Line number]]s are not required, and statements are terminated by [[newline]]s. Multiple statements may be written on a single line by separating each statement with a [[colon (punctuation)|colon]] (:)

An example [["Hello, World!" program]] is:

<syntaxhighlight lang="qbasic">
PRINT "Hello, World!"
</syntaxhighlight>

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

<syntaxhighlight lang="qbasic">
I = IMAGE("image_name.png") 'Loads a png file
I.SHOW(100,100) 'shows the image on screen at the coordinates 100,100
</syntaxhighlight>

==Loadable modules==

External modules can be written in [[C (programming language)|C]] to extend the functionality provided by SmallBASIC.<ref name="smallbasicmodules">{{cite web|url=https://github.com/smallbasic/smallbasic.plugins |title=SmallBASIC plugins |website=[[GitHub]] |access-date=22 March 2022}}</ref> Since version 12.20 modules for [[Raylib]], [[Nuklear]] and [[WebSockets]] are included in the release.<ref name="smallbasicgithub">{{cite web|url=https://smallbasic.github.io |title=SmallBASIC Home Page |access-date=22 March 2022}}</ref> Additionally a loadable module to access the [[GPIO]] connector of the [[Raspberry Pi]] exists.<ref name="smallbasicpigpio">{{cite web|url=https://joe7m.github.io/SmallBasicPIGPIO/index.html |title=SmallBASIC PiGPIO Home Page |access-date=22 March 2022}}</ref>


==Reception==
==Reception==
*[[Tech Republic]] calls it "''an excellent tool to begin programming with.''"<ref>{{cite web |last=McPherson |first=James |url=http://articles.techrepublic.com.com/5100-10878_11-5031775.html |title=Development in the palm of your hand, part 2 |publisher=Articles.techrepublic.com.com |date=4 June 2001 |accessdate=19 January 2011 |archiveurl=https://archive.today/20120904213009/http://www.techrepublic.com/article/development-in-the-palm-of-your-hand-part-2/5031775 |archivedate=4 September 2012 |deadurl=yes |df= }}</ref>
*[[Tech Republic]] calls it "''an excellent tool to begin programming with.''"<ref>{{cite web |last=McPherson |first=James |url=http://articles.techrepublic.com.com/5100-10878_11-5031775.html |title=Development in the palm of your hand, part 2 |publisher=Articles.techrepublic.com.com |date=4 June 2001 |access-date=19 January 2011 |archive-url=https://archive.today/20120904213009/http://www.techrepublic.com/article/development-in-the-palm-of-your-hand-part-2/5031775 |archive-date=4 September 2012 |url-status=dead }}</ref>
*ASCII-World says "''SmallBASIC is an excellent tool for mathematics''"<ref name="ascii-world" />
*ASCII-World says "''SmallBASIC is an excellent tool for mathematics''"<ref name="ascii-world" />
* David Mertz, Ph.D. and Andrew Blais, Ph.D. of Gnosis Software say "''SmallBASIC has one of the better development interfaces [we have] reviewed. ''"<ref name="gnosis.cx" /><!-- Note: David Mertz s the author of the Charming Python webpgage - one of the most widely read discussions of the Python programming language worldwide. -->
* David Mertz, Ph.D. and Andrew Blais, Ph.D. of Gnosis Software say "''SmallBASIC has one of the better development interfaces [we have] reviewed. ''"<ref name="gnosis.cx" /><!-- Note: David Mertz s the author of the Charming Python webpgage - one of the most widely read discussions of the Python programming language worldwide. -->
Line 52: Line 73:


==References==
==References==
{{reflist|30em}}
{{Reflist|30em}}


==External links==
==External links==
* {{SourceForge|smallbasic}}
* {{github|smallbasic}}
* [http://smallbasic.sourceforge.net/ SmallBASIC Home Page at SourceForge]
* [https://smallbasic.github.io SmallBASIC Home Page at Github pages]

{{BASIC}}


{{DEFAULTSORT:Smallbasic}}
{{DEFAULTSORT:SmallBASIC}}
[[Category:BASIC programming language family]]
[[Category:BASIC programming language family]]
[[Category:Free compilers and interpreters]]
[[Category:Free and open source interpreters]]
[[Category:Cross-platform free software]]
[[Category:Cross-platform free software]]
[[Category:Free software programmed in C]]
[[Category:Free software programmed in C]]

Latest revision as of 17:12, 10 November 2024

SmallBASIC
SmallBASIC Screenshot
Stable release
12.27 (Windows/Linux/Android)[1] / April 26, 2024; 7 months ago (2024-04-26)[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 Microsoft 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 Graphic Primitives to the screen, creating 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] 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". 26 April 2024. Retrieved 23 May 2024.
  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. Archived from the original on 4 September 2012. Retrieved 19 January 2011.
[edit]