integer division in ANSI C

Kenneth Almquist ka at hropus.UUCP
Sun Mar 2 16:07:32 AEST 1986


> This issue reveals the fundamental dichotomy in C -- between
> the systems-programmers' language and the application-programmers'
> language...

Yes.  I've never understood why anybody would *want* to do applications
programming in C, but then I've never understood why people want to use
Fortran and Cobol either...

The proposed functions will not fully solve the problem if C is used by
fallible programmers, but then only those of us who are perfect have
any business using a dangerous language like C anyway :-).  I would
suggest making the routines simpler to use by providing separate
routines for division and remainder, as this will encourage more people
to use them when necessary.  This would also mean that these routines
could be replaced with simple macros on machines that do division the
Fortran way (most of them).

It would also be nice to have a modulo function.  In my view, this
would be more useful than a remainder function.
				Kenneth Almquist
				ihnp4!houxm!hropus!ka	(official name)
				ihnp4!opus!ka		(shorter path)



More information about the Comp.lang.c mailing list