<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD-Dev] Re: PDMud thread summary -->
<!--X-From-R13: Oqnz Ivttvaf <nqnzNnatry.pbz> -->
<!--X-Date: Mon, 26 Oct 1998 15:28:04 -0800 -->
<!--X-Message-Id: Pine.SGI.3.96.981026151309.4533I-100000#zazu,angel.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 19981026161724.A2321#thelonious,new.ox.ac.uk -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: PDMud thread summary</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:adam#angel,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="msg00523.html">Previous</a>
| <a href="msg00525.html">Next</a>
]
Thread:
[ <a href="msg00518.html">Previous</a>
| <a href="msg00546.html">Next</a>
]
Index:
[ <A HREF="author.html#00524">Author</A>
| <A HREF="#00524">Date</A>
| <A HREF="thread.html#00524">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: PDMud thread summary</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: PDMud thread summary</LI>
<LI><em>From</em>: Adam Wiggins <<A HREF="mailto:adam#angel,com">adam#angel,com</A>></LI>
<LI><em>Date</em>: Mon, 26 Oct 1998 15:24:40 -0800 (PST)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Mon, 26 Oct 1998, Jo Dillon wrote:
> Nope. Constant variables would be an oxymoron ;) A static variable
> is simply a variable whose value is shared between instances of a class
> (in C++ speak anyway). It's like a global variable but it's in the class's
> scope, which helps with name hiding.
It's slightly more complicated than that, due to C++ being a hack on top
of C. 'static' is best thought of as a way to use global variables with
a limited scope. For example:
class Foo
{
public:
static int MyStatic;
};
int Foo::MyStatic = 1;
static int MyStatic = 2;
void bar()
{
static int MyStatic = 3;
printf("MyStatic = %d\n", MyStatic);
{
static int MyStatic = 4;
printf("MyStatic = %d\n", MyStatic);
}
}
main()
{
printf("Foo::MyStatic = %d\n", Foo::MyStatic);
printf("MyStatic = %d\n", MyStatic);
bar();
}
The output will be:
Foo::MyStatic = 1
MyStatic = 2
MyStatic = 3
MyStatic = 4
</PRE>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00546" HREF="msg00546.html">[MUD-Dev] Re: PDMud thread summary</A></strong>
<ul compact><li><em>From:</em> Jo Dillon <emily#thelonious,new.ox.ac.uk></li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00516" HREF="msg00516.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
<UL><LI><EM>From:</EM> Jo Dillon <emily#thelonious,new.ox.ac.uk></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00523.html">[MUD-Dev] Re: Missing the point: OpenMUD, Gamora, Casbah, etc.</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00525.html">[MUD-Dev] Re: openmud or pdmud or devmud</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00518.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00546.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00524"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00524"><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>[MUD-Dev] Re: PDMud thread summary</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00515" HREF="msg00515.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
Holly Sommer <a href="mailto:hsommer#micro,ti.com">hsommer#micro,ti.com</a>, Mon 26 Oct 1998, 16:08 GMT
<UL>
<LI><strong><A NAME="00516" HREF="msg00516.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Mon 26 Oct 1998, 16:20 GMT
<UL>
<LI><strong><A NAME="00517" HREF="msg00517.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Mon 26 Oct 1998, 17:20 GMT
<UL>
<LI><strong><A NAME="00518" HREF="msg00518.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Mon 26 Oct 1998, 17:48 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00524" HREF="msg00524.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Mon 26 Oct 1998, 23:28 GMT
<UL>
<LI><strong><A NAME="00546" HREF="msg00546.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Tue 27 Oct 1998, 09:26 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
<LI><strong><A NAME="00441" HREF="msg00441.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 24 Oct 1998, 01:15 GMT
</LI>
<LI><strong><A NAME="00443" HREF="msg00443.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 24 Oct 1998, 01:55 GMT
<UL>
<LI><strong><A NAME="00446" HREF="msg00446.html">[MUD-Dev] Re: PDMud thread summary</A></strong>,
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Sat 24 Oct 1998, 02:50 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>