473,839 Members | 1,538 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
On Sat, 8 Nov 2003 10:52:51 +0000, Mark Gordon
<sp******@fla sh-gordon.me.uk> wrote:
I've used at least one news reader which *did* apply *bold*, /italic/,
_underline_ and possibly other mark ups and did a good job of it. So
people who want such things have the option of choosing a news reader
that supports them *without* causing problems people who do not want
them.


I don't understand that statement. If they use such a reader to
compose messages which I read, they *are* causing problems, since I
still have to receive and store it (at least temporarily) and it will
quite likely display garbage in my newsreader.

If you use your reader only to compose notes to yourself, make it as
fancy as you like.

--
Al Balmer
Balmer Consulting
re************* ***********@att .net
Nov 13 '05 #151
Sheldon Simms <sh**********@y ahoo.com> wrote:
On Fri, 07 Nov 2003 15:32:45 -0600, Programmer Dude wrote:
HTML offers a wonderful, potentially universal, way to add dimension
to text. The EXACT SAME dimension that we've enjoyed for decades in
our books, magazines and newspapers. Why NOT enjoy the power of the
additional information-carrying capacity of formatted text?


One good reason not to use HTML is that HTML sucks rocks if your
goal is to format text. It is not a text-formatting language and
never was intended to be.


Perhaps Programmer Dude was including CSS in this discussion, which is a
text-formatting language, but is generally so intertwined with HTML that
one can simply assume it is there.

What is CSS?
http://www.howtocreate.co.uk/tutoria...p?tut=1&part=1

The days of USENET as totally devoid of formatted text, which is easier
to read, are indeed numbered.

Of course, when one needs monospaced text, HTML does provide for such
things...infact , there is even a tag <CODE> defined in HTML specifically
for source code.

http://www.w3.org/TR/html4/struct/text.html#edef-CODE

--
Nov 13 '05 #152
In <t7************ *************** *****@4ax.com> Alan Balmer <al******@att.n et> writes:
On Sat, 8 Nov 2003 10:52:51 +0000, Mark Gordon
<sp******@flas h-gordon.me.uk> wrote:
I've used at least one news reader which *did* apply *bold*, /italic/,
_underline_ and possibly other mark ups and did a good job of it. So
people who want such things have the option of choosing a news reader
that supports them *without* causing problems people who do not want
them.


I don't understand that statement. If they use such a reader to
compose messages which I read, they *are* causing problems, since I
still have to receive and store it (at least temporarily) and it will
quite likely display garbage in my newsreader.


Not necessarily. It depends on the markup convention being used. It is
perfectly possible to use the usual Usenet conventions in deciding which
font to use: included text and text between / characters can be rendered
with an italic font, text between _ characters with an underlined font
and text between * characters with a bold font. Some care must be taken
when handling mathematical expressions, though ;-)

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #153
On Mon, 10 Nov 2003 08:25:11 -0700
Alan Balmer <al******@att.n et> wrote:
On Sat, 8 Nov 2003 10:52:51 +0000, Mark Gordon
<sp******@fla sh-gordon.me.uk> wrote:
I've used at least one news reader which *did* apply *bold*,
/italic/,_underline_ and possibly other mark ups and did a good job
of it. So people who want such things have the option of choosing a
news reader that supports them *without* causing problems people who
do not want them.
I don't understand that statement. If they use such a reader to
compose messages which I read, they *are* causing problems, since I
still have to receive and store it (at least temporarily) and it will
quite likely display garbage in my newsreader.


No, otherwise my example above would have caused you problems. In the
above paragraph typed by you it would have displayed the word "are" in
bold because you typed it as "*are*". All the reader I mentioned does is
scan the text for commonly used emphasis markers and render the text
appropriately. So if you put underscores around a word it will be
displayed in this reader as underlined. If you put *s around it the it
is displayed in bold. If you put /s around it the it gets displayed in
italics. So it does not produce something that will be garbage in a
normal reader and it will add visibly emphasis to posts by people using
standard news readers.
If you use your reader only to compose notes to yourself, make it as
fancy as you like.


I'm not and I'm not advocating HTML. I am just pointing out that without
inconveniencing those of us using normal news readers people *can* have
things displayed in bold or underlined etc when the rest of us put
emphasis in out posts.

Similarly, if someones news reader renders :-) as a graphical smiley,
where is the problem for you?
--
Mark Gordon
Paid to be a Geek & a Senior Software Developer
Although my email address says spamtrap, it is real and I read it.
Nov 13 '05 #154
On Mon, 10 Nov 2003 17:31:09 +0000, Mark Gordon
<sp******@fla sh-gordon.me.uk> wrote:
On Mon, 10 Nov 2003 08:25:11 -0700
Alan Balmer <al******@att.n et> wrote:
On Sat, 8 Nov 2003 10:52:51 +0000, Mark Gordon
<sp******@fla sh-gordon.me.uk> wrote:
>I've used at least one news reader which *did* apply *bold*,
>/italic/,_underline_ and possibly other mark ups and did a good job
>of it. So people who want such things have the option of choosing a
>news reader that supports them *without* causing problems people who
>do not want them.
I don't understand that statement. If they use such a reader to
compose messages which I read, they *are* causing problems, since I
still have to receive and store it (at least temporarily) and it will
quite likely display garbage in my newsreader.


No, otherwise my example above would have caused you problems. In the
above paragraph typed by you it would have displayed the word "are" in
bold because you typed it as "*are*". All the reader I mentioned does is
scan the text for commonly used emphasis markers and render the text
appropriatel y.

<snip>
My bad. I had assumed that you were indeed talking about HTML or RTF.
Unfortunately, for 95% of posters who include such things, my
assumption would have been correct.


--
Al Balmer
Balmer Consulting
re************* ***********@att .net
Nov 13 '05 #155
Mark Gordon <sp******@fla sh-gordon.me.uk> writes:
[...]
I've used at least one news reader which *did* apply *bold*, /italic/,
_underline_ and possibly other mark ups and did a good job of it. So
people who want such things have the option of choosing a news reader
that supports them *without* causing problems people who do not want
them.


As it happens, the newsreader I'm currently using (Gnus v5.9.0) does
use boldface for *bold* and underlining for _underlining_. I think it
tries to use italics for /italics/, but my terminal emulator doesn't
support italics.

I wouldn't mind if it also showed me the '*', '_', and '/' characters.
It probably causes problems for things like __STDC__ (I'll see when
this article shows up). It is, of course, infinitely configurable,
but I haven't bothered to figure it out yet.

In a non-Usenet context, I've seen software that displays "8)" as a
smiley, which is annoying when someone happens to want to use that
sequence of characters. Even if it's meant to be a smiley, I'd rather
see the '8' and the ')'.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 13 '05 #156
te*********@BUS ThotmailE.Rcom writes:
[...]
The days of USENET as totally devoid of formatted text, which is easier
to read, are indeed numbered.
I hope it's a big number.
Of course, when one needs monospaced text, HTML does provide for such
things...infact , there is even a tag <CODE> defined in HTML specifically
for source code.


I might not mind if I could count on everyone to use it properly.
Even then, it would inevitably make it more difficult for me (and
everyone else) to write articles when all I want to do is write a few
paragraphs of text. I write some HTML for web pages (nothing fancy).
If I had to go to that much effort to post here, I would do it far
less often. Perhaps that wouldn't be such a bad thing (yeah, false
humility), but there are plenty of others whose contributions would be
missed.

If you want the web, you know where to find it.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 13 '05 #157
Keith Thompson <ks***@mib.or g> wrote:
te*********@BUS ThotmailE.Rcom writes:
[...]
The days of USENET as totally devoid of formatted text, which is easier
to read, are indeed numbered.
I hope it's a big number.


I hope the number is large enough to allow for good client programs to
be developed to handle such a thing well. I do not yet believe they
exist (hint:'good' is a relative term and I have high standards), but
they are getting close.
Of course, when one needs monospaced text, HTML does provide for such
things...infact , there is even a tag <CODE> defined in HTML specifically
for source code.


I might not mind if I could count on everyone to use it properly.


Which places great importance on writing good client programs for
USENET.
Even then, it would inevitably make it more difficult for me (and
everyone else) to write articles when all I want to do is write a few
paragraphs of text.


Why?

I can see no reason to believe that this task would be any more
difficult then it is now. You would still essentially create a new
message, type it in and post it. The extra features would be there for
you to use or not.

--
Nov 13 '05 #158
Sheldon Simms wrote:
One good reason not to use HTML is that HTML sucks rocks if your
goal is to format text. It is not a text-formatting language and
never was intended to be.


It depends on your definition of text-formatting. If you define it
as "page layout" I agree it was never intended as such. If you
define it as "text attributes" then it clearly WAS originally
intended as such (hence those depreciated tags).

I see two big advantages to HTML over plain text: The ability to
provide more natural emphasis (that is, true italics and bold
rather than the crude ASCII versions of such). And the big one:
the ability to wrap to fit the user's window width (and I mean
"window", not "Window").

Formatting with hard returns to 78, 77, 75, 72m 68 or 65 is a start,
but wouldn't it be nice to be able to tuck a small window somewhere
on your screen (say at 40 cols) and STILL have the text read nice?

So far, I see advantages and no disadvantages.. ..

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #159

On Mon, 10 Nov 2003 te*********@BUS ThotmailE.Rcom wrote:

Keith Thompson <ks***@mib.or g> wrote:
te*********@BUS ThotmailE.Rcom writes:
[...]
The days of USENET as totally devoid of formatted text, which is easier
to read, are indeed numbered.


I hope it's a big number.


I hope the number is large enough to allow for good client programs to
be developed to handle such a thing well. I do not yet believe they
exist (hint:'good' is a relative term and I have high standards), but
they are getting close.
Of course, when one needs monospaced text, HTML does provide for such
things...infact , there is even a tag <CODE> defined in HTML specifically
for source code.


I might not mind if I could count on everyone to use it properly.


Which places great importance on writing good client programs for
USENET.


s/client programs/users/

Unless you're proposing an *amazing* leap forward in natural-language
parsing within the above "numbered" years, the responsibility for
courteous HTML use remains on the user's shoulders, not on his
software.

<h1><font="comi c sans" size="72"><blin k>I could write like this
all the time... how would your clever little HTML newsreader like
that, hmm?</blink></font></h1>

Plain text does a great job of transmitting information from place
to place and person to person. Re an earlier argument possibly by
someone else: No, I have no books on my shelf written in monospace,
but nor do I own any books with colored text, bold text interspersed
with regular, "smilies," or -- god forbid -- blinking text. Like
someone else also said: Text formatting is fine, but HTML sucks at
text formatting. :-)
Even then, it would inevitably make it more difficult for me (and
everyone else) to write articles when all I want to do is write a few
paragraphs of text.


Why?

I can see no reason to believe that this task would be any more
difficult then it is now. You would still essentially create a new
message, type it in and post it. The extra features would be there for
you to use or not.


It would probably be inconvenient to use the new features in
most newsreaders, especially the old standards with the three-letter
names. Me, I use Pine over SSH. I don't have a toolbar to click on
the "B" for bold or whatever, and HTML-formatted text looks really
ugly in a *nix text window. Think Lynx, but with trolls.

-Arthur
Nov 13 '05 #160

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.