5 ms·
> A B@; # B is a pointer to type A IIRC that's how Pascal did it, using a caret ^ for denoting a pointer.
by esfandia 5y ago
> A B@; # B is a pointer to type A
IIRC that's how Pascal did it, using a caret ^ for denoting a pointer.
- xscott 5y agoYeah, now only if Pascal had used curly braces, all could be right in the world :-)
- ksec 5y agoArh.... But then it wouldn't be Pascal ><
- peterashford 5y agoYes! As he said - all would be right with the world =)
- zerr 5y agoIt was more about AT&T monopoly I believe :)
- WalterBright 5y agoI don't know about Pascal, but AT&T allowed anyone to write a C compiler without needing a license. (C++, too, I know because I asked AT&T's lawyers.)
- benibela 5y agoKind of. A pointer to type A is: var B: ^A The parser knows it is a declaration because of the var, and it knows ^A is the type, because of the colon. That it is a caret does not really matter here