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
PowerBASIC
(section)
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!
===Turbo Basic=== Borland's Turbo Basic contains extensions to classic BASIC (without breaking compatibility), such as a drawing API and mouse access. Unlike most BASIC implementations of its time, Turbo Basic was a full [[compiler]] which generated native code for MS-DOS. Other implementations were either [[BASIC interpreter|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 [[.exe|executable file]] that could be run on other systems without the Turbo Basic product or runtime libraries. ====Code example==== <!-- Deleted image removed: [[File:Turbobasic11 01.png|thumb|Turbo Basic 1.1 editing the example code, in the zoomed editor window.]] --><!-- Deleted image removed: [[File:Turbobasic11 02.png|thumb|Turbo Basic 1.1 running the example in the multiple-window IDE.]] --> The following program is an example of the [[ALGOL]]-like BASIC dialect that Turbo Basic supported. Unlike traditional BASIC,{{citation needed|date=February 2018}} 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]] style by making line numbers optional and adding the control structures and subroutine definitions needed for structured programming. <syntaxhighlight lang="qbasic"> INPUT "What is your name?: ", n$ PRINT "Hello "; n$ 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$ = LCASE$(LEFT$(q$, 1)) LOOP WHILE q$ = "y" PRINT "Goodbye "; n$ </syntaxhighlight> (<code>s$</code> is a [[string (computer science)|string]] and <code>s</code> is a [[single-precision floating-point format|single-precision floating-point]] (number). They are separate variables.) Like the other Borland products of this era, the code executes within the integrated development environment.
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)