Main Page | See live article | Alphabetical index

Turbo BASIC programming language

Turbo BASIC is a programming language made by Borland. It was carried on by another company as PowerBASIC, and is still sold today.

What's this sample turbo basic is structured !

(This is an unrepresentative function: you don't need line numbers, and can have subroutines and functions. It will, however, compile with Turbo BASIC.)

Code Sample

10 INPUT "What is your name"; A$
20 PRINT "Hello "; A$
30 INPUT "How many stars do you want"; S
40 FOR I = 1 TO S
50 S$ = S$ + "*"
55 NEXT I
60 PRINT S$
70 INPUT "Do you want more stars"; Q$
80 IF LEN(Q$) = 0 GOTO 70
90 Q$ = LEFT$(Q$, 1)
100 IF (Q$ = "Y") OR (Q$ = "y") THEN GOTO 30
110 PRINT "Goodbye ";
120 FOR I = 1 TO 200
130 PRINT A$; " ";
140 NEXT I
150 PRINT