Article-I.D.: watmum.731
Posted: Wed Dec 10 14:50:43 1986
Date-Received: Sat, 13-Dec-86 20:43:03 EST
References: <723@watmum.UUCP> <836@ulowell.UUCP>
Reply-To: rmariani@watmum.UUCP (Rico Mariani)
Distribution: net
Organization: U. of Waterloo, Ontario
Lines: 36
In article <836@ulowell.UUCP> page@ulowell.UUCP (Bob Page) writes:
> rmariani@watmum.UUCP (Rico Mariani) wrote in article <723@watmum.UUCP>:
> some INCREDIBLY horrible C code. Rico, where the hell do you get such
> ugly code? Anyway, on with our regularly scheduled article:
Where am I getting this code you ask? Well... I've just finished porting
Maple to the Amiga (Maple is a language for performing symbolic computations)
anyways, Maple is written not in C but in a language called Margay (written
locally) which can be compiled into C. The examples of code that I gave
were basically Margay output which I then simplified as much as possible
(such as making all the subscripts 0). The result was the smallest peice of
code I could find that still had the bug.
> main()
> {
> int box[1], i;
>
> (box+i)[0] =
> (box+i)[0] =
> (box+i)[0] =
> (box+i*i)[0] = 0;
> }
Which doesn't look very much like the Margay output and doesn't look *anything*
like the Margay source. Please don't try writing code like this at home,
writing this code takes years of practice.
Now a question: has anyone ever used the heapmem32.o module? sbrk() calls?
I think there's a bug in that library somewhere... I'll try to come up with
a minimal code fragment that illustrates this...
Also there is a bug in the #line directive, sometimes the preprocessor "misses"
the # and the C gripes about me not having declared the idenifier "line".
I'll get a minimal fragment for that too...
-Rico