M
Moi
The page at http://www.freetype.org/david/reliable-c.html is a "paper"
that describes this kind of design technique.
Excellent stuff.
Thanks for the link, Ben,
AvK
The page at http://www.freetype.org/david/reliable-c.html is a "paper"
that describes this kind of design technique.
James Dow Allen said:It can also be used as a carefree man's backtracker as at
http://james.fabpedigree.com/rrome.htm
where the calls occur from the following macros:#define EITHER if (S[1] = S[0], ! setjmp((S++)->jb)) {
#define OR } else EITHER
#define REJECT longjmp((--S)->jb, 1)
#define END_EITHER } else REJECT;
Just a word of warning: the behaviour of the above is undefined due to
the severe limits placed on the way setjmp can be called.
Basically you can have nothing more complex than !setjmp(...) or
setjmp [relational or equality op] [integer constant expression] as
the controlling expression of an if/switch/while/for/do.
Ben.
In all of the technical groups I read, only YOU are incapable of setting
your newsread properly. Why is that Nick? An attempt to be different?
Ben Bacarisse said:-48,562?
Joachim said:Hmm, here too (but not exclisivly), but I think females might be
offended of you to think of a female nicknames to be offensive...
Hmm, here too (but not exclisivly), but I think females might be offended of
you to think of a female nicknames to be offensive...
Nick Keighley said:applying a female name to a male person might quite well be offensive
to the male person.
Are you from Mars or something?
Seebs said:Most people think a gendered nickname inappropriate for their gender is
offensive. It's not whether it's male or female that's offensive, it's
that it's wrong.
?? if someone uses a name for him that he dislikes and only uses to
cause
offense then isn't almost by definition offensive?
I mean this is playgound stuff shouldn't we have grown out of this
sort of
thing?
And *why* do you need to know why its offensive? Surely Keith's
dislike
of it it enough for a polite and reasonable person to desist using it.
Keith said:I suggest that we've spent more than enough time on this.
James Dow Allen said:James Dow Allen said:It can also be used as a carefree man's backtracker as at
  http://james.fabpedigree.com/rrome.htm
where the calls occur from the following macros:#define EITHER Â Â Â Â if (S[1] = S[0], ! setjmp((S++)->jb)) {
#define OR Â Â Â Â Â Â } else EITHER
#define REJECT Â Â Â Â longjmp((--S)->jb, 1)
#define END_EITHER } else REJECT;Basically you can have nothing more complex than !setjmp(...) or
setjmp [relational or equality op] [integer constant expression] as
the controlling expression of an if/switch/while/for/do.
One simple change I could make would be to
move the comma operator to inside the setjmp
argument, i.e. replace
if (S[1] = S[0], ! setjmp((S++)->jb)) {
with
if (! setjmp((S[1] = S[0], (S++)->jb))) {
Would this solve the problem?
The comma operator isn't just a fetish here,
but seemed essential to the "smoothness" of
these macros in the presence of "else".
If we insist, for some reason, on not using
the comma operator *at all*, a workaround may
be harder, assuming we reject an approach like:
/* which END_EITHER to use depends on number of OR's */
#define END_E1 } else REJECT; }
#define END_E2 } else REJECT; }}
#define END_E3 } else REJECT; }}}
#define END_E4 } else REJECT; }}}}
#define END_E5 } else REJECT; }}}}}
#define END_E6 } else REJECT; }}}}}}
Perhaps there's a clever solution based on some
" do { ... break ...} while()" construct, but I'll
leave that as an exercise.
Another interesting puzzle -- solution for which
would be embarrassing for me, but perhaps not overly
surprising -- is to redesign the macros to avoid
setjmp/longjmp altogether. (I would not consider a
solution "valid" in this sense if its overall
complexity increases, or if threads or fork()s
are substituted for the setjmp()s.)
I suggest that we've spent more than enough time on this.
to my knowledge google provides no automatic way to do this.
I think I've told you this before...
Are you posting through Google Groups? So am I, but I don't have the
same problem. For example, this paragraph is one long line without
any line breaks, and it probably looks fine.
Are you typing your posts in some other program and putting your own
linebreaks in it or something?
At least once in the last few years I was told by someone that A
called B an "X," and I did not know what the term "X" meant. As it
turned out, it was a regional racial epithet which I had never heard
before. This puts the comment in a completely different light than
calling someone by a (disliked) diminutive of their name (which you
might also not be familiar with - for example, many non-native English
speakers are probably unaware of the common reduction of "Richard").
I interpreted the original query as to why the term was offensive in
that context.
Seebs said:Probably. I am sympathetic to people trying to figure out where the
offense came from when it's not completely overt, because I have had
a hard time with that in the past. Still do sometimes!
Are you posting through Google Groups? So am I, but I don't have the
same problem. For example, this paragraph is one long line without
any line breaks, and it probably looks fine.
Are you typing your posts in some other program and putting your own
linebreaks in it or something?
Nick said:I'm typeing directly into google and putting my own line breaks in.
That's your mistake. You're putting in too many line breaks; only break
the line manually at the end of paragraphs.
Frank a écrit :
C assumes a stack, and if the machine has no
stack register it must be implemented in software.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.