473,839 Members | 1,473 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
Mark Gordon wrote:
As a writer and an artist, [...] Those attributes are a part of
my creative expressive toolkit (for in the hands of a knowledgable
user, they can add a great deal to the information content).
The problem here is that most posters (including myself) are *not*
knowledgeable about what is readable to the majority of people.


Takes a wise man to know his limits.

Simple solution: set your HTML reader/writer to emit basically what
you type. Of even turn off the HTML.
You are assuming that most people understand how to configure there
software. You are also assuming that the most commonly used software
allows such configuration to be done in a simple manner.
Perhaps an area that needs growth, yes. 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.
How about the fact that it would take a lot longer to download..


A *lot* longer? I doubt that. Maybe a little bit longer, but
compared to over quoting and OT and SPAM,.... is it really that
bad?

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #191
Les Cargill wrote:
The existing system known as Usenet ranges to serve people from
those using HTML emabled readers to those using Tin. The Tin
folks will not understand HTML very easily.


They looking for a heart? ;-|

But seriously, to pre-answer a question down thread, I suspect
the variety of readers is the reason it hasn't caught on, yet.

I continue to suspect it will, though.

[shrug] Time will tell.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #192
te*********@BUS ThotmailE.Rcom wrote:
If this transition is inevitable, why hasn't it started?


It has via the support for HTML in some usenet clients.


Netscape's had it for years.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #193
Richard Bos wrote:
(which suggests the odd idea that a sans-serif, monospace font
would be ideal...I just don't think I *know* of one!)


You've never used a _real_ terminal? *Blink* Even most MS-DOS
computers originally had sans-serif monospaced fonts.


Yes. But the name of that font?.....

It was probably a basic 5x7 ROM encoded display font, ya know?

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #194
Ben Pfaff wrote:
Indented paragraphs alone are worth their weight in gold, not to
mention auto-wrapping paragraphs and automatic justification.
Having the ability to do bullet lists would be nice, too!


All of these are possible in plain text.


Truly indented? I don't mean indented with spaces or tabs.

Auto-wrapping? Sure, so long as you didn't put any hard returns
in (something HTML would ignore).

Automatic Justification? Yeah, I've seen it in text. Ugly!!

Bullet Lists? By hand, sure.

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #195
Patrick Foley wrote:
I am unaware of any rich-text or markup standard for news postings
having appeared in the intervening years.
Basic HTML would do fine.
If there is a proposal, it has obviously not been adopted.
USENET is not, I suspect a growing entity (in the development sense).
I would not expect to see RFCs extending or changing it, but I
wouldn't be surprised if de facto standards occurred. (My contention
is that they ARE occurring.)
That suggests to me that the inevitability of this can certainly be
doubted, from which I take a modicum of comfort. You, Chris, might
consider why it hasn't happened if people have been talking about it
for so long.
Well, there's that "desire to stay in the era of the buggy whip"
thing, but look a bit upthread at my reply to Les Cargill. There
are a wide variety of platforms and readers out there, and I think
it's just going to take more time than a handful of years.
followups not set since the thread seems to be dying anyway...


Yeah, I've said my bit, tried to support it (done okay I think).
Time to move on!

--
|_ CJSonnack <Ch***@Sonnack. com> _____________| How's my programming? |
|_ http://www.Sonnack.com/ _______________ ____| Call: 1-800-DEV-NULL |
|______________ _______________ _______________ _|_____________ __________|
Nov 13 '05 #196
On Tue, 11 Nov 2003 16:52:48 -0600
Programmer Dude <Ch***@Sonnack. com> wrote:
Mark Gordon wrote:
As a writer and an artist, [...] Those attributes are a part of
my creative expressive toolkit (for in the hands of a knowledgable
user, they can add a great deal to the information content).
The problem here is that most posters (including myself) are *not*
knowledgeable about what is readable to the majority of people.


Takes a wise man to know his limits.

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.
You are assuming that most people understand how to configure there
software. You are also assuming that the most commonly used software
allows such configuration to be done in a simple manner.


Perhaps an area that needs growth, yes.


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.
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? For example I know one
person who has only upgraded from a 486 to a Pentium based computer
because we acquired one for free for him. Should he be excluded from
Usenet due to lack of resources just because you want HTML?
How about the fact that it would take a lot longer to download..


A *lot* longer? I doubt that. Maybe a little bit longer, but
compared to over quoting and OT and SPAM,.... is it really that
bad?


Currently I have the option of using a news server that does not accept
HTML posting, this on its own eliminates a chunk of spam and attempts by
viruses to spread themselves without me even having to get as far as
downloading the headers. So that combined with the extra bandwidth
required for HTML over plain ASCII does lead to a noticeable saving.

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. Then you can see such formatting and include it in your
posts *without* enforcing anything on anyone else.

Every news ready I have used does formating for me.

If I want more advanced formatting I have the option of using any text
editor I want so I can have auto-indent and anything else. So apart from
the fact it is not HTML you *can* have easy to use formatting of the
type you have described without the need for HTML or anything else
beyond what we already have.
--
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 #197
On Tue, 11 Nov 2003 16:43:44 -0600
Programmer Dude <Ch***@Sonnack. com> wrote:
Ben Pfaff wrote:
Indented paragraphs alone are worth their weight in gold, not to
mention auto-wrapping paragraphs and automatic justification.
Having the ability to do bullet lists would be nice, too!
All of these are possible in plain text.


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? If I tell my reader to use vim or emacs as the editor (it supports
using any editor I want) then I'm sure it will handle it for me.
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.
Automatic Justification? Yeah, I've seen it in text. Ugly!!
I don't find a ragged right edge to be a problem. Also, this client is
applying the requested justification without any problems.
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. So that just needs better editors as part of the
client and does not require moving to HTML.

If people stick to standard quoting conventions then SW can rewrap
quoted text (this client does it on posting a reply) so it is entirely
possible to write a client that will format the displayed message in a
nice (to you) proportional font using kerning to get a straight right
edge on the justified text. It just needs applying the type of
heuristics that modern word processors use to do auto-formatting as you
type.
--
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 #198
Keith Thompson wrote:
te*********@BUS ThotmailE.Rcom writes:
[...]
You are apparently ignoring the inevitability of a USENET on which HTML
is common and those who wish to continue to use it would be required to
move to clients which supports HTML.
We're not ignoring it, we're denying it. We're not failing to
understand your point, we just think you're wrong.

We've seen a major transition of e-mail from a medium that only
supported plain text to one that also supports HTML.


It's interesting that you should say that.

It is quite rare for me to send emails except in reply to those who send
them to me (some would say that even the replies are pretty rare right now,
but you can blame that on spam). My correspondents tend to be either people
asking for help (I wish they would use the newsgroups, and I urge them to
use the newsgroups, but sometimes they /don't/ use the newsgroups), or
people I know already. The people I know use ordinary plain text email. The
rest - the people asking for help - are a mixture; some HTML, some text.

I read my email in vi (well, all right, vim). If I *can't* read an email
because the tags stop me from doing so effectively, I have a very simple
solution - I just delete the email (assuming the spam filter didn't do it
for me). What I /don't/ do is send a reply asking the person to fix their
email account. If they want to send HTML email, that's entirely up to them.
And if I choose not to read it, that's entirely up to me. I don't bother
complaining because, compared to the volume of spam I get, HTML email is a
minor annoyance.

Same applies in Usenet. The HTML postings tend to come from those asking for
help. The plain text replies are coming from those giving it. If by
choosing to post in HTML format those who seek help make life harder for
those who give it, then those who give it will be less willing to give it.
We simply are
not seeing any signs of a similar transition for Usenet, though the
idea has been under discussion for years. Usenet has evolved
mechanisms for transferring binary files, but there just hasn't been
any significant demand for HTML. If this transition is inevitable,
why hasn't it started?
Because it isn't as inevitable as it was supposed to be? :-)
I know of at least one founder of USENET who hates everything that is
USENET and advocates it's demise. I believe he works for Apple Computer
now and helps run their mailing lists (lists.apple.co m).


Death Of Usenet Imminent! Film at 11!
I don't know who you're referring to, but he, like everyone else, is
free not to use Usenet if he doesn't want to.


Quite.

--
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 #199
Programmer Dude <Ch***@Sonnack. com> wrote:
Richard Bos wrote:
(which suggests the odd idea that a sans-serif, monospace font
would be ideal...I just don't think I *know* of one!)


You've never used a _real_ terminal? *Blink* Even most MS-DOS
computers originally had sans-serif monospaced fonts.


Yes. But the name of that font?.....

It was probably a basic 5x7 ROM encoded display font, ya know?


Probably (though it more likely would've been 8x10), and had no name.
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). Letter Gothic
does have serifs, but they're barely noticable.
In fact, the only noticably serifed monospaced font I have is Courier.

Richard
Nov 13 '05 #200

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.