Originally published at: https://boingboing.net/2024/05/01/programming-language-basic-is-60-years-old.html
…
IF 60 years old
THEN celebrate
It was the language of choice at the Byte Shop when I worked there in 1978 in high school. I can’t say that I’ve used it since then.
Meanwhile FORTRAN is old enough to retire.
Oh and SQL, the language directly or indirectly behind getting data out of nearly every kind of database everywhere (they’re everywhere) is 45.
Let that sink in.
yeah, a solid beginning for many of us nerdolithics:
BASIC, FORTRAN, C, Pascal, Forth, (C++ but never got the hang of it), Perl, Python (and i suspect that’ll be the last, maybe)
avoid functions with global side-effects and make lots of comments because you really can’t trust your memory (frink out)
The scariest incantation to make any old- OR new-school developer quake in their boots:
object COBOL
I worked with Merant’s Net Express implementation of OOCOBOL for about 10 years and loved it. I have no idea why it would inspire fear in anyone.
sighs my first love!
Java isn’t even 30…
Oh and COBOL is 65!
HELLO WORLD
I wrote a program for my masters in basic partly because I’d never really programmed before and I had to knock up something functional fast, this was in the 2000’s
It was really easy to learn, and gave me useful results.
I learned BASIC from articles in Byte Magazine. I miss that rag.
OMG - someone alive who’s heard of FORTH!
You got a masters in BASIC??!!
<ducks
“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger W. Dijkstra, quoted in The Jargon File
I spent the 80s in working in FORTH with an astronomy PhD programmer who learned it from Chuck Moore on Kitt Peak, then wrote his own Z80 and M68K versions. Now I work at the radio telescope where Moore wrote it. But we switched to C long ago.
Still just as readable as when it was written!
10 FILES *
20 DIM U$[8],X$[8],C$[6,16],Q1$[80],F$[35],T$[40,8],D$[40,30]
30 DIM N$[8],P[40,2],A$[255],B$[255],P$[255],S$[16]
40 INTEGER F9,W9,L9
50 *WHOM(U$,X$,X$,X$)
60 *FULLSCRN(U$,F9,W9,L9,C$[1],C$[2],C$[3],C$[4],C$[5],C$[6])
70 MARGIN W9
80 *COM(Q1$)
90 Q1$=DEB$(UPS$(Q1$))
100 IF Q1$="" OR Q1$[1,1]="?" THEN Q1$="BHPUNIH/WAGAWAGA.PROD.A ?"+&
Q1$[2]
110 IF NOT POS(Q1$,"?") THEN DO
120 IF NOT POS(Q1$," ") THEN Q1$=Q1$+" ?"
130 ELSE Q1$=Q1$[1,POS(Q1$," ")]+"?"+Q1$[POS(Q1$," ")+1]
140 DOEND
150 F$=DEB$(Q1$[1,POS(Q1$,"?")-1])
160 IF NOT POS(F$,".") THEN F$=F$+".PROD.A"
170 Q1$=Q1$[POS(Q1$,"?")]
180 Q1$=DEB$(Q1$[2])
190 ASSIGN F$,1,X,NL
200 IF X>2 THEN DO
210 PRINT "No help available..."
220 END
230 DOEND
240 IF C$[1]="" OR L9<8 THEN F9=0
250 IF NOT F9 THEN C$[1]=""
260 T$[1]="OVERVIEW",D$[1]="GENERAL DESCRIPTION",P[1,1]=1,P[1,2]=0
270 T$[2]="ALL",D$[2]="PRINT ALL TOPICS",P[2,1]=-2
280 T$[3]="EXIT",D$[3]="EXIT FROM HELP",P[3,1]=-3
290 S$=" "
300 T9=3,T8=0,B9=0
310 IF Q1$="^^foad" THEN DO
320 ASSIGN *,1
330 END
340 DOEND
350 IF T8 THEN GOSUB 1070
360 ELSE DO
370 T8=1
380 ON END #1 THEN 620
390 READ #1;A$
400 A$=DEB$(A$)
410 IF N$="" AND A$<>"" AND A$[1,2]<>"**" AND A$[1,1]<>"^" THEN DO
420 IF POS(A$," ") THEN N$=UPS$(A$[1,POS(A$," ")-1 MIN 8])
430 ELSE N$=UPS$(A$)
440 IF Q1$="" THEN GOSUB 1070
450 DOEND
460 IF A$[1,2]="**" THEN DO
470 T9=T9+1
480 P[T9,1]=REC(1)
490 P[T9,2]=ITM(1)
500 IF POS(A$,"//")>3 THEN DO
510 T$[T9]=UPS$(DEB$(A$[3,POS(A$,"//")-1]))
520 D$[T9]=DEB$(A$[POS(A$,"//")+2])
530 IF D$[T9]="" THEN D$[T9]=" ---"
540 DOEND
550 ELSE DO
560 T$[T9]=DEB$(A$[3])
570 D$[T9]=" ---"
580 DOEND
590 IF Q1$="" THEN X=FNM(T9)
600 DOEND
610 GOTO 390
620 DOEND
630 IF Q1$<>"" THEN DO
640 A$=Q1$
650 Q1$="^^foad"
660 GOTO 720
670 DOEND
680 PRINT '13'10'10+C$[5]+N$+"/HELP>"+C$[6]+" ";
690 X=FNB(-1)
700 LINPUT A$
710 X=FNB(1)
720 A$=DEB$(UPS$(A$[1;8]))
730 IF POS(A$," ") THEN A$=A$[1;POS(A$," ")-1]
740 IF A$[1;1]="?" THEN DO
750 PRINT FNW$('10&
"Select a help topic from the list of topics and ");
760 PRINT FNW$("descriptions, type it in, and press return.")
770 PRINT FNW$('10"Select OVERVIEW to get an idea of what the ");
780 PRINT FNW$(&
"program is about, and ALL to get all available help.")
790 PRINT FNW$('10&
"Type EXIT to end the help, and return to where you were.")
800 GOTO 680
810 DOEND
820 FOR Z=1 TO T9
830 IF POS(T$[Z],A$)=1 THEN DO
840 IF P[Z,1]>0 THEN DO
850 X=FNP(Z,0)
860 GOTO 310
870 DOEND
880 IF P[Z,1]=-2 THEN DO
890 X=FNP(1,1)
900 GOTO 310
910 DOEND
920 IF P[Z,1]=-3 THEN DO
930 ASSIGN *,1
940 X=FNB(-1)
950 END
960 DOEND
970 DOEND
980 NEXT Z
990 PRINT "No such help topic."
1000 IF Q1$<>"" THEN DO
1010 Q1$=""
1020 PRINT '7;
1030 ENTER 1,X,X
1040 GOTO 310
1050 DOEND
1060 GOTO 680
1070 PRINT C$[1]+C$[5]+"== "+N$+" HELP =="+C$[6];'13'10
1080 X=INT((W9-1)/39) MAX 1
1090 P$=C$[5]
1100 FOR Z=1 TO X
1110 P$=P$+"-TOPIC-- ---------DESCRIPTION---------- "
1120 NEXT Z
1130 PRINT DEB$(P$)+C$[6]
1140 IF FNB(1) THEN 1190
1150 FOR Z=1 TO T9
1160 X=FNM(Z)
1170 IF FNB(1) THEN 1190
1180 NEXT Z
1190 RETURN
1200 DEF FNM(Q)
1210 IF (Q MOD (INT(W9/39) MAX 1))=0 THEN DO
1220 PRINT USING "#,8AX";T$[Q]
1230 PRINT D$[Q]
1240 DOEND
1250 ELSE PRINT USING "#,8AX,30AX";T$[Q],D$[Q]
1260 RETURN 0
1270 FNEND
1280 DEF FNP(S,M0)
1290 A$="",I1=I2=I3=J=P=M5=Q5=0,L8=1
1300 IF NOT F9 THEN PRINT '13'10
1310 PRINT C$[1]+C$[5]+"== "+N$+" HELP =="+C$[6]
1320 ON END #1 THEN 2190
1330 READ #1,P[S,1]
1340 ADVANCE #1;P[S,2],X
1350 IF Q5 THEN 2190
1360 READ #1;B$
1370 IF B$[1,2]="**" AND NOT M0 THEN 2190
1380 IF B$[1,1]="^" THEN DO
1390 IF LEN(A$) THEN X=FNQ(S$[1;I1]+A$)
1400 A$=""
1410 B$=UPS$(B$)
1420 IF B$[2]="NJ" THEN J=0
1430 IF B$[2]="RJ" THEN J=1
1440 IF B$[2,2]="O" THEN DO
1450 I3=0
1460 CONVERT B$[3] TO I3,1470
1470 DOEND
1480 IF POS("TABLE",B$[2])=1 THEN I1=1,I2=0,I3=0,J=0
1490 IF POS("TEXT",B$[2])=1 THEN I1=0,I2=2,I3=5
1500 IF POS("PAGE",B$[2])=1 THEN L8=999
1510 IF B$[2,2]="M" THEN DO
1520 I1=I2=0
1530 IF POS(B$,"-") THEN DO
1540 CONVERT B$[3,POS(B$,"-")-1] TO I1,1550
1550 CONVERT B$[POS(B$,"-")+1] TO I2,1560
1560 DOEND
1570 ELSE CONVERT B$[3] TO I1,1580
1580 I1=ABS(I1) MIN 10
1590 I2=ABS(I2) MIN 4
1600 I3=I1
1610 DOEND
1620 GOTO 1350
1630 DOEND
1640 IF B$[1,2]="**" THEN DO
1650 IF A$<>"" THEN DO
1660 IF P THEN X=FNQ(S$[1;I3]+A$)
1670 ELSE X=FNQ(S$[1;I1]+A$)
1680 X=FNQ("")
1690 A$=""
1700 DOEND
1710 L8=-L8
1720 I1=I2=I3=0
1730 GOTO 1350
1740 DOEND
1750 IF B$="" OR A$="" OR B$[1,1]=" " THEN DO
1760 IF A$="" THEN 1790
1770 IF P THEN X=FNQ(S$[1;I3]+A$)
1780 ELSE X=FNQ(S$[1;I1]+A$)
1790 IF B$="" THEN X=FNQ("")
1800 A$=B$
1810 P=1
1820 DOEND
1830 ELSE DO
1840 IF A$[LEN(A$)]="." THEN A$=A$+" "
1850 IF A$[LEN(A$)-1 MAX 1]="." THEN A$=A$+" "
1860 IF A$[LEN(A$)]=" " THEN A$=A$+B$
1870 ELSE A$=A$+" "+B$
1880 DOEND
1890 L7=W9-I1*(P=0)-I3*(P=1)-I2
1900 IF I1<>I2 THEN A$=DEB$(A$)
1910 IF LEN(A$)<L7 THEN 1350
1920 FOR Z=L7 TO 1 STEP -1
1930 IF POS(" ,-!?)]",A$[Z;1]) THEN 1960
1940 NEXT Z
1950 Z=L7
1960 P$=A$[1,Z]
1970 IF J AND W9>31 THEN DO
1980 IF I1<>I3 THEN P$=DEB$(P$)
1990 FOR X=1 TO (L7-LEN(P$)) MIN LEN(P$)/2
2000 M=20,C=0,P0=1,P1=0
2010 FOR Y=1 TO LEN(P$)
2020 IF P$[Y;1]=" " THEN C=C+1
2030 ELSE DO
2040 IF NOT C THEN 2080
2050 IF C=M THEN P1=P1+1
2060 IF C=M AND INT(RND(1)*P1)=1 THEN P0=Y-1,M=C
2070 IF C<M THEN P0=Y-1,M=C,P1=1
2080 C=0
2090 DOEND
2100 NEXT Y
2110 P$=P$[1,P0]+" "+P$[P0+1]
2120 NEXT X
2130 DOEND
2140 IF P THEN X=FNQ(S$[1;I3]+P$)
2150 ELSE X=FNQ(S$[1;I1]+P$)
2160 P=0
2170 A$=A$[Z+1]
2180 GOTO 1890
2190 IF P THEN X=FNQ(S$[1;I3]+A$)
2200 ELSE X=FNQ(S$[1;I1]+A$)
2210 IF F9 AND NOT Q5 THEN DO
2220 PRINT LIN(L9-L8-1);C$[5]+"*END*"+C$[6];
2230 ENTER 60,X,X
2240 DOEND
2250 RETURN 0
2260 FNEND
2270 DEF FNQ(X$)
2280 DIM M$[1]
2290 IF FNB(1) OR Q5 THEN Q5=1
2300 ELSE DO
2310 IF (L8<0 OR (L8>L9-4 AND M5) OR (L8>L9-2)) AND F9 THEN DO
2320 IF L8>0 THEN PRINT LIN(L9-L8);C$[5]+"-MORE-"+C$[6];
2330 ELSE PRINT LIN(L9+L8);C$[5]+"-MORE-"+C$[6];
2340 ENTER 60,X,M$
2350 IF POS("NEQ",UPS$(M$)) AND M$<>"" THEN Q5=1
2360 ELSE PRINT C$[1]+C$[5]+"== "+N$+" HELP =="+C$[6];'13'10
2370 L8=2
2380 M5=0
2390 DOEND
2400 IF LEN(DEB$(X$)) AND NOT Q5 THEN DO
2410 IF M5 THEN PRINT LIN(M5);X$
2420 ELSE PRINT X$
2430 M5=0
2440 DOEND
2450 ELSE M5=M5+1
2460 L8=L8+1
2470 DOEND
2480 RETURN 0
2490 FNEND
2500 DEF FNB(X)
2510 REAL B7
2520 INTEGER B8
2530 B8=0
2540 *CHECKCTLY(B8)
2550 IF X<0 AND B8 THEN DO
2560 *DISARMCTLY
2570 RETURN 0
2580 DOEND
2590 ELSE DO
2600 IF B8<>2 THEN DO
2610 *ARMCTLY
2620 B7=0,B9=0
2630 DOEND
2640 ELSE DO
2650 *RESETCTLY
2660 B7=TIM(-1)-B9
2670 B9=TIM(-1)
2680 DOEND
2690 DOEND
2700 RETURN B7
2710 FNEND
2720 DEF FNW$(W9$)
2730 DIM W8$[255]
2740 IF POS(W9$," ") THEN DO
2750 W8$=W9$[1,POS(W9$," ")]
2760 PRINT W8$;
2770 W9$=W9$[POS(W9$," ")+1]
2780 GOTO 2740
2790 DOEND
2800 PRINT W9$;
2810 RETURN ""
2820 FNEND
My MS-DOS computer came with QBASIC, and the first programming I ever did was to work out how to make the sun at the top be normally frowny, and smile when hit with a banana, rather than the other way round.
I never learned any programming language but i do have fond memories of the computer classes i had as a young kid. Our school had a nifty program to teach kids some programming skills, i remember it being called LOGO Writer perhaps. You could use the program to make quizzes, fairly basic games, animations and songs.