Both sides previous revisionPrevious revisionNext revision | Previous revision |
basic_language [2024/09/17 22:31] – [The basics of BASIC] 4gl ☜ hc9 | basic_language [2024/09/30 20:16] (current) – [Available BASIC Interpreters at SDF] void hc9 |
---|
==== 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's. BASIC's authors intended to create a programming language and environment which would be useful to people who's primary interest was something other than computer programming. It was intended to be used by average users, scientists, and programming students alike. BASIC was instantly popular among the students and faculty of Dartmouth, and it saw rapid adoption on other systems. When the microcomputer revolution started to take hold in the 1970's and 1980's, BASIC was the default user environment of choice. As a result, many of today's programmers cut their teeth on BASIC. This tutorial will help you get started with this wonderful little language. BASIC remains a very easy to learn language, and it is great for writing small programs. Best of all, a lot of the concepts in BASIC transfer to other languages, so this can serve as a great jumping off point for your programming career! | 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's. BASIC's authors intended to create a programming language and environment which would be useful to people who's primary interest was something other than computer programming. It was intended to be used by average users, scientists, and programming students alike. BASIC was instantly popular among the students and faculty of Dartmouth, and it saw rapid adoption on other systems. When the microcomputer revolution started to take hold in the 1970's and 1980's, BASIC was the default user environment of choice. As a result, many of today's programmers cut their teeth on BASIC (([[doku>syntax_highlighting|Advanced]] Syntax [[wiki:syntax#syntax_highlighting |Highlighting]] is available for BASIC language strings: |
| //basic4gl blitzbasic freebasic gwbasic locobasic mapbasic purebasic qbasic sdlbasic thinbasic xbasic zxbasic//)) (([[wp>List_of_BASIC_dialects|BASIC]] language: |
| [[wp>Basic4GL|basic4gl]] [[wp>Blitz_BASIC|blitzbasic]] [[wp>FreeBASIC|freebasic]] [[wp>GW-BASIC|gwbasic]] [[wp>Locomotive_BASIC|locobasic]] [[wp>MapBasic|mapbasic]] [[wp>PureBasic|purebasic]] [[wp>QBasic|qbasic]] [[wp>SdlBasic|sdlbasic]] [[wp>ThinBasic|thinbasic]] [[wp>XBasic|xbasic]] [[wp>Sinclair_BASIC|zxbasic]])). This tutorial will help you get started with this wonderful little language. BASIC remains a very easy to learn language, and it is great for writing small programs. Best of all, a lot of the concepts in BASIC transfer to other languages, so this can serve as a great jumping off point for your programming career! |
| |
One of the difficulties in learning BASIC lies in the wide array of BASIC compilers and interpreters that are currently in circulation. Each one of these programs comes with their own nuances and extensions to the BASIC programming language. The good news is that there is a lot of commonality between the various versions of BASIC, and once you've gained familiarity with one you can move to another pretty quickly. Best of all, there is a common thread which runs through all the various BASICs, and that is where we will begin. We'll start with a minimal subset of the language, one which will get you up and running with all the interpreters available on SDF. | One of the difficulties in learning BASIC lies in the wide array of BASIC compilers and interpreters that are currently in circulation. Each one of these programs comes with their own nuances and extensions to the BASIC programming language. The good news is that there is a lot of commonality between the various versions of BASIC, and once you've gained familiarity with one you can move to another pretty quickly. Best of all, there is a common thread which runs through all the various BASICs, and that is where we will begin. We'll start with a minimal subset of the language, one which will get you up and running with all the interpreters available on SDF. |
If this is run through a BASIC interpreter, it will have the following output: | If this is run through a BASIC interpreter, it will have the following output: |
| |
<code> | <code basic4gl [highlight_lines_extra="1,2,3,4"]> |
HELLO | HELLO |
HELLO | HELLO |
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 "bwbasic" at the sdf prompt. Type in the program listed above, and then type RUN and press enter. Once you've been greeted enough times, press Ctrl-C to halt the program. The hole session should look like this: | 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 "bwbasic" at the sdf prompt. Type in the program listed above, and then type RUN and press enter. Once you've been greeted enough times, press Ctrl-C to halt the program. The hole session should look like this: |
| |
<code basic4gl> | <code basic4gl [highlight_lines_extra="25,26,27,28,29,30,31,32,33,34,35"] bwBASIC> |
######## ## ## ## ## ### ######## ######## ######## | ######## ## ## ## ## ### ######## ######## ######## |
## ## ## ## ## ## ## ## ## ## ## ## ## | ## ## ## ## ## ## ## ## ## ## ## ## ## |
| |
//This is exactly how to use BASIC at SDF with a plethora of fun and interesting programming examples just for you!// | //This is exactly how to use BASIC at SDF with a plethora of fun and interesting programming examples just for you!// |
| |
| * **Using BASIC** |
| * ''%%https://wiki.twenex.org/tutorials:%%[[https://wiki.twenex.org/tutorials:basic |basic]]'' |
| * ''%%https://wiki.twenex.org/tutorials:basic%%'' – a link for [[plan9front_-_acme_sam_abaco_mothra_and_man#mothra |mothra]] |
| * **BASIC Programming Language** |
| * ''%%https://wiki.sdf.org/doku.php?id=vintage_systems:%%[[vintage_systems:basic |basic]]'' |
| * ''%%https://wiki.sdf.org/doku.php?id=vintage_systems:basic%%'' – a link for [[plan9front_-_acme_sam_abaco_mothra_and_man#mothra |mothra]] |
| * …//our repository for [[https://web.archive.org/web/20240426225029/https://www.livingcomputers.org/Computer-Collection/Online-Systems/User-Documentation.aspx |User Documentation]] (external, archived)//‚ for //Online Systems//‚ for formal user and reference manuals. |
| |
---- | ---- |
| |
$Id: basic-language.html,v 1.4 2016/08/11 02:11:08 pngwen Exp $ [[http://sdf.org/?tutorials/basic-language|BASIC]] - traditional link (using [[wp>Revision_Control_System|RCS]]) | $Id: basic-language.html,v 1.4 2016/08/11 02:11:08 pngwen Exp $ [[http://sdf.org/?tutorials/basic-language|BASIC]] - traditional link (using [[wp>Revision_Control_System|RCS]]) |
| |