A number of early microcomputer BASICs had 'array like strings' that were unlike MS's system and instead behaved like arrays of char. Substrings were accessed using a syntax like:

A$ = B$(1,5)

as opposed to the MS style:

A$ = LEFT$(B$,4)

Note the potential off-by-one.

I know that some minicomputer BASICs also worked this way, I believe HP and Nova were the canonical examples. North Star BASIC also used this style, and I suspect, due to its origins, that Cromenco Extended BASIC did as well.

So the question: does anyone know the first microcomputer BASIC that used this style of string notation? And wider, where this style originated?

  • 2
    Why and how are you distinguishing micros from minis? A given BASIC could be made to run on either. – Wilson May 8 '19 at 11:32
  • 1
    HT2000 Basic worked as described; any microcomputer BASICs probably derived such behavior from the HP. – supercat May 8 '19 at 11:46
  • 2
    For reference, both approaches seem to be revisionist treatments :-). BASIC comes from Dartmouth. 4th edition BASIC had the CHANGE statement to convert between a string variable and an array of ASCII character-codes.. – another-dave May 8 '19 at 12:01
  • I do however think I used the LEFT$/RIGHT$ syntax around 1971, dialed in to the UK Open University computer system (I had a maths teacher doing an OU degree in computer science), which I think was running on some HP mini. – another-dave May 8 '19 at 12:06
  • @another-dave I don’t know much about minis, but LEFT$ seems to have appeared on micros early on; 8K Altair BASIC had it in 1975. – Stephen Kitt May 8 '19 at 12:17

I think the earliest BASIC dialects on micros to use these constructs for strings were North Star BASIC and Apple Integer BASIC in 1977, both presumably influenced by HP BASIC. The Apple lineage isn’t surprising since Steve Wozniak worked at HP.

The origin of this approach to substring addressing could be FORTRAN, which uses a syntax of the form A(I:L).

  • Apple BASIC used this style? I didn't know that! – Maury Markowitz May 8 '19 at 12:56
  • 2
    Only Apple integer basic, Applesoft was standard MS Left/Right/Mid – PeterI May 8 '19 at 13:04
  • Cromenco also did, but that's 1978. So its looking like NS BASIC might be it. What about the Tiny derivatives, did any of them have strings? – Maury Markowitz May 8 '19 at 14:35
  • @Maury Tiny BASIC had string literals for PRINT; MINOL added a way to store strings and retrieve them, using pointers only (no string variables), but didn’t support sub-strings. I don’t know of any other Tiny derivative which had string variables with something like A$(2,4) before NS BASIC. – Stephen Kitt May 8 '19 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.