knudsen@ihwpt.UUCP (mike knudsen) (12/05/86)
I'd been puzzled for some time about a Level I Microware C
runtime error, #045, on my Coco.
The C manual lists only errors 41 thru 43, with 42 being
div-by-zero.
Since I suspected my program of doing just that, I wrote
a quickie to deliberately /0, like:
main() {
short top, bot, q; /* for future 68K efficiency */
top = 123;
bot = 0;
q = top / bot;
}
and guess what, it gives out ERROR #045.
So 045 indeed means "divide by zero", in INT at least.
Perhaps the documented error 042 refers only to FLOAT /0;
someone want to test that? (I avoid floats, too sloooooowwwww).
I guess the Microware C library writers decided to be more specific
in error reporting (good!) after the manual was all typeset.
Now I wonder what 044 was assigned to ... ?
mike k
--
Mike J Knudsen ...ihnp4!ihwpt!knudsen
Bell Labs (AT&T) (312)-979-4132 (work)
You think AT&T cares about CoCos, music, or Star Trek?
No? Then, these opinions must be all mine!