Re: advantage of using typedefs
- From: Mark McIntyre <markmcintyre@xxxxxxxxxxx>
- Date: Sun, 29 Jan 2006 11:22:17 +0000
On Sat, 28 Jan 2006 21:31:09 GMT, in comp.lang.c , Keith Thompson
<kst-u@xxxxxxx> wrote:
>
>Then I'm confused. junky_fellow's question was:
>
> But if this is the case (ie we need the biggest possible unsigned
> integer to hold offset ) then why not declare unsigned long long
> offset
>
>and you replied:
>
> Because then its size would vary from platform to platform, and on
> a c90 implementation it would be an error.
>but I don't see what you're
>getting at with the first point. If you want the biggest possible
>unsigned integer, its size *will* vary from platform to platform, but
>you presented the variation in size as a reason not to use "unsigned
>long long".
My point was that it will vary, and is thus a nonportable construct in
terms of say file access. If all you care about is one platform, then
no problem.
But this thread was about why one would use typedefs, and one reason
is to keep such platform specific stuff in a single place.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.
- Follow-Ups:
- Re: advantage of using typedefs
- From: Keith Thompson
- Re: advantage of using typedefs
- References:
- advantage of using typedefs
- From: junky_fellow@xxxxxxxxxxx
- Re: advantage of using typedefs
- From: Emmanuel Delahaye
- Re: advantage of using typedefs
- From: junky_fellow@xxxxxxxxxxx
- Re: advantage of using typedefs
- From: Mark McIntyre
- Re: advantage of using typedefs
- From: Keith Thompson
- Re: advantage of using typedefs
- From: Mark McIntyre
- Re: advantage of using typedefs
- From: Keith Thompson
- advantage of using typedefs
- Prev by Date: Re: Online programming challeges?
- Next by Date: Re: NULL with representation other then all bits 0
- Previous by thread: Re: advantage of using typedefs
- Next by thread: Re: advantage of using typedefs
- Index(es):
Relevant Pages
|