basic_language
Differences
This shows you the differences between two versions of the page.
basic_language [2021/03/13 06:30] – created hc9 | basic_language [2023/06/30 00:18] (current) – upsize all the section headings peteyboy | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== BASIC ===== | ===== BASIC ===== | ||
- | === The basics of BASIC === | + | ==== The basics of BASIC ==== |
BASIC, which stands for **B**eginners **A**ll-Purpose **S**ymbolic **I**nstruction **C**ode is a programming language which was created at Dartmouth University by John Kemeny and Thomas Kurtz in the early 1960' | BASIC, which stands for **B**eginners **A**ll-Purpose **S**ymbolic **I**nstruction **C**ode is a programming language which was created at Dartmouth University by John Kemeny and Thomas Kurtz in the early 1960' | ||
Line 24: | Line 24: | ||
</ | </ | ||
+ | === Try This Yourself === | ||
In fact, why don't we try this out in one of our several BASIC interpreters! Go ahead and fire up bwbasic. To do this, just type " | In fact, why don't we try this out in one of our several BASIC interpreters! Go ahead and fire up bwbasic. To do this, just type " | ||
Line 68: | Line 69: | ||
To exit bwbasic, just type " | To exit bwbasic, just type " | ||
- | === Structure of BASIC Lines of Code === | + | ==== Structure of BASIC Lines of Code ==== |
Ok, so let's unpack what we just did a little bit. The basic layout of a BASIC statement works like this: | Ok, so let's unpack what we just did a little bit. The basic layout of a BASIC statement works like this: | ||
Line 98: | Line 99: | ||
GOTO is a command which tells them computer what line to execute next. Normally, the computer will just step through the lines of the program in order, but when it hits a GOTO, that's your chance to send it somewhere else. Here, we are sending it back to line 10. This causes it to print out " | GOTO is a command which tells them computer what line to execute next. Normally, the computer will just step through the lines of the program in order, but when it hits a GOTO, that's your chance to send it somewhere else. Here, we are sending it back to line 10. This causes it to print out " | ||
- | === The BASIC Line Editor === | + | ==== The BASIC Line Editor |
Before we go any further with the language, we should explore what's going on with those line numbers. The answer lies in BASIC' | Before we go any further with the language, we should explore what's going on with those line numbers. The answer lies in BASIC' | ||
Line 131: | Line 132: | ||
So in short, these line numbers are both your labels in your program, and they are also a means to edit your program. Of course, I should mention that not all BASIC interpreters support this sort of direct editing. In those cases, you'll want to edit your program in a standard text editor (like ed!) [ok, or vi or emacs]. But for that old-school feel, you'll want to use line number editing. | So in short, these line numbers are both your labels in your program, and they are also a means to edit your program. Of course, I should mention that not all BASIC interpreters support this sort of direct editing. In those cases, you'll want to edit your program in a standard text editor (like ed!) [ok, or vi or emacs]. But for that old-school feel, you'll want to use line number editing. | ||
- | === Available BASIC Interpreters at SDF === | + | ==== Available BASIC Interpreters at SDF ==== |
* bwbasic | * bwbasic |
basic_language.1615617036.txt.gz · Last modified: 2021/03/13 06:30 by hc9