473,796 Members | 2,625 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
Programmer Dude wrote:
Noah Roberts wrote:

<p style="Normal"> <c props="lang:en-US">I am just posting this so
you can see how truly awful it would be.</c></p>
<p style="Normal"> <c props="lang:en-US"></c></p>
<p style="Normal"> <c props="lang:en-US">When you post HTML to
newsgroups this is often what it looks like on the other
side.</c></p>

Fascinating. No problem reading, BTW. If I wanted to view it in
fully formatted, I could dump it into a wide variety of things that
can display HTML.

No problem.

When you post HTML to newsgroups this is often what it looks like
on the other side.

So get out of the dark ages and get something that can render HTML.
I suspect it's going to be like HD tv. Eventually, the choice will
not be yours.

<borg>You <strong>WILL</strong> be assimilated</borg>

*plonk*

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

Nov 13 '05 #131
Keith Thompson wrote:
HTML has not become a de facto standard on Usenet.

The newsreader I use does not render HTML. (Actually, there might be
a way to tell it to do so, but I haven't looked into it; in any case,
many other newsreaders in common use cannot render HTML at all.) I
run it under an 80-column terminal emulator with a fixed-width font.
I'm certain that many, perhaps most, of the regulars on this newsgroup
are in the same position.


Mine will display HTML but I have told it explicitly not to. I used to
be in XFree86's support team and we would get html messages a lot. When
I was using a reader that was able to read these messages often times
the font was not on my system and would be replaced by something
rediculously small. Toss, into trash, learn to use text dork!

I stopped using that email reader. Most of the HTML messages became
readable after that because most clients adhere to MIME standard and
send in text and HTML. Those that did not would show up looking very
similar to my Abiword post and again - toss, into trash, learn to use
text dork!

There is 0 reason to use HTML, or any markup language, when
communicating through email or usenet. I think most people here
probably view their messages in fixed width font so that little argument
is pointless. If you insist on forcing your font and formatting choices
on me I will simply killfile you. Life is too precious to waste it on
such stupidity.

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

Nov 13 '05 #132
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote in message news:<bn******* ***@sparta.btin ternet.com>...

<snipped>
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?


us unfortunate readers who have to use google to read news.

then *you* can read *my* message and correct *my* errors made
while correcting *his* errors :-)

goose,
still no proper ISP, sadly ...
Nov 13 '05 #133
"Roose" <no****@nospam. nospam> wrote in message news:<xC******* ********@newssv r29.news.prodig y.com>...

<snipped>
Weird, since at first I thought you were _definitely_ smarter than Mr. Hu or
Mr. McIntyre. I'm usually a pretty good judge of character at first.


stop being everyones whipping post sonnyboy ... find something else
to get off on and get on with it.

goose,
next post will be in swahili, right ?
Nov 13 '05 #134
Programmer Dude wrote:
Try Ruth's shoes for a moment. Upon approaching a new group, she
is immediately told she's doing wrong. In front of an audience.
At the very *least* I would suggest not doing that in front of an
audience. Even Westerners have a sense of saving face.

That's too bad. Corrective posts are the best, because they not only
inform the offender but others.

Besides, most of us don't have to imagine it. We all generally screwed
up at some time on some newsgroup. My first post here was off-topic
(asked about editors).

Brian Rodenborn
Nov 13 '05 #135
CBFalconer wrote:
The reality is, outside something that *requires* monospace font
for alignment purposes (such as our source code), formatted text
is *easier* to read. MUCH easier. And HTML is quickly becoming
a de facto standard for representing formatted text. Like it or
not, HTML newsgroups are probably going to be standard before long.
That would simply open the door to script kiddies and other evil
types, and spell the death of using newsgroups at all.


Nonsense. Nothing in HTML itself can harm you. It's trivially
easy to disable <object> and <script> (and even <img>) tags.
With pure text you KNOW you cannot be attacked.


An HTML document *IS* pure text.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #136
Default User wrote:
Try Ruth's shoes for a moment. Upon approaching a new group, she
is immediately told she's doing wrong. In front of an audience.
At the very *least* I would suggest not doing that in front of an
audience. Even Westerners have a sense of saving face.


That's too bad. Corrective posts are the best, because they not
only inform the offender but others.


Certainly. And in a newsgroup or mailing list, the loss of face
isn't significant. (I was addressing Vandervies' story about Ruth.)

Still, as I said to Dave, "A *great* deal would depend on Rick's
presentation, since he was now in the position of commenting on
someone's public behavior."

THAT applies here as well. There's corrective posts, and there's
flammage. A gentle corrective post to a newbie is a fine thing.

What bothers me *most* is the lack of tolerance shown for those
with other ideas. If a poster is *clearly* a troll or agitator,
fine, have at'm. The problem is the tendancy to lump those with
different opinions into the Troll Box.

"He doesn't agree with me/us, so he must be a Troll."

No small town is more insular or more intolerant than this group.
In fact, "Small Town" is an excellent metaphor for this (and many
other) newsgroup(s) on many counts.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #137
Keith Thompson wrote:
And HTML is quickly becoming a de facto standard for representing
formatted text. Like it or not, HTML newsgroups are probably
going to be standard before long.
HTML has not become a de facto standard on Usenet.


Did I say it had? Consider the words quoted above. Particularly
the "before long" and "probably" words. Consider also the difference
between "for representing text" and "on Usenet".
The newsreader I use does not render HTML.
There are plenty that do. Some are even free.
I run it under an 80-column terminal emulator with a fixed-width
font.
How quaint. Thinking of joining the new millenium anytime soon?
I'm certain that many, perhaps most, of the regulars on this
newsgroup are in the same position.


Of using inefficient, ancient tools? That's too bad!!
Even if I did have something monumental to say, I'd still want to
make it as easy as possible for it to be read.


Which would be via formatted text.


Not for most Usenet readers, and certainly not for most readers of
comp.lang.c.


Your desire to remain in the era of buggy whips not withstanding,
the *fact* of the matter is that formatted text is *easier* to
read. This--hopefully--is not in dispute.

What is, perhaps, in dispute is the value of hanging on to ancient
systems whose day is long, long past.
I'd agree. How about someone with genuine interest in C who just
happens to believe in HTML and top posting and--outside that--makes
very intelligent, readable posts?


I don't believe I've seen any examples of that.


Maybe if you opened your mind a little more you might be surprised.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #138
Programmer Dude wrote:
Keith Thompson wrote:
The newsreader I use does not render HTML.
There are plenty that do. Some are even free.


But the one he has chosen to use does not. That's /his/ choice.
I run it under an 80-column terminal emulator with a fixed-width
font.


How quaint. Thinking of joining the new millenium anytime soon?


Thinking of conceding other people's right to use the software /they/ want
to use anytime soon?

I'm certain that many, perhaps most, of the regulars on this
newsgroup are in the same position.


Of using inefficient, ancient tools? That's too bad!!


I find nothing terribly inefficient about a fixed-pitch display. In fact, I
find it very easy to read, especially for source code. On this newsgroup,
we see a /lot/ of source code, some of it so badly formatted that it looks
pretty horrible even in fixed-pitch. I'd hate to think what it would look
like in a proportional font.

As for ancientiosity, I see no reason why a tool should be abandoned just
because it's getting on a bit. Do you still use wheels? Fire? Or are they
too old-fashioned now?

<snip>
Your desire to remain in the era of buggy whips not withstanding,
Where did Keith Thompson mention such a desire? Quote the message ID,
please.
the *fact* of the matter is that formatted text is *easier* to
read. This--hopefully--is not in dispute.
It is. See above.

What is, perhaps, in dispute is the value of hanging on to ancient
systems whose day is long, long past.


Who is to judge whether a system's day is long, long past? You? Bill Gates?

Each of us is perfectly capable of deciding which software he or she wants
to use.
I'd agree. How about someone with genuine interest in C who just
happens to believe in HTML and top posting and--outside that--makes
very intelligent, readable posts?


I don't believe I've seen any examples of that.


Maybe if you opened your mind a little more you might be surprised.


Our minds should indeed be open - but not gaping. I don't think Keith
Thompson is a particularly credulous person.

--
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 #139
Programmer Dude <Ch***@Sonnack. com> writes:
Keith Thompson wrote:
And HTML is quickly becoming a de facto standard for representing
formatted text. Like it or not, HTML newsgroups are probably
going to be standard before long.
HTML has not become a de facto standard on Usenet.


Did I say it had? Consider the words quoted above. Particularly
the "before long" and "probably" words. Consider also the difference
between "for representing text" and "on Usenet".


It is my sincere hope that HTML newsgroups do not become standard any
time soon. I prefer plain text, as do many other people. If you want
the web, you know where to find it.
The newsreader I use does not render HTML.


There are plenty that do. Some are even free.


That's nice. I don't *want* my newsreader to render HTML. (Actually,
I think it does; I'm glad to say that it rarely has to.)
I run it under an 80-column terminal emulator with a fixed-width
font.


How quaint. Thinking of joining the new millenium anytime soon?


No, I like the third one just fine.
I'm certain that many, perhaps most, of the regulars on this
newsgroup are in the same position.


Of using inefficient, ancient tools? That's too bad!!
Even if I did have something monumental to say, I'd still want to
make it as easy as possible for it to be read.

Which would be via formatted text.


Not for most Usenet readers, and certainly not for most readers of
comp.lang.c.


Your desire to remain in the era of buggy whips not withstanding,
the *fact* of the matter is that formatted text is *easier* to
read. This--hopefully--is not in dispute.


I have no problem reading fixed-width text. For much of what I read,
including C source code, formatted text would be more difficult to
read. A variable-width font might be easier to read for running
English text like this, but the drawbacks would greatly outweigh the
benefits.
What is, perhaps, in dispute is the value of hanging on to ancient
systems whose day is long, long past.
So if we all do things the way you want us to, we'll all be just fine,
right?

The tools you advocate are newer, flashier, and more complex. That
doesn't make them better for this specific purpose.
I'd agree. How about someone with genuine interest in C who just
happens to believe in HTML and top posting and--outside that--makes
very intelligent, readable posts?


I don't believe I've seen any examples of that.


Maybe if you opened your mind a little more you might be surprised.


Perhaps you can provide some concrete examples? I don't think I've
ever seen an HTML posting in comp.lang.c, other than one or two
examples during this discussion. As for top-posting, those who do it
here repeatedly tend to be trolling rather than actually discussing C.
--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|


Nice sig block, but it doesn't look very good in a variable-width
font, does it?

--
Keith Thompson (The_Other_Keit h) ks*@cts.com <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
Nov 13 '05 #140

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.