The D Programming Language
Stuart D. Gathman
stuart at bms-at.UUCP
Fri Mar 11 07:26:58 AEST 1988
In article <700 at l.cc.purdue.edu>, cik at l.cc.purdue.edu (Herman Rubin) writes:
> but even for direct operators. For example, the infamous frexp function
> in C should not have the syntax
> y = frexp(x,&n);
> but
> y,n = frexp(x);
> This would, for example, allow n to be in a register, which is probably
> where it should be anyhow.
> Another example would be to have
> q,r = a///b;
> where the quotient and remainder are simultaneously produced. Possibly
Another example is string comparison. I use a string compare function
that returns the index of the first different character. I also
need the gt/lt/eq result. Fortunately, in this case it is easily
computed by recomparing the chars at the index. This is another case
of a double valued hardware primitive. (Available on all three
of the architectures we use: Series/1, 80286, 68020.)
--
Stuart D. Gathman <stuart at bms-at.uucp>
<..!{vrdxhq|daitc}!bms-at!stuart>
More information about the Comp.lang.c
mailing list