Post Reply 
BASIC is 50 years old!
04-15-2014, 02:13 PM (This post was last modified: 04-19-2014 08:23 AM by Don Shepherd.)
Post: #25
RE: BASIC is 50 years old!
In honor of BASIC's 50th anniversary on May 1, 2014, I list the first meaningful BASIC program I wrote, in spring 1973 for a Physical Geography class at the University of Louisville under Dr. John Anderson, one of the best teachers I have ever known. I wrote the program on a teletype machine connected to a HP-2000C minicomputer running BASIC.

Interestingly, the program uses the INPUT statement which was lacking in the original Dartmouth BASIC in 1964. That BASIC was not interactive. It wasn't until 1966 with BASIC version 3 that the INPUT statement was introduced, allowing a wide variety of interactive programs (and games of course). The program also uses string variables (A$) which appeared in BASIC version 4 in 1968.

The program determines the Koppen classification code for a given region based on user responses to questions. This was a common method for classifying different types of climate regions for areas on earth based on precipitation and temperature, and it was very easy to code in BASIC.

Code:

10 REM KOPPEN CLIMATE CLASSIFICATION SYSTEM
20 REM WRITTEN SPRING, 1973
30 REM BY DON SHEPHERD, UNIVERSITY OF LOUISVILLE
40 INPUT "IS EVERY MONTH > 64.4 F";A$
60 IF A$<>"Y" THEN 80
70 PRINT "A - TROPICAL"
75 STOP
80 INPUT "IS EVAPORATION > PRECIPITATION";A$
100 IF A$<>"Y" THEN 120
110 PRINT "B - DRY"
115 STOP
120 INPUT "IS COLDEST MONTH 26.6 - 64.4 F";A$
140 IF A$<>"Y" THEN 160
145 INPUT "IS AT LEAST ONE MONTH > 50 F";A$
155 IF A$<>"Y" THEN 160
157 PRINT "C - WARM TEMPERATE"
158 STOP
160 INPUT "IS COLDEST MONTH < 26.6 F";A$
180 IF A$<>"Y" THEN 200
185 INPUT "IS WARMEST MONTH > 50 F";A$
187 IF A$<>"Y" THEN 200
188 PRINT "D - SNOW"
189 STOP
200 INPUT "IS WARMEST MONTH < 50 F";A$
220 IF A$<>"Y" THEN 240
230 PRINT "E - ICE"
235 STOP
240 PRINT "NOT CLASSIFIABLE"
999 END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
BASIC is 50 years old! - Don Shepherd - 04-09-2014, 02:32 PM
RE: BASIC is 50 years old! - Don Shepherd - 04-09-2014, 07:20 PM
RE: BASIC is 50 years old! - Don Shepherd - 04-10-2014, 02:39 PM
RE: BASIC is 50 years old! - Egan Ford - 04-10-2014, 10:27 PM
RE: BASIC is 50 years old! - Don Shepherd - 04-10-2014, 11:11 PM
RE: BASIC is 50 years old! - Thomas Klemm - 04-11-2014, 12:56 AM
RE: BASIC is 50 years old! - Don Shepherd - 04-11-2014, 12:18 PM
RE: BASIC is 50 years old! - Don Shepherd - 04-13-2014, 01:04 PM
RE: BASIC is 50 years old! - Les Bell - 04-14-2014, 01:30 AM
RE: BASIC is 50 years old! - HP67 - 04-10-2014, 03:38 PM
RE: BASIC is 50 years old! - Don Shepherd - 04-10-2014, 05:48 PM
RE: BASIC is 50 years old! - Alvaro - 04-10-2014, 09:23 PM
RE: BASIC is 50 years old! - peacecalc - 04-13-2014, 11:43 AM
RE: BASIC is 50 years old! - Alvaro - 04-14-2014, 09:03 PM
RE: BASIC is 50 years old! - Don Shepherd - 04-14-2014, 11:32 PM
RE: BASIC is 50 years old! - Don Shepherd - 04-15-2014, 01:16 AM
RE: BASIC is 50 years old! - Alvaro - 04-15-2014, 08:41 AM
RE: BASIC is 50 years old! - Don Shepherd - 04-15-2014, 01:54 PM
RE: BASIC is 50 years old! - Don Shepherd - 04-15-2014 02:13 PM



User(s) browsing this thread: 1 Guest(s)