<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD-Dev] PirateMUD and CSL -->
<!--X-From-R13: pynjerapNphc.uc.pbz -->
<!--X-Date: Tue, 12 Aug 1997 23:47:32 +0000 -->
<!--X-Message-Id: 199708122346.QAA13154#xsvr3,cup.hp.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 9708060212.8ame@ami-cg.GraySage.Edmonton.AB.CA -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] PirateMUD and CSL</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:clawrenc#cup,hp.com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">
<font size="+4" color="#804040">
<strong><em>MUD-Dev<br>mailing list archive</em></strong>
</font>
<br>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00503.html">Previous</a>
| <a href="msg00505.html">Next</a>
]
Thread:
[ <a href="msg00408.html">Previous</a>
| <a href="msg00402.html">Next</a>
]
Index:
[ <A HREF="author.html#00504">Author</A>
| <A HREF="#00504">Date</A>
| <A HREF="thread.html#00504">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] PirateMUD and CSL</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] PirateMUD and CSL</LI>
<LI><em>From</em>: <A HREF="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</A></LI>
<LI><em>Date</em>: Tue, 12 Aug 97 16:38:49 -0700</LI>
<LI><em>Reply-to</em>: <A HREF="mailto:claw#null,net">claw#null,net</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
In <<A HREF="msg00408.html">9708060212.8ame#ami-cg,GraySage.Edmonton.AB.CA</A>>, on 08/06/97
at 07:53 AM, cg#ami-cg,GraySage.Edmonton.AB.CA (Chris Gray) said:
>However, what I did was to make up a datatype that is 3-valued, and
>have many such routines return that type. I call the type "status",
>and it is built into the language just like "int", "bool", etc. The
>three values it has, and their common meanings are:
> success - the activity has completed successfully
> failure - the activity has failed
> continue - continue with the activity
I'd long wondered about that one. I've had a similar type for almost
10 years now, originally an enum:
enum {
NEG = -1,
MID,
POS
} ACT;
Its been an incredibly useful mini-tool. I've found it rather
surprising that nobody else seems to have used a tri-value in any of
the code I've worked on (which often could have *really* used one).
>In your example, the writer of the CSL could choose whether or not to
>return 'success', having done everything related to the event, or
>return 'continue', indicating that the default activities should
>happen. Returning 'continue' doesn't mean that nothing special has
>been done, however. Naturally, I then ran into cases where 3 values
>weren't enough, so I fudged it. You could just return an integer, and
>predefine some values.
For me a typical interpretation might be:
switch (ACTvar) {
case NEG:
error...
case MID:
do nothing...nothing happened...
case POS:
do something...something happened.
}
My general extrapolation is:
negative values == failure conditions
zero value == success/pass
postive values == something notable which isn't an error happened.
--
J C Lawrence Internet: claw#null,net
(Contractor) Internet: coder#ibm,net
---------------(*) Internet: clawrenc#cup,hp.com
...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...
</PRE>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00408" HREF="msg00408.html">Re: [MUD-Dev] PirateMUD and CSL</A></STRONG>
<UL><LI><EM>From:</EM> cg#ami-cg,GraySage.Edmonton.AB.CA (Chris Gray)</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00503.html">Re: [MUD-Dev] Graphic MUDS/Ultima Online</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00505.html">Re: [MUD-Dev] Generalized AI Resend</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00408.html">Re: [MUD-Dev] PirateMUD and CSL</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00402.html">[MUD-Dev] Reputation, was butthead features</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00504"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00504"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] PirateMUD and CSL</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00573" HREF="msg00573.html">Re: [MUD-Dev] PirateMUD and CSL</A></strong>,
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 14 Aug 1997, 21:25 GMT
</LI>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00412" HREF="msg00412.html">[MUD-Dev] Generalized AI Resend</A></strong>,
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Wed 06 Aug 1997, 22:00 GMT
<UL>
<LI><strong><A NAME="00505" HREF="msg00505.html">Re: [MUD-Dev] Generalized AI Resend</A></strong>,
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Wed 13 Aug 1997, 00:01 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00408" HREF="msg00408.html">Re: [MUD-Dev] PirateMUD and CSL</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 06 Aug 1997, 13:05 GMT
<UL>
<LI><strong><A NAME="00504" HREF="msg00504.html">Re: [MUD-Dev] PirateMUD and CSL</A></strong>,
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Tue 12 Aug 1997, 23:47 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00402" HREF="msg00402.html">[MUD-Dev] Reputation, was butthead features</A></strong>,
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Wed 06 Aug 1997, 02:16 GMT
<UL>
<LI><strong><A NAME="00407" HREF="msg00407.html">Re: [MUD-Dev] Reputation, was butthead features</A></strong>,
Jeff Kesselman <a href="mailto:jeffk#tenetwork,com">jeffk#tenetwork,com</a>, Wed 06 Aug 1997, 09:41 GMT
</LI>
</UL>
<UL>
<li><Possible follow-up(s)><br>
<LI><strong><A NAME="00411" HREF="msg00411.html">RE: [MUD-Dev] Reputation, was butthead features</A></strong>,
Koster, Kristen <a href="mailto:kkoster#origin,ea.com">kkoster#origin,ea.com</a>, Wed 06 Aug 1997, 21:30 GMT
<UL>
<LI><strong><A NAME="00419" HREF="msg00419.html">Re: [MUD-Dev] Reputation, was butthead features</A></strong>,
Jeff Kesselman <a href="mailto:jeffk#tenetwork,com">jeffk#tenetwork,com</a>, Thu 07 Aug 1997, 00:43 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>