Jump to content

Turbo Basic

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 77.239.254.6 (talk) at 13:00, 19 July 2010 (References: Added Interwiki to Russian page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
File:Turbobasic11 00.png
Turbo Basic 1.1 (1987) startup screen.

Turbo Basic is a BASIC compiler and dialect originally created by Robert "Bob" Zale and bought from him by Borland. When Borland decided to stop publishing it, Zale bought it back from them, renamed it to PowerBASIC and set up PowerBASIC Inc. to continue support and development of it.

This software is from the 1987-1988 period and features the Borland "black screen" similar to Turbo Pascal 4.0, Turbo C 1.0/1.5, and Turbo Prolog 1.1. Borland did not adopt its trademark "blue screen" integrated development environment until the 1989 period when Turbo C 2.0, Turbo C++ 1.1, etc. were released. By this time, Turbo Basic and Turbo Prolog were no longer being sold.

Unlike most BASIC implementations of this period, Turbo Basic was a full compiler which generated native code for MS-DOS. Other implementations were either interpreters, or relied heavily on a runtime library. The integrated development environment could run a BASIC program internally for traditional BASIC debugging (see sample below), or generate an MS-DOS stand-alone executable file that could be run on other systems without the Turbo Basic product or runtime libraries.

Code sample

File:Turbobasic11 01.png
Turbo Basic 1.1 editing the sample code.

The following program is an example of the ALGOL-like BASIC dialect that Turbo Basic supported. Unlike traditional BASIC, which used line numbers and had limited control structures and no support for ALGOL-like subroutines, modern BASIC dialects starting at this period were extended to make the language compatible with modern structured programming theory by discarding the line numbers and adding the control structures and subroutine definitions needed by structured programming.

 INPUT "What is your name:", A$
 PRINT "Hello "; A$
 DO
   S$ = ""
   INPUT "How many stars do you want to print"; S
   FOR I = 1 TO S
     S$ = S$ + "*"
   NEXT I
   PRINT S$
   DO 
     INPUT "Do you want to print more stars"; Q$
   LOOP WHILE LEN(Q$) = 0
   Q$ = LEFT$ (Q$, 1)
 LOOP WHILE (Q$ = "Y") OR (Q$ = "y")
 PRINT "Goodbye "; A$
File:Turbobasic11 02.png
Turbo Basic 1.1 running the sample

Like the other Borland products of this era, the code executes within the integrated development environment.

References