SA> if (programmer!=clue)
SA> {
SA> post_msg(public_echo);
SA> self.fool=true;
SA> colour=red;
SA> }
I've used this routine a thousand times.
It works like a charm, even though I can't seem to find
the self struct in the standard anywhere. It must be
undocumented. :)
Eventually I amended it, similar to this:
if(!pointless(msg) && !clueless(msg)
&& !(rude(msg) || cruel(msg))
{
post_msg(public_echo(msg));
}
else
{
abort_msg(public_echo(msg));
}
As you can see, however, this still fails on occassion.
I have some concern about the time required to perform
four separate operations on the same data, which is why
I put pointless(msg) first, which takes advantage of the
shortcut on failure in comparisons found in C, since if
clueless() or rude() or cruel() are TRUE, then pointless()
is generally TRUE as well. The further comparisons are
there for redundancy in the event that the first one fails,
though, since !pointless(msg) may be TRUE and still fail
on the other conditionals.
The is one of the areas where a multitasking library works
to advantage, since the computer can constantly evaluate
msg while it is being edited because the human peripheral
is so much slower than the processor. I believe MS Word
does something similar to this with its spell checker.
This becomes much easier in C++, where the parallel
thread may be part of the same class and have automatic
access to msg due to that fact. Otherwise, in straight C,
passing msg to the parallel thread is of some concern.
I generally find that the message will abort before I get
more than four or five lines into it, composing it with
this routine in place and processing in parallel.
It's a real time-saver!
> ] Those who don't learn from the past are... Rats! I forgot...
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)
|