473,796 Members | 2,550 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 8758
"Roose" <no****@nospam. nospam> writes:
I agree with your points, and that is why I never complain about
bottom-posting. There are valid reasons for bottom posting, which is why I
do it sometimes, as I already said. But there are valid reasons for
top-posting as well, which I already listed. And that is why I get pissed
when people complain about ME top-posting.
But regardless of your preferences, you are expected to abide by
the rules of etiquette and social courtesy set forth by the NG to
which you post. This newsgroup has a very clear preference for
bottom-posting, and an active hatred toward top-posting.

In USENET, you are expected to read a group for a couple weeks
before posting to it.
The bottom line is that it is personal preference, and UseNet is public, so
I have the right to follow my preference.
In which case, we also have the right to killfile you. And you
should expect such when you treat others with such spite.
Just like everyone has the right
to post their f*cking stupid sigs after every goddamn message.
But this is different: this is *long*-standing
USENET-acceptable. Top-posting is not, though some of the younger
groups are apathetic about it. In such groups, I don't correct
people's top-posting, and my response will be in kind, except
when I just can't do that (e.g., when I'm responding
item-by-item, such as in this post).
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.


The issue is not top-posting: the issue is continued rudeness
towards a group in which you are currently a *guest*.
--
Micah J. Cowan
mi***@cowan.nam e
Nov 13 '05 #51
"Roose" <no****@nospam. nospam> writes:
Do you have the slightest clue how much diskspace even the text-only
newsgroups take up per day? Not to mention the binaries. I'm not
wasting my diskspace storing that.


Well, I looked in my outlook folder, and it's 26 megs, for about 40
newsgroups from two news servers, including a several binary groups. That's
because it only downloads the headers at first.


No -- he's talking about actually *running* a news server. People
who do that are committing themselves to willingly giving up
*huge* disk for the sake of others.

--
Micah J. Cowan
mi***@cowan.nam e
Nov 13 '05 #52
> In USENET, you are expected to read a group for a couple weeks
before posting to it.
Says who? There is no President of UseNet.
In which case, we also have the right to killfile you. And you
should expect such when you treat others with such spite.
And I have encouraged people who get riled up about something as stupid as
top-posting to killfile me. In fact, I have repeatedly asked them to, and
they still haven't.
But this is different: this is *long*-standing
USENET-acceptable. Top-posting is not, though some of the younger
That is not a good enough reason for me. The English language is a standard
as well, but it changes with time and de facto rules evolve. Old rules get
broken. Same thing with UseNet. It has changed over time to include
top-posting as acceptable.
The issue is not top-posting: the issue is continued rudeness
towards a group in which you are currently a *guest*.


I am no more a guest than you are. I probably posted here in 1995, well
before most people here. Because you post here a lot doesn't mean you own
the group.

Nov 13 '05 #53
> The issue is not top-posting: the issue is continued rudeness
towards a group in which you are currently a *guest*.


And about the rudeness, it seems to be one of the accepted norms in this
group. Every other post is "blah blah you idiot, there is no such thing in
standard C" or "No, you can't do that, stupid". I started with a simple
question, it was someone else who answered with the "Don't top-post" BS.

The rudeness also serves the purpose of showing everyone what hypocrites
they are. If they consider me a troll, then they should follow netiquette
and killfile _without comment_.
Nov 13 '05 #54
Roose wrote:
In USENET, you are expected to read a group for a couple weeks
before posting to it.
Says who? There is no President of UseNet.


"Read both mailing lists and newsgroups for one to two months before you
post anything. This helps you to get an understanding of the culture of
the group." - RFC 1855.

I see you're finally quoting context. Well done.
In which case, we also have the right to killfile you. And you
should expect such when you treat others with such spite.


And I have encouraged people who get riled up about something as stupid as
top-posting to killfile me. In fact, I have repeatedly asked them to, and
they still haven't.


It's not for you, or anyone else except me, to decide who goes into my
killfile.
But this is different: this is *long*-standing
USENET-acceptable. Top-posting is not, though some of the younger


That is not a good enough reason for me. The English language is
a standard as well, but it changes with time and de facto rules
evolve.


Indeed. And they have done so in comp.lang.c, too.
Old rules get broken. Same thing with UseNet.
Only if the old rules cease to make sense in new circumstances. That isn't
the case here.
It has changed over time to include
top-posting as acceptable.
Not in comp.lang.c. Newsgroups have their own cultures, which you would do
well to respect.
The issue is not top-posting: the issue is continued rudeness
towards a group in which you are currently a *guest*.
I am no more a guest than you are. I probably posted here in 1995, well
before most people here.


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.
Because you post here a lot doesn't mean you own the group.


No, but neither does /not/ posting here a lot.

--
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 #55
> "Read both mailing lists and newsgroups for one to two months before you
post anything. This helps you to get an understanding of the culture of
the group." - RFC 1855.
Thanks, check out this one too:

"Don't get involved in flame wars. Neither post nor respond to incendiary
material."

You're in no position to tell me not to top-post, clearly. And this is not
recognition of those rules as authority.
I see you're finally quoting context. Well done.
I already said that I am perfectly capable of quoting, when I think it's
more clear. I top-post when that's more clear.
Old rules get broken. Same thing with UseNet.


Only if the old rules cease to make sense in new circumstances. That isn't
the case here.


The new circumstances are that most people use different newsreaders than
they did 10 years ago. Back in the day, the ergonomics of newsreaders
demanded that you quote. Now they don't, as there are zillions of free
newsreaders that let you track threads quite easily.

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.
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.
Because you post here a lot doesn't mean you own the group.


No, but neither does /not/ posting here a lot.


No shit. I never said that I owned the group. You're the ones telling ME
what 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.
Nov 13 '05 #56
No, I don't think he is. In any case, it's not relevant if he's talking
about running a news server. I said that it is easy to track a thread even
without quoting, if you have a proper newsreader which sorts by thread. He
said that that isn't possible because you would have to store too many
messages on your machine. I say, not really, they're on the server.

There is no disk space issue with tracking messages backward by thread, in
order to follow a conversation without quoting.

No -- he's talking about actually *running* a news server. People
who do that are committing themselves to willingly giving up
*huge* disk for the sake of others.

--
Micah J. Cowan
mi***@cowan.nam e

Nov 13 '05 #57
On 2003-10-30, Roose <no****@nospam. nospam> wrote:
You're in no position to tell me not to top-post, clearly. And this
is not recognition of those rules as authority.
Of course, it is obvious the only rules you recognize as having any
authority are your own.
I already said that I am perfectly capable of quoting, when I think
it's more clear. I top-post when that's more clear.
Obviously, it is a convention of this newsgroup to not top-post. Just
like it is convention to not bring crying babies into the movie theater.
It doesn't mean it doesn't ever happen, but when it does, the convention
breaker will get complaints. If you don't want to put up with the
complaining, why not killfile the complainers?
The new circumstances are that most people use different newsreaders
than they did 10 years ago. Back in the day, the ergonomics of
newsreaders demanded that you quote. Now they don't, as there are
zillions of free newsreaders that let you track threads quite easily.
This is a rather idyllic view. In reality, the supported features of
a news reader is dependent upon multiple factors, including, but not
limited to:

* whether the feature is implemented in the news reader
* whether the user is reading the news from a local spool or
a remote server
* whether or not the the user is reading the news offline
* whether the remote server supports all the features supported
by the client

As to which client any particular user may be using, that is a personal
choice, and the conventions of this newsgroup are such that the least
capable news reader can participate just as efficiently as the most
capable news reader.

To consider your example of threading, some commercial NNTP services
do not support the retrieval of an entire thread because it involves
a very expensive search of their, often proprietary, news database.

Others may read their news in an offline mode, to save on dial up
expenses, or reduce the amount of time the phone line is tied up by the
internet connection. In such cases, they may not have the complete
thread cached when they read a particular article.
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.
The more things change, the more things stay the same.

HTML e-mail is even more annoying these days, because spammers that
generate random e-mail targets now get a web server ping from your
e-mail reader, thus validating your e-mail address.
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.


You are so keen on getting people to killfile you, but you now openly
admit that you freely change your Usenet identity.
> Because you post here a lot doesn't mean you own the group.

No, but neither does /not/ posting here a lot.


No shit.


Why, you're a potty-mouthed wart-hog-faced buffoon!
I never said that I owned the group. You're the ones
telling ME what to do.
I can't speak for everyone, but I was complaining about how you rudely
responded to a request to follow this groups netiquette, and then you
continued to rudely assert that you will do as you please. Which, to
me, implies you don't respect the members of this newsgroup that wish
you to follow netiquette.

Of course, what you do always remains your choice. Just like what
we do (which may include loud complainig) remains ours.
I'm not telling you to do anything. I simply
suggest that if you're so keen on following netiquette, then killfile
me already.


I repeat: If you don't want to put up with the complaining, why not
killfile the complainers?

....

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?

-- James
Nov 13 '05 #58
"Roose" <no****@nospam. nospam> wrote:

<snip>
I started with a simple
question, it was someone else who answered with the "Don't top-post" BS.


Nope, 't was: "Please don't top-post."
^^^^^^
--
Irrwahn
(ir*******@free net.de)
Nov 13 '05 #59
Irrwahn Grausewitz wrote:
"Roose" <no****@nospam. nospam> wrote:

<snip>
I started with a simple
question, it was someone else who answered with the "Don't top-post" BS.

Nope, 't was: "Please don't top-post."
^^^^^^

Not only that but they answered his question very nicely while very
politely asking him not to top post. His thank you was a big fuck you.

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

Nov 13 '05 #60

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.