Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
PowerBASIC
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
PowerBASIC
(section)
Add topic