473,839 Members | 1,514 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Asking if elements in struct arre zero

If I have:

struct one_{
unsigned int one_1;
unsigned short one_2;
unsigned short one_3;
};

struct two_{
unsigned int two_1;
unsigned short two_2;
unsigned char two_3;
};

struct mystruct{
struct one_ one;
struct two_ two;
}mystruct1;

Then could I by any change ask on the value of the whole struct mystruct1,
that is all the elements in the struct in one call? I want to do something
like (in pseudo like language):

if(mystruct1 == 0) { print("All elements of mystruct1 is zero");}
Best Regards
Terry
Nov 13 '05
258 8840

"James Hu" <jx*@despammed. com> wrote in message
news:ya******** ************@co mcast.com...
ObC: So, what is the right way to print the value of a variable of type
int32_t? The best I can think of is:

int32_t i = 42;
printf("%jd\n", (intmax_t)i);

Is there a better way?


Isn't long guaranteed to be at least 32 bits wide? You can use

printf("%ld\n", (long)i);
Nov 13 '05 #71
Mark McIntyre wrote:
There is no disk space issue with tracking messages backward by thread, in
order to follow a conversation without quoting.

Yes there is.

You know, I think Roose, and maybe others, misses the point entirely.
The point isn't disk space usage, or being able to backtrack a message
because most of the time it is possible. The point is the irritation
caused by reading something like this:

"I don't see that as a benefit."

And then going "WTF is he talking about?" You begin looking for clues,
because for some reason you give a fuck. You read the post to which he
is replying, either by reading below the top-post or backtracking the
thread, and see several things to which he could be refering.

Even if I can decern exactly what he is refering to after minor research
I am already pissed off because I had to do that research. Why should I
have to go hunting for context?! In my opinion it is very pretentious
to think that you have the right to waste my time like that. What arogance!

Also highly irritating is something like this:

<hypoquote>
Maybe someday he will get it...
On Wed, 29 Oct 2003 02:19:58 GMT, in comp.lang.c , "Roose"
<no****@nospam. nospam> wrote:
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah

<hypoquote cut short>

And at first you go "Why the hell did he reply, quote the entire text,
and say nothing?"

I hate top posting, I am glad I killfiled this jerk. Not only did he
say "I don't want you to listen to a damn thing I say" when he top
posted, not only did you say "Fuck you" to a very well layed out answer
and polite request to be polite, but finally he had the gaul to dare me
to killfile him...bye! The rest of you still listening to his clap trap
would do good to follow those of us that saw him for the turd he is
right off and flush.

--
Noah Roberts
- "If you are not outraged, you are not paying attention."

Nov 13 '05 #72
Thanks, but at this point, it's just entertainment. No big deal. Pretty
much half the newsgroup has be vehemently replying to this thread, so I'll
take that as a license to continue. But you're right that I would have got
bored if they stopped replying.

<te*********@BU SThotmailE.Rcom > wrote in message
news:1g3nagc.sz 8mhf13bva5rN%te *********@BUSTh otmailE.Rcom...
Roose <no****@nospam. nospam> wrote:


Since you do not wish to killfile various people in the group, I would
recommend just ignoring them and ending this thread.

Their only desire at this point is to continue baiting you. They are not
interested in any genuine or logical discussion. They are only posting
because they believe it makes you say funny things.

--

Nov 13 '05 #73
> > "Don't get involved in flame wars. Neither post nor respond to
incendiary
material."
I have not posted any incendiary material in this thread.


That's debatable, but what's not debatable is that you consider my posts to
be incendiary, and you have replied to them. Therefore you have violated
your precious RFC.
You're in no position to tell me not to top-post, clearly.


I have *asked* you not to top-post. There is a difference between asking

and telling.
Then you are in no position to ask me not to top-post, since you don't
follow netiquette yourself.
It appears from what you say that the only authority you recognise (and
expect us to recognise) is you.
That's true on Usenet, because by its design it admits no authority.
Whether this design is a mistake is a separate issue. If it were a private
group, I would abide by its rules or simply not participate. And in fact I
do participate in a few web forums and abide by their rules.
I disagree that putting the response before the stimulus is ever "more
clear".
I am well-aware of that, as are you that I disagree.

The issue is that you should either respect my preference for top-posting,
or killfile me because you consider me a troll. Or at least remain agnostic
and stop contributing to a thread that is off-topic (which is also proper
netiquette). You have failed to do any of these things.

Note that if you continue to show inability to follow the logic of a basic
argument, then I might get so bored that I would stop. That would
accomplish the same goal as well, so you can give that a try.

So far though you've distinguished yourself from James Hu and Mark McIntyre,
who aren't really worth responding to. Mr. Hu is just a fucking dolt who
sounds like a 12-year-old with a thesaurus. And Mr. McIntyre has bored me
with his inability to grasp basic ideas and the sheer volume of posts.
Just like HTML e-mail used to be an ungodly annoyance, it is coming into
acceptance because of greater disk space, bandwidth, and more e-mail
clients
support it. Oh times they change.


HTML e-mail remains an ungodly annoyance. Oh times they stay the same.


The point is not personal preference. I can think of many reasons as well
why it's annoying. However I'm saying that it is coming into common usage
(or has already). Therefore the ever-changing Internet community has given
de facto approval to its use. There is no central authority to decide
whether its valid or not. So you can either live with it like I do and
appreciate some benefits of it, or you can drive your blood pressure through
the roof being pissed about it.
That's a lie. There have been no articles by Roose, EVER, in the

comp.lang.c
newsgroup except in this very thread, according to the archives.


Apparently you don't really understand how Usenet works.


Well, you certainly don't, if you think you can make unsupported and

indeed patently false claims in this newsgroup without being challenged.


Prove that I did not post here. If you understood how Usenet works, you
would not be able to say that my claim is false.

I used to post under my real name, and no I'm not going to post it for the
group or give you a google link. I can change my name any time by going
into a dialog box in my newsreader. But so far I haven't, because otherwise
you wouldn't be able to killfile me, which I invite you to do.
I'm not telling you to do anything. I simply suggest that if
you're so keen on following netiquette, then killfile me already.


But what if you were to start dispensing language advice? If you were in
every regular contributor's killfile, who would correct your errors?


That's pretty lame. A transparent facade for your control problems.

Anyway, there are OBVIOUSLY plenty of people who haven't killfiled me, so
you can -- safe with the knowledge that no incorrect answers will go
unnoticed.

Roose
Nov 13 '05 #74
> >However, I am less pissed now than amused by the fact that I've caused a
collective apoplexy in comp.lang.c, over something as stupid as
top-posting.
Well stop doing it.


This seems unlikely, given the size this thread has grown to.
Nov 13 '05 #75
Roose wrote:
> "Don't get involved in flame wars. Neither post nor respond to incendiary > material."
I have not posted any incendiary material in this thread.


That's debatable,


Then debate it. Please cite some material that I have posted to this thread
which could reasonably be considered by an impartial observer to be
incendiary.
but what's not debatable is that you consider my posts
to be incendiary,
Do you have any evidence to back up your belief that you have irrefutable
knowledge of what I do and do not consider to be incendiary?

and you have replied to them. Therefore you have violated
your precious RFC.
Actually, I haven't.
> You're in no position to tell me not to top-post, clearly.


I have *asked* you not to top-post. There is a difference between asking

and
telling.


Then you are in no position to ask me not to top-post, since you don't
follow netiquette yourself.


If I have breached netiquette, I will apologise to you for that, but I don't
believe that I have. Your /belief/ in such a breach does not actually
/constitute/ a breach on my part.
It appears from what you say that the only authority you recognise (and
expect us to recognise) is you.


That's true on Usenet, because by its design it admits no authority.


If you do not recognise, for example, the authority of truth, of competence,
or of convention, then I see little chance of this discussion leading to
any positive outcome.

<snip>
The issue is that you should either respect my preference for top-posting,
or killfile me because you consider me a troll.
I disagree. The issue is whether you wish to be taken seriously on this
newsgroup, which values its conventions highly, and for good reason. I
don't think you're a troll, but I do think you have misunderstood this
newsgroup.
Or at least remain
agnostic
Lit "unknowing" . You may consider that to be a desirable state. I do not.

<snip>
> Just like HTML e-mail used to be an ungodly annoyance, it is coming
> into acceptance because of greater disk space, bandwidth, and more
> e-mail clients
> support it. Oh times they change.


HTML e-mail remains an ungodly annoyance. Oh times they stay the same.


The point is not personal preference. I can think of many reasons as well
why it's annoying. However I'm saying that it is coming into common usage
(or has already). Therefore the ever-changing Internet community has
given
de facto approval to its use. There is no central authority to decide
whether its valid or not. So you can either live with it like I do and
appreciate some benefits of it, or you can drive your blood pressure
through the roof being pissed about it.


Or you can make it clear to those who correspond with you that you prefer to
have text email. That is what I do.
>> That's a lie. There have been no articles by Roose, EVER, in the
> comp.lang.c
>> newsgroup except in this very thread, according to the archives.
>
> Apparently you don't really understand how Usenet works.


Well, you certainly don't, if you think you can make unsupported and

indeed
patently false claims in this newsgroup without being challenged.


Prove that I did not post here. If you understood how Usenet works, you
would not be able to say that my claim is false.


You, Roose, have posted to this newsgroup in exactly one thread - this one.
My supporting evidence is the Google archive.

Are you claiming that Google has lost your articles?
I used to post under my real name


I don't believe you.

<snip>

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #76
Peter Pichler wrote:
"Mark McIntyre" <ma**********@s pamcop.net> wrote in message
news:v6******** *************** *********@4ax.c om...
On Wed, 29 Oct 2003 02:07:15 GMT, in comp.lang.c , "Roose"
<no****@nospam. nospam> wrote:
>
>You said you killfiled me already,


He has not, but I am now:

*PLONK!*
No, I killfile you when you start telling people wrong C answers.


That would be a bad idea, wrong answers need to be corrected.
Ignorant idiots, OTOH, may be happily plonked :-)


Alas, Roose has started dispensing C "advice".

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #77
> > That's debatable,

Then debate it. Please cite some material that I have posted to this thread which could reasonably be considered by an impartial observer to be
incendiary.
You posted repeated messages that told me not to top-post, when clearly you
had no expectation that I would. You were just bugging me for the sake of
replying, having the last word. Not that incendiary, and not unwelcome from
me, I admit, but to a strict netiquette nerd, they would definitely be
considered unnecessary.
but what's not debatable is that you consider my posts
to be incendiary,


Do you have any evidence to back up your belief that you have irrefutable
knowledge of what I do and do not consider to be incendiary?


Well, at least you *said* so if you don't believe so, or maybe that was one
of the others in the indistinguishab le mass of anal-retentive geeks. Can't
really tell.

If you don't think any of my past message was incendiary, then that last
line certainly was. So if you reply to this, then you're replying to
incendiary material.
That's true on Usenet, because by its design it admits no authority.


If you do not recognise, for example, the authority of truth, of

competence, or of convention, then I see little chance of this discussion leading to
any positive outcome.
I think that is clear, regardless of whether I recognize those authorities.
: )
I disagree. The issue is whether you wish to be taken seriously on this
newsgroup, which values its conventions highly, and for good reason. I
don't think you're a troll, but I do think you have misunderstood this
newsgroup.
Who brought up that issue? I didn't. I am fine just having some fun.
Apparently people do take me seriously, since they've attempted (poorly) to
logically refute my arguments, and have not killfiled me, which you would do
with someone you don't take seriously.
Prove that I did not post here. If you understood how Usenet works, you
would not be able to say that my claim is false.


You, Roose, have posted to this newsgroup in exactly one thread - this

one. My supporting evidence is the Google archive.

Are you claiming that Google has lost your articles?


Jesus Christ. I think this is like the 3rd time I've explained this. Let's
go back to the basics.

There is the real world, and then there is the Internet. In the real world,
there is a person that exists. On the Internet, that person can have AS
MANY USENET IDENTITIES AS HE WISHES. It's fascinating, I know.

Therefore, the fact that "Roose" (NOT my real name, BTW) only appears in
certain threads, does not mean that I (a real person) have never posted in
other threads.

You're making this way too easy for me.
Nov 13 '05 #78
> Alas, Roose has started dispensing C "advice".

Honestly. In all seriousness.

Do you think the OP (in the interview question thread) wants to hear what I
told him, or what you guys told him? Really. Just a reality check here. I
want to know what kind of people I'm dealing with here.
Nov 13 '05 #79
On 2003-10-31, Roose <no****@nospam. nospam> wrote:
Alas, Roose has started dispensing C "advice".


Honestly. In all seriousness.

Do you think the OP (in the interview question thread) wants to hear
what I told him, or what you guys told him? Really. Just a reality
check here. I want to know what kind of people I'm dealing with here.


If I asked a technical question looking for an answer, I would rather
be told the correct answer, instead of being told what I wanted to
hear.

And then, I apply the golden rule.

-- James
Nov 13 '05 #80

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.