Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: size of array??

Reply
Thread Tools

Re: size of array??

 
 
pete
Guest
Posts: n/a
 
      07-10-2003
Mark McIntyre wrote:
>
> On Wed, 09 Jul 2003 09:28:41 -0400, in comp.lang.c , pete
> <(E-Mail Removed)> wrote:
>
> >Mark McIntyre wrote:

>
> >> I think Alan's point tho was that there is no C type "byte", and no
> >> function returns bytes or takes bytes as a parameter,
> >> so its incorrect
> >> to refer to sizeof as telling you the size in bytes.

>
> (gah, need to read more carefully... )
>
> >That point, would be wrong.
> >sizeof isn't a function.

>
> irrelevant .


That's MY point.
You provided a reason that has something
to do with functions and types.
Functions and types are irrelavant as to whether or not
the value yielded by sizeof, represents bytes.

> >The return type of sizeof is size_t, and it counts bytes.

>
> Quite correct, my error.
> However sizeof not "return" bytes, it returns
> a size_t.


That's what I just said.
What's the "However" for ?

> There's still no C type "byte".


What does the fact that there is no type "byte"
have to do with whether or not sizeof yields
the size of a type in bytes ?

Are you still stuck in that frame of mind where you think
that everything that isn't a type, isn't defined in C?

http://groups.google.com/groups?hl=e...ing.com#link25

--
pete
 
Reply With Quote
 
 
 
 
Richard Bos
Guest
Posts: n/a
 
      07-10-2003
Mark McIntyre <(E-Mail Removed)> wrote:

> On Wed, 09 Jul 2003 14:02:02 GMT, in comp.lang.c ,
> http://www.velocityreviews.com/forums/(E-Mail Removed) (Richard Bos) wrote:
>
> >Mark McIntyre <(E-Mail Removed)> wrote:
> >
> >> I think Alan's point tho was that there is no C type "byte", and no
> >> function returns bytes or takes bytes as a parameter, so its incorrect
> >> to refer to sizeof as telling you the size in bytes.

> >
> > 3.5
> > [#1] character
> > bit representation that fits in a byte
> >
> >That help?

>
> Help with what? There's still no C type "byte"/


So? A char is one byte large, guaranteed by the Standard. A byte is the
size of one char, guaranteed by the Standard. Whether sizeof determines
size in number of chars or in bytes is undecidable, since the two are
exactly the same within the C Standard.

Your complaint is like that of someone who wants volumes reported in
cubic decimetres rather than in litres.

Richard
 
Reply With Quote
 
 
 
 
Mark McIntyre
Guest
Posts: n/a
 
      07-10-2003
On Wed, 09 Jul 2003 23:49:16 -0400, in comp.lang.c , pete
<(E-Mail Removed)> wrote:

>Mark McIntyre wrote:
>>
>>
>> irrelevant .

>
>That's MY point.
>You provided a reason that has something
>to do with functions and types.


no, you misunderstood my reason.

>Functions and types are irrelavant as to whether or not
>the value yielded by sizeof, represents bytes.


Sure, but its also irrelevant that sizeof is a unary operator not a
function.

>> >The return type of sizeof


as /you/ pointed out, its an operator, not a function )

>> > is size_t, and it counts bytes.

>>
>> Quite correct, my error.
>> However sizeof not "return" bytes, it returns
>> a size_t.

>
>That's what I just said. What's the "However" for ?


because my original post said "there's no C function that returns the
type byte", (please extend that to operators too, as was my intent)

>> There's still no C type "byte".

>
>What does the fact that there is no type "byte"


the original point being made was that there is no byte type in C.

>have to do with whether or not sizeof yields
>the size of a type in bytes ?


nothing, thats a different point.

>Are you still stuck in that frame of mind where you think
>that everything that isn't a type, isn't defined in C?


I've never been in that frame of mind. What on earth makes you think
this?

(snip link to google groups)

not sure what you're trying to do by posting this link which seems
spectacularly irrelevant to this thread .BTW since I don't read
anything by Dan Pop, its pretty uninteresting to me anyway.



--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      07-10-2003
On Thu, 10 Jul 2003 08:08:40 GMT, in comp.lang.c ,
(E-Mail Removed) (Richard Bos) wrote:

>Mark McIntyre <(E-Mail Removed)> wrote:
>
>> Help with what? There's still no C type "byte"/

>
>So?


and?

>Your complaint is like that of someone who wants volumes reported in
>cubic decimetres rather than in litres.


?Que?
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Reply With Quote
 
Richard Bos
Guest
Posts: n/a
 
      07-10-2003
Mark McIntyre <(E-Mail Removed)> wrote:

> On Thu, 10 Jul 2003 08:08:40 GMT, in comp.lang.c ,
> (E-Mail Removed) (Richard Bos) wrote:
>
> >Your complaint is like that of someone who wants volumes reported in
> >cubic decimetres rather than in litres.

>
> ?Que?


Same difference.

Richard
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      07-10-2003
On Thu, 10 Jul 2003 11:11:22 GMT, in comp.lang.c ,
(E-Mail Removed) (Richard Bos) wrote:

>Mark McIntyre <(E-Mail Removed)> wrote:
>
>> On Thu, 10 Jul 2003 08:08:40 GMT, in comp.lang.c ,
>> (E-Mail Removed) (Richard Bos) wrote:
>>
>> >Your complaint is like that of someone who wants volumes reported in
>> >cubic decimetres rather than in litres.

>>
>> ?Que?

>
>Same difference.


I don't think we have an argument here. I was simply trying to point
out that there's no type "byte" in C, and no function (or operator)
can therefore return a byte, or even a pointer to one.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      07-10-2003
On Thu, 10 Jul 2003 07:50:32 -0400, in comp.lang.c , pete
<(E-Mail Removed)> wrote:

>
>> BTW since I don't read anything by Dan Pop,
>> its pretty uninteresting to me anyway.

>
>Dan Pop and Ben Pfaff are two different people.


I'm aware of that. I'm not sure why its relevant tho.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Reply With Quote
 
pete
Guest
Posts: n/a
 
      07-10-2003
Arthur J. O'Dwyer wrote:

> P.S to pete: Try to snip Google Groups URLs to a reasonable length.


http://groups.google.com/groups?thre...ord.EDU&rnum=1

> would have been enough, and wouldn't have wrapped twice on my screen.


That's a good idea, but I don't know how to get that URL, from this:

http://groups.google.com/groups?hl=e...ing.com#link25

--
pete
 
Reply With Quote
 
Arthur J. O'Dwyer
Guest
Posts: n/a
 
      07-10-2003

On Thu, 10 Jul 2003, pete wrote:
>
> Arthur J. O'Dwyer wrote:
>
> > P.S to pete: Try to snip Google Groups URLs to a reasonable length.
> > http://groups.google.com/groups?
> > threadm=87n0tjaugc.fsf%40pfaff.Stanford.EDU&rnum=1
> > would have been enough, and wouldn't have wrapped twice on my screen.


Until someone put it in >>quotes, of course.

> That's a good idea, but I don't know how to get that URL, from this:
>
> http://groups.google.com/groups?
> hl=en&lr=&ie=UTF-8&frame=right&


First pass: Strip all this. The default language is English, and the
default encoding is UTF-8 (AFAIK), and whatever lr= is, it never gets
used.

> rnum=21&thl=1206107469,1206037441,1206000908,12059 97268,1205804151,
> 1205793896,1205336111,1205220087,1205150173,120560 6600,1205985361,
> 1205548274&


I don't know what these numbers refer to, but your first goal should be
to find a URL for the page that doesn't contain them. They don't look
very informative (in the information-theoretical sense .

> seekm=3D1A95D9.1707%40mindspring.com#link25


The only important bit: the message-ID.

With a bit of practice, I've gotten to where I can snip Google URLs
by directly editing the address line in IE. But I've never seen one
like yours, with all those numbers in it. So to get from (A) to
(B) much more directly, one can:

Go to the original URL.
Click "View this article only."
Click "Complete Thread (nnn articles)."
Cut and paste the new URL from the address bar
(or "Copy Shortcut" or whatever on the last click).

Strip the hl, dq, lr, ie, and prev attributes from the URL.
Strip the rnum attribute too, if it's 1.
Test the stripped URL to make sure you didn't break it.

HTH,
-Arthur

 
Reply With Quote
 
Micah Cowan
Guest
Posts: n/a
 
      07-11-2003
Mark McIntyre <(E-Mail Removed)> writes:

> On Thu, 10 Jul 2003 07:50:32 -0400, in comp.lang.c , pete
> <(E-Mail Removed)> wrote:
>
> >Mark McIntyre wrote:
> >>
> >> the original point being made was that there is no byte type in C.

> >
> >That's not the original point.
> >That's something you just introduced two posts up this thread

>
> thats correct, my original point was that there's no byte type. Do you
> have a problem with that?


The original point was not yours in the first place. You changed it
into something else, which no one was arguing in the first place. You
*conjectured* that it was what was meant by Alan Gillespie upthread,
but it isn't: he literally meant that the C standard has no concept of
a byte (which obviously means he hasn't *read* the thing). He has made
this absurd claim several times, and been corrected several times. I
am under the impression that he doesn't read follow-ups to his own
messages (personally, I always read follow-ups to my thread first, in
case I wouldn't have time to read everything, which is frequently so),
so I have written him an e-mail imploring him to stop posting
assertions about a document which he clearly has not read.

-Micah

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preferred Size, Minimum Size, Size Jason Cavett Java 5 05-25-2008 08:32 AM
mega pixels, file size, image size, and print size - Adobe Evangelists Frank ess Digital Photography 0 11-14-2006 05:08 PM
How to set the DataGrid Row Size to a fixed size. =?Utf-8?B?QmlkYXJrb3Rh?= ASP .Net 0 05-19-2005 08:14 PM
Using <asp:label font-size=16px...> ist not showing size in FireFox Browser Andreas Klemt ASP .Net 6 11-28-2004 09:21 PM
Dynamic Size for Text Box - Expanding more than the relative size Madhanmohan S ASP .Net 5 09-03-2004 06:28 AM



Advertisments