"address" of a bitfield

Joseph D. Shapiro shap at bunker.UUCP
Fri Jul 21 04:01:44 AEST 1989


In article <2840 at blake.acs.washington.edu> wiml at blake.UUCP (William Lewis) writes:
>
>   For the usual reasons, I have to pass the address of a variable to
>a function. (The function needs to read, and possibly modify, any of a 
>large number of variables of diverse types.)  Unfortunately, many of these

this may not apply, but you should probably consider not passing the
address, but the value, and use something like:

	x = function(x);

if function is declared as

	unsigned long function(unsigned long x);

the compiler will do all the type conversions for you, even for bit fields.
-- 
__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__
Joe Shapiro					"My other car is a turbo...
ISC-Bunker Ramo     				 ...too."
{decvax,yale,philabs,oliveb}!bunker!shap



More information about the Comp.lang.c mailing list