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
True BASIC
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|Programming language}} {{more citations needed|date=June 2016}} {{Infobox programming language | name = True BASIC | logo = [[Image:True BASIC logo.svg]] | caption = Original True BASIC logo | released = {{Start date and age|1983}} | os = [[Windows XP]] and newer | designer = [[John George Kemeny|John G. Kemeny]]<br>[[Thomas Eugene Kurtz|Thomas E. Kurtz]] | developer = True BASIC, Inc. | influenced by = [[BASIC]] | website = {{url|www.truebasic.com}} }} '''True BASIC''' is a variant of the [[BASIC|BASIC programming language]] descended from [[Dartmouth BASIC]] — the original BASIC. Both were created by college professors [[John George Kemeny|John G. Kemeny]] and [[Thomas Eugene Kurtz|Thomas E. Kurtz]].<ref>{{Cite web |last=Kemp |first=Juliet |access-date=25 June 2022 |title=BASIC: The Language that started a revolution |url=http://www.linuxvoice.com/issues/005/basic.pdf}}</ref> ==History== {{unreferenced section|date=June 2018}} True BASIC traces its history to an offshoot of [[Dartmouth BASIC]] called Structured BASIC, or [[Dartmouth_BASIC#SBASIC|SBASIC]] for short. This was released sometime in 1975 or 1976, but was not installed as the mainline version of BASIC on the [[Dartmouth Time-Sharing System]] (DTSS) that supported the campus. Shortly after, Kemeny became involved in an effort to produce an [[ANSI]] standard BASIC in an attempt to bring together the many small variations of the language that had developed through the late 1960s and early 1970s. This effort initially focused on a system known as [[Minimal BASIC]] that was similar to earliest versions of Dartmouth BASIC, while later work was aimed at a [[Full BASIC]] that was essentially SBASIC with various extensions. By the early 1980s, tens of millions of [[home computer]]s were running some variation of [[Microsoft BASIC]], which had become the ''de facto'' standard. The ANSI efforts eventually became pointless, as it became clear that these versions were not going to have any market impact in a world dominated by Microsoft. Both versions were eventually ratified but saw little or no adoption and the standards were later withdrawn. Kemeny and Kurtz, however, decided to continue their efforts to introduce the concepts from SBASIC and the ANSI Standard BASIC efforts. This became True BASIC. Initially based on Dartmouth BASIC 7, True BASIC was introduced in 1985. There are versions of the True BASIC [[compiler]] for [[MS-DOS]], [[Microsoft Windows]], and [[Classic Mac OS]]. At one time, versions for [[TRS-80 Color Computer]], [[Amiga]] and [[Atari ST]] computers were offered, as well as a [[UNIX]] command-line compiler. ==Features== {{unreferenced section|date=June 2018}} Being a [[structured programming]] implementation of the language, it dispenses with the need for [[line number]]s and <code>[[GOTO]]</code> statements, although these can still be used. True BASIC provides statements for [[Matrix (mathematics)|matrix]] arithmetic, a feature that had been present in Dartmouth BASIC since early times, but had been dropped in almost all [[microcomputer]] versions of [[BASIC interpreter]]s. It implements [[global variable|global]] and [[local variable]]s which make it possible to write [[Recursion#Functional recursion|recursive]] functions and [[subroutine]]s. The designers wanted to make the language hardware-independent, so True BASIC [[source code]] would run equally well on any version of their compiler.{{citation needed|date=June 2018}} For the most part, they succeed in this endeavor. The drawback for users was that direct access to some features of their machines was not available, but this could be remedied with callable functions and subroutines specially written in [[assembly language]]. Using newer versions of True BASIC, some of the older functions are blocked out. An example of the recent code would be more like this: <syntaxhighlight lang="basic"> RANDOMIZE SET WINDOW 0,20,0,20 SET COLOR 5 !Set the pen and text colour to 5 as true basic has 0-15 colours PRINT "Welcome To ..." !Print "Welcome To ..." on the user's screen. DO !Begin the loop LET x=rnd*20 !Let the value 'x' equal a random number between '0' and '20' LET y=rnd*20 !Let the value 'y' equal a random number between '0' and '20' Pause .1 !Waits 1/10 of a second PLOT TEXT, at x, y: "Fabulous Wikipedia!" !Plot 'Fabulous Wikipedia!' at coordinates 'x' and 'y' LOOP !End the loop END !End the program </syntaxhighlight> This simple program plots the text "Welcome To ..." at the top left-hand corner of the screen, and then continues into a never-ending loop plotting "Fabulous Wikipedia!" at random coordinates. An example of simple animation could be like this: <syntaxhighlight lang="basic"> !Draw the Car SET WINDOW 0,20,0,20 SET COLOR 5 BOX AREA 2,6,2,3 BOX AREA 9,13,2,3 BOX AREA 16,20,2,3 SET COLOR 249 PLOT LINES :0,5;20,5 FLOOD 10,1 BOX KEEP 0,20,0,5 IN road$ BOX CIRCLE 2,3,5,6 FLOOD 2.5,5.5 BOX CIRCLE 5,6,5,6 FLOOD 5.5,5.5 SET COLOR 35 PLOT LINES :2.5,6;5.5,6 PLOT LINES :5,6;8,6;8,8;6,8;6,10;2,10;2,8;0,8;0,6;3,6 FLOOD 4,8 SET COLOR 248 BOX AREA 4,5,8,9 BOX KEEP 0,8,5,10 IN car$ !Save the car in 'car$' FOR x=1 TO 20 STEP 1 !Create a 'for' loop BOX SHOW road$ AT 0,0 BOX SHOW car$ AT x,5 PAUSE .1 CLEAR NEXT x !End the 'for' loop END !End the programs </syntaxhighlight> ==Reception== [[Jerry Pournelle]] in 1985 asked, "why do we need True BASIC at all? [It] doesn't seem to do anything regular BASIC doesn't do, and what it does do isn't attacked in a logical or intuitive manner." He criticized the lack of output when encountering an error, preventing interactive debugging by "[[breakpoint|inserting print statements as diagnostics]]". Pournelle concluded, "I think I'll pass up the opportunity to become a born-again True BASIC believer. I'll enjoy my [[Microsoft BASIC|Microsoft]] and [[CBASIC]] heresies."<ref name="pournelle198509">{{cite news | url=https://archive.org/stream/byte-magazine-1985-09/1985_09_BYTE_10-09_Homebrewing#page/n329/mode/2up | title=PCs, Peripherals, Programs, and People | work=BYTE | date=September 1985 | access-date=20 March 2016 | author=Pournelle, Jerry | pages=347}}</ref> Some users have complained about their programs and the editor using up 100% of their [[CPU]] (or [[CPU core|core]]).<ref name=FirstComplaint>{{cite web|title=CPU Usage|url=http://www.truebasic.com/node/832|website=True BASIC Support Forum Dec 31, 2010|access-date=26 July 2014}}</ref><ref>{{cite web|title=CPU usage at 100%|url=http://www.truebasic.com/node/1005|website=True BASIC Support Forum Aug 22, 2012|access-date=26 July 2014}}</ref><ref>{{cite web|title=CPU usage|url=http://www.truebasic.com/node/1119|website=True BASIC Support Forum Sep 24, 2013|access-date=26 July 2014}}</ref><ref name=LastComplaint>{{cite web|title=A few more editor bugs|url=http://www.truebasic.com/node/1121|website=True BASIC Support Forum reply Feb 18, 2014|access-date=26 July 2014}}</ref> This appears to be caused by the editor and user's programs using a loop which constantly [[Polling (computer science)|polls]] the keyboard and mouse for events. The problem has been known since at least the end of 2010,<ref name=FirstComplaint /> yet as of early 2014 is still being worked on.<ref name=LastComplaint /> ==Further reading== * Kemeny, John G.; Kurtz, Thomas E. (1985). ''Back To BASIC: The History, Corruption, and Future of the Language''. Addison-Wesley Publishing Company, Inc. 141 pp. {{ISBN|0-201-13433-0}}. ==References== {{Reflist}} ==External links== *{{Official website|www.truebasic.com}} {{BASIC}} {{Authority control}} [[Category:Articles with example BASIC code]] [[Category:BASIC interpreters]] [[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:Authority control
(
edit
)
Template:BASIC
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite news
(
edit
)
Template:Cite web
(
edit
)
Template:ISBN
(
edit
)
Template:Infobox programming language
(
edit
)
Template:More citations needed
(
edit
)
Template:Official website
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Unreferenced section
(
edit
)