3 ms·
Pascal and related languages use the notation x := 5 I have heard that this was to mimic (in ASCII) the look of an arrow: x ⇐ 5
by teddyh 6y ago
Pascal and related languages use the notation
x := 5
I have heard that this was to mimic (in ASCII) the look of an arrow:
x ⇐ 5
- Wowfunhappy 6y agoMy first thought was, if they wanted an arrow why wouldn’t they go with: x <= 5 But of course, that means “less than or equal to”. You could do: x <- 5 But I suppose the mere presence of the “less than” symbol is weird in context. (Although, maybe not inherently weirder than using the equals sign for something other than equality?) Perhaps we would have been better off if we’d all just agreed early on, that @, #, or ~ should represent assignment.
- teddyh 6y agoThe original 1963 version of ASCII had a left-arrow (←) symbol, but it was replaced with underscore (_) in the 1965 version.