Preferences

That syntax was irregular but very useful. It was not surprising or confusing.

A$ = "ABCD"

MID(A$,2,2)="12"

PRINT $A

>A123


Assuming a typo here, but I would be surprised if the output contained "3"
This is still going strong today in list slice notation in Python (and other languages, no doubt):

    x = [1,2,5,6]
    x[2:2] = [3,4]
    print(x)
(Slice notation can be used on any collection, not just lists, but you can't use it in assignment like that for strings because they're immutable, so you'd have to convert to a list of characters and back.)

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal