%!PS-Adobe-2.0
%%Creator: dvipsk 5.526a Copyright 1986, 1993 Radical Eye Software
%%Title: cool.dvi
%%Pages: 31
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%%DocumentFonts: Palatino-Roman Helvetica Palatino-Bold Courier
%%+ Palatino-Italic
%%EndComments
%DVIPSCommandLine: dvips -f cool.dvi
%DVIPSParameters: dpi=300, compressed, comments removed
%DVIPSSource:  TeX output 1994.11.09:1651
%%BeginProcSet: texc.pro
/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N
/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72
mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1}
ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div
hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul
TR matrix currentmatrix dup dup 4 get round 4 exch put dup dup 5 get
round 5 exch put setmatrix}N /@landscape{/isls true N}B /@manualfeed{
statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0
0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn
begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X
array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo
setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx
FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{
pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get}
B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{128 ch-data dup
length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B
/ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type
/stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp
0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2
index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff
ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice
ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]/id
ch-image N /rw ch-width 7 add 8 idiv string N /rc 0 N /gp 0 N /cp 0 N{
rc 0 ne{rc 1 sub /rc X rw}{G}ifelse}imagemask restore}B /G{{id gp get
/gp gp 1 add N dup 18 mod S 18 idiv pl S get exec}loop}B /adv{cp add /cp
X}B /chg{rw cp id gp 4 index getinterval putinterval dup gp add /gp X
adv}B /nd{/cp 0 N rw exit}B /lsh{rw cp 2 copy get dup 0 eq{pop 1}{dup
255 eq{pop 254}{dup dup add 255 and S 1 and or}ifelse}ifelse put 1 adv}
B /rsh{rw cp 2 copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2 idiv
S 128 and or}ifelse}ifelse put 1 adv}B /clr{rw cp 2 index string
putinterval adv}B /set{rw cp fillstr 0 4 index getinterval putinterval
adv}B /fillstr 18 string 0 1 17{2 copy 255 put pop}for N /pl[{adv 1 chg}
{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{
adv rsh nd}{1 add adv}{/rc X nd}{1 add set}{1 add clr}{adv 2 chg}{adv 2
chg nd}{pop nd}]dup{bind pop}forall N /D{/cc X dup type /stringtype ne{]
}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup
length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{
cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin
0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul
add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore showpage
userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook
known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X
/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for
65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0
0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V
{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7
getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false}
ifelse}{false}ifelse end{{gsave TR -.1 -.1 TR 1 1 scale rulex ruley
false RMat{BDot}imagemask grestore}}{{gsave TR -.1 -.1 TR rulex ruley
scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave
transform round exch round exch itransform moveto rulex 0 rlineto 0
ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta
0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}
B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{
3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p
-1 w}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{
3 2 roll p a}B /bos{/SS save N}B /eos{SS restore}B end
%%EndProcSet
%%BeginProcSet: texps.pro
TeXDict begin /rf{findfont dup length 1 add dict begin{1 index /FID ne 2
index /UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
exch def dict begin Encoding{exch dup type /integertype ne{pop pop 1 sub
dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}
ifelse}forall Metrics /Metrics currentdict end def[2 index currentdict
end definefont 3 -1 roll makefont /setfont load]cvx def}def
/ObliqueSlant{dup sin S cos div neg}B /SlantFont{4 index mul add}def
/ExtendFont{3 -1 roll mul exch}def /ReEncodeFont{/Encoding exch def}def
end
%%EndProcSet
TeXDict begin 40258431 52099146 1000 300 300 (cool.dvi)
@start /Fa 2 94 df<12FEA212C0B3B312FEA207297C9E0C>91
D<12FEA21206B3B312FEA20729809E0C>93 D E /Fb 2 104 df<133C13E0EA01C01380
1203AD13005A121C12F0121C12077E1380AD120113C0EA00E0133C0E297D9E15>102
D<12F0121C12077E1380AD120113C0EA00E0133C13E0EA01C013801203AD13005A121C12
F00E297D9E15>I E /Fc 136[30 1[30 30 1[30 2[30 30 1[30
30 1[30 30 1[30 30 30 30 30 30 49[30 47[{}17 50.000001
/Courier rf /Fd 1 59 df<126012F0A2126004047C830C>58 D
E /Fe 134[21 21 30 21 23 14 16 16 1[21 18 23 32 12 18
12 12 21 21 12 16 21 17 19 18 45[21 21 21 3[14 3[14 41[{}29
41.666669 /Palatino-Italic rf /Ff 133[21 3[21 23 12 21
14 1[23 23 23 35 9 2[9 1[23 12 23 23 1[23 23 10[28 2[28
9[12 5[30 1[28 7[23 23 23 23 23 23 23 23 23 23 1[12 46[{}34
41.666669 /Helvetica rf /Fg 138[30 17 22 19 1[30 28 30
44 17 1[17 17 3[25 2[30 25 97[{}14 50.000001 /Palatino-Bold
rf /Fh 133[25 25 25 1[25 28 14 25 17 1[28 28 28 41 11
25 11 11 28 28 14 28 28 25 28 28 9[47 33 1[30 33 2[33
39 36 41 28 2[14 2[30 33 36 36 33 33 9[28 28 28 28 28
28 28 2[14 17 3[17 17 40[{}51 50.000001 /Helvetica rf
/Fi 130[25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 1[25 1[25 25
25 1[25 25 25 25 25 25 25 25 1[25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 1[25 25 1[25 25 1[25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 1[25 25 1[25
25 25 33[{}84 41.666669 /Courier rf /Fj 134[23 3[25 14
18 16 1[25 23 25 37 14 25 14 14 25 23 16 21 25 18 25
21 97[{}21 41.666669 /Palatino-Bold rf /Fk 170[29 1[20
3[29 1[35 23 2[13 4[29 26 1[29 65[{}9 37.500000 /Palatino-Roman
rf /Fl 60[14 8[21 10[25 25 3[21 47[21 23 21 35 23 25
14 18 16 23 25 23 24 37 12 23 10 12 24 23 14 20 25 18
23 21 12 2[14 1[14 1[28 28 42 30 32 25 22 28 1[25 33
34 39 25 30 14 14 35 32 23 25 32 29 25 32 1[18 1[25 1[10
10 21 21 21 21 21 21 21 21 21 21 25 10 14 10 1[16 14
14 12 32 35 1[21 15 12 33[{}85 41.666669 /Palatino-Roman
rf /Fm 134[30 1[43 1[33 17 30 20 1[33 33 33 1[13 2[13
33 33 1[33 33 30 33 33 10[40 5[40 2[50 6[37 1[43 43 40
10[33 33 33 33 33 33 33 3[20 45[{}33 59.999974 /Helvetica
rf /Fn 139[16 1[20 1[30 27 29 4[14 29 2[24 1[22 28 10[50
3[26 3[39 8[28 12[25 25 3[25 1[25 25 2[12 1[12 44[{}21
50.000001 /Palatino-Roman rf /Fo 138[43 23 1[28 2[39
42 63 3[21 42 40 1[34 44 32 1[36 16[43 56 2[44 2[24 5[51
67[{}18 71.999998 /Palatino-Roman rf end
%%EndProlog
%%BeginSetup
%%Feature: *Resolution 300dpi
TeXDict begin

%%EndSetup
%%Page: 1 1
1 0 bop 336 482 a Fo(Intr)o(oduction)18 b(to)h(the)f(COOL)h(Pr)o
(ogramming)820 573 y(Language)792 760 y Fn(Stephen)12
b(F)-5 b(.)13 b(White)796 898 y(October)g(28,)f(1994)262
1121 y Fm(1)60 b(Datatypes)262 1255 y Fl(Ther)o(e)14
b(ar)o(e)f(six)g(datatypes)f(in)h Fk(COOL)p Fl(:)h(string)f(\()p
Fj(str)p Fl(\),)i(number)e(\()p Fj(num)p Fl(\),)h(object)e(\()p
Fj(obj)p Fl(\),)i(list)262 1305 y(\()p Fj(list)p Fl(\),)c(err)o(or)h
(\()p Fj(err)p Fl(\))f(and)h(mapping)f(\()p Fj(map)p
Fl(\).)262 1393 y(The)i(only)h(compile-time)e(checking)j(done)f(by)f
Fk(COOL)i Fl(is)e(to)f(ensur)o(e)i(that)f(any)g(instance)262
1443 y(variables)i(ar)o(e)h(initialized)f(only)g(fr)o(om)h(the)f(corr)o
(ect)h(constants.)26 b(Other)14 b(than)g(that,)h(all)262
1493 y(type)8 b(checking)i(is)f(done)g(at)f(run-time,)h(with)f(the)h
(exception)f Fi(E)p 1260 1493 13 2 v 15 w(TYPE)h Fl(being)g(raised)g
(if)g(an)262 1543 y(err)o(or)i(occurs)g(in)f(an)h(operator)e(or)i
(system)e(function.)262 1703 y Fh(1.1)49 b(Str)q(ing)12
b(\()p Fg(str)p Fh(\))262 1821 y Fl(Strings)e(ar)o(e)g(enclosed)h(in)f
(doublequotes)f(\()p Fi(")p Fl(\).)15 b(The)c(following)f(ar)o(e)g
(examples)g(of)g(string)262 1871 y(constants:)365 1993
y Fi("foo")365 2043 y("The)25 b(rain)f(in)h(spain.\\n")365
2093 y("They)g(call)f(me)h(\\"The)f(Woodmaster\\",)g(son.")262
2214 y Fl(String)10 b(instance)g(variables)g(ar)o(e)h(declar)o(ed)h(as)
d(follows:)365 2336 y Fi(str)25 b(foo;)365 2386 y(str)g(bar,)f(baz;)365
2436 y(str)h(zip)g(=)f("The)h(rain)f(in)h(spain.\\n";)967
2574 y Fl(1)p eop
%%Page: 2 2
2 1 bop 262 307 a Fh(1.2)49 b(Number)13 b(\()p Fg(num)p
Fh(\))262 422 y Fl(Numbers)d(ar)o(e)h(long)f(integers)g(\(typically)g
(in)h(the)f(range)g(-2)1212 413 y(\303)1209 422 y(31)g(to)f(2)1331
413 y(\303)1328 422 y(31)h(-)g(1\).)365 531 y Fi(num)25
b(a,)g(n)f(=)h(-1034;)262 686 y Fh(1.3)49 b(Object)12
b(ID)i(\()p Fg(obj)p Fh(\))262 802 y Fl(Object)8 b(ID's)h(consist)f(of)
h(two)f(parts:)14 b(the)9 b(ID,)h(and)g(the)f(servername.)15
b(The)10 b(following)e(ar)o(e)262 851 y(values)i(of)g(type)f(OBJ:)365
960 y Fi(#5@joemud)365 1010 y(#10@fredmud)262 1119 y
Fl(If)h(the)g(object)f(in)i(question)e(is)h(on)h(the)f(local)g(MUD,)h
(the)f(server)h(part)f(may)g(be)h(omitted:)365 1227 y
Fi(#7)262 1336 y Fl(r)o(epr)o(esents)e(object)h(#7)f(on)h(the)g(local)g
(MUD.)h(The)f(value)h(#-1)e(is)h(a)f(special)h(value,)h(usually)262
1386 y(meaning)f(\252nothing\272,)g(\252nowher)o(e\272,)g(or)g(some)g
(kind)h(of)f(err)o(or)h(condition.)262 1541 y Fh(1.4)49
b(List)13 b(\()p Fg(list)p Fh(\))262 1656 y Fl(Lists)h(ar)o(e)i(heter)o
(ogenous,)g(or)o(der)o(ed)h(collections)e(of)g(other)h(datatypes.)29
b(They)16 b(can)g(be)262 1706 y(manipulated)11 b(as)g(unor)o(der)o(ed)i
(sets,)f(using)f(the)h(setadd\(\))f(and)h(setr)o(emove\(\))f
(functions,)262 1756 y(or)f(as)g(or)o(der)o(ed)i(lists,)d(using)i
(listinsert\(\),)e(listappend\(\),)h(listassign\(\).)j(and)e
(listdelete\(\).)262 1842 y(T)l(ypically)f(lists)f(ar)o(e)g(used)h(to)e
(stor)o(e)h(things)g(like)g(the)g(contents)g(of)g(a)g(r)o(oom)g(\(a)g
(list)g(of)g(OBJ\),)262 1892 y(or)h(a)g(list)g(of)g(methods)f(on)h(an)g
(object)g(\(a)g(list)g(of)f(STR\).)262 1978 y(The)j(elements)f(of)h(a)g
(list)g(ar)o(e)h(enclosed)f(by)g(braces,)i(and)e(separated)g(by)g
(commas.)20 b(The)262 2028 y(following)9 b(ar)o(e)i(examples)e(of)h
(lists:)286 2115 y Fi({})648 b Fl(\(the)10 b(empty)f(list\))286
2164 y Fi({1,)25 b(2,)g(3})473 b Fl(\(a)10 b(list)f(of)h(numbers\))286
2214 y Fi({"abc",)25 b("def",)f("ghi"})174 b Fl(\(a)10
b(list)f(of)h(strings\))286 2264 y Fi({)25 b({1,)g(2},)f({3,)h(4},)g
({5,)f(6})h(})50 b Fl(\(a)10 b(list)f(of)h(lists\))286
2314 y Fi({1,)25 b("abc",)f(#3})349 b Fl(\(a)10 b(heter)o(ogenous)f
(list\))262 2399 y(The)k Fi(+)f Fl(and)h Fi(-)f Fl(operators)g(ar)o(e)g
(overloaded)i(for)e(lists)f(to)h(perform)g(the)h Fi(setadd\(\))e
Fl(and)262 2449 y Fi(setremove\(\))e Fl(functions,)h(r)o(espectively)-5
b(.)967 2574 y(2)p eop
%%Page: 3 3
3 2 bop 262 307 a Fh(1.5)49 b(Error)12 b(\()p Fg(err)p
Fh(\))262 422 y Fl(Err)o(or)c(values)g(stor)o(e)e(the)h(r)o(esult)h(of)
e(an)i(operation.)13 b(The)8 b(following)f(is)g(a)g(list)g(of)g(the)g
(curr)o(ent)262 472 y(err)o(ors)j(and)h(their)g(meanings:)p
262 525 918 2 v 261 575 2 50 v 286 560 a(Err)o(or)h(Symbol)p
557 575 V 49 w(Description)p 1179 575 V 262 577 918 2
v 261 626 2 50 v 286 612 a Fi(E)p 313 612 13 2 v 15 w(TYPE)p
557 626 2 50 v 156 w Fl(T)l(ype)f(mismatch)p 1179 626
V 261 676 V 286 661 a Fi(E)p 313 661 13 2 v 15 w(ARGTYPE)p
557 676 2 50 v 81 w Fl(Ar)o(gument)g(type)f(mismatch)p
1179 676 V 261 726 V 286 711 a Fi(E)p 313 711 13 2 v
15 w(NARGS)p 557 726 2 50 v 131 w Fl(Incorr)o(ect)i(number)e(of)g(ar)o
(guments)p 1179 726 V 261 776 V 286 761 a Fi(E)p 313
761 13 2 v 15 w(RANGE)p 557 776 2 50 v 131 w Fl(Range)g(err)o(or)p
1179 776 V 261 826 V 286 811 a Fi(E)p 313 811 13 2 v
15 w(INVIND)p 557 826 2 50 v 106 w Fl(Invalid)i(indir)o(ection)p
1179 826 V 261 876 V 286 861 a Fi(E)p 313 861 13 2 v
15 w(DIV)p 557 876 2 50 v 181 w Fl(Division)f(by)f(zer)o(o)p
1179 876 V 261 925 V 286 910 a Fi(E)p 313 910 13 2 v
15 w(MAXREC)p 557 925 2 50 v 106 w Fl(Maximum)h(r)o(ecursion)g
(exceeded)p 1179 925 V 261 975 V 286 960 a Fi(E)p 313
960 13 2 v 15 w(METHODNF)p 557 975 2 50 v 56 w Fl(Method)g(not)e(found)
p 1179 975 V 261 1025 V 286 1010 a Fi(E)p 313 1010 13
2 v 15 w(VARNF)p 557 1025 2 50 v 131 w Fl(V)l(ariable)i(not)e(found)p
1179 1025 V 261 1075 V 286 1060 a Fi(E)p 313 1060 13
2 v 15 w(FOR)p 557 1075 2 50 v 181 w Fl(For)i(variable)g(not)e(a)h
(list)p 1179 1075 V 261 1125 V 286 1110 a Fi(E)p 313
1110 13 2 v 15 w(SERVERNF)p 557 1125 2 50 v 56 w Fl(Server)i(not)d
(found)p 1179 1125 V 261 1174 V 286 1159 a Fi(E)p 313
1159 13 2 v 15 w(SERVERDN)p 557 1174 2 50 v 56 w Fl(Server)j(down)p
1179 1174 V 261 1224 V 286 1209 a Fi(E)p 313 1209 13
2 v 15 w(OBJNF)p 557 1224 2 50 v 131 w Fl(Object)e(not)g(found)p
1179 1224 V 261 1274 V 286 1259 a Fi(E)p 313 1259 13
2 v 15 w(MESSAGE)p 557 1274 2 50 v 81 w Fl(Message)g(unparseable)p
1179 1274 V 261 1324 V 286 1309 a Fi(E)p 313 1309 13
2 v 15 w(TIMEOUT)p 557 1324 2 50 v 81 w Fl(T)n(imed)h(out)p
1179 1324 V 261 1374 V 286 1359 a Fi(E)p 313 1359 13
2 v 15 w(STACKOVR)p 557 1374 2 50 v 56 w Fl(Stack)f(over\257ow)p
1179 1374 V 261 1423 V 286 1409 a Fi(E)p 313 1409 13
2 v 15 w(STACKUND)p 557 1423 2 50 v 56 w Fl(Stack)g(under\257ow)p
1179 1423 V 261 1473 V 286 1458 a Fi(E)p 313 1458 13
2 v 15 w(PERM)p 557 1473 2 50 v 156 w Fl(Permission)g(denied)p
1179 1473 V 261 1523 V 286 1508 a Fi(E)p 313 1508 13
2 v 15 w(INTERNAL)p 557 1523 2 50 v 56 w Fl(Internal)h(err)o(or)p
1179 1523 V 261 1573 V 286 1558 a Fi(E)p 313 1558 13
2 v 15 w(FILE)p 557 1573 2 50 v 156 w Fl(File)g(not)f(found)p
1179 1573 V 261 1623 V 286 1608 a Fi(E)p 313 1608 13
2 v 15 w(TICKS)p 557 1623 2 50 v 131 w Fl(T)l(ask)h(ran)f(out)g(of)g
(ticks)p 1179 1623 V 261 1673 V 286 1658 a Fi(E)p 313
1658 13 2 v 15 w(TERM)p 557 1673 2 50 v 156 w Fl(T)l(ask)h(terminated)p
1179 1673 V 261 1722 V 286 1707 a Fi(E)p 313 1707 13
2 v 15 w(MAPNF)p 557 1722 2 50 v 131 w Fl(Mapping)g(not)f(found)p
1179 1722 V 262 1724 918 2 v 262 1861 a Fh(1.6)49 b(Mapping)12
b(\()p Fg(map)p Fh(\))262 1976 y Fl(Mappings)h(ar)o(e)g(arrays)h(which)
g(can)g(be)f(indexed)h(by)g(values)f(of)g(any)g(type.)24
b(The)14 b(most)262 2025 y(common)9 b(use)g(is)g(indexing)i(by)f
(strings,)g(for)g(use)f(as)g(associative)g(arrays.)15
b(Each)c(element)262 2075 y(of)c(a)g(mapping)h(consists)e(of)h(two)g
(parts:)13 b(the)7 b(key)-5 b(,)9 b(and)f(the)g(data.)13
b(Indexing)c(of)e(mappings)262 2125 y(is)j(done)g(in)h(exactly)f(the)g
(same)f(way)h(as)g(lists:)365 2236 y Fi(map)25 b(a;)365
2350 y(a["name"])f(=)h("stephen";)365 2399 y(a["cpus"])f(=)h(11;)967
2574 y Fl(3)p eop
%%Page: 4 4
4 3 bop 262 307 a Fl(Now)10 b(indexing)h(on)f Fi(name)g
Fl(or)h Fi(cpus)f Fl(will)g(r)o(eturn)h(the)f(values)g(assigned:)365
437 y Fi(a["name"])24 b(=>)h("stephen")365 487 y(a["cpus"])f(=>)h(11)
365 537 y(a["foobar"])f(=>)h(E)p 766 537 13 2 v 15 w(MAPNF)262
739 y Ff(1.6.1)40 b(Initializing)12 b(mappings)262 857
y Fl(Mappings)d(may)g(be)h(initialized)f(using)h(a)g(constant)e
(mapping)h(expr)o(ession,)i(which)f(is)f(of)262 907 y(the)g(form:)365
1037 y Fi([)25 b Fe(key1)g Fi(=>)g Fe(value1)p Fi(,)f
Fe(key2)h Fi(=>)g Fe(value2)p Fi(,)g Fd(:)7 b(:)g(:)e
Fi(])262 1167 y Fl(For)10 b(example,)g(the)g(above)g(assignments)f
(could)i(be)f(written)g(as:)365 1297 y Fi(map)25 b(a;)365
1414 y(a)g(=)g(["name")f(=>)h("stephen",)f("cpus")g(=>)h(11];)262
1594 y Fl(Of)9 b(course,)i(indexing)h(on)e(values)g(of)g(other)g(types)
f(is)h(possible)g(also:)365 1724 y Fi(a)25 b(=)g([#3)g(=>)f("Object)h
(Number)f(Three",)g(E)p 1239 1724 V 15 w(RANGE)g(=>)h("Value)365
1774 y(out)g(of)g(Range"];)262 1904 y Fl(Y)l(ou)9 b(can)i(even)g(index)
g(on)f(other)g(associative)g(arrays,)g(but)g(that's)f(just)g(perverse!)
262 2086 y Fm(2)60 b(V)l(ar)q(iab)o(les)262 2219 y Fl(Ther)o(e)21
b(ar)o(e)g(two)f(kinds)h(of)f(variables:)36 b(method)21
b(variables)f(and)h(object)f(variables.)262 2269 y(Method)13
b(variables)g(ar)o(e)h(declar)o(ed)g(in)g(methods,)f(and)h(ar)o(e)f
(temporary)-5 b(.)24 b(They)14 b(ar)o(e)g(cr)o(e-)262
2319 y(ated)7 b(for)i(the)f(execution)g(of)g(the)g(method,)g(and)h(ar)o
(e)g(fr)o(eed)g(when)f(execution)g(is)g(complete.)262
2369 y(Object)i(variables)h(ar)o(e)g(permanent,)g(and)g(ar)o(e)g(used)g
(to)f(stor)o(e)g(the)h(state)e(of)i(an)f(object)h(\(its)262
2419 y(name,)j(location,)h(etc\).)26 b(Object)13 b(variables)h(ar)o(e)g
(inherited)h(by)f(instances)f(of)g(an)h(object.)967 2574
y(4)p eop
%%Page: 5 5
5 4 bop 262 307 a Fl(Method)11 b(variables)h(ar)o(e)f(sometimes)f(r)o
(eferr)o(ed)j(to)d(as)h(\252local\272,)h(and)g(object)f(variables)g(as)
262 357 y(\252global\272.)262 444 y(An)g(object's)d(variables)j(may)f
(only)g(be)h(assigned)f(by)h(that)e(object's)g(methods.)15
b(The)c(only)262 494 y(way)d(to)g(r)o(etrieve)h(or)g(modify)g(another)f
(object's)f(variables)i(is)f(to)g(send)h(a)f(message)g(to)g(that)262
544 y(object.)14 b(For)9 b(example,)g(the)g(\252location\272)e(message)
h(says,)h(\252give)g(me)f(your)i(location\272,)e(and)262
594 y(the)h(\252moveto\272)g(message)g(says,)h(\252move)g(yourself)g
(to)f(the)h(following)g(location\272.)262 681 y(V)l(ariables)d(may)h
(be)g(\256xed)g(type,)h(in)f(that)f(they)g(can)i(stor)o(e)e(one)h(type)
f(of)h(value,)h(or)f(variable,)262 731 y(so)j(that)h(they)g(can)h(stor)
o(e)f(any)-5 b(.)23 b(Assigning)12 b(the)h(wr)o(ong)f(type)g(of)h
(value)f(to)g(a)h(\256xed-type)262 781 y(variable)d(raises)g
Fi(E)p 562 781 13 2 v 15 w(TYPE)p Fl(,)g(a)g(type)g(mismatch.)262
869 y(Curr)o(ently)-5 b(,)17 b(object)d(variables)g(can)h(only)f(be)h
(\256xed-type,)g(and)g(method)f(variables)g(can)262 918
y(only)e(be)f(variable)i(type.)20 b(This)12 b(may)g(change)g(in)g(the)g
(futur)o(e.)20 b(Both)12 b(types)f(of)h(variables)262
968 y(may)d(be)i(initialized)f(in)g(their)h(declaration.)262
1126 y Fh(2.1)49 b(Examples)365 1220 y Fi(str)25 b(name;)262
1343 y Fl(declar)o(es)11 b(a)f(\256xed-type)g(string)g(variable)h
(called)g(\252name\272.)365 1466 y Fi(num)25 b(contents;)262
1588 y Fl(declar)o(es)11 b(a)f(\256xed-type)g(list)g(variable)h(called)
f(\252contents\272.)365 1711 y Fi(var)25 b(a,)g(b;)262
1834 y Fl(declar)o(es)11 b(a)f(local)g(variables)g(\252a\272)g(and)h
(\252b\272)f(which)g(may)g(hold)h(values)f(of)g(any)g(type.)262
1992 y Fh(2.2)49 b(Built-In)12 b(V)m(ar)q(iab)o(les)262
2108 y Fl(Ther)o(e)g(ar)o(e)f(a)g(number)h(of)e(tokens)g(in)i
Fk(COOL)g Fl(which)g(act)f(like)g(built-in)g(variables.)18
b(How-)262 2158 y(ever)m(,)11 b(they)f(may)g(not)f(be)i(assigned)f(to.)
k(The)d(following)f(table)f(lists)g(them.)p 262 2213
1202 2 v 261 2263 2 50 v 286 2248 a(V)l(ariable)p 462
2263 V 50 w(T)l(ype)p 611 2263 V 61 w(V)l(alue)p 1463
2263 V 262 2265 1202 2 v 261 2315 2 50 v 286 2300 a Fi(this)p
462 2315 V 101 w(obj)p 611 2315 V 75 w Fl(Object)g(on)h(which)h(the)f
(curr)o(ent)i(thr)o(ead)e(is)g(acting)p 1463 2315 V 261
2364 V 286 2350 a Fi(player)p 462 2364 V 51 w(obj)p 611
2364 V 75 w Fl(Player)g(object)g(which)h(initiated)f(this)f(thead)p
1463 2364 V 261 2414 V 286 2399 a Fi(caller)p 462 2414
V 51 w(obj)p 611 2414 V 75 w Fl(Object)g(which)i(called)g(the)f(curr)o
(ent)h(method)p 1463 2414 V 261 2464 V 286 2449 a Fi(args)p
462 2464 V 101 w(list)p 611 2464 V 50 w Fl(Ar)o(guments)f(to)g(the)g
(curr)o(ent)h(method)p 1463 2464 V 262 2466 1202 2 v
967 2574 a(5)p eop
%%Page: 6 6
6 5 bop 262 308 a Fm(3)60 b(Methods)262 448 y Fh(3.1)49
b(Declar)q(ing)12 b(Methods)262 563 y Fl(Methods)d(consist)g(of)h(a)g
Fi(method)f Fl(declaration,)i(variable)f(and)g(exception)h
(declarations,)262 613 y(statements,)c(and)k(an)f Fi(endmethod)g
Fl(declaration.)262 699 y(The)g(simplest)f(method)h(of)g(all)g(is)g
(the)g(null)h(method:)365 814 y Fi(method)25 b(foo)365
864 y(endmethod)262 978 y Fl(Methods)9 b(describe)i(the)f(action)f(to)h
(be)g(taken)f(when)h(an)g(object)f(r)o(eceives)i(a)f(certain)h(mes-)262
1028 y(sage.)i(If)8 b(a)f(message)f(is)i(sent)f(to)f(an)i(object)f(for)
h(which)g(it)f(does)g(not)g(have)h(a)g(corr)o(esponding)262
1078 y(method,)h Fi(E)p 451 1078 13 2 v 15 w(METHODNF)g
Fl(is)h(raised.)15 b(Methods)10 b(may)f(be)h(called)h(by)f(any)g(other)
g(object,)f(so)262 1128 y(any)h(permissions)f(checking)j(must)d(be)h
(done)g(by)h(the)f(method)f(itself.)365 1243 y Fi(method)25
b(add)407 1292 y(return)f(args[1])g(+)h(args[2];)365
1342 y(endmethod)262 1498 y Fh(3.2)49 b(Bloc)o(k)o(ed)13
b(Methods)262 1613 y Fl(Sometimes)f(it)j(is)g(desir)o(ed)h(that)e(a)h
(method)g(should)g(be)g(declar)o(ed)h(on)f(an)g(object,)h(and)262
1663 y(non-overrideable)c(by)g(any)g(of)g(its)f(childr)o(en.)22
b(The)13 b(keywor)o(d)f Fi(blocked)f Fl(may)h(be)g(used)262
1713 y(in)e(a)g(method)g(declaration)g(to)g(declar)o(e)h(such)g(a)f
(method.)365 1827 y Fi(blocked)25 b(method)f(foo)407
1877 y Fd(:)7 b(:)g(:)365 1927 y Fi(endmethod)262 2042
y Fl(Thus,)g(any)g(childr)o(en)g(of)g(this)g(object)g(would)g(have)g
(the)g(\252)o(foo\272)f(me)o(thod,)f(but)i(any)g(\252method)262
2092 y(foo\272)i(declar)o(ed)j(on)e(those)f(childr)o(en)j(would)e(be)h
(ignor)o(ed.)262 2268 y Fm(4)60 b(Message)17 b(P)n(assing)262
2399 y Fl(Passing)c(a)i(message)e(fr)o(om)h(one)h(object)e(to)h
(another)g(is)h(the)f(only)g(way)g(in)h Fk(COOLMUD)262
2449 y Fl(for)d(objects)g(to)g(interact.)23 b(Objects)11
b(may)i(not)f(r)o(etrieve)i(other)e(objects')f(data,)j(except)f(by)967
2574 y(6)p eop
%%Page: 7 7
7 6 bop 262 307 a Fl(passing)15 b(a)i(message.)32 b(Similarly)-5
b(,)19 b(objects)d(may)g(not)g(set)f(other)i(objects')e(pr)o(operties,)
262 357 y(except)10 b(by)g(passing)g(a)g(message.)262
517 y Fh(4.1)49 b(Syntax)262 635 y Fl(Message)9 b(passing)h(is)g
(accomplished)g(with)g(the)g(`)p Fi(.)p Fl(')f(operator:)365
763 y Fi(#3@joemud.foo\(1,)24 b(2,)g(3\);)262 892 y Fl(passes)10
b(the)i(message)e('foo')h(to)g(object)g(#3)h(on)g(joemud,)g(with)g(the)
g(numeric)g(ar)o(guments)262 942 y(1,)e(2,)h(3.)365 1071
y Fi(var)25 b(a;)365 1121 y(a)g(=)g(#3.location\(\);)262
1250 y Fl(sends)14 b(the)g(message)f('location')g(to)h(#3)g(on)g(the)g
(local)h(mud,)h(and)e(stor)o(es)g(the)g(r)o(esult)g(in)262
1300 y(temporary)c(variable)h(a.)18 b(If)11 b(ther)o(e)g(ar)o(e)g(no)g
(ar)o(guments,)g(the)g(brackets)g(may)g(be)g(omitted,)262
1349 y(like)f(so:)365 1478 y Fi(var)25 b(a;)365 1528
y(a)g(=)g(#3.location;)262 1657 y Fl(Note:)h(When)15
b(no)h(ar)o(guments)g(ar)o(e)g(r)o(equir)o(ed,)k(it's)14
b(a)i(good)g(idea)g(to)f(use)h(brackets)f(to)262 1707
y(indicate)h(the)h(type)f(of)g(message)f(being)i(passed.)33
b(If)16 b(the)g(message)g(will)g(change)h(the)262 1757
y(r)o(emote)d(object)h(or)g(acts)g(like)g(a)h(function,)g(use)f
(brackets.)30 b(If)16 b(the)f(message)e(will)j(only)262
1806 y(r)o(etrieve)11 b(data,)f(use)g(no)g(brackets.)262
1988 y Fm(5)60 b(V)-5 b(erbs)262 2121 y Fl(V)g(erb)14
b(declarations)f(ar)o(e)g(a)g(simple)g(way)g(of)g(attaching)g(player)g
(commands)g(to)f(objects.)262 2171 y(V)-5 b(erb)13 b(declarations)g
(must)f(appear)g(in)i(the)e(declarations)h(section)f(of)h(an)g(object,)
g(befor)o(e)262 2221 y(any)g(method)g(declarations.)26
b(A)14 b(verb)h(declaration)f(is)f(like)h(a)g(template,)f(which)h(r)o
(eads)262 2270 y(fr)o(om)e(left)g(to)g(right.)22 b(On)13
b(the)f(left)g(is)g(the)g(pattern)g(to)g(be)h(matched,)g(on)g(the)f
(right)h(is)f(the)262 2320 y(method)d(called)i(if)f(ther)o(e)h(is)f(a)g
(match.)15 b(For)10 b(example,)365 2449 y Fi(verb)25
b("look")f(=)h(look;)967 2574 y Fl(7)p eop
%%Page: 8 8
8 7 bop 262 307 a Fl(This)11 b(de\256nes)g(a)g(mapping)g(between)f(the)
g(command)h(\252look\272)f(and)i(the)e(\252look\272)g(method)262
357 y(on)g(the)f(object.)15 b(When)10 b(the)f(object)h(is)g(checked)h
(for)f(commands,)g(the)g(command)g(\252look\272)262 407
y(will)f(cause)g(the)f(method)h(named)g(\252look\272)f(on)h(the)g
(object)f(to)h(be)g(called.)16 b(Any)9 b(ar)o(guments)262
457 y(may)f(follow)f(the)i(verb)g(in)g(this)f(example,)h(so)f(the)g
(commands)g(\252look)g(fr)o(ed\272,)i(\252look\272,)e(and)262
506 y(\252look)13 b(at)h(the)h(pr)o(etty)f(\257owers\272)g(would)g(all)
h(match.)28 b(If)14 b(further)h(parsing)g(is)f(r)o(equir)o(ed,)262
556 y(pr)o(epositions)h(may)g(be)h(used)h(\(see)e(below\).)32
b(If)16 b(only)g(a)g(verb)h(is)f(speci\256ed,)j(only)d(the)262
606 y(\256rst)c(wor)o(d)h(of)g(the)f(command)h(will)g(be)f(checked;)k
(checking)e(the)f(ar)o(guments)f(must)g(be)262 656 y(performed)e(by)g
(the)g(associated)f(method.)262 816 y Fh(5.1)49 b(V)l(erb)13
b(Aliasing)262 934 y Fl(Multiple)d(verbs)g(may)g(be)h(listed)e(in)i
(the)f(same)f(declaration,)i(separated)f(by)g(spaces:)365
1064 y Fi(verb)25 b("look)f(examine")g(=)h(look;)262
1195 y Fl(These)10 b(act)g(as)f(aliases,)h(so)f(either)h(\252look\272)f
(or)i(\252examine\272)e(will)h(call)h(the)f(\252look\272)f(method.)262
1355 y Fh(5.2)49 b(Abbre)o(viation)o(s)262 1473 y Fl(The)10
b(asterisk)g(character)m(,)h(*,)g(may)f(be)g(used)g(to)g(indicate)h
(abbr)o(eviations:)365 1603 y Fi(verb)25 b("l*ook")f(=)h(look;)262
1733 y Fl(This)10 b(will)g(match)g(the)g(commands)g(\252l\272,)g
(\252lo\272,)g(\252loo\272,)g(and)h(\252look\272.)262
1822 y(The)j(characters)f(up)h(to)f(the)g(asterisk)f
Fe(must)i Fl(be)f(typed)h(in)f(or)o(der)i(for)e(the)g(command)g(to)262
1872 y(match.)h(Characters)d(after)f(the)g(asterisk)f(ar)o(e)i
(optional.)j(For)d(example,)365 2002 y Fi(verb)25 b("exa*mine")f(=)h
(examine;)262 2133 y Fl(would)10 b(match)g(\252exa\272,)g
(\252exam\272,)g(etc.,)h(but)f(not)f(\252ex\272)i(or)f(\252e\272.)262
2293 y Fh(5.3)49 b(Prepositions)262 2411 y Fl(In)10 b(addition)g(the)g
(the)g(verb)h(name,)g(a)f(pr)o(eposition)f(may)h(be)g(supplied:)967
2574 y(8)p eop
%%Page: 9 9
9 8 bop 365 307 a Fi(verb)25 b("hit")f(:)50 b("with")24
b(=)h(hit;)262 424 y Fl(Her)o(e,)8 b(the)f(colon)h(separates)d(the)j
(verb)g(and)g(pr)o(eposition.)13 b(Only)8 b(commands)f(containing)262
474 y(both)16 b(the)h(verb)h(and)f(that)g(pr)o(eposition)f(in)h(them)g
(will)g(be)g(matched:)29 b(\252hit)17 b(joe)f(with)262
524 y(sledghammer)s(\272)d(and)i(\252hit)e(with)h(book\272)f(would)h
(match;)i(\252hit\272)e(by)g(itself)f(would)h(not.)262
574 y(Multiple)c(pr)o(epositions)f(may)h(also)f(be)i(used:)365
691 y Fi(verb)25 b("hit)f(smack")h(:)49 b("with)25 b(using")f(=)h(hit;)
262 808 y Fl(Commands)14 b(matching)h(this)g(template)f(include:)26
b(\252hit)15 b(using)g(swor)o(d\272)g(\252smack)g(tr)o(oll)262
858 y(with)9 b(emacs)h(sour)o(ce",)i(\252smack)d(with)h(fr)o(ed\272,)h
(etc.)16 b(No)10 b(abbr)o(eviations)g(may)g(be)g(used)h(for)262
908 y(pr)o(epositions.)262 994 y(Any)h(wor)o(d)g(or)g(character)g(may)g
(be)f(used)h(as)f(a)h(pr)o(eposition,)f(so)g(emulating)g(T)n(inyMUD)262
1044 y(is)f(possible:)365 1161 y Fi(verb)25 b("@desc*ribe")f(:)49
b("=")25 b(=)g(describe;)262 1278 y Fl(This)10 b(har)o(d-to-r)o(ead)h
(declaration)f(uses)g("=")h(as)f(the)g(pr)o(eposition,)g(so)g(the)g
(command)365 1395 y Fi(@desc)25 b(me)f(=)h(groovy)262
1512 y Fl(would)9 b(match.)15 b(Note)9 b(that)g(spaces)h(ar)o(ound)g
(the)g("=")h(ar)o(e)f(r)o(equir)o(ed,)i(however)m(.)j(A)10
b(better)262 1562 y(way)g(to)f(do)i(this)f(would)g(be)h(to)e(modify)i
(the)f(\252parse\272)f(method)h(on)g(the)h(PLA)-5 b(YER)11
b(object,)262 1612 y(but)e(that's)g(beyond)h(the)g(scope)g(of)g(this)g
(humble)g(paragraph.)262 1768 y Fh(5.4)49 b(Inher)q(itance)11
b(of)i(V)l(erbs)262 1884 y Fl(All)h(verbs)g(declar)o(ed)i(by)e(an)g
(object)f(ar)o(e)h(inherited)h(by)f(instances)f(of)g(that)g(object.)26
b(For)262 1934 y(example:)365 2051 y Fi(object)f(FOO)407
2100 y(verb)f("hit")h(=)g(hit;)407 2150 y(method)f(hit)448
2200 y Fd(:)7 b(:)g(:)407 2250 y Fi(endmethod)365 2300
y(endobject)365 2350 y(object)25 b(BAR)407 2399 y(parents)f(FOO;)365
2449 y(endobject)967 2574 y Fl(9)p eop
%%Page: 10 10
10 9 bop 262 307 a Fl(Now)10 b(both)f(FOO)h(and)h(BAR)g(have)f
(\252hit\272)g(verb)h(available.)262 395 y(It)e(is)g(important)g(to)g
(note)g(that)f(verb)j(and)f(method)f(inheritance)h(ar)o(e)g(separate,)f
(and)h(both)262 445 y(start)j(fr)o(om)h(the)f(instances)h(and)g(move)g
(up.)27 b(When)14 b(a)g(verb)h(matches,)g(the)e(method)h(is)262
495 y(passed)e(to)h(the)g(child,)j(even)e(if)f(the)g(verb)h(was)f
(declar)o(ed)i(on)e(the)g(par)o(ent.)25 b(If)13 b(the)h(child)262
545 y(object)c(r)o(ede\256nes)h(the)f(method,)h(that)f(method)g(will)h
(be)g(used)f(instead.)17 b(In)11 b(the)f(example)262
595 y(above,)h(if)g(BAR)h(de\256ned)g(a)f(\252hit\272)f(method,)h(it)g
(would)g(be)g(used)g(when)g(BAR)h(was)e(\252hit\272.)262
644 y(Redeclaring)h(the)f(verb)h(isn't)e(necessary)-5
b(.)262 804 y Fh(5.5)49 b(The)13 b(Method)g(P)n(ar)r(t)262
921 y Fl(W)l(e've)g(seen)h(how)g(a)g(verb)i(template)c(is)i(set)g(up,)i
(but)e(so)f(far)i(no)f(action)g(can)h(be)f(taken)262
971 y(because)e(we)h(don't)g(have)h(a)f(method)g(to)f(be)i(called.)25
b(When)13 b(writing)g(a)g(method)g(to)g(be)262 1021 y(used)d(as)g(a)g
(verb,)h(certain)g(conditions)f(apply)-5 b(.)262 1172
y Ff(5.5.1)40 b(V)m(erb)11 b(Arguments)262 1289 y Fl(When)j(a)g(method)
g(is)g(called)h(as)f(a)g(verb,)i(the)e(ar)o(guments)g(to)g(the)g(verb)h
(ar)o(e)g(passed)e(as)262 1339 y(strings)c(in)i(the)f(\252ar)o(gs\272)g
(variable,)h(as)f(follows:)p 262 1395 829 2 v 261 1445
2 50 v 485 1445 V 511 1430 a(W)n(ithout)e(Pr)o(ep)p 781
1445 V 51 w(W)n(ith)h(Pr)o(ep)p 1089 1445 V 262 1446
829 2 v 261 1496 2 50 v 286 1481 a Fi(args[1])p 485 1496
V 50 w Fl(verb)p 781 1496 V 214 w(verb)p 1089 1496 V
261 1546 V 286 1531 a Fi(args[2])p 485 1546 V 50 w Fl(dir)o(ect)i
(object)p 781 1546 V 73 w(dir)o(ect)g(object)p 1089 1546
V 261 1596 V 286 1581 a Fi(args[3])p 485 1596 V 781 1596
V 346 w Fl(pr)o(eposition)p 1089 1596 V 261 1646 V 286
1631 a Fi(args[4])p 485 1646 V 781 1646 V 346 w Fl(indir)o(ect)g
(object)p 1089 1646 V 262 1647 829 2 v 262 1720 a(The)f(parser)h
(itself)e(does)h(no)g(matching)g(of)g(dobj)g(or)g(iobj.)15
b(The)c(method)f(itself)f(is)h(r)o(espon-)262 1770 y(sible)i(for)g
(ensuring)h(that)e(the)h(ar)o(guments)g(speci\256ed)h(r)o(efer)g(to)f
(the)g(corr)o(ect)i(object.)21 b(For)262 1819 y(example,)10
b(consider)h(a)f(\252button\272)f(object)g(with)h(the)g(verb)h
(declaration:)365 1946 y Fi(verb)25 b("press")f(=)h(press;)262
2073 y Fl(This)12 b(declaration)g(matches)g(\252pr)o(ess)f(button\272,)
h(but)g(also)f(\252pr)o(ess\272,)h(\252pr)o(ess)g(nancy\272,)h(etc.)262
2123 y(In)h(or)o(der)i(to)e(make)g(sur)o(e)g(the)h(command)f(r)o(efers)
h(to)e(the)i(button,)g(we)f(must)f(explicitly)262 2173
y(match)c(ar)o(gs[2],)i(the)f(dir)o(ect)h(object:)365
2300 y Fi(method)25 b(press)f(/*)h(verb)f(*/)407 2350
y(if)h(\(!this.match\(args[2]\)\))d(/*)j(not)g(this)f(object)h(*/)448
2399 y(return)g(1;)f(/*)h(abort)g(*/)407 2449 y(endif)957
2574 y Fl(10)p eop
%%Page: 11 11
11 10 bop 407 307 a Fd(:)7 b(:)g(:)365 357 y Fi(endmethod)262
487 y Fl(Her)o(e)16 b(we)h(ar)o(e)g(assuming)f(that)g(the)g(object)g
(has)h(a)g(method)f(called)h(\252match\272,)h(which)262
537 y(r)o(eturns)9 b(1)g(if)h(the)f(ar)o(gument)g(matches)f(the)h
(object's)f(name.)15 b(If)9 b(the)g(dir)o(ect)h(object)f(doesn't)262
587 y(match)g(the)h(object's)e(name,)i(the)g(verb)h(is)e(exited)h(with)
g(numeric)h(value)f(\2521\272.)k(The)d(r)o(eturn)262
637 y(value)g(fr)o(om)g(a)h(verb)g(method)f(has)g(a)g(special)g
(meaning.)18 b(Returning)12 b(a)f(non-zer)o(o)g(value)262
687 y(indicates)c(to)g(the)g(parser)h(that)f(no)g(match)h(was)e(found,)
j(and)f(the)f(parser)h(should)g(continue)262 736 y(to)f(look)g(for)h
(verbs)h(on)e(this)h(and)g(other)g(objects.)13 b(Returning)8
b(zer)o(o)g(means)f(that)g(the)h(match)262 786 y(was)h(successful,)h
(and)h(no)f(further)h(parsing)f(should)g(be)g(done.)262
875 y(NOTE:)16 b(It)f(is)g(a)g(good)g(idea)g(to)g(comment)f(the)h
(\252method\272)f(declaration)i(of)e(a)h(method)262 925
y(which)h(is)g(being)h(used)f(as)g(a)g(verb,)j(to)c(r)o(emind)i
(yourself)f(of)g(the)g(special)g(conditions)262 975 y(which)10
b(apply)h(to)e(writing)h(a)h(verb)g(\(ar)o(guments,)f(r)o(eturn)h
(value\).)262 1156 y Fm(6)60 b(Control)17 b(Flo)o(w)262
1298 y Fh(6.1)49 b Fc(if)13 b Fh(Statement)262 1416 y
Fl(The)d Fi(if)h Fl(statement)c(is)k(the)f(conditional)g(for)g
Fk(COOL)18 b Fl(and)11 b(whose)e(simplest)g(form)h(is:)365
1546 y Fi(if)25 b(\()g Fe(expr)o(ession)36 b Fi(\))407
1596 y Fe(statements)365 1646 y Fi(endif)262 1776 y Fl(If)10
b Fe(expr)o(ession)21 b Fl(evaluates)9 b(true,)i Fe(statements)21
b Fl(ar)o(e)11 b(executed.)16 b(Note)9 b(that)h(both)f(the)h(par)o(en-)
262 1826 y(theses)k(ar)o(ound)j(the)f(condition)g(and)h(the)e
Fi(endif)h Fl(ar)o(e)h(mandatory)-5 b(,)17 b(and)g(ther)o(e)f(is)g(no)
262 1876 y(`then')9 b(after)g(the)h Fi(if)p Fl(.)16 b
Fi(if)p Fl(s)9 b(may)h(be)g(nested)g(in\256nitely)-5
b(.)262 2028 y Ff(6.1.1)40 b(Conditions)262 2146 y Fl(In)10
b(addition)g(to)f(numeric)h(1)g(and)g(0,)g(the)g(following)f(values)h
(may)f(be)h(used)g(in)g(the)f Fe(expr)o(es-)262 2196
y(sion)20 b Fl(above.)957 2574 y(11)p eop
%%Page: 12 12
12 11 bop 262 267 716 2 v 261 317 2 50 v 286 302 a Fl(T)l(ype)p
410 317 V 61 w(Condition)10 b(for)h(\252true\272)p 976
317 V 262 319 716 2 v 261 369 2 50 v 286 354 a Fi(NUM)p
410 369 V 75 w Fl(Non-zer)o(o)p 976 369 V 261 418 V 286
403 a Fi(STR)p 410 418 V 75 w Fl(Non-empty)p 976 418
V 261 468 V 286 453 a Fi(LIST)p 410 468 V 50 w Fl(Non-empty)p
976 468 V 261 518 V 286 503 a Fi(MAP)p 410 518 V 75 w
Fl(Non-empty)p 976 518 V 261 568 V 286 553 a Fi(OBJ)p
410 568 V 75 w Fl(Positive)f(\(ie.,)h(not)e(#-1\))p 976
568 V 261 618 V 286 603 a Fi(ERR)p 410 618 V 75 w Fl(\(All)i(err)o(or)g
(values)f(ar)o(e)h(F)m(ALSE\))p 976 618 V 262 619 716
2 v 262 692 a(Note)h(that)h(the)g(objects)f(r)o(efer)o(enced)j(by)e
Fi(OBJ)g Fl(values)g(may)g(not)f(actually)i(exist,)f(but)g(as)262
742 y(long)7 b(they)g(ar)o(e)h(positive)e(and)i(have)f(a)h(valid)g
(server)g(id,)h Fk(COOL)f Fl(will)f(tr)o(eat)g(them)g(as)f
(\252true\272.)262 831 y Fi(&&)i Fl(and)g Fi(||)g Fl(ar)o(e)h(the)f
(boolean)f(`and')h(and)g(`or)s(')g(operators.)13 b Fi(!)c
Fl(is)f(the)g(`not')e(operator)m(.)14 b(They)262 881
y(may)9 b(be)i(used)f(to)f(form)h(boolean)g(conditions)g(such)h(as:)365
1011 y Fi(\(a)25 b(==)g(5)g(&&)f(b)h(!=)g(0\))365 1061
y(\(player.location)f(==)g(location)h(&&)f(!player.dead\))365
1111 y(\(s1)h(||)g(!s2\))262 1241 y Fl(The)8 b(boolean)f(operators)g
(have)h(the)f(same)g(pr)o(ecedence)i(as)f(C.)g(They)h(also)e
(\252short-cir)o(cuit\272)262 1291 y(in)18 b(the)f(same)f(way)i(that)e
(that)h(they)h(do)f(in)h(C.)h(The)f(\256rst)f(false)g(condition)h(in)g
(an)g Fi(&&)262 1341 y Fl(expr)o(ession)13 b(will)h(r)o(eturn)g(a)g
(false)e(r)o(esult,)j(and)f(will)g(cause)f(short-cir)o(cuit)h
(execution)g(of)262 1390 y(the)c(r)o(est)h(of)f(the)g(statement.)15
b(The)c(\256rst)g(true)f(condition)h(in)g(a)g Fi(||)g
Fl(expr)o(ession)g(will)f(make)262 1440 y(the)f(r)o(esult)i(true,)f
(and)h(will)f(short-cir)o(cuit)h(execution)f(of)g(the)g(r)o(est)g(of)g
(the)g(expr)o(ession.)262 1592 y Ff(6.1.2)40 b Fi(else)12
b Ff(Statement)262 1710 y Fl(The)h Fi(else)g Fl(construct)f(allows)g(a)
h(pr)o(ogrammer)g(to)f(specify)h(a)g(set)f(of)g(statements)f(to)h(be)
262 1760 y(executed)e(if)h(the)f(condition)g(in)h(an)f
Fi(if)g Fl(statement)e(evaluates)h(false.)365 1890 y
Fi(if)25 b(\()g Fe(expr)o(ession)36 b Fi(\))407 1940
y Fe(statements1)365 1990 y Fi(else)407 2040 y Fe(statements2)365
2090 y Fi(endif)262 2220 y Fl(If)12 b Fe(expr)o(ession)26
b Fl(evaluates)12 b(true,)i Fe(statements1)26 b Fl(ar)o(e)13
b(executed.)23 b(Otherwise,)13 b Fe(statements2)262 2270
y Fl(ar)o(e)d(executed.)957 2574 y(12)p eop
%%Page: 13 13
13 12 bop 262 307 a Ff(6.1.3)40 b Fi(elseif)11 b Ff(Statement)262
423 y Fl(The)18 b Fi(elseif)f Fl(statement)e(may)i(be)g(used)g(to)g
(test)f(a)i(series)f(of)g(conditions,)i(without)262 473
y(r)o(equiring)12 b(another)d(level)i(of)f Fi(if)p Fl(/)p
Fi(endif)g Fl(pairs.)15 b(Its)10 b(function)g(is)g(mostly)f(cosmetic.)
365 589 y Fi(if)25 b(\()g Fe(expr)o(ession1)35 b Fi(\))407
639 y Fe(statements1)365 688 y Fi(elseif)25 b(\()f Fe(expr)o(ession2)36
b Fi(\))407 738 y Fe(statements2)365 788 y Fi(else)407
838 y Fe(statements3)365 888 y Fi(endif)262 1004 y Fl(If)9
b Fe(expr)o(ession1)20 b Fl(is)10 b(true,)g Fe(statments1)20
b Fl(ar)o(e)10 b(executed.)15 b(Otherwise,)10 b(if)f
Fe(expr)o(ession2)20 b Fl(is)10 b(true,)262 1054 y Fe(statements2)25
b Fl(ar)o(e)13 b(executed.)21 b(Otherwise,)12 b Fe(statements3)26
b Fl(ar)o(e)12 b(executed.)22 b(For)13 b(example,)262
1104 y(the)c(code:)365 1220 y Fi(if)25 b(\(a)g(==)f("who"\))407
1270 y(c)h(=)f(1;)365 1319 y(else)407 1369 y(if)h(\(a)f(==)h("what"\))
448 1419 y(c)g(=)g(2;)407 1469 y(else)448 1519 y(if)g(\(a)g(==)f
("where"\))490 1568 y(c)h(=)f(3;)448 1618 y(else)490
1668 y(c)h(=)f(0;)448 1718 y(endif)407 1768 y(endif)365
1818 y(endif)262 1934 y Fl(could)10 b(be)h(instead)e(written)h(as:)365
2050 y Fi(if)25 b(\(a)g(==)f("who"\))407 2100 y(c)h(=)f(1;)365
2150 y(elseif)h(\(a)f(==)h("what"\))407 2199 y(c)g(=)f(2;)365
2249 y(elseif)h(\(a)f(==)h("where"\))407 2299 y(c)g(=)f(3;)365
2349 y(else)407 2399 y(c)h(=)f(0;)365 2448 y(endif)957
2574 y Fl(13)p eop
%%Page: 14 14
14 13 bop 262 307 a Fh(6.2)49 b Fc(for)13 b Fh(Statement)262
425 y Fl(The)d Fi(for)f Fl(statement)e(allows)h(the)h(pr)o(ogrammer)h
(to)f(traverse)g(a)h(list)e(of)h(values.)15 b(It)9 b(comes)262
475 y(in)g(two)g(\257avours.)15 b(The)10 b(\256rst)f(\257avour)i(is)e
(for)g(iterating)h(over)g(elements)e(of)h(a)g(given)i(list)e(or)262
525 y(string,)i(and)g(the)g(second)g(for)g(iterating)f(of)h(values)g
(in)g(a)g(given)g(range.)18 b Fi(for)11 b Fl(statements)262
575 y(may)e(be)i(nested)e(in\256nitely)-5 b(.)262 727
y Ff(6.2.1)40 b(Iterating)10 b(o)o(v)o(er)i(a)g(giv)o(en)f(list)h(or)f
(str)q(ing)365 822 y Fi(for)25 b Fe(variable)35 b Fi(in)25
b(\()g Fe(expr)o(ession)36 b Fi(\))407 872 y Fe(statements)365
922 y Fi(endfor)262 1052 y Fl(This)11 b(construct)f(sets)g
Fe(variable)22 b Fl(to)10 b(each)i(element)e(in)h Fe(expr)o(ession)23
b Fl(in)11 b(turn,)h(and)f(executes)262 1102 y Fe(statements)23
b Fl(for)11 b(each)g(one.)17 b Fe(expr)o(ession)12 b
Fl(must)e(be)h(an)g(expr)o(ession)g(whose)f(value)i(is)e(a)h(list)262
1152 y(or)f(a)g(string.)15 b(If)10 b(not,)h Fi(E)p 621
1152 13 2 v 14 w(FOR)g Fl(is)f(raised.)262 1304 y Ff(6.2.2)40
b(Iterating)10 b(o)o(v)o(er)i(a)g(list)262 1422 y Fl(Examples:)365
1552 y Fi(for)25 b(a)g(in)f(\()h Fb(f)p Fi(1,)g(2,)f(3)p
Fb(g)h Fi(\))407 1602 y(player.tell\(tostr\(a\)\);)365
1652 y(endfor)262 1782 y Fl(would)10 b(set)f Fi(a)h Fl(to)g(1,)g(2,)h
(and)g(3)f(in)g(turn,)h(and)g(echo)f(the)g(r)o(esult)g(to)g(the)g
(player)m(.)365 1912 y Fi(for)25 b(item)f(in)h(\()g(player.contents)e
(\))407 1962 y(player.tell\()h(item.name)g(\);)365 2012
y(endfor)262 2142 y Fl(would)11 b(set)f Fi(item)h Fl(to)f(each)i
(element)e(of)h Fi(player.contents)f Fl(and)h(echo)h(the)e(name)h(of)
262 2192 y(each)d(object)f(to)h(the)f(player)i(\(assuming)d(that)i
(\252contents\272,)f(\252name\272)g(and)i(\252tell\272)e(methods)262
2242 y(have)j(been)g(de\256ned)i(on)e(the)g(objects)f(in)h(question\).)
957 2574 y(14)p eop
%%Page: 15 15
15 14 bop 262 307 a Ff(6.2.3)40 b(Iterating)10 b(o)o(v)o(er)i(a)g(str)q
(ing)262 425 y Fl(Example:)365 555 y Fi(for)25 b(c)g(in)f(\("abcde"\))
407 605 y Fd(:)7 b(:)g(:)365 655 y Fi(endfor)262 785
y Fl(would)j(set)f(c)i(to)e(\252a\272,)h(\252b\272,)h(\252c\272,)f
(\252d\272)h(and)f(\252e\272)g(in)h(turn)f(within)g(the)g(body)h(of)e
(the)h(loop.)262 937 y Ff(6.2.4)40 b(Iterating)10 b(o)o(v)o(er)i(a)g
(range)f(of)g(v)o(alues)262 1055 y Fl(This)f(\257avour)h(sets)e(a)h
(variable)h(to)f(an)g(incr)o(easing)h(range)g(of)f(numeric)h(values:)
365 1186 y Fi(for)25 b Fe(variable)35 b Fi(in)25 b([)g
Fe(expr)o(ession1)36 b Fi(..)p Fe(expr)o(ession2)f Fi(])407
1235 y Fe(statements)365 1285 y Fi(endfor)262 1415 y
Fl(This)13 b(construct)f(sets)f Fe(variable)26 b Fl(to)12
b(each)h(value)g(in)g(the)f(given)i(range,)g(fr)o(om)e
Fe(expr)o(ession1)262 1465 y Fl(to)i Fe(expr)o(ession2)h
Fl(.)28 b(Both)15 b(expr)o(essions)f(must)g(be)g(integers,)i(or)f
Fi(E)p 1309 1465 13 2 v 15 w(TYPE)f Fl(is)h(raised.)29
b(For)262 1515 y(example,)365 1645 y Fi(for)c(n)g(in)f([1..5])407
1695 y Fd(:)7 b(:)g(:)365 1745 y Fi(endfor)262 1875 y
Fl(would)k(set)g Fi(n)h Fl(to)f(1,)i(2,)g(3,)f(4,)h(and)f(5.)20
b(If)12 b Fe(expr)o(ession2)24 b Fl(is)12 b(less)f(than)h
Fe(expr)o(ession1)p Fl(,)h(the)e(loop)262 1925 y(will)f(not)f(execute)i
(at)f(all.)262 2085 y Fh(6.3)49 b Fc(while)13 b Fh(Statement)365
2181 y Fi(while)25 b(\()p Fe(expr)o(ession)g Fi(\))407
2231 y Fe(statements)365 2281 y Fi(endwhile)262 2411
y Fl(This)7 b(construct)f(executes)h Fe(statements)15
b Fl(while)7 b Fe(expr)o(ession)15 b Fl(evaluates)6 b(true.)13
b(For)8 b(example:)957 2574 y(15)p eop
%%Page: 16 16
16 15 bop 365 307 a Fi(var)25 b(a;)365 357 y(a)g(=)g(5;)365
407 y(while)g(\(a)f(>)h(0\))407 457 y(echo\(tostr\(a\)\);)407
506 y(a)g(=)f(a)h(-)g(1;)365 556 y(endwhile)262 714 y
Fh(6.4)49 b Fc(do/while)13 b Fh(Statement)365 808 y Fi(do)407
858 y Fe(statements)365 908 y Fi(while)25 b(\()p Fe(expr)o(ession)11
b Fi(\);)262 1029 y Fl(Same)g(as)h(the)f(while)i(statement,)d(except)j
(that)e Fe(expr)o(ession)25 b Fl(is)12 b(tested)f(at)h(the)g(end)g(of)g
(the)262 1079 y(loop,)e(instead)f(of)h(the)g(beginning.)16
b(The)11 b(loop)f(is)g(thus)g(always)f(executed)i(at)e(least)h(once.)
262 1237 y Fh(6.5)49 b Fc(return)13 b Fh(Statement)365
1331 y Fi(return)25 b Fa([)10 b Fe(expr)o(ession)g Fa(])35
b Fi(;)262 1453 y Fl(The)11 b Fi(return)g Fl(statement)d(r)o(eturns)k
Fe(expr)o(ession)23 b Fl(to)10 b(the)h(calling)g(function,)h(and)f
(exits)g(the)262 1503 y(curr)o(ent)g(verb.)16 b(Returning)10
b(a)h(value)f(to)g(the)g(command)g(parser)g(does)g(nothing.)262
1660 y Fh(6.6)49 b Fc(break)13 b Fh(Statement)365 1754
y Fi(break)25 b Fa([)10 b Fe(num)g Fa(])35 b Fi(;)262
1876 y Fl(The)12 b Fi(break)f Fl(statement)e(is)j(used)f(to)g(exit)h
(fr)o(om)g(a)f(loop,)h(within)f(the)h(body)f(of)h(the)f(loop.)262
1926 y(The)j(optional)f(numeric)i(constant)e(indicates)g(how)h(many)g
(loops)f(to)g(br)o(eak)h(out)g(of,)g(in)262 1976 y(nested)9
b(loops.)262 2134 y Fh(6.7)49 b Fc(continue)13 b Fh(Statement)365
2228 y Fi(continue)24 b Fa([)10 b Fe(num)h Fa(])35 b
Fi(;)262 2350 y Fl(The)10 b Fi(continue)g Fl(statement)e(is)i(used)g
(to)g(br)o(eak)g(out)g(of)g(the)g(curr)o(ent)h(iteration)e(of)h(a)g
(loop)262 2399 y(and)g(start)f(again)h(at)f(the)h(top.)k(The)d
(optional)e(numeric)i(constant)e(indicates)h(which)g(loop)262
2449 y(to)f(r)o(estart)h(\(the)g(default)f(is)i(1\).)957
2574 y(16)p eop
%%Page: 17 17
17 16 bop 262 308 a Fm(7)60 b(Built-in)17 b(Functions)262
442 y Fk(COOLMUD)h Fl(has)g(a)f(number)h(of)f(built-in)g(functions.)36
b(These)18 b(functions)f(can)h(be)f(di-)262 492 y(vided)12
b(into)e(r)o(oughly)i(7)f(gr)o(oups:)17 b(functions)11
b(for)g(manipulating)f(objects,)h(dealing)g(with)262
541 y(players,)g(miscellanous)f(functions,)h(thr)o(ead)h(functions,)f
(list)g(manipulation)f(functions,)262 591 y(conversion)f(functions,)f
(and)h(wizar)o(d)g(functions.)14 b(The)9 b(following)f(is)g(a)g
(summary)g(of)g(the)262 641 y(functions,)i(followed)f(by)i(a)f(mor)o(e)
g(detailed)g(description)h(of)f(each.)957 2574 y(17)p
eop
%%Page: 18 18
18 17 bop 262 267 1428 2 v 261 317 2 50 v 286 302 a Fl(Function)p
956 317 V 533 w(Description)p 1688 317 V 262 319 1428
2 v 262 327 V 261 377 2 50 v 286 362 a Fi(clone\(\))p
956 377 V 521 w Fl(Make)10 b(an)g(instance)g(of)g Fi(this)p
1688 377 V 261 427 V 286 412 a(destroy\(\))p 956 427
V 471 w Fl(Destr)o(oy)g Fi(this)p 1688 427 V 261 477
V 286 462 a(chparents\()p Fe(list)f Fi(\))p 956 477 V
358 w Fl(Change)i(the)e(inheritance)i(of)f Fi(this)p
1688 477 V 261 526 V 286 511 a(lock\()p Fe(str)g Fi(\))p
956 526 V 490 w Fl(Place)g(a)g(named)h(lock)f(on)g Fi(this)p
1688 526 V 261 576 V 286 561 a(add)p 363 561 13 2 v 15
w(verb\()p Fe(verb)g Fi(,)p Fe(pr)o(ep)h Fi(,)p Fe(method)f
Fi(\))p 956 576 2 50 v 108 w Fl(Add)h(a)f(verb)h(to)f
Fi(this)p 1688 576 V 261 626 V 286 611 a(rm)p 338 611
13 2 v 15 w(verb\()p Fe(str)g Fi(\))p 956 626 2 50 v
425 w Fl(Remove)f(a)h(verb)i(fr)o(om)e Fi(this)p 1688
626 V 261 676 V 286 661 a(rm)p 338 661 13 2 v 15 w(method\()p
Fe(str)g Fi(\))p 956 676 2 50 v 375 w Fl(Remove)f(a)h(method)g(fr)o(om)
g Fi(this)p 1688 676 V 261 726 V 286 711 a(rm)p 338 711
13 2 v 15 w(var\()p Fe(str)g Fi(\))p 956 726 2 50 v 450
w Fl(Remove)f(a)h(variable)h(fr)o(om)f Fi(this)p 1688
726 V 261 775 V 286 760 a(unlock\()p Fe(str)g Fi(\))p
956 775 V 440 w Fl(Remove)f(a)h(named)h(lock)f(fr)o(om)g
Fi(this)p 1688 775 V 261 825 V 286 810 a(verbs\(\))p
956 825 V 521 w Fl(Return)g(a)g(list)g(of)f(verbs)i(on)f
Fi(this)p 1688 825 V 261 875 V 286 860 a(vars\(\))p 956
875 V 546 w Fl(Return)g(a)g(list)g(of)f(variables)i(on)f
Fi(this)p 1688 875 V 261 925 V 286 910 a(methods\(\))p
956 925 V 471 w Fl(Return)g(a)g(list)g(of)f(methods)h(on)g
Fi(this)p 1688 925 V 261 975 V 286 960 a(getvar\()p Fe(str)g
Fi(\))p 956 975 V 440 w Fl(Get)f(a)h(variable)h(on)f
Fi(this)p Fl(,)h(by)f(name)p 1688 975 V 261 1024 V 286
1010 a Fi(setvar\()p Fe(str)g Fi(,)p Fe(value)p Fi(\))p
956 1024 V 325 w Fl(Set)f(a)h(variable)h(on)f Fi(this)p
Fl(,)h(by)f(name)p 1688 1024 V 261 1074 V 286 1059 a
Fi(hasparent\()p Fe(obj)g Fi(\))p 956 1074 V 362 w Fl(Does)f
Fi(this)h Fl(have)h Fe(obj)21 b Fl(as)10 b(a)g(par)o(ent?)p
1688 1074 V 261 1124 V 286 1109 a Fi(find)p 388 1109
13 2 v 15 w(method\()p Fe(str)g Fi(\))p 956 1124 2 50
v 325 w Fl(Find)h(a)f(method)g(on)g Fi(this)g Fl(or)g(ancestor)p
1688 1124 V 261 1174 V 286 1159 a Fi(spew)p 388 1159
13 2 v 15 w(method\()p Fe(str)g Fi(\))p 956 1174 2 50
v 325 w Fl(Spew)f(internal)i(stack-machine)e(code)p 1688
1174 V 261 1224 V 286 1209 a Fi(list)p 388 1209 13 2
v 15 w(method\()p Fe(str)h Fi(,)25 b Fd(:)7 b(:)g(:)e
Fi(\))p 956 1224 2 50 v 220 w Fl(Decompile)10 b(the)g(method)f
Fe(str)21 b Fl(to)10 b(sour)o(ce)p 1688 1224 V 261 1274
V 286 1259 a Fi(decompile\(\))p 956 1274 V 421 w Fl(Decompile)g(the)g
(object)f Fi(this)h Fl(to)g(sour)o(ce)p 1688 1274 V 261
1323 V 286 1308 a Fi(objsize\(\))p 956 1323 V 471 w Fl(Return)g(the)g
(size)f(\(in)i(bytes\))e(of)h Fi(this)p 1688 1323 V 262
1325 1428 2 v 261 1375 2 50 v 286 1360 a(echo\()p Fe(str)g
Fi(\))p 956 1375 V 490 w Fl(Display)g Fe(str)21 b Fl(to)9
b Fi(this)h Fl(\(player\))p 1688 1375 V 261 1425 V 286
1410 a Fi(echo)p 388 1410 13 2 v 15 w(file\()p Fe(str)g
Fi(\))p 956 1425 2 50 v 375 w Fl(Display)g(a)g(local)g(\256le)h(to)e
Fi(this)h Fl(\(player\))p 1688 1425 V 261 1474 V 286
1460 a Fi(quit\(\))p 956 1474 V 546 w Fl(Disconnect)g
Fi(this)g Fl(\(player\))p 1688 1474 V 261 1524 V 286
1509 a Fi(program\()p Fa([)g Fe(obj)g Fi(,)p Fe(method)h
Fa(])f Fi(\))p 956 1524 V 210 w Fl(Enter)g(pr)o(ogramming)h(mode)p
1688 1524 V 262 1526 1428 2 v 261 1576 2 50 v 286 1561
a Fi(typeof\()p Fe(var)f Fi(\))p 956 1576 V 431 w Fl(Get)f(the)h(type)g
(of)g(a)g(value)p 1688 1576 V 261 1626 V 286 1611 a Fi(lengthof\()p
Fe(var)g Fi(\))p 956 1626 V 381 w Fl(Get)f(the)h(length)g(of)g(a)g
(list)g(or)g(string)p 1688 1626 V 261 1675 V 286 1660
a Fi(serverof\()p Fe(obj)g Fi(\))p 956 1675 V 387 w Fl(Get)f(the)h
(server)h(#)f(of)g(an)g Fe(obj)21 b Fl(value)p 1688 1675
V 261 1725 V 286 1710 a Fi(servername\()p Fe(obj)10 b
Fi(\))p 956 1725 V 337 w Fl(Get)f(the)h(server)h(name)f(of)g(an)g
Fe(obj)21 b Fl(value)p 1688 1725 V 261 1775 V 286 1760
a Fi(servers\(\))p 956 1775 V 471 w Fl(Return)10 b(the)g(list)f(of)h
(known)g(servers)p 1688 1775 V 261 1825 V 286 1810 a
Fi(explode\()p Fe(str)g Fa([)g Fi(,)p Fe(sep)g Fa(])g
Fi(\))p 956 1825 V 283 w Fl(Br)o(eak)h(a)f(string)g(into)g(a)g(list)g
(of)g(strings)p 1688 1825 V 261 1875 V 286 1860 a Fi(time\(\))p
956 1875 V 546 w Fl(Get)f(the)h(curr)o(ent)i(time)d(&)i(date)p
1688 1875 V 261 1924 V 286 1910 a Fi(ctime\()p Fa([)f
Fe(num)h Fa(])f Fi(\))p 956 1924 V 388 w Fl(Convert)h(numeric)g(time)e
(to)h Fk(ASCII)f Fl(string)p 1688 1924 V 261 1974 V 286
1959 a Fi(crypt\()p Fe(str)h Fa([)g Fi(,)p Fe(salt)g
Fa(])g Fi(\))p 956 1974 V 326 w Fl(Encrypt)h(a)f(string,)h(with)e
(optional)h(salt)p 1688 1974 V 261 2024 V 286 2009 a
Fi(match\()p Fe(template)g Fi(,)p Fe(str)h Fa([)f Fi(,)p
Fe(sep)g Fa(])g Fi(\))p 956 2024 V 154 w Fl(Match)g(a)g(string)h(to)e
(a)h(template)f(\(pr)o(e\256x\))p 1688 2024 V 261 2074
V 286 2059 a Fi(match)p 413 2059 13 2 v 15 w(full\()p
Fe(template)h Fi(,)p Fe(str)g Fa([)p Fi(,)p Fe(sep)g
Fa(])g Fi(\))p 956 2074 2 50 v 50 w Fl(Match)g(a)g(string)h(to)e(a)h
(template)f(\(full\))p 1688 2074 V 261 2124 V 286 2109
a Fi(psub\(\))p 956 2124 V 546 w Fl(Perform)h(\045-variable)g
(substitutions)p 1688 2124 V 261 2174 V 286 2159 a Fi(strsub\()p
Fe(with)f Fi(,)p Fe(what)i Fi(,)p Fe(str)f Fi(\))p 956
2174 V 210 w Fl(Perform)g(string)g(substitution)p 1688
2174 V 261 2223 V 286 2208 a Fi(pad\()p Fe(str)h Fi(,)p
Fe(length)e Fa([)p Fi(,)p Fe(padchar)h Fa(])p Fi(\))p
956 2223 V 182 w Fl(Pad/truncate)g(a)g(string)p 1688
2223 V 261 2273 V 286 2258 a Fi(random\()p Fe(num)h Fi(\))p
956 2273 V 407 w Fl(Return)f(a)g(random)g(number)h(1)f(..)p
Fe(num)p 1688 2273 V 261 2323 V 286 2308 a Fi(compile\()p
Fe(str)g Fi(,)p Fa([)g Fe(obj)h Fi(,)p Fe(method)f Fa(])g
Fi(\))p 956 2323 V 129 w Fl(Compile)g Fe(str)21 b Fl(into)9
b(an)i(object)e(or)i(method)p 1688 2323 V 262 2325 1428
2 v 957 2574 a(18)p eop
%%Page: 19 19
19 18 bop 262 267 1394 2 v 261 317 2 50 v 286 302 a Fl(Function)p
932 317 V 509 w(Description)p 1654 317 V 262 319 1394
2 v 262 327 V 261 377 2 50 v 286 362 a Fi(sleep\()p Fe(num)11
b Fi(\))p 932 377 V 408 w Fl(Pause)f(for)g Fe(num)21
b Fl(seconds)p 1654 377 V 261 427 V 286 412 a Fi(kill\()p
Fe(num)11 b Fi(\))p 932 427 V 433 w Fl(T)l(erminate)g(thr)o(ead)f
Fe(num)p 1654 427 V 261 477 V 286 462 a Fi(ps\(\))p 932
477 V 572 w Fl(Get)g(a)g(list)f(of)h(active)h(thr)o(eads)p
1654 477 V 262 478 1394 2 v 261 528 2 50 v 286 513 a
Fi(setadd\()p Fe(list)e Fi(,)p Fe(value)h Fi(\))p 932
528 V 284 w Fl(Add)i(a)e(value)g(to)g(a)g(set,)g(no)g(duplicates)p
1654 528 V 261 578 V 286 563 a Fi(setremove\()p Fe(list)f
Fi(,)p Fe(value)h Fi(\))p 932 578 V 209 w Fl(Remove)g(a)g(value)h(fr)o
(om)f(a)g(set)p 1654 578 V 261 628 V 286 613 a Fi(listinsert\()p
Fe(list)f Fi(,)p Fe(value)h Fa([)g Fi(,)p Fe(pos)h Fa(])f
Fi(\))p 932 628 V 49 w Fl(Insert)g(a)g(value)h(into)f(a)g(list)p
1654 628 V 261 677 V 286 663 a Fi(listappend\()p Fe(list)f
Fi(,)p Fe(value)h Fa([)g Fi(,)p Fe(pos)h Fa(])f Fi(\))p
932 677 V 49 w Fl(Append)h(a)f(value)h(to)e(a)i(list)p
1654 677 V 261 727 V 286 712 a Fi(listassign\()p Fe(list)e
Fi(,)p Fe(value)h Fi(,)p Fe(pos)h Fi(\))p 932 727 V 93
w Fl(Assign)f(a)h(value)f(to)g(an)g(element)f(of)h(a)g(list)p
1654 727 V 261 777 V 286 762 a Fi(listdelete\()p Fe(list)f
Fi(,)p Fe(pos)h Fi(\))p 932 777 V 219 w Fl(Delete)g(a)g(value)h(fr)o
(om)f(a)g(list)p 1654 777 V 262 779 1394 2 v 261 829
2 50 v 286 814 a Fi(tonum\()p Fe(var)h Fi(\))p 932 829
V 431 w Fl(Convert)g(a)f(value)h(to)e(number)i(type)p
1654 829 V 261 878 V 286 863 a Fi(toobj\()p Fe(var)g
Fi(\))p 932 878 V 431 w Fl(Convert)g(a)f(value)h(to)e(object)h(type)p
1654 878 V 261 928 V 286 913 a Fi(tostr\()p Fe(var)h
Fi(\))p 932 928 V 431 w Fl(Convert)g(a)f(value)h(to)e(string)p
1654 928 V 261 978 V 286 963 a Fi(toerr\()p Fe(var)i
Fi(\))p 932 978 V 431 w Fl(Convert)g(a)f(value)h(to)e(err)o(or)j(type)p
1654 978 V 262 980 1394 2 v 261 1029 2 50 v 286 1015
a Fi(shutdown\(\))p 932 1029 V 422 w Fl(Shut)e(down)g(the)g(MUD)p
1654 1029 V 261 1079 V 286 1064 a Fi(dump\(\))p 932 1079
V 522 w Fl(Dump)g(the)g(database)p 1654 1079 V 261 1129
V 286 1114 a Fi(writelog\()p Fe(str)g Fi(\))p 932 1129
V 366 w Fl(W)m(rite)g Fe(str)21 b Fl(to)9 b(the)h(log\256le)p
1654 1129 V 261 1179 V 286 1164 a Fi(checkmem\(\))p 932
1179 V 422 w Fl(Show)g(memory)g(usage)p 1654 1179 V 261
1229 V 286 1214 a Fi(cache)p 413 1214 13 2 v 15 w(stats\(\))p
932 1229 2 50 v 357 w Fl(Show)g(memory)g(cache)h(statistics)p
1654 1229 V 262 1230 1394 2 v 262 1366 a Fh(7.1)49 b(Object)12
b(Functions)262 1480 y Fl(All)h(functions)g(which)g(perform)g
(operations)f(on)h(objects)e(r)o(efer)j(to)e(the)h(curr)o(ent)h
(object,)262 1530 y Fi(this)p Fl(.)k(Ther)o(e)12 b(is)f(no)g(way)g(to)g
(dir)o(ectly)h(modify)f(or)h(get)e(information)h(about)f(a)h(dif)o(fer)
o(ent)262 1580 y(object.)19 b(This)12 b(is)f(done)h(to)g(ensur)o(e)g
(that)f(an)g(object's)g(methods)f(will)i(work)g(acr)o(oss)g(inter)o(-)
262 1630 y(mud)j(links)g(\(see)g(\252distrib\272\).)30
b(Also,)17 b(it)e(serves)g(as)g(a)g(permissions)f(system:)24
b(to)14 b(clone)262 1680 y(an)f(object,)g(for)g(example,)h(you)f(must)f
(ask)h(the)g(object)f(to)h(clone)g(itself)f(by)h(sending)h(it)f(a)262
1729 y(message.)262 1875 y Ff(7.1.1)40 b Fi(clone\(\))262
1990 y Fl(Clone)12 b(the)g(curr)o(ent)h(object.)19 b(A)13
b(new)f(object)f(is)h(cr)o(eated,)h(whose)e(par)o(ent)h(is)g(the)g
(curr)o(ent)262 2040 y(object.)19 b(The)13 b(new)f(object's)e(init)i
(method)f(is)h(called.)21 b(Return)12 b(value:)19 b(The)13
b(object)e(ID)h(of)262 2089 y(the)f(new)h(object.)19
b(If)11 b(the)h(curr)o(ent)h(object)e(no)g(longer)i(exists)d(\(ie.,)j
(has)f(been)f(destr)o(oyed\),)262 2139 y(#-1)e(is)h(r)o(eturned.)262
2285 y Ff(7.1.2)40 b Fi(destroy\(\))262 2399 y Fl(Destr)o(oy)11
b(the)g(curr)o(ent)i(object.)19 b(The)12 b(object)f(itself)g(is)g(r)o
(esponsible)h(for)f(cleaning)i(up)f(any)262 2449 y(r)o(efer)o(ences)c
(to)f(itself)g(prior)h(to)f(this)g(call.)15 b(This)8
b(might)g(include)g(r)o(emoving)h(any)f(contained)957
2574 y(19)p eop
%%Page: 20 20
20 19 bop 262 307 a Fl(objects,)9 b(r)o(e-par)o(enting)i(or)f(destr)o
(oying)h(any)f(instances)g(of)g(it,)g(etc.)262 452 y
Ff(7.1.3)40 b Fi(chparents\()p Fe(list)9 b Fi(\))262
567 y Fl(Change)i(the)f(par)o(ents)g(of)g(the)g(curr)o(ent)i(object)e
(to)f(those)h(speci\256ed)h(in)g Fe(list)p Fl(.)k(All)c(variables)262
616 y(and)f(methods)e(on)i(the)f(object)g(itself)g(r)o(emain)h(intact,)
f(however)h(any)g(variables)g(or)g(meth-)262 666 y(ods)j(it)g
(inherited)h(fr)o(om)f(its)f(old)i(par)o(ents)f(par)o(ents)g(it)g(may)g
(not)g(inherit)g(fr)o(om)g(the)g(new)l(.)262 716 y Fe(list)d
Fl(must)g(be)i(a)f(non-empty)g(list,)g(and)h(must)e(not)h(cause)g(any)h
(loops)e(in)i(the)f(inheritance)262 766 y(hierar)o(chy)h(\(eg.,)h(an)e
(object)f(may)h(not)g(have)g(itself)g(or)g(one)g(of)g(its)g(childr)o
(en)i(as)d(a)i(par)o(ent\).)262 816 y(Any)g(childr)o(en)h(of)f(the)f
(curr)o(ent)i(object)e(will)g(also)g(have)h(their)g(inheritance)g
(changed)h(by)262 865 y(this)d(call,)i(such)g(that)e(the)h(new)g(par)o
(ents)g(speci\256ed)h(in)f(the)g(list)g(will)g(be)g(ancestors)f(of)h
(the)262 915 y(childr)o(en)h(as)d(well.)262 1060 y Ff(7.1.4)40
b Fi(lock\()p Fe(str)10 b Fi(\))262 1175 y Fl(This)e(function)f(is)h
(used)f(to)g(lock)i(an)e(object,)h(to)f(pr)o(event)h(another)g
(execution)g(thr)o(ead)g(fr)o(om)262 1224 y(modifying)f(the)g(object)g
(befor)o(e)g(the)g(curr)o(ent)h(thr)o(ead)g(is)f(\256nished)h(with)f
(it)g(\(see)f(\252locking\272\).)262 1274 y(The)12 b(ar)o(gument)f
Fe(str)24 b Fl(is)11 b(the)h(name)f(of)g(the)h(lock)g(to)f(place)h(on)f
(the)h(object.)18 b(Locks)12 b(placed)262 1324 y(by)g(an)g(execution)g
(thr)o(ead)g(r)o(emain)h(in)f(ef)o(fect)g(until)g(a)f(corr)o(esponding)
j Fi(unlock\(\))d Fl(call,)262 1374 y(or)f(until)g(the)g(method)g
(terminates.)262 1519 y Ff(7.1.5)40 b Fi(add)p 472 1519
13 2 v 15 w(verb\()p Fe(verb)10 b Fi(,)p Fe(pr)o(ep)h
Fi(,)p Fe(method)f Fi(\))262 1633 y Fl(Add)i(a)g(verb)h(to)e(the)h
(curr)o(ent)h(object.)19 b Fe(verb)24 b Fl(is)12 b(the)f(name)h(of)f
(the)h(verb)g(to)f(add.)21 b Fe(pr)o(ep)j Fl(is)262 1683
y(the)9 b(pr)o(eposition,)g(or)h Fi("")g Fl(for)f(none.)15
b Fe(method)20 b Fl(is)9 b(the)g(name)h(of)f(the)g(method)g(to)g(call)h
(in)g(the)262 1733 y(curr)o(ent)g(object)e(when)g(the)h(verb)h(gets)e
(trigger)o(ed.)15 b(The)10 b(verb)f(is)g(added)h(to)e(the)g(end)i(of)e
(the)262 1783 y(object's)h(verb)j(list,)g(unless)f(a)g(verb)h(with)f
(the)g(same)f(name)h(and)h(no)f(pr)o(eposition)g(exists,)262
1833 y(in)h(which)g(case)g(it)g(is)f(inserted)h(befor)o(e)g(that)f
(verb.)21 b(This)12 b(is)g(to)f(pr)o(event)i(a)f(verb)g(with)g(no)262
1882 y(pr)o(eposition)d(masking)h(one)g(with)g(a)g(pr)o(eposition.)262
2027 y Ff(7.1.6)40 b Fi(rm)p 447 2027 V 15 w(verb\()p
Fe(str)10 b Fi(\))262 2142 y Fl(Remove)h(the)h(\256rst)g(verb)h(named)g
Fe(str)25 b Fl(fr)o(om)12 b(the)g(curr)o(ent)h(object.)21
b(The)13 b(ar)o(gument)f(may)262 2192 y(also)k(be)i(a)f(string)g(r)o
(epr)o(esenting)h(the)f(number)h(indexing)h(the)e(verb)h(to)f(be)g(r)o
(emoved)262 2241 y(\(indexed)11 b(fr)o(om)f(0\).)15 b(eg.,)262
2345 y Fi(rm_verb\("3"\);)262 2449 y Fl(would)10 b(r)o(emove)g(the)g
(4th)g(verb)h(on)f(the)g(curr)o(ent)i(object.)957 2574
y(20)p eop
%%Page: 21 21
21 20 bop 262 307 a Ff(7.1.7)40 b Fi(rm)p 447 307 13
2 v 15 w(method\()p Fe(str)10 b Fi(\))262 423 y Fl(Remove)e
Fe(str)17 b Fl(fr)o(om)9 b(the)f(curr)o(ent)i(object.)k(Note)9
b(that)e Fk(COOLMUD)j Fl(has)f(special)f(pr)o(ovision)262
473 y(to)g(allow)h(a)g(method)f(to)h(r)o(emove)g(itself)g(and)g
(continue)h(executing.)15 b(It)9 b(won't)f(be)h(actually)262
522 y(destr)o(oyed)h(until)g(after)g(the)g(method)g(\256nishes.)262
670 y Ff(7.1.8)40 b Fi(rm)p 447 670 V 15 w(var\()p Fe(str)10
b Fi(\))262 785 y Fl(Remove)f(the)h(variable)h(\(pr)o(operty\))f(named)
g Fe(str)21 b Fl(fr)o(om)10 b(the)g(curr)o(ent)i(object.)262
933 y Ff(7.1.9)40 b Fi(unlock\()p Fe(str)10 b Fi(\))262
1048 y Fl(Remove)h(the)h(lock)g(named)h Fe(str)24 b Fl(fr)o(om)12
b(the)g(curr)o(ent)i(object.)20 b(If)12 b(any)g(execution)h(thr)o(eads)
262 1098 y(ar)o(e)d(waiting)g(for)g(this)g(lock)h(to)e(be)h(r)o
(emoved,)i(they)e(will)g(execute.)262 1246 y Ff(7.1.10)40
b Fi(verbs\(\))262 1361 y Fl(Return)10 b(a)g(list)g(of)h(verbs)g(on)f
(the)h(curr)o(ent)g(object.)16 b(Each)11 b(element)f(of)g(the)h(list)f
(is)g(in)h(turn)g(a)262 1411 y(3-element)f(list,)i(consisting)f(of)h(3)
f(strings:)18 b(the)12 b(verb)g(name,)h(the)e(pr)o(eposition,)h(and)g
(the)262 1461 y(method)d(to)h(call.)262 1608 y Ff(7.1.11)40
b Fi(vars\(\))262 1724 y Fl(Return)9 b(a)g(list)g(of)f(variables)i
(\(pr)o(operties\))f(on)g(the)g(curr)o(ent)h(object.)15
b(Each)10 b(element)e(of)h(the)262 1774 y(list)g(is)h(a)g(string)h
(containing)f(the)g(name)g(of)g(the)g(variable.)262 1921
y Ff(7.1.12)40 b Fi(methods\(\))262 2037 y Fl(Return)7
b(a)h(list)g(of)f(methods)g(on)h(the)g(curr)o(ent)h(object.)14
b(Each)9 b(element)e(of)h(the)g(list)f(is)h(a)g(string)262
2087 y(containing)i(the)g(name)g(of)g(the)g(method.)262
2234 y Ff(7.1.13)40 b Fi(getvar\()p Fe(str)10 b Fi(\))262
2350 y Fl(Gets)g(the)h(value)h(of)f(the)g(variable)h(named)f
Fe(str)24 b Fl(on)11 b(the)g(curr)o(ent)i(object.)18
b(Normally)-5 b(,)13 b(one)262 2399 y(would)7 b(just)f(r)o(efer)o(ence)
j(the)f(variable)g(in)f(COOL)h(code)g(by)g(name,)g(but)f
Fi(getvar\(\))g Fl(allows)262 2449 y(the)i(use)h(of)g(an)h(arbitrary)f
(string)g(to)g(get)g(the)g(value)g(of)g(a)g(variable.)16
b(Example:)957 2574 y(21)p eop
%%Page: 22 22
22 21 bop 365 307 a Fi(getvar)25 b(\("abc")f(+)h("def"\))262
429 y Fl(would)10 b(r)o(eturn)h(the)f(value)g(of)g(the)g(variable)h
(named)f Fi(abcdef)g Fl(on)g(the)g(curr)o(ent)h(object.)262
581 y Ff(7.1.14)40 b Fi(setvar\()p Fe(str)10 b Fi(,)p
Fe(value)h Fi(\))262 699 y Fl(Sets)e(the)i(value)g(of)f(the)h(variable)
g(named)g Fe(str)22 b Fl(on)11 b(the)f(curr)o(ent)j(object)d(to)g
Fe(value)h Fl(.)17 b(Again,)262 749 y(this)12 b(would)h(usually)g(be)g
(accomplished)g(with)f(assignment)g(operator)m(,)h(but)g(in)g(certain)
262 798 y(cases)7 b(\(eg.,)f(the)h(name)g(of)g(the)g(variable)g(must)f
(cr)o(eated)h(at)f(run-tim)o(e)h(wit)o(h)g(an)g(e)o(xpr)o(ession\),)262
848 y(this)12 b(function)i(must)e(be)i(used.)25 b(If)13
b(the)g(variable)h(does)f(not)g(exist,)h(it)f(is)h(cr)o(eated.)25
b(Note)262 898 y(that)10 b(the)h(type)g(of)g(the)h(new)f(variable)h(is)
f(determined)h(by)f Fe(value)p Fl(,)i(and)f(may)f(not)g(later)g(be)262
948 y(changed.)16 b(Example:)365 1070 y Fi(setvar)25
b(\("abc")f(+)h("def",)f(100\);)262 1191 y Fl(would)10
b(set)f(the)h(value)h(of)f(the)f(variable)i(named)f Fi(abcdef)g
Fl(on)g(the)g(curr)o(ent)i(object)d(to)h(the)262 1241
y(numeric)h(value)f(100.)15 b(If)10 b Fi(abcdef)g Fl(did)h(not)f
(exist,)g(it)g(would)g(be)g(cr)o(eated.)262 1393 y Ff(7.1.15)40
b Fi(hasparent\()p Fe(obj)10 b Fi(\))262 1511 y Fl(Returns)f(a)i
(positive)e(value)i(if)g(the)f(curr)o(ent)h(object)f(has)g
Fe(obj)21 b Fl(as)10 b(a)g(par)o(ent.)16 b(This)11 b(function)262
1561 y(looks)h(r)o(ecursively)j(on)e(all)h(par)o(ents)e(of)h(the)g
(curr)o(ent)i(object,)f(so)e(it)h(will)h(r)o(eturn)g(1)f(if)g(the)262
1611 y(object)c(has)h Fe(obj)21 b Fl(as)10 b(a)g(par)o(ent)g(anywher)o
(e)h(in)f(its)g(inheritance)h(tr)o(ee,)f(and)h(0)f(otherwise.)262
1763 y Ff(7.1.16)40 b Fi(find)p 520 1763 13 2 v 15 w(method\()p
Fe(str)10 b Fi(\))262 1880 y Fl(Locates)e(the)g(method)g(named)h
Fe(str)g Fl(on)g(the)f(curr)o(ent)i(object,)f(if)g(one)f(exists.)14
b(This)c(activates)262 1930 y(the)e(same)h(method-sear)o(ching)g
(algorithm)g(as)f(used)h(when)h(actually)f(sending)g(an)g(object)262
1980 y(a)k(message.)24 b(Returns)13 b(the)g(object)g(ID)h(of)f(the)h
(object)f(de\256ning)h(the)g(method,)g(or)g(#-1)f(if)262
2030 y(none)8 b(is)h(found.)15 b(\(This)9 b(was)f(useful)g(in)h
(building)h(the)e Fi(@list)h Fl(command,)g(for)g(instance\).)262
2182 y Ff(7.1.17)40 b Fi(spew)p 520 2182 V 15 w(method\()p
Fe(str)10 b Fi(\))262 2300 y Fl(Returns)k(a)g(string)h(containing)g
(the)f(internal)h(stack-machine)f(code)i(for)e(method)g
Fe(str)h Fl(.)262 2350 y(This)d(code)h(is)f(pr)o(etty)g(unintelligible)
g(unless)g(your)g(brain)h(works)f(in)g(RPN.)h(Even)h(then,)262
2399 y(some)9 b(instructions)h(ar)o(e)i(har)o(d)g(to)e(\256gur)o(e)i
(out,)f(and)g(ther)o(e's)f(not)h(much)g(point.)17 b(Only)11
b(for)262 2449 y(the)e(habitually)h(curious.)957 2574
y(22)p eop
%%Page: 23 23
23 22 bop 262 307 a Ff(7.1.18)40 b Fi(list)p 520 307
13 2 v 15 w(method\()p Fe(str)10 b Fa([)g Fi(,)p Fe(lineno)g
Fa([)g Fi(,)25 b Fe(fullbrackets)10 b Fa([)g Fi(,)25
b Fe(indent)9 b Fa(])h(])g(])g Fi(\))262 425 y Fl(Returns)h(a)i(string)
f(containing)g(the)h(decompiled)f(code)h(for)g(method)e
Fe(str)i Fl(.)22 b(This)12 b(works)262 475 y(by)f(turning)h(the)f
(stack)f(machine)i(code)g(back)f(into)g(r)o(eadable)h(form.)17
b(It)11 b(does)g(automatic)262 525 y(indentation,)d(line)g(numbering,)h
(and)g(smart)e(bracketing)h(\(ie.,)h(it)f(will)g(use)g(the)f(minimum)
262 575 y(number)18 b(of)f(brackets)h(when)g(decompiling)h(an)f(expr)o
(ession\).)38 b(The)19 b(thr)o(ee)f(optional)262 624
y(ar)o(guments)9 b(ar)o(e)i(numeric)g(ar)o(guments)f(which)g(contr)o
(ol)h(the)f(decompilation:)262 755 y Fj(lineno)20 b Fl(T)l(urns)12
b(line)e(numbering)h(on)f(and)h(of)o(f)f(\(default)g(on\).)262
838 y Fj(fullbrackets)22 b Fl(When)17 b(on,)k(dumb)d(bracketing)g(will)
g(be)g(used)g(in)h(every)f(expr)o(ession.)365 887 y(Default)10
b(is)g(of)o(f,)g(or)h(smart)e(bracketing.)262 971 y Fj(indent)21
b Fl(The)11 b(number)f(of)g(spaces)g(to)f(use)h(in)h(indenting)g(the)e
(code)i(\(default)f(2\).)262 1101 y(The)g(string)h(r)o(eturned)g
(contains)f(embedded)g(newlines.)262 1253 y Ff(7.1.19)40
b Fi(decompile\(\))262 1371 y Fl(Decompiles)6 b(the)g(entir)o(e)i(curr)
o(ent)g(object)e(back)h(to)f(sour)o(ce.)15 b(Returns)6
b(a)h(string,)h(containing)262 1421 y(embedded)k(newlines)f(containing)
h(the)f(sour)o(ce)h(for)f(the)h(object.)18 b(V)l(ariables)11
b(ar)o(e)h(shown)262 1470 y(auto-initialized)7 b(to)g(their)g(curr)o
(ent)g(values.)12 b(This)7 b(function)g(can)g(be)g Fe(very)g
Fl(CPU-intensive,)262 1520 y(if)j(the)g(object)f(is)h(lar)o(ge.)262
1672 y Ff(7.1.20)40 b Fi(objsize\(\))262 1790 y Fl(Returns)10
b(the)h(size,)g(on)h(disc,)g(of)f(the)g(curr)o(ent)h(object.)18
b(This)11 b(r)o(e\257ects)h(the)f(ideal)g(size,)g(and)262
1840 y(not)g(the)h(actual)f(amount)g(of)h(memory)f(or)h(disc)h
(consumed)f(by)g(the)f(objecct,)i(which)f(ar)o(e)262
1890 y(subject)d(to)h Fi(malloc\(\))f Fl(tax,)i(dbm)f(tax,)h(etc.)262
2050 y Fh(7.2)49 b(Pla)o(y)o(er)12 b(Functions)262 2168
y Fl(These)e(functions)g(also)g(work)g(on)h Fi(this)p
Fl(,)f(the)h(curr)o(ent)g(object.)k(However)m(,)c(they)f(assume)262
2218 y(that)i Fi(this)i Fl(is)g(a)f(connected)i(player)m(.)26
b(They)14 b(will)g(have)g(no)g(ef)o(fect)f(if)h(on)g(a)g(non-player)262
2268 y(object,)9 b(or)i(a)f(player)h(object)e(which)i(isn't)e
(connected.)957 2574 y(23)p eop
%%Page: 24 24
24 23 bop 262 307 a Ff(7.2.1)40 b Fi(echo\()p Fe(str)10
b Fi(\))262 422 y Fl(Display)k Fe(str)28 b Fl(to)14 b(the)g(curr)o(ent)
h(object.)27 b(Does)14 b(nothing)g(if)g(the)g(curr)o(ent)i(object)d(is)
h(not)g(a)262 472 y(connected)c(player)m(.)262 618 y
Ff(7.2.2)40 b Fi(echo)p 497 618 13 2 v 15 w(file\()p
Fe(str)10 b Fi(\))262 733 y Fl(Read)i(in)h(the)f(contents)g(of)g(the)h
(local)g(\256le)g Fe(str)p Fl(,)g(and)h(echo)e(them,)h(one)g(like)g(at)
f(a)h(time,)f(to)262 783 y(the)f(curr)o(ent)h(object.)18
b(The)12 b(\256le)g(is)f(located)g(r)o(elative)h(to)e(RUNDIR)i(\(usu.)
18 b(bin/online\))12 b(of)262 833 y(the)d(server)s('s)i(installation.)
262 979 y Ff(7.2.3)40 b Fi(quit\(\))262 1094 y Fl(Disconnect)10
b(the)g(curr)o(ent)h(object.)262 1240 y Ff(7.2.4)40 b
Fi(program\()p Fa([)p Fe(obj)10 b Fi(,)p Fe(method)35
b Fa(])p Fi(\))262 1355 y Fl(Enter)10 b(pr)o(ogramming)g(mode.)15
b(This)10 b(sets)f(a)h(\257ag)g(on)g(the)g(player)s('s)f(descriptor)h
(such)h(that)262 1405 y(all)d(input)g(fr)o(om)g(the)g(player)h(is)f
(diverted)h(to)f(a)g(temporary)g(\256le.)15 b(When)8
b(the)g(player)g(enters)262 1455 y('.',)15 b(the)g(\256le)g(is)f
(compiled,)j(and)e(then)f(erased.)29 b(Ther)o(e)16 b(can)f(either)g(be)
f(no)h(ar)o(guments,)262 1505 y(in)e(which)h(case)e(the)h(server)h
(expects)f(a)g(series)g(of)f(objects,)h(or)h(two)e(ar)o(guments,)h
(which)262 1554 y(should)7 b(be)h(the)f(object)g(and)h(method)f(to)g
(pr)o(ogram.)15 b(In)8 b(either)f(case,)i(the)e(server)h(curr)o(ently)
262 1604 y(uses)i(a)h(built-in)f(set)g(of)h(permissions)f(checks)h(to)g
(determine)g(whether)f(the)h(player)g(may)262 1654 y(r)o(epr)o(ogram)16
b(that)f(object:)26 b(either)15 b(they)h(must)f(be)g(in)i(the)e
(object's)f(owners)h(list,)i(or)f(in)262 1704 y(SYS)p
336 1704 V 14 w(OBJ.wizar)o(ds.)262 1858 y Fh(7.3)49
b(Miscellanous)12 b(Functions)262 1973 y Ff(7.3.1)40
b Fi(typeof\()p Fe(var)10 b Fi(\))262 2088 y Fl(Returns)j(a)h(number)g
(r)o(epr)o(esenting)h(the)f(type)g(of)f Fe(var)i Fl(.)27
b(This)14 b(value)h(may)e(be)h(checked)262 2138 y(against)9
b(the)h(pr)o(e-de\256ned)h(constants)e(NUM,)j(OBJ,)e(STR,)h(LIST)g(and)
g(ERR.)262 2284 y Ff(7.3.2)40 b Fi(lengthof\()p Fe(var)10
b Fi(\))262 2399 y Fl(Returns)h(a)h(number)g(r)o(epr)o(esenting)h(the)e
(length)h(of)g Fe(var)g Fl(.)21 b Fe(var)j Fl(must)11
b(be)h(a)g(string)g(or)g(list)262 2449 y(expr)o(ession.)957
2574 y(24)p eop
%%Page: 25 25
25 24 bop 262 307 a Ff(7.3.3)40 b Fi(serverof\()p Fe(obj)10
b Fi(\))262 425 y Fl(Returns)g(a)g(number)h(r)o(epr)o(esenting)g(the)g
(server)g(ID)g(of)g Fe(obj)g Fl(.)16 b(This)11 b(ID)g(is)g(used)f
(internally)262 475 y(by)g(the)f(server)m(,)j(and)e(has)g(no)g(meaning)
g(except)g(that)f(ID)h(zer)o(o)g(is)g(the)g(local)g(MUD.)h(So)f(the)262
525 y(statement)365 647 y Fi(if)25 b(\(!serverof\(thingy\)\))407
697 y Fd(:)7 b(:)g(:)365 746 y Fi(endif)262 868 y Fl(would)j(evaluate)f
(to)h(true)g(if)g(thingy)h(is)f(a)g(local)g(object.)262
1020 y Ff(7.3.4)40 b Fi(servername\()p Fe(obj)10 b Fi(\))262
1138 y Fl(Returns)f(a)h(string)h(r)o(epr)o(esenting)f(the)g(server)h
(name)f(part)g(of)g Fe(obj)h Fl(.)262 1290 y Ff(7.3.5)40
b Fi(servers\(\))262 1408 y Fl(Returns)7 b(a)h(list)g(corr)o(esponding)
i(to)d(the)h(system)f(object)h(\(#0\))f(at)h(each)g(r)o(emote)g(server)
h(\(eg.,)262 1458 y Fi(#0@remotemud)p Fl(,)g Fi(#0@localmud)p
Fl(,)h(etc\).)262 1610 y Ff(7.3.6)40 b Fi(explode\()p
Fe(str)35 b Fa([)p Fi(,)p Fe(sep)g Fa(])p Fi(\))262 1728
y Fl(Br)o(eak)8 b Fe(str)15 b Fl(into)6 b(a)i(list)e(of)h(strings.)14
b(By)8 b(default,)g(explode)f(br)o(eaks)h(on)f(spaces;)h(the)f
(optional)262 1778 y(second)j(ar)o(gument)g(is)g(the)g(character)h(to)f
(br)o(eak)h(on.)262 1930 y Ff(7.3.7)40 b Fi(time\(\))262
2048 y Fl(Returns)11 b(a)g(numeric)h(value)g(r)o(epr)o(esenting)h(the)e
(curr)o(ent)i(date)e(and)h(time,)g(given)g(in)g(sec-)262
2098 y(onds)e(since)g(12:00)g(GMT)m(,)h(January)f(1,)h(1970.)262
2250 y Ff(7.3.8)40 b Fi(ctime\()p Fa([)10 b Fe(num)h
Fa(])e Fi(\))262 2368 y Fl(Returns)f(a)g(string)h(r)o(epr)o(esenting)g
(the)f(integer)h Fe(num)18 b Fl(as)8 b(an)h(English)g(date,)g(or)g(the)
g(curr)o(ent)262 2417 y(time)g(if)h(no)h(ar)o(gument)f(is)g(given.)957
2574 y(25)p eop
%%Page: 26 26
26 25 bop 262 307 a Ff(7.3.9)40 b Fi(crypt\()p Fe(str)10
b Fa([)g Fi(,)p Fe(salt)g Fa(])g Fi(\))262 425 y Fl(Encrypt)h(a)e
(string.)15 b(This)c(function)f(uses)f(UNIX's)h(crypt\(\))g(r)o(outine)
g(to)f(encrypt)i(a)e(string.)262 475 y(Useful)h(for)g(passwor)o(d)f
(checking,)k(etc.)262 627 y Ff(7.3.10)40 b Fi(match\()p
Fe(template)10 b Fi(,)p Fe(str)36 b Fa([)p Fi(,)p Fe(sep)e
Fa(])p Fi(\))262 745 y Fl(This)14 b(function)g(matches)f
Fe(str)28 b Fl(to)13 b Fe(template)h Fl(.)27 b Fe(str)h
Fl(should)14 b(be)g(a)f(1-wor)o(d)h(string)g(which)262
795 y(is)d(compar)o(ed)i(against)e(each)i(wor)o(d)f(in)h
Fe(template)f Fl(.)21 b(If)12 b Fe(str)25 b Fl(matches)11
b(a)h(substring)g(of)g(any)262 845 y(wor)o(d)j(in)g Fe(template)g
Fl(,)h(1)f(is)f(r)o(eturned,)j(otherwise)d(0)h(is)f(r)o(eturned.)30
b(The)15 b(optional)f(thir)o(d)262 894 y(ar)o(gument)c(is)g(the)g
(separator)f(to)h(use)f(when)i(matching)f(\(default)g(is)g(a)g
(blank\).)262 1046 y Ff(7.3.11)40 b Fi(match)p 545 1046
13 2 v 15 w(full\()p Fe(template)10 b Fi(,)p Fe(str)35
b Fa([)p Fi(,)p Fe(sep)g Fa(])p Fi(\))262 1164 y Fl(This)10
b(function)g(matches)g Fe(str)21 b Fl(to)9 b Fe(template)i
Fl(,)g(as)e(above,)i(except)f(that)g Fe(str)21 b Fl(must)9
b(match)h(an)262 1214 y(entir)o(e)g(wor)o(d)h(in)f Fe(template)h
Fl(,)f(not)g(just)f(a)i(substring.)262 1366 y Ff(7.3.12)40
b Fi(psub\()p Fe(str)10 b Fi(\))262 1484 y Fl(This)g(function)f
(substitutes)e(the)j(value)g(of)f(the)g(local)h(\(method\))f(variable)h
("foo")g(for)f(each)262 1534 y(instance)g(of)h("\045foo")h(or)f
("\045foo\045")g(in)h Fe(str)p Fl(.)k(Example:)365 1664
y Fi(foo)25 b(=)g("system";)365 1714 y(n)g(=)g(#0;)365
1764 y(echo\(psub\("\045n)f(is)h(the)f(\045foo)h(object."\)\);)262
1894 y Fl(would)10 b(r)o(esult)g(in)g(the)g(output)f("#0)i(is)f(the)g
(system)f(object".)262 2046 y Ff(7.3.13)40 b Fi(strsub\()p
Fe(with)9 b Fi(,)p Fe(what)i Fi(,)p Fe(str)f Fi(\))262
2164 y Fl(Perform)g(string)g(substitution.)262 2316 y
Ff(7.3.14)40 b Fi(pad\()p Fe(str)11 b Fi(,)p Fe(length)e
Fa([)p Fi(,)p Fe(padchar)h Fa(])p Fi(\))262 2434 y Fl(Pad/truncate)g(a)
g(string.)957 2574 y(26)p eop
%%Page: 27 27
27 26 bop 262 307 a Ff(7.3.15)40 b Fi(random\()p Fe(num)11
b Fi(\))262 425 y Fl(Return)f(a)g(random)g(number)h(1)f(..)p
Fe(num)262 577 y Ff(7.3.16)40 b Fi(compile\()p Fe(str)10
b Fi(,)p Fa([)g Fe(obj)h Fi(,)p Fe(method)f Fa(])g Fi(\))262
695 y Fl(Compile)g Fe(str)21 b Fl(into)9 b(an)i(object)e(or)i(method)
262 855 y Fh(7.4)49 b(List)13 b(Functions)262 973 y Fl(Lists)e(ar)o(e)h
(heter)o(ogenous)g(collections)f(of)h(values,)h(which)f(may)g(be)g(tr)o
(eated)g(as)f(or)o(der)o(ed)262 1023 y(lists,)i(or)g(unor)o(der)o(ed)h
(sets)e(\(see)g('datatypes'\).)21 b(Choosing)13 b(either)g(the)g('set')
e(operations)262 1073 y(or)f('list')f(operations)g(determines)h(how)f
(they)h(ar)o(e)h(tr)o(eated.)262 1162 y(Since)d Fk(COOL)i
Fl(has)e(no)g(concept)g(of)g(pointers)g(\(and)g(all)h(ar)o(guments)f
(ar)o(e)g(passed)g(by)g(value\),)262 1212 y(none)g(of)g(the)h(list)f
(operations)f(can)i(modify)f(lists)g(passed)g(to)g(them.)14
b(Instead,)9 b(they)f(r)o(eturn)262 1261 y(new)i(lists)f(with)h(the)g
(indicated)h(modi\256cations)e(performed.)15 b(So)10
b(the)g(code:)365 1383 y Fi(setadd\(a,)24 b(3\);)262
1505 y Fl(on)10 b(its)f(own)h(does)g(nothing.)365 1627
y Fi(a)25 b(=)g(setadd\(a,)f(3\);)262 1749 y Fl(on)10
b(the)g(other)g(hand,)h(adds)f(the)g(element)g(3)g(to)f(the)h(list)g
(variable)h Fi(a)p Fl(,)f(as)g(intended.)262 1901 y Ff(7.4.1)40
b Fi(setadd\()p Fe(list)9 b Fi(,)p Fe(value)h Fi(\))262
2019 y Fl(This)g(function)f(adds)h Fe(value)19 b Fl(to)9
b Fe(list)g Fl(,)h(as)f(long)h(as)f(it's)g(not)g(alr)o(eady)h(pr)o
(esent.)15 b(Returns)9 b(the)262 2069 y(new)h(list.)262
2221 y Ff(7.4.2)40 b Fi(setremove\()p Fe(list)9 b Fi(,)p
Fe(value)h Fi(\))262 2339 y Fl(Remove)f Fe(value)21 b
Fl(fr)o(om)10 b Fe(list)f Fl(,)i(anywher)o(e)g(in)f(the)g(list.)15
b(Returns)10 b(the)g(new)g(list.)957 2574 y(27)p eop
%%Page: 28 28
28 27 bop 262 307 a Ff(7.4.3)40 b Fi(listinsert\()p Fe(list)9
b Fi(,)p Fe(value)h Fa([)g Fi(,)25 b Fe(pos)10 b Fa(])g
Fi(\))262 425 y Fl(Insert)d Fe(value)16 b Fl(into)8 b
Fe(list)f Fl(.)15 b(By)8 b(default,)h(the)e(new)h(element)f(is)h
(inserted)g(at)g(the)f(beginning)i(of)262 475 y(the)h(list.)16
b(If)11 b(the)g(optional)e(numeric)j(ar)o(gument)f Fe(pos)22
b Fl(is)11 b(given,)h(the)e(element)g(is)h(inserted)262
525 y(befor)o(e)f(position)f Fe(pos)i Fl(.)k(Returns)10
b(the)g(new)g(list.)262 676 y Ff(7.4.4)40 b Fi(listappend\()p
Fe(list)9 b Fi(,)p Fe(value)h Fa([)g Fi(,)25 b Fe(pos)10
b Fa(])g Fi(\))262 794 y Fl(Appends)j Fe(value)25 b Fl(to)12
b(the)h(end)g(of)g Fe(list)f Fl(,)h(or)g(after)g(position)e
Fe(pos)j Fl(,)f(if)g(given.)24 b(Returns)12 b(the)262
844 y(new)e(list.)262 996 y Ff(7.4.5)40 b Fi(listassign\()p
Fe(list)9 b Fi(,)p Fe(value)h Fi(,)25 b Fe(pos)11 b Fi(\))262
1114 y Fl(Replaces)e(element)h(at)f(position)g Fe(pos)22
b Fl(in)10 b Fe(list)20 b Fl(with)10 b Fe(value)g Fl(.)15
b(Returns)10 b(the)g(new)g(list.)262 1265 y Ff(7.4.6)40
b Fi(listdelete\()p Fe(list)9 b Fi(,)p Fe(pos)h Fi(\))262
1383 y Fl(Deletes)f(the)h(element)f(at)h(position)f Fe(pos)21
b Fl(in)11 b Fe(list)e Fl(.)16 b(Returns)9 b(the)h(new)g(list.)262
1543 y Fh(7.5)49 b(Con)o(v)o(ersion)11 b(Functions)262
1661 y Fl(These)j(functions)g(allow)g(values)h(of)f(one)h(datatype)e
(to)h(be)h(converted)g(into)g(values)f(of)262 1711 y(another)9
b(datatype.)262 1863 y Ff(7.5.1)40 b Fi(tonum\()p Fe(var)11
b Fi(\))262 1980 y Fl(Convert)i(an)f(obj,)h(string,)g(or)g(err)o(or)h
(value)e(into)g(a)h(numeric)g(value.)22 b(Object)12 b(values)g(ar)o(e)
262 2030 y(converted)g(by)f(using)h(the)f(object)g(ID)g(portion)g(as)g
(the)g(new)h(value.)19 b(Strings)11 b(ar)o(e)h(parsed)262
2080 y(like)g(the)h(UNIX)g(function)g(atoi\(\).)21 b(Err)o(or)15
b(values)d(r)o(eturn)i(the)e(internal)h(ID)g(of)f(the)h(err)o(or)262
2130 y(\(which)d(isn't)f(much)i(use)f(except)g(to)g(trivia)h
(addicts\).)262 2282 y Ff(7.5.2)40 b Fi(toobj\()p Fe(var)11
b Fi(\))262 2399 y Fl(Convert)k(a)f(num,)i(string,)g(or)f(err)o(or)g
(value)g(into)f(an)h(object)f(ID)g(value.)29 b(Numbers)14
b(ar)o(e)262 2449 y(converted)e(by)f(using)g(the)g(number)g(as)g(the)f
(object)h(ID)g(portion)g(of)g(the)f(new)h(value,)h(and)957
2574 y(28)p eop
%%Page: 29 29
29 28 bop 262 307 a Fl(the)14 b(local)h(server)g(for)g(the)f(server)i
(ID)e(portion.)28 b(Strings)15 b(ar)o(e)g(parsed,)h(the)f(same)e(way)
262 357 y Fk(COOL)h Fl(itself)e(parses:)20 b Fi(#3)13
b Fl(or)g Fi(#3@foomud)f Fl(syntax.)23 b(Err)o(ors)14
b(ar)o(e)g(converted)g(by)f(using)262 407 y(the)c(internal)i(ID)f(of)g
(the)g(err)o(or)i(as)d(the)h(object)g(ID)h(portion,)f(and)g(the)g
(local)h(server)g(for)f(the)262 457 y(server)h(ID)f(portion.)262
609 y Ff(7.5.3)40 b Fi(tostr\()p Fe(var)11 b Fi(\))262
727 y Fl(Convert)c(a)g(string,)i(number)m(,)f(object,)g(list)e(or)i
(err)o(or)g(type)f(into)g(a)g(string)g(value.)14 b(Strings)7
b(ar)o(e)262 776 y(converted)k(by)h(enclosing)f(them)f(in)i
(doublequotes,)e(and)i(escaping)f(any)g(contr)o(ol)g(chars)262
826 y(with)6 b(a)g(backslash)g(\()p Fi(\\n)p Fl(,)g Fi(\\t)p
Fl(,)h(etc\).)14 b(Numbers)6 b(and)g(object)g(ID's)g(ar)o(e)g(simply)g
(printed.)14 b(Lists)262 876 y(ar)o(e)e(evaluated)h(r)o(ecursively)-5
b(,)15 b(printing)e('',)f(followed)g(by)h(the)f(list)f(elements,)i
(separated)262 926 y(by)i(commas,)g(and)g(then)g(''.)28
b(Err)o(ors)16 b(ar)o(e)g(converted)f(into)g(a)g(string)g(r)o(epr)o
(esenting)g(the)262 976 y(err)o(or)c(identi\256er)g(\()p
Fi(E_TYPE)e Fl(becomes)h Fi("E_TYPE")p Fl(\).)262 1128
y Ff(7.5.4)40 b Fi(toerr\()p Fe(var)11 b Fi(\))262 1246
y Fl(Convert)18 b(a)g(string,)i(number)m(,)g(or)e(object)g(value)g
(into)f(an)h(err)o(or)h(value.)39 b(Strings)17 b(ar)o(e)262
1295 y(parsed,)10 b(the)g(same)g(way)g Fk(COOLMUD)h Fl(parses)f(err)o
(ors)h(\()p Fi("E_TYPE")e Fl(becomes)h Fi(E_TYPE)p Fl(\).)262
1345 y(Numbers)j(ar)o(e)h(converted)h(by)f(using)f(the)h(number)f(as)g
(the)h(internal)g(err)o(or)g(ID.)h(Object)262 1395 y(values)10
b(ar)o(e)g(converted)i(by)e(using)g(the)g(object)g(ID)g(portion)g(as)g
(the)g(err)o(or)h(ID.)262 1555 y Fh(7.6)49 b(T)-6 b(ask)13
b(Functions)262 1673 y Ff(7.6.1)40 b Fi(sleep\()p Fe(num)11
b Fi(\))262 1791 y Fl(Pause)e(for)i Fe(num)21 b Fl(seconds)262
1943 y Ff(7.6.2)40 b Fi(kill\()p Fe(num)11 b Fi(\))262
2061 y Fl(T)l(erminate)f(thr)o(ead)h Fe(num)262 2213
y Ff(7.6.3)40 b Fi(ps\(\))262 2331 y Fl(Get)9 b(a)h(list)f(of)h(all)g
(active)g(thr)o(eads)g(on)g(the)g(MUD.)h(Returns)f(a)g(list)f(of)h
(lists,)f(in)i(which)f(each)262 2381 y(element)f(r)o(epr)o(esents)h(a)g
(thr)o(ead)h(in)g(an)f(11-element)f(list)g(of)h(the)g(form:)957
2574 y(29)p eop
%%Page: 30 30
30 29 bop 365 307 a Fi(msgid,)25 b(age,)f(ticks,)h(player,)f(this,)g
(on,)h(caller,)365 357 y(args,)g(methodname,)f(blocked)p
991 357 13 2 v 14 w(on,)h(timer)262 475 y Fj(msgid)c
Fl(The)11 b(message)e(identi\256er)h(of)g(the)g(curr)o(ent)i(thr)o
(ead.)262 554 y Fj(age)20 b Fl(The)11 b("depth")g(of)f(the)g(message)e
(in)j(r)o(ecursive)h(calls.)262 633 y Fj(ticks)21 b Fl(The)11
b(number)f(of)g(ticks)g(used)h(by)f(the)g(thr)o(ead)h(so)e(far)m(.)262
712 y Fj(player)20 b Fl(The)11 b(player)g(who)e(typed)i(the)f(command)g
(that)f(initiated)h(this)g(thr)o(ead.)262 791 y Fj(on)21
b Fl(The)11 b(object)e(on)h(which)h(the)f(method)g(which)h(is)f
(executing)h(is)f(de\256ned.)262 870 y Fj(caller)20 b
Fl(The)11 b(object)e(which)i(called)g(this)f(method.)262
949 y Fj(args)21 b Fl(The)11 b(ar)o(guments)e(to)h(this)g(method,)g
(when)g(called.)262 1028 y Fj(methodname)20 b Fl(The)11
b(name)f(of)g(the)g(curr)o(ently-executing)i(method.)262
1107 y Fj(blocked)p 415 1107 V 16 w(on)21 b Fl(A)7 b(numeric)g
(identi\256er)m(,)h(indicating)f(the)g(state)g(of)f(the)g(curr)o
(ently-executing)365 1156 y(thr)o(ead.)262 1235 y Fj(timer)20
b Fl(A)14 b(numeric)h(value,)h(indicating)g(the)e(time)f(at)h(which)h
(the)f(curr)o(ent)h(thr)o(ead)g(will)365 1285 y(r)o(esume,)c(or)f
(expir)o(e)h(\(depending)h(on)e(state\).)262 1442 y Fh(7.7)49
b(Wizard)12 b(Functions)262 1558 y Fl(All)g(wizar)o(d)g(functions)f
(check)h(that)f(the)g(object)g(calling)i(them)d(is)i(a)f(wizar)o(d)h
(by)g(looking)262 1607 y(in)e(SYS)p 382 1607 V 14 w(OBJ.wizar)o(ds)262
1755 y Ff(7.7.1)40 b Fi(shutdown\(\))262 1871 y Fl(Shut)14
b(down)h(the)g(MUD.)h(The)g(database)d(is)i(written,)h(r)o(emote)e
(servers)i(disconnected,)262 1921 y(and)10 b(the)g Fk(COOLMUD)i
Fl(pr)o(ocess)e(terminates.)262 2069 y Ff(7.7.2)40 b
Fi(dump\(\))262 2185 y Fl(Dump)10 b(the)g(database.)262
2333 y Ff(7.7.3)40 b Fi(writelog\()p Fe(str)10 b(\))262
2449 y Fl(W)m(rite)f Fe(str)21 b Fl(to)10 b(the)g(log\256le.)15
b(The)c(string)f(is)g(pr)o(e\256xed)i(by)e(the)g(curr)o(ent)i(date)d
(and)i(time.)957 2574 y(30)p eop
%%Page: 31 31
31 30 bop 262 307 a Ff(7.7.4)40 b Fi(checkmem\(\))262
425 y Fl(Returns)12 b(a)h(string)h(showing)e(the)h(amount)g(of)g
(memory)f(dynamically)i(allocated,)g(and)262 475 y(how)g(many)h(chunks)
h(it)f(was)f(allocated)h(in.)31 b(If)15 b(the)g(server)h(was)e(not)h
(compiled)g(with)262 525 y(-DCHECKMEM,)d(this)e(function)g(will)g(r)o
(eturn)h(\252Memory)f(checking)i(disabled.\272)262 677
y Ff(7.7.5)40 b Fi(cache)p 522 677 13 2 v 15 w(stats\(\))262
795 y Fl(Returns)13 b(a)g(string)h(with)f(embedded)h(newlines)f
(containing)h(the)f(curr)o(ent)i(statistics)c(of)262
845 y(the)e(object-paging)h(cache.)16 b(Curr)o(ently)c(the)e(output)f
(looks)g(like)i(this:)262 975 y Fi(cache)24 b(stats,)g(last)h(24)g
(sec.:)311 1025 y(writes:)g(8)273 b(reads:)25 b(161)311
1074 y(dbwrites:)f(0)224 b(dbreads:)25 b(10)311 1124
y(read)g(hits:)f(151)149 b(active)25 b(hits:)f(126)311
1174 y(write)h(hits)f(to)h(dirty)f(cache:)h(6)311 1224
y(deletes:)f(0)249 b(checks:)25 b(18)311 1274 y(resets:)g(11)248
b(syncs:)25 b(0)224 b(objects:)24 b(161)957 2574 y Fl(31)p
eop
%%Trailer
end
userdict /end-hook known{end-hook}if
%%EOF