Bakul Shah <bakul(a)iitbombay.org> wrote:
Was B, or rather BCPL, influenced by Algol68? It too
had
<var> <op>:= <value>
as a shorthand for
<var> := <var> op <value>
Its declaration
<type> <name>
is the same as in C. Though in A68 this was a shorthand for
ref <type> <name> = loc <type>
I don't know if it was purposeful or not, but Algol 68 had the notion
of deproceduring - i.e. function call, which seems to have carried over
into C where the name of function is a pointer to it. You can do
void myproc();
void (*functptr) = myproc;
...
funcptr()
to call through the pointer. (Even though the K&R book taught us
to use (*funcptr)(), the syntax above worked at least as far back
as PCC.)
Did C pick this up from Algol 68? I have no idea, but it would not
surprise me if it had.
Arnold