Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

True BASIC

From Wikipedia, the free encyclopedia
Programming language
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "True BASIC" – news ·newspapers ·books ·scholar ·JSTOR
(June 2016) (Learn how and when to remove this message)
True BASIC
Designed byJohn G. Kemeny
Thomas E. Kurtz
DeveloperTrue BASIC, Inc.
First appeared1983; 43 years ago (1983)
Websitewww.truebasic.com
Influenced by
BASIC

True BASIC is a variant of theBASIC programming language descended fromDartmouth BASIC — the original BASIC. Both were created by college professorsJohn G. Kemeny andThomas E. Kurtz.[1]

History

[edit]
icon
This sectiondoes notcite anysources. Please helpimprove this section byadding citations to reliable sources. Unsourced material may be challenged andremoved.(June 2018) (Learn how and when to remove this message)

True BASIC traces its history to an offshoot ofDartmouth BASIC called Structured BASIC, orSBASIC for short. This was released sometime in 1975 or 1976, but was not installed as the mainline version of BASIC on theDartmouth Time-Sharing System (DTSS) that supported the campus. Shortly after, Kemeny became involved in an effort to produce anANSI 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 asMinimal BASIC that was similar to earliest versions of Dartmouth BASIC, while later work was aimed at aFull BASIC that was essentially SBASIC with various extensions.

By the early 1980s, tens of millions ofhome computers were running some variation ofMicrosoft BASIC, which had become thede 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 BASICcompiler forMS-DOS,Microsoft Windows, andClassic Mac OS. At one time, versions forTRS-80 Color Computer,Amiga andAtari ST computers were offered, as well as aUNIX command-line compiler.

Features

[edit]
icon
This sectiondoes notcite anysources. Please helpimprove this section byadding citations to reliable sources. Unsourced material may be challenged andremoved.(June 2018) (Learn how and when to remove this message)

Being astructured programming implementation of the language, it dispenses with the need forline numbers andGOTO statements, although these can still be used.

True BASIC provides statements formatrix arithmetic, a feature that had been present in Dartmouth BASIC since early times, but had been dropped in almost allmicrocomputer versions ofBASIC interpreters. It implementsglobal andlocal variables which make it possible to writerecursive functions andsubroutines.

The designers wanted to make the language hardware-independent, so True BASICsource code would run equally well on any version of their compiler.[citation needed] 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 inassembly 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:

RANDOMIZESETWINDOW0,20,0,20SETCOLOR5!Setthepenandtextcolourto5astruebasichas0-15coloursPRINT"Welcome To ..."!Print"Welcome To ..."ontheuser's screen.DO!BegintheloopLETx=rnd*20!Letthevalue'x' equal a random number between '0' and '20'LETy=rnd*20!Letthevalue'y' equal a random number between '0' and '20'Pause.1!Waits1/10ofasecondPLOTTEXT,atx,y:"Fabulous Wikipedia!"!Plot'Fabulous Wikipedia!' at coordinates 'x' and 'y'LOOP!EndtheloopEND!Endtheprogram

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:

!DrawtheCarSETWINDOW0,20,0,20SETCOLOR5BOXAREA2,6,2,3BOXAREA9,13,2,3BOXAREA16,20,2,3SETCOLOR249PLOTLINES:0,5;20,5FLOOD10,1BOXKEEP0,20,0,5INroad$BOXCIRCLE2,3,5,6FLOOD2.5,5.5BOXCIRCLE5,6,5,6FLOOD5.5,5.5SETCOLOR35PLOTLINES:2.5,6;5.5,6PLOTLINES:5,6;8,6;8,8;6,8;6,10;2,10;2,8;0,8;0,6;3,6FLOOD4,8SETCOLOR248BOXAREA4,5,8,9BOXKEEP0,8,5,10INcar$!Savethecarin'car$'FORx=1TO20STEP1!Createa'for' loopBOXSHOWroad$AT0,0BOXSHOWcar$ATx,5PAUSE.1CLEARNEXTx!Endthe'for' loopEND!Endtheprograms

Reception

[edit]

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 "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 myMicrosoft andCBASIC heresies."[2]

Some users have complained about their programs and the editor using up 100% of theirCPU (orcore).[3][4][5][6] This appears to be caused by the editor and user's programs using a loop which constantlypolls the keyboard and mouse for events. The problem has been known since at least the end of 2010,[3] yet as of early 2014 is still being worked on.[6]

Further reading

[edit]
  • 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

[edit]
  1. ^Kemp, Juliet."BASIC: The Language that started a revolution"(PDF). Retrieved25 June 2022.
  2. ^Pournelle, Jerry (September 1985)."PCs, Peripherals, Programs, and People".BYTE. p. 347. Retrieved20 March 2016.
  3. ^ab"CPU Usage".True BASIC Support Forum Dec 31, 2010. Retrieved26 July 2014.
  4. ^"CPU usage at 100%".True BASIC Support Forum Aug 22, 2012. Retrieved26 July 2014.
  5. ^"CPU usage".True BASIC Support Forum Sep 24, 2013. Retrieved26 July 2014.
  6. ^ab"A few more editor bugs".True BASIC Support Forum reply Feb 18, 2014. Retrieved26 July 2014.

External links

[edit]
Dialects of theBASIC programming language (list)
Classic
Microsoft
Texas Instruments
Hewlett-Packard
Locomotive Software
Microcomputers
Minicomputers
Time-sharing computers
Other
Extenders
Procedure-
oriented
Proprietary
Free and
open source
Withobject
extensions
Proprietary
Free and
open source
RAD
designers
Proprietary
Free and
open source
Defunct
Authority control databases: NationalEdit this at Wikidata
Retrieved from "https://en.wikipedia.org/w/index.php?title=True_BASIC&oldid=1291555292"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp