33

My mom found some old source code that she wrote for a course around the year 1983. I've tried to identify the language that is used, but have come up empty-handed. It seemed to be BASIC at first, but I haven't been able to find a version of BASIC matching this syntax. I also don't know what computer the code was written on.

I've transcribed the source code (which was originally on an ancient print-out) exactly as it was written below:

0010 // PROGRAM LAVET AF LOTTE OG METTE
0020 DIM NAVN$ OF 20
0030 INPUT "INDTAST NAVN   ":NAVN$
0040 PRINT "NAVN   ";NAVN$
0050 INPUT "INDTAST ALDER   ":ALDER
0060 IF ALDER<16 THEN
0070   PRINT "DUER IKKE   ";ALDER
0080 ELSE
0090   IF ALDER>16 THEN
0100     PRINT "GOD NOK   ";ALDER
0110     INPUT "INDTAST HØJDE   ":HØJDE
0120     IF HØJDE<1.80 THEN
0130       PRINT "SKIP HAM   ";HØJDE
0140     ELSE
0150       IF HØJDE>1.80 THEN
0160         PRINT "UDEMÆRKET   ";HØJDE
0170         INPUT "INDTAST HÅRFARVE RØD=1,BRUN=2,LYS=3,SORT=4 ":HÅRFARVE
0180         IF HÅRFARVE<2 THEN
0190           PRINT "YTTTT ";HÅRFARVE
0200         ELSE
0210           IF HÅRFARVE>1 THEN
0220             PRINT "FLOT FYR   ";HÅRFARVE
0230             INPUT "INDTAST KROPSBYGNING V-FORMET=1,IKKE V-FORMET=2":KROPSBYGNING
0240             IF KROPSBYGNING>1 THEN
0250               PRINT "HAM KAN DU IKKE VÆRE BEKENDT AT FØLGES MED";KROPSBYGNING
0260             ELSE
0270               IF KROPSBYGNING<2 THEN
0280                 PRINT "HAM KAN DU VÆRE STOLT AF";KROPSBYGNING
0290               ENDIF
0300             ENDIF
0310           ENDIF
0320         ENDIF
0330       ENDIF
0340     ENDIF
0350   ENDIF
0360 ENDIF
0370 END

The oddities are:

  • The comment at line 0010 using a double slash instead of the REM keyword.

  • The OF keyword used in line 0020 when declaring an array with DIM.

  • The ENDIF keyword instead of END IF.

  • The assignation of variables without any keywords like LET, only appending them to the INPUT command with a colon.

  • The variable names appended with semicolons after PRINT's.

  • The allowed use of the foreign characters Æ, Ø and Å.

  • Possibly others that I haven't identified.

Other information that could possibly help:

  • She claims that the course was sponsored by IBM (but the code doesn't seem to match any IBM BASIC I could find.)

  • She claims that the code ran without issue, when it was tested for the course.

It's possible that it's an esoteric BASIC version made specifically for this one course, but I somehow doubt it. Excited to see what you all can make of this.

(And yes, if you know Danish, the program itself is super silly.)

7
  • 6
    One suspects that "Æ, Ø and Å" were not foreign characters to the author (and the language).
    – Jon Custer
    Commented Oct 13, 2023 at 15:32
  • 1
    Ok, I'll bite: retrocomputing.stackexchange.com/questions/27834/…
    – davidbak
    Commented Oct 13, 2023 at 19:59
  • 1
    @JonCuster Also quite likely that they were made using ISO-646-DK
    – Raffzahn
    Commented Oct 13, 2023 at 21:08
  • 2
    By the way, the input and print syntax is not that strange, many BASIC implementations had that.
    – paxdiablo
    Commented Oct 13, 2023 at 23:17
  • 1
    @Raffzahn I can confirm that. Commented Oct 15, 2023 at 9:58

2 Answers 2

51

My guess is that this is COMAL, which was available on the IBM PC. Notably:

  1. COMAL was developed in Denmark.
  2. COMAL was based on BASIC (and possibly Pascal).
  3. COMAL uses the DIM variable OF x format, which is how I found it: I assumed a common variable and searched on “DIM A$ OF”, which produced an article in COMAL Today from 1984, “celebrating COMALs 10th anniversary”.
  4. COMAL is also a structured language, encouraging indentation of code.
  5. COMAL was used in 1983 in educational settings (and may still be today).

You may also find Update on COMAL: A SuperBASIC interesting, describing its use on Commodore machines and praising it as an easy BASIC for beginners with the power of structured Pascal. The Internet Archive has the Commodore 64 Manual for COMAL-80, and on page 141 you can see the use of double slashes for comments.

COMAL-80 was a version of COMAL available on the IBM PC at the time; you can see its name and the year 1984 in this image. Ingvar Gratte’s Starting with COMAL is a tutorial written with COMAL-80 (on a Commodore) as the starting point, and you may also find the COMAL-80 Standardization Group’s 1985 COMAL Kernel: Syntax & Semantics useful as a reference.

6
  • 2
    Thank you! This has been doing my head in. What an interesting language I had no clue existed!
    – tacecapS
    Commented Oct 13, 2023 at 15:43
  • 4
    Wiki article also links to this PDF which has full syntax including // remarks. Impressed you found this so fast.
    – miken32
    Commented Oct 13, 2023 at 16:00
  • 2
    I personally remember the COMAL cartridge for C64 being used at school. IIRC, we used to add cool stuff to the EEPROM in it Commented Oct 14, 2023 at 10:18
  • 1
    That was my immediate guess. We were taught programming in COMAL at school in the mid-90s on old (even at the time) BBC computers. I think they changed a couple of years later.
    – neil
    Commented Oct 14, 2023 at 14:21
  • 1
    COMAL was available for the BBC Micros
    – CSM
    Commented Oct 16, 2023 at 9:06
16

Comments are in Danish, so this is Comal, and most likely Comal80 which was what was taught in Danish schools at that time. I cut my teeth on the Regnecentral version - which was robust but slow - but others existed. If your mom can remember any characteristics about the machines they used, we can probably identify it.

enter image description here

You may find the emulator at http://www.jbox.dk/rc702/emulator.shtm interesting as disk images with RC Comal80 is available.

Comal80 is a nice teaching language as it has the interactivity of BASIC with elements of structured programming. A nice stepping stone to PolyPascal/Turbo Pascal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .