q for the C hackers

Derek Martin invalid at pizzashack.org
Tue Aug 19 10:48:10 EDT 2003


On Tue, Aug 19, 2003 at 08:26:22AM -0400, Kevin D. Clark wrote:
> > Normally, the former way is what you'd use.  The latter construct is
> > most often used, in my experience, for function parameters which you
> > want to make sure are not modified by the function to which they
> > belong.  
> 
> This is confused.  Erik wasn't even asking about function parameters.
> He just wants to use a constant in his program.

I never said he was...  I was merely commenting that in my experience,
using a const int is most commonly used to declare parameters of a
function, whereas #define'd macros are generally used for known
constants.  I'm not sure what's confused about that.

> Like you stated in a later post, exactly *what* the compiler does for
> these cases is implementation defined.

Agreed.

-- 
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.
Replying to it will result in undeliverable mail.
Sorry for the inconvenience.  Thank the spammers.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20030819/3ea7eaac/attachment.bin


More information about the gnhlug-discuss mailing list