Slicing, not as modern as you thought

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Jul 9 11:54:17 UTC 2019


On Sunday, 7 July 2019 at 14:12:05 UTC, Patrick Schluter wrote:
> After watching this retro-computing video [1] I was quite 
> surprised to discover that the lowly Sinclair ZX81 already 
> implemented slicing in its Basic string handling. The syntax 
> was of course typical Basic ad hoc, but it seem to work quite 
> nicely.

High level languages often have substring "slices" of some kind, 
though. BASIC dialects borrowed a lot from "real" languages.

I think Simula got its string handling standardised  in 1968.  I 
think Simula had both value and reference semantics for strings. 
Assignment-operator ":=" copies by value and ":-" sets a 
reference. The standard calls slices "SectionText Frames":

http://simula67.at.ifi.uio.no/Standard-86/chap_2.htm



More information about the Digitalmars-d mailing list