Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!alberta!auvax!rwa From: rwa@auvax.UUCP (Ross Alexander) Newsgroups: comp.lang.c Subject: Re: C machine Message-ID: <461@auvax.UUCP> Date: 18 Dec 87 07:21:28 GMT References: <7535@alice.UUCP> <8226@steinmetz.steinmetz.UUCP> Organization: Athabasca U., Alberta, Canada Lines: 34 Summary: yes, and while we're at it... (I have moved this from comp.arch for obvious reasons) In article <8226@steinmetz.steinmetz.UUCP>, davidsen@steinmetz.steinmetz.UUCP (William E. Davidsen Jr) writes: > ... and in keeping with being typeless but > needing floating point, [I] used floating operators instead. As I recall the > assignment operator was changed to ":=" ala Pascal, equality was just > "=", and inequality was "<>" like BASIC. This made the code somewhat > easier to read if you didn't know the language. I remember Tom Duff hacking on our GCOS/TSS implementation of B, long long ago, with exactly the same intent. He created a whole whack of $ things (i.e., +$, -$, *$, /$) which assumed the object was a float. Not a nice language to actually use... BTW, did you know that labels were variables preinitialized to point to whereever in the code they were declared? This let you do the old COBOL hack of 'ALTER PROCEDURE TO PROCEED TO ' by saying 'foo = bar;' where somewhere or other 'foo: ;' and 'bar: ;' were lurking in that procedure. Then 'goto foo;' transferred you to bar: (ugh!). Dave Conroy was famous for declaring labels to be used as static temporaries rather than as branch targets. In fact, even funtions were really variables that just happened to point to code that would perform the procedure (that is, the code itself was anonymous, access to a proc was strictly by indirecting through a named object that pointed at the code for the proc). I exploited this to do various grotty things, such as tell lies to library routines at runtime (an early version of _very_ dynamic bindings in a staticly compiled language ;-), personally; I'm older now & have learned better. -- Ross Alexander @ Athabasca University alberta!auvax!rwa