Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SuperBASIC
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Sinclair QL variant of the BASIC programming language}} {{about|the interpreter included in Sinclair QDOS|the unrelated BASIC system by Tymshare|SUPER BASIC}} {{Infobox software | name = SuperBASIC | screenshot = | caption = | released = {{Start date and age|1984}} | developer = [[Sinclair Research]], [[Jan Jones (novelist)|Jan Jones]] | latest release version = | latest release date = | operating_system = [[Sinclair QDOS|QDOS]] | platform = [[Sinclair QL]] [[microcomputer]] | genre = [[BASIC programming language#Structured BASIC|second-generation BASIC]] | license = [[Proprietary software|Proprietary]] }} '''SuperBASIC''' is an advanced variant of the [[BASIC programming language]] with many [[structured programming]] additions. It was developed at [[Sinclair Research]] by [[Jan Jones (novelist)|Jan Jones]] during the early 1980s. Originally SuperBASIC was intended as the [[BASIC interpreter]] for a [[home computer]] code-named ''SuperSpectrum'', then under development. This project was later cancelled; however, SuperBASIC was subsequently included in the [[read-only memory|ROM]] [[firmware]] of the [[Sinclair QL]] [[microcomputer]] (announced in January 1984), also serving as the [[command line interpreter]] for the QL's [[Sinclair QDOS|QDOS]] [[operating system]].<ref>{{Cite web |title=Illustrating Super-BASIC on the Sinclair QL |url=http://www.computinghistory.org.uk/det/12985/Illustrating-Super-BASIC-on-the-Sinclair-QL/ |access-date=2023-02-06 |website=Computing History}}</ref><ref>{{Cite web |last=Apostolo |first=Alberto |title=Sinclair QL: mistakes, misfortune and so many regrets |url=https://issuu.com/retromagazineworld/docs/retromagazine_00_eng/s/11179075 |access-date=2023-02-06 |website=RetroMagazineWorld |language=en}}</ref> It was one of the first [[BASIC programming language#Structured BASIC|second-generation BASIC]]s to be integrated into a microcomputer's operating system (unlike [[BBC BASIC]] which preceded it in 1981), making the OS user-extendable—as done by [[Linus Torvalds#Early years|Linus Torvalds]] in his formative years. ==Reception== ''[[BYTE]]'' in September 1984 approved of SuperBASIC's improvements over [[Sinclair BASIC]] but criticized its "very, very slow" performance on the [[Byte Sieve]], writing that "With a 7.5-MHz [[Motorola 68008|68008]], you'd think it would take some effort to get a language to run that slowly". The magazine also noted that SuperBASIC's seven-digit precision made it unsuitable for business use ("you can represent numbers far larger than the number of quarks in the universe, but not the pennies on your balance sheet if your turnover exceeds £99,000").<ref name="pountain198409">{{Cite magazine |last=Pountain |first=Dick |date=September 1984 |title=The Sinclair QL |url=https://archive.org/details/BYTE_Vol_09-10_1984-09_Computer_Graphics/page/n416/mode/1up?view=theater |access-date=2025-04-10 |magazine=BYTE |pages=415-419}}</ref> == Advanced features == * RESPR for resident [[Function (computer programming)|procedures]], e.g. to extend QDOS * choice of parameters passed to procedures * procedures return parameters as chosen * <code>IF</code> - <code>THEN</code> - <code>ELSE</code> - <code>END IF</code> * <code>FOR</code> - <code>NEXT</code> - <code>EXIT</code> - <code>END FOR</code> * <code>REPeat</code> - <code>NEXT</code> - <code>EXIT</code> - <code>END REPeat</code> * <code>SELect ON</code> - <code>ON</code> - <code>REMAINDER</code> - <code>END SELect</code> * arbitrarily <code>RETurn</code> from within procedures & functions * [[Type conversion|data type coercion]] between [[Variable (computer science)|numeric]] and [[String (computer science)|string variables]] * actual parameters passing data type to formal parameters * [[Array (data structure)|array]] operations: slicing, joining etc. * <code>LOCal</code> arrays & (string) variables * <code>AUTOmatic</code> line numbering * relative <code>RESTORE</code> & <code>DATA</code> The function below illustrates the last eight of these features. After having <code>RUN</code> it, entering PRINT weekdays$(Iso("19631122",1)) will print <samp>FRI</samp> to the screen. Until cleared (e.g. by entering <kbd><code>NEW</code></kbd>), the function {{mono|Iso}}<ref>gopher://sdf.org/0/users/retroburrowers/TemporalRetrology/QL/JG</ref> will act like an extension to the operating system. Similarly, according to the QL User Guide, "many of the operating system commands are themselves defined as procedures."<ref>{{Cite book |last=Berry |first=Stephen |url=http://www.dilwyn.me.uk/docs/ebooks/olqlug/QL%20Manual%20-%20Keywords.htm#datareadrestore |archive-url=https://web.archive.org/web/20170222113142/http://www.dilwyn.me.uk/docs/ebooks/olqlug/QL%20Manual%20-%20Keywords.htm#datareadrestore |url-status=usurped |archive-date=February 22, 2017 |title=QL User Guide |publisher=Sinclair Research Ltd |year=1984 |edition=2nd |location=Cambridge}}</ref> == Example == AUTO 11,2 DEFine FN Iso(S,O) LOCal y%,m%,d%,i$,n%,w% REM Step 0 - to isolate components of date-stamp S="YEARMoDa" LET y%=S(1TO 4) : m%=S(5TO 6) : d%=S(7TO 8) REM Step 1 - to initiate [[Determination of the day of the week#Keith|Lachman's Congruence]]<ref>{{Citation |title=Motorola 68000 |date=2023-01-11 |url=https://en.wikipedia.org/w/index.php?title=Motorola_68000&oldid=1132884334 |work=Wikipedia |language=en |access-date=2023-02-06}}</ref> LET i$=m%*2.56+ 193 : S=S(1TO 6)- 3 REM Step 2 - to compute the day-number within the week LET w%=(S(1TO 2)&"32"DIV 16+ S(1TO 4)DIV 4+ y%+ i$(2TO 3)+ d%)MOD 7 REM Step 3 - to return result SELect ON O ON O= 5 : n%=i$(2TO 3) ON O= 4 : n%=y% ON O= 3 : n%=m% ON O= 2 : n%=d% ON O= 1 : n%=w% ON O= REMAINDER : n%=-1 END SELect RETurn n% REM data statements DIM weekdays$(6,3) RESTORE 190 FOR count=0 TO 6 : READ weekdays$(count) {{keypress|ctrl|space}} <syntaxhighlight lang="basic"> 100 DIM month$(12,9) 110 RESTORE 120 REM QL User Guide's "Data Read Restore" example ii 130 REM appropriately amended relative to example i 140 FOR count=1 TO 12 : READ month$(count) 150 DATA "January","February","March" 160 DATA "April","May","June" 170 DATA "July","August","September" 180 DATA "October","November","December" 190 DATA "SUN","MON","TUE","WED","THU","FRI","SAT" 199 END DEFine Iso </syntaxhighlight> == Bibliography == * Donald Alcock: ''Illustrating Superbasic on the Sinclair QL.'' Cambridge University Press, 1985. {{ISBN|0-521-31517-4}} * Roy Atherton: ''Good Programming with QL Superbasic.'' Longman Software, 1984. {{ISBN|0-582-29662-5}} * A. A. Berk: ''QL SuperBasic''. Granada Publishing, 1984. {{ISBN|0-246-12596-9}} * {{Cite web|url=http://www.worldofspectrum.org/infoseekid.cgi?id=2000180|title=Illustrating Superbasic on the Sinclair QL - World of Spectrum|website=www.worldofspectrum.org|access-date=2016-04-11}} * [[Jan Jones (novelist)|Jan Jones:]] ''QL SuperBasic: The Definitive Handbook''. McGraw-Hill, 1984 {{ISBN|0070847843}} ([[e-book]] reissue 2014) * Dick Meadows, Robin Bradbeer, Nigel Searle: ''Introduction to Superbasic on the Sinclair QL.'' Hutchinson Computer Publishing, 1984. {{ISBN|0-09-158951-7}} * Dick Meadows, Robin Bradbeer, Nigel Searle: ''Making the Most of the Sinclair QL: QL Superbasic and Its Applications.'' Hutchinson Computer Publishing, 1985. {{ISBN|0-09-160561-X}} * Andrew Nelson: ''Exploring the Sinclair QL: An Introduction to SuperBasic.'' Interface Publications, 1984. {{ISBN|0-907563-84-8}} * John K. Wilson: ''QL Superbasic: A Programmer's Guide.'' Micro Press, 1984. {{ISBN|0-7447-0020-5}} == References == <references/> == External links == * [http://www.nvg.ntnu.no/sinclair/computers/ql/ql_sst.htm ''The Quantum Leap - to where?'']: a chapter from ''Sinclair and the 'Sunrise' Technology'' {{BASIC}} [[Category:BASIC interpreters]] [[Category:Discontinued BASICs]] [[Category:Sinclair Research]] [[Category:Programming languages created by women]] [[Category:BASIC programming language family]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:BASIC
(
edit
)
Template:Citation
(
edit
)
Template:Cite book
(
edit
)
Template:Cite magazine
(
edit
)
Template:Cite web
(
edit
)
Template:ISBN
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Keypress
(
edit
)
Template:Main other
(
edit
)
Template:Mono
(
edit
)
Template:Short description
(
edit
)
Template:Template other
(
edit
)