473,839 Members | 1,471 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 8834
te*********@BUS ThotmailE.Rcom wrote:
You are apparently ignoring the inevitability of a USENET on which HTML
is common
You are apparently the only one who thinks this is inevitable.
This, of course, does assume that USENET survives to make the
transition...wh ich is by no means guaranteed either.


Death of Usenet predicted, film at eleven.

Richard
Nov 13 '05 #201
Richard Bos wrote:
But fire up any MS-Windows machine and ask for FixedSys. It, like
many others such as Terminal (MS-specific again, I suspect),
Lucida Console and OCR-A only have serifs on narrow letters (i, j
and l).


True enough. Maybe we can call them half-serif. (-:

(In fact, I moved to Lucida Console for most of my source code
editors *because* it is cleaner.)

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #202
Mark Gordon wrote:
Truly indented? I don't mean indented with spaces or tabs.
What is wrong with spaces for the indent if the editor handles it
for you?


Nothing, really. It's just slightly cruder.
Auto-wrapping? Sure, so long as you didn't put any hard returns
in (something HTML would ignore).


It's not perfect, but I've just resized my text window for reading
to about 20 characters and it is still perfectly readable.


Try reading 65-column text with hard returns in a 55-column window!
Looks kinda ugly with those alternating short and full lines.
Automatic Justification? Yeah, I've seen it in text. Ugly!!


I don't find a ragged right edge to be a problem.


Nor do I, although (well) justified text is easier to read (hence
its common use in books and magazines).
Bullet Lists? By hand, sure.


I'm sure it can be done in emacs or vim, either of which I can
use as an editor for my client.


By hand (or with macros, I suppose), but you're rather restricted
to the ASCII symbol set. HTML gives you those cute bullets.
If people stick to standard quoting conventions then SW can rewrap
quoted text...


Fine for reading other people's writing. I just wouldn't mind
having more formatting ability for MY writing. As I've said,
I'd much rather use "real" bullet lists, real bold, real italics
and real underlining rather than their ASCII-alikes.

Considering the overall movement towards more sophisticated tools,
I continue to suspect I need only bide my time. (-:

Peace out.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #203
Mark Gordon wrote:
Simple solution: set your HTML reader/writer to emit basically what
you type. Of even turn off the HTML.
Please note your previous paragraph and note that the majority of
people are not wise. Then consider what it means for the likely
formatting.


[shrug] It's a learning process. I'd still rather move forward
than stay in one place.
Alternatively don't add a need for the extra options then no one
needs to learn how to use them and no one needs to write them.
Sounds stagnant to me. While I don't support Obsessive Growth
(something of an American Way Of Life), I do think growth and
change are vital to, well, vitality.

Suppose we'd all decided there was no need for the extra options
offered by improved medical care? Or any other advance.
But I dislike, very much, living in a world limited by lower
common denominators. Other people's inability to handle "X"
shouldn't prevent me from it if I am able.


Why should your ability to cope with it exclude those who either
by choice or lack of resources are not able to cope?


I don't think it *excludes* at all. If you want to stay with
plain text, do so. If you want to strip HTML tags from HTML
posts, do so. If you want to use HTML tags as a filter to
eliminate posts you refuse to see, do so.

I'm not in favor of forcing anyone to do anything. I would like
the ability to use advanced tools if *I* choose.
As I've said, if you want *bold* rendered in *bold* and _underlined_
rendered as _underlined_ then you can get a news reader today for
free that will do it.


No, I want to be able to *produce* text that looks a certain way.

Peace Out.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #204
On Wed, 12 Nov 2003 11:55:26 -0600, Programmer Dude
<Ch***@Sonnack. com> wrote:
Mark Gordon wrote:
Truly indented? I don't mean indented with spaces or tabs.
What is wrong with spaces for the indent if the editor handles it
for you?


Nothing, really. It's just slightly cruder.


Because you can't indent in other than multiples of a character? I
doubt that I'd ever notice the difference.
Auto-wrapping? Sure, so long as you didn't put any hard returns
in (something HTML would ignore).
It's not perfect, but I've just resized my text window for reading
to about 20 characters and it is still perfectly readable.


Try reading 65-column text with hard returns in a 55-column window!
Looks kinda ugly with those alternating short and full lines.


I can have my (text) reader re-wrap the text.
Automatic Justification? Yeah, I've seen it in text. Ugly!!
I don't find a ragged right edge to be a problem.


Nor do I, although (well) justified text is easier to read (hence
its common use in books and magazines).


Hmm.. Chapter and verse, please. I've never explicitly researched
this, but I do remember a study some years ago which indicated that
ragged right edges are actually easier to read.
Bullet Lists? By hand, sure.
I'm sure it can be done in emacs or vim, either of which I can
use as an editor for my client.


By hand (or with macros, I suppose), but you're rather restricted
to the ASCII symbol set. HTML gives you those cute bullets.


Yes, I've seen some of those - one was miniature elephants waving
their trunks. I didn't think it added to readability, but that's just
my opinion.
If people stick to standard quoting conventions then SW can rewrap
quoted text...


Fine for reading other people's writing. I just wouldn't mind
having more formatting ability for MY writing. As I've said,
I'd much rather use "real" bullet lists, real bold, real italics
and real underlining rather than their ASCII-alikes.

Considering the overall movement towards more sophisticated tools,
I continue to suspect I need only bide my time. (-:

Peace out.

If the tools get sophisticated enough so that *your* tool can turn
your html into plain text for transmission, go for it, but I don't
want to have to supply a tool that turns your 100 lines of html into
my 10 lines of text. Let's do it the other way around.

--
Al Balmer
Balmer Consulting
re************* ***********@att .net
Nov 13 '05 #205
Programmer Dude wrote:

<snip>
If you want to stay with
plain text, do so. If you want to strip HTML tags from HTML
posts, do so. If you want to use HTML tags as a filter to
eliminate posts you refuse to see, do so.

I'm not in favor of forcing anyone to do anything. I would like
the ability to use advanced tools if *I* choose.


Indeed (although we could quibble over "advanced" - but let's not).

But the problem is this: most of the people in comp.lang.c who are providing
a service are also the people who don't like HTML articles. Most of the
people posting in HTML (and I don't mean to make it sound like there are
hundreds, because there aren't) are also the people who wish to avail
themselves of that service.

So - which is better? To say to these people "please don't post in HTML" and
then help them out with their C question, or to ignore their articles
completely without even telling them why they're being ignored?

<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 #206
Richard Heathfield wrote:
I'm not in favor of forcing anyone to do anything. I would like
the ability to use advanced tools if *I* choose.
Indeed (although we could quibble over "advanced" - but let's not).


Good. You'd lose.
So - which is better? To say to these people "please don't post in
HTML" and then help them out with their C question, or to ignore
their articles completely without even telling them why they're
being ignored?


I don't agree those are the only choices.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #207
Alan Balmer wrote:
Try reading 65-column text with hard returns in a 55-column window!
Looks kinda ugly with those alternating short and full lines.
I can have my (text) reader re-wrap the text.


It will ignore hard returns? Slick.
I don't find a ragged right edge to be a problem.


Nor do I, although (well) justified text is easier to read (hence
its common use in books and magazines).


Hmm.. Chapter and verse, please. I've never explicitly researched
this, but I do remember a study some years ago which indicated that
ragged right edges are actually easier to read.


I did a little poking around the 'net. Opinions vary with a number
of them in favor of "ragged right" (although some of them go on to
mention the potential for "really ragged right" (unattractive)) .

Justified seems to be considered more formal and does require care
to insure you don't have "rivers" (of white running down the text).
It was also mentioned that the additional space betweed words does
have the potential to slow reading time.

I suspect it boils down to this: with very good typesetting and
the right line width, justified is probably "better". In most
other cases, it probably is not.

Thus, I retract my original statement (I have a background in the
publishing industry, and that was the source of my belief--which
remains true IN THAT CONTEXT).

Yes, I've seen some of those - one was miniature elephants waving
their trunks. I didn't think it added to readability,...


No, I'd agree! Cute does not good writing make.

Indeed, writing for content should be as "transparen t" as possible.
My opinion is that true bold/italic/underline is more transparent
than their ASCII alikes (when I write very seriously (in text) I
tend to not use the ASCII indicators and emoticons at all). I would
also opine that proportional spacing is more transparent than mono
for anything but source code.

[shrug] As I've said; time will tell.

Peace Out.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #208
On Wed, 12 Nov 2003 15:56:45 -0600, Programmer Dude
<Ch***@Sonnack. com> wrote:
My opinion is that true bold/italic/underline is more transparent
than their ASCII alikes
I think I have to agree with that, so long as it's transparent to a
reader which doesn't support it.
(when I write very seriously (in text) I
tend to not use the ASCII indicators and emoticons at all).
The ability to effective convey emotional tone without the use of such
devices is a mark of a good wordsmith.
I would
also opine that proportional spacing is more transparent than mono
for anything but source code.


Once again, I agree with you. I use a proportional font unless there's
code involved. Just don't send me HTML!

--
Al Balmer
Balmer Consulting
re************* ***********@att .net
Nov 13 '05 #209
Programmer Dude wrote:
Richard Heathfield wrote:
I'm not in favor of forcing anyone to do anything. I would like
the ability to use advanced tools if *I* choose.
Indeed (although we could quibble over "advanced" - but let's not).


Good. You'd lose.


I don't think so. In this case, what you call "advanced" is what most people
taking part in this discussion would consider retarded or regressed,
because providing newbies with the power to post HTML into comp.lang.c
without also providing them with the wisdom not to is not a sign of
advancement, but of poverty of thought.
So - which is better? To say to these people "please don't post in
HTML" and then help them out with their C question, or to ignore
their articles completely without even telling them why they're
being ignored?


I don't agree those are the only choices.


But you don't get to choose other people's actions for them, any more than I
do. You only get to choose your own. Personally, I'm getting more and more
fed up of off-topic bickering such as has been seen in this thread, and
it's getting to the point where I would go for the second option rather
than the first, because the first only leads to asinine threads like this
one.

--
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 #210

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.