Word size problem with MSC

Richard Bumby bumby at math.rutgers.edu
Fri Apr 14 06:58:55 AEST 1989


In article <9462 at hodge.UUCP> jdm at hodge.UUCP (jdm) writes:

          . . . <some stuff omitted> . . .

> 	Normally I would convert the case statement to a series of
> 	if...else statements, but I have been informed that the part of the
> 	code I am working on cannot be changed for reasons of future
> 	compatability.  Is there a patch for the MS C compiler, or some other
> 	action, that will allow the switch() function to accept 32 bit
> 	integers?
> 
> -- 
	This may not be the patch you are looking for, but as long as
you really don't need more than 65536 cases, you should probably find
a simple function that maps your domain into something that can be
represented by a 16 bit integer.  As long as it is declared to be an
int, the internal representation will be irrelevant.  The resulting
code will then be compatable with both 16 and 32 bit processors.
-- 

--R. T. Bumby ** Math ** Rutgers ** New Brunswick **
(in one form or another for all kinds of mail)
[bumby at math.rutgers.edu]



More information about the Comp.lang.c mailing list