%!PS-Adobe-2.0
%%Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software
%%Title: ProgrammersManual.dvi
%%Pages: 83
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%%EndComments
%DVIPSCommandLine: dvips ProgrammersManual.dvi
%DVIPSParameters: dpi=300, compressed, comments removed
%DVIPSSource:  TeX output 1997.03.04:1703
%%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 round sub abs 0.00001 lt{round}if}
forall round exch round exch]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 sub]/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 userdict
/eop-hook known{eop-hook}if showpage}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 newpath 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
TeXDict begin 40258431 52099146 1000 300 300 (ProgrammersManual.dvi)
@start /Fa 1 47 df<127012F8A212F012E005057B840E>46 D
E /Fb 1 47 df<1238127C12FCA212F8127006067A8512>46 D E
/Fc 11 58 df<126012F0A212701210A31220A21240A2040B7D830B>44
D<EA07E0EA1C38EA381CEA300CEA700EEA6006A2EAE007AAEA6006A2EA700EEA300CEA38
1CEA1C38EA07E010187F9713>48 D<12035AB4FC1207B3A2EA7FF80D187D9713>I<EA0F
80EA1060EA2030EA4038EA803CEAC01C12E01240EA003C1338A21370136013C0EA018013
001202EA040412081210EA3008EA3FF8127F12FF0E187E9713>I<EA07E0EA1838EA201C
EA601EEA700EEA201E1200131CA213381370EA07E0EA0038131C130E130FA212E0A212C0
EA400EEA601CEA1838EA07E010187F9713>I<1318A21338137813F813B8EA01381202A2
12041208121812101220124012C0B5FCEA0038A6EA03FF10187F9713>I<EA3018EA3FF0
13E01380EA2000A5EA2FC0EA3060EA2030EA00381318131CA2124012E0A2EA8018EA4038
1330EA30E0EA0F800E187E9713>I<EA01F8EA0704EA0C06EA180E123013001270126012
E0EAE3E0EAE418EAE80CEAF00EEAE0061307A31260A2EA7006EA300EEA180CEA0C38EA07
E010187F9713>I<1240EA7FFF13FEA2EA4004EA80081310A2EA00201340A21380120113
005AA25A1206A2120EA5120410197E9813>I<EA07E0EA1818EA300CEA20061260A21270
EA780CEA3E18EA1F30EA07C0EA03E0EA0CF8EA307CEA601E130FEAC0071303A3EA6002EA
2004EA1818EA07E010187F9713>I<EA07E0EA1C30EA3018EA700CEA600EEAE006A21307
A31260EA700FEA3017EA1827EA07C7EA00071306130E130C12701318EA6030EA3060EA0F
8010187F9713>I E /Fd 1 47 df<1270A212F0126004047D830B>46
D E /Fe 29 123 df<EA01801203EA06005A121C121812385AA35AA91270A37E1218121C
120C7EEA03801201091D799914>40 D<EA07C0EA0FE0EA1C70EA3838EA3018EA701CA2EA
E00EA9EA701CA2EA3838A2EA1C70EA0FE0EA07C00F177E9614>48
D<1203A25A5A123F12F712471207AEEA7FF0A20C177C9614>I<EA1FC0EA7FF0EA7078EA
2018EA001CA2EA07FC121FEA3C1C127012E0A3EA707C383FFF80EA0F8F11107E8F14>97
D<12FCA2121CA513F8EA1DFEEA1F07EA1E03001C1380EB01C0A6EB0380001E1300EA1F0E
EA1DFCEA0CF81217809614>I<EA03F8EA0FFEEA1C0EEA3804EA7000126012E0A4126012
70EA380EEA1C1EEA0FFCEA03F00F107E8F14>I<137EA2130EA5EA07CEEA0FFEEA1C3EEA
301EEA700E12E0A61270EA301EEA383E381FEFC0EA07CF12177F9614>I<EA07E0EA0FF0
EA1C38EA301CEA700CEAE00EA2EAFFFEA2EAE00012601270EA380EEA1C1EEA0FFCEA03F0
0F107E8F14>I<13FCEA01FEEA038EEA07041300A3EA7FFE12FFEA0700ACEAFFF8A20F17
7F9614>I<EA07CF381FFF80EA383B38301800EA701CA3EA3018EA3838EA3FF0EA37C000
70C7FCA2EA3FF86C7E487EEA700F38E00380A438700700EA3C1EEA1FFCEA07F011197F8F
14>I<12FCA2121CA51378EA1DFEEA1F86EA1E07121CAA38FF8FE0A21317809614>I<1206
120FA21206C7FCA4B4FCA21207ACEAFFF8A20D187C9714>I<136013F0A213601300A4EA
1FF0A2EA0070B2EA40E0EAE0C0EA7F80EA3F000C207E9714>I<12FCA2121CA5EBFF80A2
EB1C005B5B5BEA1DC0EA1FE0A2EA1E70EA1C38133C131C7F38FF1F80A21117809614>I<
EAFF80A21203B3EAFFFEA20F177E9614>I<EAFB8EEAFFDF383CF380A2EA38E3AA38FEFB
E013791310808F14>I<EAFC78EAFDFEEA1F86EA1E07121CAA38FF8FE0A21310808F14>I<
EA07C0EA1FF0EA3C78EA701CA2EAE00EA6EA701CEA783CEA3C78EA1FF0EA07C00F107E8F
14>I<EAFCF8EAFDFEEA1F07EA1E03001C1380EB01C0A6EB0380001E1300EA1F0EEA1DFC
EA1CF890C7FCA6B47EA21218808F14>I<EA03E7EA0FF7EA1C1FEA300F1270487EA6EA70
0F1230EA1C3FEA0FF7EA07C7EA0007A6EB3FE0A213187F8F14>I<EAFE1FEB7F80EA0EE3
380F810090C7FCA2120EA8EAFFF0A211107F8F14>I<EA0FD8EA3FF8EA603812C0A2EAF0
00EA7F80EA3FF0EA07F8EA001CEA600612E012F0EAF81CEAFFF8EACFE00F107E8F14>I<
1206120EA4EA7FFC12FFEA0E00A8130EA3131CEA07F8EA01F00F157F9414>I<EAFC3FA2
EA1C07AB131F380FFFE0EA03E71310808F14>I<38FE3F80A2383C1E00EA1C1CA36C5AA3
EA0630EA0770A36C5AA311107F8F14>I<38FE3F80A238700700EA380EA3EA39CEA3EA1B
6C121AA3EA1E7CA2EA0E3811107F8F14>I<EA7E3FA2EA1E3CEA0E78EA07705B12036C5A
12037FEA0770EA0E781338487E38FE3F80A211107F8F14>I<38FE3F80A2381C0E005BA2
120E5BA212071330A2EA0370A25B1201A25BA3485A12730077C7FC127E123C11187F8F14
>I<EA3FFF5AEA700E131C1338EA007013E0EA01C0EA0380EA0700120EEA1C0712381270
B5FCA210107F8F14>I E /Ff 31 123 df<90380FF83F90397FFDFFC03A01FC1FE3E039
03F03FC7EA07E0D80FC01387ED83C091381F8000A6B612FCA2390FC01F80B2397FF8FFF8
A223237FA221>11 D<90380FFF80137F3801FC1F3803F03FEA07E0EA0FC0141FA7B6FCA2
380FC01FB2397FF8FFF0A21C237FA220>13 D<13181330136013C01201EA038012071300
5A121EA2123E123CA2127CA3127812F8AD1278127CA3123CA2123E121EA27E7E13801203
EA01C012001360133013180D317BA416>40 D<13FF000313C0380FC3F0381F00F8003E13
7CA248133EA400FC133FAD007C133EA2007E137E003E137CA26C13F8380FC3F03803FFC0
C6130018207E9F1D>48 D<13381378EA03F812FF12FD1201B3A7387FFFF0A214207C9F1D
>I<EA07FE381FFF80383F07E06D7E130180121E1200A2133FEA03FDEA1F81EA3E01127C
12F8A4EA7C02EA7E0C391FF87F803807E03F19167E951C>97 D<B47EA2121FABEB87F0EB
BFFCEBF03EEBC01F9038800F8015C0140715E0A715C0A2140F15809038C01F00381E707E
381C3FFC38180FE01B237EA220>I<EBFF80000713E0380F83F0EA1F03123E127E387C01
E090C7FC12FCA6127C127EA2003E13186C1330380FC0603807FFC0C6130015167E9519>
I<49B4FCA2EB003FAB13FE3807FFBF380FC1FF48C67E003E7F127E127CA212FCA7127C12
7E123E6C5B380F81FF3907FF3FE0EA01FC1B237EA220>I<13FE3807FF80380F83C0381E
01E0383E00F0127E007C13F8147812FCB512F8A200FCC7FCA3127CA26C1318A26C133038
0F80E03803FFC0C6130015167E951A>I<EB1F80EBFFE03801F1F0EA03E31207EA0FC3EB
C1E0EBC000A6EAFFFEA2EA0FC0B2EA7FFCA214237EA212>I<9038FE0F803903FF9FC038
0F83E3381F01F3391E00F000003E7FA5001E5BEA1F01380F83E0380BFF80D808FEC7FC00
18C8FCA2121C381FFFE014FC6C13FF7E001F1480397C001FC00078130F00F81307A3007C
EB0F806CEB1F00381F807E6CB45A000113E01A217F951D>I<B47EA2121FABEB83F0EB8F
FCEB987EEBA03EEBC03FA21380AE39FFF1FFE0A21B237DA220>I<121E123FEA7F80A4EA
3F00121EC7FCA6EAFF80A2121FB2EAFFF0A20C247EA30F>I<133C137E13FFA4137E133C
1300A6EA03FFA2EA003FB3A5127812FC133E137CEA7878EA3FF0EA1FC0102E83A312>I<
B47EA2121FABECFF80A2EC3C00143014E0EB81C00183C7FC1386139E13BE13FFEBDF80EB
8FC01307806D7E6D7E130080147E39FFE1FFC0A21A237EA21E>I<EAFF80A2121FB3ADEA
FFF0A20C237EA20F>I<3AFF03F803F890390FFE0FFE3A1F183F183F9039201F201F0140
01C01380A201801380AE3BFFF0FFF0FFF0A22C167D9531>I<38FF03F0EB0FFC381F187E
EB203EEB403FA21380AE39FFF1FFE0A21B167D9520>I<13FF000713E0380F81F0381F00
F8003E137C48133EA300FC133FA7007C133E007E137E003E137C6C13F8380F81F03807FF
E0C6130018167E951D>I<38FF87F0EBBFFC381FF07EEBC01F9038800F8015C0A2EC07E0
A715C0140FA2EC1F8001C01300EBF07EEBBFFCEB8FE00180C7FCA8EAFFF0A21B207E9520
>I<EBFE033807FF07380FC1CF381F00DF48137F007E7FA2127C12FCA7127EA2003E5B6C
5BEA0FC13807FF3FEA00FC1300A8903801FFE0A21B207E951E>I<38FF0F80EB1FE0381F
33F013631343A2EBC1E0EB8000ADEAFFF8A214167E9518>I<3807F980EA1FFFEA3807EA
7003EAF001A26CC7FCB4FC13F8EA7FFE6C7E6C1380120738003FC0EAC007130312E0A200
F0138038FC0F00EAEFFEEAC3F812167E9517>I<487EA41203A21207A2120F123FB5FCA2
EA1F80ABEB8180A5380F830013C3EA07FEEA01F811207F9F16>I<38FF81FFA2381F803F
AF5C5C380FC1BF3907FF3FE0EA01FC1B167D9520>I<39FFF01FE0A2391FC00700000F13
06EBE00E0007130C13F000035BA26C6C5AA26C6C5AA2EBFEE0EB7EC0137F6D5AA26DC7FC
A2130EA21B167F951E>I<3AFFF3FF83FCA23A1F807C00E0D80FC014C08001E013010007
017F1380A2D803F0EB0300ECCF8301F81387D801F913C61487D800FD13ECEBFF0315FC01
7F5BEB7E01013E5BEB3C00A20118136026167F9529>I<39FFF07FC0A2390FC01C006C6C
5A6D5A00035B6C6C5A3800FD80137F91C7FC7F6D7E497EEB37E0EB67F013C33801C1F838
0380FC48487E000E137F39FF81FFE0A21B167F951E>I<39FFF01FE0A2391FC00700000F
1306EBE00E0007130C13F000035BA26C6C5AA26C6C5AA2EBFEE0EB7EC0137F6D5AA26DC7
FCA2130EA2130CA25B1278EAFC3813305BEA69C0EA7F80001FC8FC1B207F951E>I<387F
FFF0A2387C07E038700FC0EA601F00E0138038C03F005B137EC65A1201485AEBF030EA07
E0120FEBC070EA1F80003F1360EB00E0EA7E03B5FCA214167E9519>I
E /Fg 15 119 df<EA1FF0EA3FFC487EEA780FEA300738000380A2137FEA07FF121FEA3F
83EA7803127012E0A3EA7007EA780F383FFFFCEA1FFDEA07F016157D941A>97
D<12FEA3120EA6133EEBFF80000F13E0EBC1F0EB8070EB0038120E141CA7000F13381478
EB80F0EBC1E0EBFFC0000E138038063E00161E7F9D1A>I<EA01F8EA07FF481380381E07
C0EA3C01387800E01270481370A2B512F0A300E0C7FC1270A2007813707E381F01F0380F
FFE0000313803800FE0014157D941A>101 D<EB07E0EB1FF0EB3FF8EB7878EBF030EBE0
00A4387FFFF0B5FCA23800E000AF383FFF804813C06C1380151E7F9D1A>I<EA01C0487E
A36C5AC8FCA5EA7FE0A31200AF387FFF80B512C06C1380121F7C9E1A>105
D<131C133EA3131C1300A5EA0FFEA3EA000EB3A5131C1260EAF038EAFFF8EA7FF0EA1FC0
0F2A7E9E1A>I<EAFFE0A31200B3A6B512E0A3131E7D9D1A>108 D<387CE0E038FFFBF8EA
7FFF381F1F1CEA1E1EA2EA1C1CAC387F1F1F39FF9F9F80397F1F1F00191580941A>I<EA
FE3EEBFF80B512C0EA0FC1EB80E01300120EAC38FFE3FE13E713E317157F941A>I<EA01
F0EA07FCEA1FFF383E0F80EA3C07387803C0EA700138E000E0A6EAF001007013C0EA7803
383C0780EA3E0F381FFF00EA07FCEA01F013157D941A>I<387F81F838FF8FFC387F9FFE
3803FE1EEBF80CEBE000A25B5BAAEA7FFFB5FC7E17157F941A>114
D<3807FB80EA1FFF127FEA7807EAE003A30078C7FCEA7FC0EA1FFCEA07FE38003F801307
386001C012E0A2EAF00338FC0780B51200EAEFFEEAE3F812157C941A>I<487E1203A638
7FFFE0B5FCA238038000AA1470A43801C1E013FF6C1380EB3F00141C7F9B1A>I<38FE0F
E0A3EA0E00AD1301EA0F033807FFFE7EEA00FC17157F941A>I<387FC7FC00FF13FE007F
13FC380E00E0A3380701C0A338038380A33801C700A3EA00EEA3137CA2133817157F941A
>I E /Fh 5 115 df<13E0EA01C0EA0380120713005A121EA2121C123CA212381278A312
7012F0AE12701278A31238123CA2121C121EA27E7E13801203EA01C0EA00E00B2E7CA112
>40 D<12E012707E123C121C121E7EA27E1380A2120313C0A3120113E0AE13C01203A313
801207A213005AA2121E121C123C12385A5A0B2E7EA112>I<EA03F0EA0FFC487EEA3E1F
EA7C07127838700380B5FCA300F0C7FCA3127012786C1380EA3E07EA1FFF00071300EA01
F811147F9314>101 D<EA01F8EA07FE381FFF80383F0FC0EA3C03387801E0A238F000F0
A6387801E0A2383C03C0EA3F0F381FFF803807FE00EA01F814147F9317>111
D<EAF0E012F312F7EAFF0012FCA25AA25AAC0B147D9310>114 D
E /Fi 1 59 df<127012F8A3127005057C840D>58 D E /Fj 57
122 df<EAFFFEA50F057F8E14>45 D<123C127E12FFA4127E123C08087C8711>I<EB7F80
3803FFF03807E1F8380F807C48487E48133F003E7F007E1480A400FE14C0AD007E1480A4
6CEB3F00A26C133E6C6C5A3807E1F86CB45A38007F801A237EA21F>48
D<131C133C13FC12FFA21200B3AA387FFFFCA216237CA21F>I<48B4FC000713C0381E07
F0383803F8386001FC387C00FE12FE14FF147FA2127C003813FFC7FC14FEA2EB01FC14F8
EB03F0EB07E01480EB0F00131E5B1370EBE003EA01C038038007380700061206380FFFFE
5A5A4813FCB5FCA218237DA21F>I<48B4FC000713E0381E03F0383801F8003C13FC387E
00FEA3123EEA1C01000013FCA2EB03F8EB07F0EB0FC03801FF00A2380007E0EB01F014F8
EB00FC14FE14FFA21210127C12FEA214FEA2387C01FC007013F8383E07F0380FFFC00001
130018237DA21F>I<14381478A214F81301130313071306130C131C13381330136013E0
EA01C01380EA03005A120E5A12185A12705AB612C0A2390001F800A790387FFFC0A21A23
7EA21F>I<0018130C001F137CEBFFF814F014E014C01480EBFC000018C7FCA513FF001B
13E0381F03F0381C00F8000813FCC7127EA3147FA2127812FCA3147E5A006013FC127038
3801F8381E07E03807FFC03801FE0018237DA21F>I<EB1FC0EB7FF03801F0383803E00C
3807803E000F137EEA1F005AA2007E133C1400A338FE3FC0EB7FF0EB80F800FF13FCEB00
7C147E5A147FA4127EA4003E137E123F6C137C380F80F83807C1F03803FFC038007F0018
237DA21F>I<1230123C003FB512C0A215804814005C5C38600018A200E05B485B5CC648
5AA249C7FC1306130EA25BA2133CA25BA213F8A41201A66C5A13601A257DA41F>I<EBFF
80000313E0380F01F8381C007C48133C141E1278A2127C127E387F803C13E0383FF87838
1FFDF0EBFFC07E000313E014F8000F13FCEA1E1F383C07FEEA7803EB00FF48133F141F14
0FA3140E1278141C6C1338381F80F03807FFE00001130018237DA21F>I<13FF000313C0
380F83E0381F00F04813F8007E137CA2147E12FEA3147FA4127E14FF123EEA3F01001F13
7FEA0FFEEA03FCC7FC147EA2123C007E13FCA214F814F0EA7C01383003E0381C0F80380F
FF00EA03F818237DA21F>I<141CA2143EA3147FA24A7EA39038019FC0A29038031FE014
0F01077FEB0607A2010C7F1403011C7FEB1801A2496C7EA2017FB5FCA29039E0007F8049
133FA2484880151F00038190C7120FA2486E7ED8FFF090B51280A229257EA42E>65
D<B612E015FC3903F0007FED3F80ED1FC0ED0FE0A216F0A21507150FA216E0151F16C0ED
7F80913801FE0090B512F815FF9039F0003FC0ED0FE0ED07F016F8150316FCA616F81507
ED0FF0ED1FE0ED7FC0B7120015F826257EA42C>I<9138FF8008010FEBF01890393FC03C
789039FE0006F8D801F81303484813014848130048481478121F48481438A2007F151890
C8FCA2481500A97E16187F123FA26C6C1430120F6C6C14606C6C14C06C6CEB0180D800FE
EB070090383FC01E90380FFFF8010013C025257DA42C>I<B612E015FC3903F800FFED1F
C0ED07E06F7E6F7E82150082A2167FA31780AA1700A316FEA24B5A5E4B5A4B5AED1FC0ED
FF80B648C7FC15E029257EA42F>I<B7FCA23903F8007FED0F8015071503A21501A3ED00
C01406A21600A2140E141EEBFFFEA2EBF81E140E1406A21660A291C7FC16C0A415011503
A2ED0F80153FB7FCA223257EA428>I<B612FEA23803F800151F8181A281A3ED01801403
A292C7FCA25C5C90B5FCA2EBF80F8080A491C8FCAAB512F0A221257EA427>I<9138FF80
10010FEBE03090393FC078F09038FE000DD801F81307D807F0130348481301491300001F
1570485AA2007F153090C8FCA2481500A70203B5FCA26C90380007F0A27F123FA26C7E12
0F7F6C7EEA01F8D800FE130F90383FC03990390FFFF0700100EB803028257DA430>I<B5
00E0B512E0A23B03F80003F800AF90B6FCA29038F80003B0B500E0B512E0A22B257EA430
>I<B512E0A23803F800B3AFB512E0A213257EA417>I<B512F0A2D803F8C7FCB3A31503A3
1506A3150EA2151E153E157CEC03FCB6FCA220257EA425>76 D<D8FFF8EDFFF86D5C0003
EEFE00017EEC037EA36D1406A26D6C130CA26D6C1318A26D6C1330A36D6C1360A26D6C13
C0A2903900FC0180A291387E0300A3EC3F06A2EC1F8CA2EC0FD8A2EC07F0A36E5AEA0780
3CFFFC01C01FFFF8A235257EA43A>I<D8FFF8903807FFE07FD803FE9038003C006D1418
7F6D7E6D7E806D7E6D7E13036D7E6D7E80EC7F80EC3FC0141FEC0FE015F0EC07F8EC03FC
1401EC00FE157F1698ED3FD8ED1FF8150F15071503A2150115001678486C1438D8FFFC14
18A22B257EA430>I<903803FF80011F13F090387F01FC3901FC007FD803F0EB1F804848
EB0FC0000F15E04848EB07F0491303003F15F8A2007F15FC90C71201A24815FEA96C15FC
A26D1303003F15F8A26C6CEB07F0A26C6CEB0FE06C6CEB1FC06C6CEB3F806C6CEB7F0039
007F01FC90381FFFF00103138027257DA42E>I<B612E015FC3903F800FFED3F80ED1FC0
16E0150F16F0A616E0151F16C0ED3F80EDFF0090B512FC15E001F8C8FCAFB512E0A22425
7EA42A>I<B67E15F83903F801FEEC007F6F7E6F7EA282A55EA24B5A4BC7FCEC01FE90B5
12F815C09038F803F06E7E6E7E157EA2157FA482A31760ED3FC017C0ED1FE1B539E00FFF
80923801FE002B257EA42E>82 D<01FF1380000713E3380F80F7381E001F48130F481307
140312F81401A27E91C7FCB4FCEA7FE013FE383FFFE014F86C13FE00077F6C1480C67E01
0313C0EB003FEC0FE01407A200C01303A315C07E6C13076C14806CEB0F0038FFC03E38E3
FFF838803FE01B257DA422>I<007FB612F8A2397E00FE010078EC007800701538006015
18A200E0151C160C5AA4C71400B3A390B512FEA226247EA32B>I<B539E00FFFC0A2D803
F8C7EA78001630B3A700015D7F00005D137C6D495A6D0107C7FC90380FE03E903803FFF8
9038007FC02A257EA42F>I<B5398001FFE0A2D807F8C7EA1C0000031518A26D14380001
15306D1470000015607F6D5C80013F495AA2ECC003011F91C7FC6E5A010F130614F00107
5BA26D6C5AA2ECFC3801011330ECFE700100136014FF6E5AA26E5AA36EC8FCA2140EA22B
257FA42E>I<B53B81FFFE01FFF0A23D07F0001FC0000F007013066C6C010F5CA26F7E6C
6C5EA26D496C1338000017304B7E017F01195CA291388030FE013F5E829139C0607F0101
1F5E03E0138190280FE0C03F83C7FCA29139F1801FC3010715C617E69139FB000FEE0103
15EC02FF14FC6D486D5AA24A130301005DA24A130102785CA202306D5A3C257FA43F>I<
EA07FF001F13E0383E03F0383F00F880147E121EC7FCA3EB1FFE3803FE7EEA0FC0EA1F00
123E127E5AA314BEEA7E01383F073E391FFE1FE03807F00F1B187E971E>97
D<EAFFC0A2120FACEBC1FCEBCFFF9038FC0FC09038F007E09038C003F0A2EC01F8A215FC
A815F8A2EC03F013E09038F007E090381C1F80390E0FFF00380C03F81E267FA522>I<EB
7FE03803FFF83807C07C381F80FC13005A007E1378140012FEA8127E127F6C130CEA1F80
EBC0183807E0703803FFE038007F0016187E971B>I<ECFFC0A2140FAC137F3803FFCF38
0FE0FF381F803F383F000FA2127EA212FEA8127EA27E141F381F803F380FC0EF3903FFCF
FC3800FE0F1E267EA522>I<137F3803FFC03807C1F0380F80F8EA1F0048137C127E147E
12FEA2B512FEA248C7FCA3127EA214067E6C130C380F80183807E0703803FFE038007F80
17187E971C>I<EB1FC0EB7FF0EA01F83803E1F8120713C1380FC0F01400A7B5FCA2EA0F
C0B3A2EAFFFEA215267EA513>I<3901FF07C00007EBDFE0380F83F1EA1F01393E00F800
007E7FA6003E5B6C485A380F83E0EBFFC0001190C7FC0030C8FCA21238123C383FFFE06C
13FC806C7F481480383C003F48EB0FC000F81307A4007CEB0F806CEB1F00381F807E3807
FFF8C613C01B247E971F>I<EAFFC0A2120FAC14FE9038C3FF809038CE0FC013D89038D0
07E013E0A213C0AF39FFFC7FFEA21F267EA522>I<120FEA1F80EA3FC0A4EA1F80EA0F00
C7FCA7EA7FC0A2120FB3A2EAFFF8A20D277EA611>I<131E133FEB7F80A4EB3F00131E90
C7FCA73801FF80A2EA001FB3A8127800FC13005B133EEA787CEA3FF8EA0FE0113283A613
>I<EAFFC0A2120FACEC1FF0A2EC0780EC0E005C14305CEBC1C0EBC38013C713DFEBFFC0
EBE7E0EBC3F0138180EB80FC147E80A2EC1F80EC0FC039FFF83FF8A21D267FA520>I<EA
FFC0A2120FB3B0EAFFFCA20E267EA511>I<26FF80FE137F903A83FF81FFC03B0F8E0FC7
07E0019813CC903A9007E803F001A013F0A201C013E0AF3BFFFC7FFE3FFFA230187E9733
>I<38FF80FE903883FF80390F8E0FC0139890389007E013A0A213C0AF39FFFC7FFEA21F
187E9722>I<EB7F803803FFF03807C0F8381F807E48487EA2007EEB1F80A200FE14C0A8
007E1480A26CEB3F00A2381F807E6C6C5A3803FFF038007F801A187E971F>I<38FFC1FC
EBCFFF390FFC1FC09038F007E001C013F0140315F8140115FCA8EC03F8A215F0EBE00790
38F00FE09038DC1F809038CFFF00EBC3F801C0C7FCA9EAFFFCA21E237F9722>I<017F13
C03803FFC13807E0E3381FC033EB801FEA3F0048130FA212FEA8127E127F7EEB801F001F
133F380FE0EF3803FF8F3800FE0F1300A9ECFFFCA21E237E9720>I<38FF83E0EB8FF838
0F8C7CEB90FC13B013A01478EBE0005BAEEAFFFEA216187F9719>I<3807F8C0EA1FFFEA
3C07EA7001EAF000A300FC1300B47EEA7FFC7F383FFF80000F13C0120338001FE01303EA
C001A212E014C0EAF00338FC078038EFFF00EAC3FC13187E9718>I<13C0A41201A31203
1207120F121FB512C0A2380FC000AC1460A63807E0C013E13801FF8038007E0013237FA2
18>I<39FFC07FE0A2000F1307B0140FA200071317EBE0673903FFC7FE38007F071F187E
9722>I<39FFF80FF8A2390FC001C015803907E00300A26D5A00031306EBF80E0001130C
13FC00005B13FEEB7E30A26D5AA214E06D5AA26D5AA26DC7FCA21D187F9720>I<3BFFF9
FFE0FF80A23B1FC03F001C00000F6D13181580D807E05CA29039F03FC070000301371360
15E02601F8635BA29038FCE3F1000001C15B15F990267F80FBC7FCA215FF90383F007EA2
011E133CA3010C131829187F972C>I<39FFF83FF0A2390FC00F003807E00E6C6C5A6D5A
6C6C5A00001360EB7EC06D5AA2131F6D7E497E80EB33F81361EBE0FC3801C07E3803807F
3907003F8048131F39FFC07FF8A21D187F9720>I<39FFF80FF8A2390FC001C015803907
E00300A26D5A00031306EBF80E0001130C13FC00005B13FEEB7E30A26D5AA214E06D5AA2
6D5AA26DC7FCA21306A25B1230EA781CEAFC185B1370EA68E0EA7FC0001FC8FC1D237F97
20>I E /Fk 13 117 df<1238127C12FEA3127C12381200A61238127C12FEA3127C1238
07147D930D>58 D<39FFC007FEA2390FE000607FEA0DF8A2EA0CFC137EA27FEB1F80EB0F
C0A2EB07E0EB03F014F81301EB00FC147EA2143FEC1FE0140FA214071403A214011400D8
FFC01360A21F1F7E9E24>78 D<3BFFF87FFC1FF0A23B1F800FC00380D80FC001E0130014
07A23A07E00FF006A32603F01F5BEC19F8A22601F8395BEC30FCA2D800FC5CEC607EA201
FE147090397EC03F60A2017F14E06D486C5AA36D486C5AA3010E6DC7FCA32C1F7F9E2F>
87 D<EAFF80A3EAE000B3B3A3EAFF80A3092D7DA10D>91 D<EAFF80A31203B3B3A312FF
A3092D80A10D>93 D<EA0FF0EA3FFCEA7E1E131FEB0F80A21218120013FF120FEA1F0F12
7CA212F8A31317EA7C37383FE3F0EA0F8114147F9316>97 D<EA03F8EA0FFEEA1F0F383E
0780123C007C13C0A212FCB5FCA200FCC7FCA3127CA26C13C0A2381F03803807FF00EA01
FC12147F9315>101 D<3803F0E0380FFDF0EA1E1EEA3C0F007C1380A5003C1300EA1E1E
EA1FFCEA33F00030C7FCA21238EA3FFEEBFF806C13C04813E0387803F0EA700012F0A438
7801E0383E07C0381FFF803803FC00141E7F9317>103 D<121C123E127FA3123E121CC7
FCA6B4FCA2121FB0EAFFE0A20B217FA00C>105 D<EAFE1FEB3FC0EA1E63EB83E0A2EA1F
03AD38FFE7FCA216147E9319>110 D<EA01F8EA0FFF381F0F80383E07C0387C03E0A300
FC13F0A7007C13E0A2383E07C0381F0F80380FFF00EA03FC14147F9317>I<EAFE3C137F
381EDF80139F121F131FEB060090C7FCABEAFFF0A21114809313>114
D<1203A45AA25AA2123FEAFFF8A2EA1F00AA130CA5EA0F98EA07F0EA03E00E1D7F9C12>
116 D E /Fl 49 123 df<EB03E0EB1C181338EB703C13E014383801C000A5485A387FFF
F038038070A4380700E0A6380E01C0A6381C0380001E13C038FF0FF016207E9F19>12
D<EB03F4EB1C1CEB383C137013E01438EA01C0A538038070387FFFF038038070A4380700
E0A6380E01C0A6381C0380001E13C038FF9FF016207E9F19>I<903803F03F90391E09E0
809039380F80C09039701F01E0EBE03E021E13C02601C01CC7FCA548485A007FB6128039
03803803A43A0700700700A6000EEBE00EA64848485A001EEBE01E3AFF8FF8FFC023207E
9F26>I<EAFFF0A20C027E8A0F>45 D<137EEA01C338030180000713C0EA0E0014E05AA2
EA3C0112381278A538F003C0A51480130712E01400A2130E1260EA701CEA3038EA3870EA
0FC0131F7C9D17>48 D<13181338EA01F8EA0E701200A513E0A6EA01C0A6EA0380A6EA07
001380EAFFFC0E1E7B9D17>I<EB3F80EBC1E038010070000213785AA2000F137C1380A2
EB00781206C712F814F0EB01E014C0EB0380EB0700130E5B5B13605B485A380300201206
000813405A383FFFC0481380B5FC161E7E9D17>I<137F380183C0380201E0EA04000007
13F05A1301A2000013E0A2EB03C0EB07801400131CEA01F8EA000E7F148014C013031307
1230127812F8A200F0138038800F00EA400E6C5AEA1078EA0FE0141F7D9D17>I<1460A2
14E0EB01C013031305130D13091311EB2380134313C31383EA0103120238040700120812
18121012201240B512F038000E00A55B131E3801FFC0141E7E9D17>I<120E121FA2121E
120C1200AA1230127812F81278127008147C930D>58 D<ECFE02903807018690381C004E
0170133E49131E4848131C4848130C120748C7FC5A121E003E1408003C1400127CA45AA4
127815101520A27E1540001C14806CEB01006C13023803800C3800E030EB3FC01F217C9F
21>67 D<0007B57E3900F801E0903878007081497F151E150E150FA348481480A6484814
005DA3151E153E4848133C5DA25D4A5A4A5A260F000FC7FC143CB512F0211F7E9E23>I<
0007B512FC3900F8007C0178131C150C5B1504A414043901E00800A31438EBFFF8EBE038
3803C010A4EC00081510485AA21520A2156015C0380F00011407B612801E1F7E9E1F>I<
0007B512F83900F800780178133815185B1508A53901E00800A314181438EBFFF83803C0
301410A491C7FC485AA648C8FC7FEAFFFC1D1F7E9E1E>I<3807FF803800F8001378A25B
A6485AA6485AA6485AA648C7FC7FEAFFF0111F7E9E10>73 D<3807FFE0D800FCC7FC1378
A25BA6485AA6485AA41580EC0100EA0780A25C14021406140E380F001E147CB512FC191F
7E9E1C>76 D<D807F8EC7FE00000ED7C00017814BCA2019C495AA21502A2018E13041508
D8010E5C1510A26D1320A215400002EC41E09038038081EC8101A21482A23A0401C403C0
A214C8A2EB00F0000C13E04B5A001E01C07FD8FFC0EB7FFC2B1F7E9E2A>I<D807F8EB7F
C0D8007CEB1F00150C015E1304019E5B138FA2EB8780A2EB83C0D801035BEB01E0A2EB00
F0A2147800025C143CA2141EA2140F485CEC07C0A21403A21401000C5C001E1300B47E22
1F7E9E22>I<EB01FCEB0E0790383801C090387000E0484813F048481378485A153C48C7
FC5A001E143E123E123C127CA448147CA3157815F81278EC01F0007C14E01403003C14C0
001CEB0780001EEB0F006C131E380780383801C0E038007F801F217C9F23>I<0007B5FC
3900F803C090387800F015785B157CA41578484813F815F0EC01E0EC03C0EC0F00EBFFFC
D803C0C7FCA6485AA648C8FC7FEAFFF81E1F7E9E1F>I<3807FFFE3900F8078090387801
E0EC00F05B15F8A415F03801E00115E0EC03C0EC0780EC1E00EBFFF03803C03880141E14
0EA2140F48485AA51502D80F001304EB800F39FFF00788C7EA01F01F207E9E21>82
D<EB1F82EB7066EBC01E3801800EEA030048130C00061304120EA3000F1300A27FEA07F0
13FF6C13C06C13E038003FF0EB03F813001478143CA200401338A3143000601370146000
F013C038E8018038C60300EA81FC17217E9F19>I<3A03FFC0FFC03A007F003E00013C13
18013E1310011E5B011F5B6D5B0281C7FCEB078314C2EB03C414E8EB01F0A2130080A2EB
017CEB023CEB043EEB0C1EEB081F497E132001407FEB8007000180EB0003000780391F80
07F039FFC01FFE221F7F9E22>88 D<EA07F8EA0C0CEA1E061307121C1200A313FFEA07C7
EA1E07EA3C0E127800F01310A3131EEB2E2038784F40381F878014147D9317>97
D<1207123F120F7EA2120EA65A137CEA1D83381E0180001C13C0EB00E05A14F0A5387001
E0A214C013031480EB0700EAE80EEACC38EA83E014207B9F19>I<13FEEA0383380E0780
121C0038130090C7FC12785AA45AA37E5BEA70026C5AEA1C18EA07E011147D9314>I<14
38EB01F8EB00781438A21470A614E013FCEA0382EA0601121CEA3C00383801C0127812F0
A438E00380A412F0EA700738380F00381C37803807C7E015207D9F19>I<13F8EA070EEA
0E07121C383803801278127012F0A2B5FC00F0C7FC5AA46C5AEA7002EA3004EA1C18EA07
E011147D9314>I<EB07C0EB1C60EB30F01360EBE0E0EBC0001201A5485AEA3FFCEA0380
A448C7FCA6120EA65A121EEAFFC014207F9F0E>I<140EEB3E11EBE1A33801C1C2380381
E0EA07801301120FA3380703C01480EB8700EA04FC48C7FCA21218121CEA0FFF14C014E0
381800F04813305A5AA3006013606C13C0381C0700EA07FC181F809417>I<13E0120712
011200A2485AA6485AEB8F80EB90E013A0EBC0601380000713E01300A5380E01C0A6381C
0380001E13C038FF8FF014207E9F19>I<EA01C0EA03E0A213C0EA0180C7FCA6EA038012
1F12071203A2EA0700A6120EA65A121EEAFF800B1F7F9E0C>I<EB0380EB07C0A21480EB
030090C7FCA61307137F130F7FA2130EA65BA65BA65B1260EAF0605BEA6180003FC7FC12
28839E0E>I<13E0120712011200A2485AA6485AEB81FCEB80F014C0EB81801400EA0704
5B13181338137C131C120E7FA2130F7F1480EA1C03381E07C038FF8FF016207E9F18>I<
13E0120712011200A2EA01C0A6EA0380A6EA0700A6120EA65A121EEAFF800B207F9F0C>
I<390387C07C391F9861863907A072073903C03403EB80380007EB7807EB0070A5000EEB
E00EA64848485A001EEBE01E3AFFCFFCFFC022147E9326>I<38038F80381F90E0EA07A0
3803C0601380000713E01300A5380E01C0A6381C0380001E13C038FF8FF014147E9319>
I<13FCEA0387380E0180381C00C04813E0A24813F012F0A438E001E0A214C0130300F013
8038700700EA380E6C5AEA07E014147D9317>I<EBE3E03807EC383800F01C497E140F48
487E1580A53903800F00A2140E141E141C5C38074070EB61C0011FC7FC90C8FCA3120EA4
121EEAFFC0191D809319>I<EBFC2038038260EA0702381E01E0123C003813C0127812F0
A438E00380A212F0A21307127038380F00EA1C37EA07C7EA0007A3130EA4131EEBFFC013
1D7D9318>I<EA038E381FB380EA07C71203EB8300EA078090C7FCA5120EA65A121EEAFF
C011147E9312>I<EA01F9EA0607EA080312181301EA3802EA3C00121F13F0EA07FCEA01
FEEA001FEA40071303A212601306EAF004EAC818EA87E010147F9312>I<1380EA0100A3
5A5A5A121EEAFFF8EA0E00A45AA65A1310A41320A2EA1840EA0F800D1C7C9B12>I<381C
0380EAFC1FEA3C07EA1C03A238380700A6EA700EA4131EA25BEA305E381F9F8011147B93
19>I<38FF83F8381E00E0001C13C01480121E380E01005B13025B12075BA25BEA039013
A013E05B5B120190C7FC15147C9318>I<39FF9FE1FC393C078070391C03006014801540
1580EA0E0790380D81001309EB19C21311380F21C4EA0720EB40C814E8EB80F0A26C485A
1460000213401E147C9321>I<381FF0FF3803C0780001137014403800E0C0EBE180EB73
001376133CA2131C132E134E1387EA0107380203801204380C01C0383C03E038FE07FC18
147F9318>I<390FF83F803901E00E00EBC00C140813E000005B143014205C13705CA201
71C7FC1339133A133E133C133813181310A25BA25BEA70C0EAF08000F1C8FC12E6127819
1D809318>I<380FFFE0EA0E01000C13C038080380EB0700EA100E5BC65A5BA25B485A38
038080EA0700120E381C0100A2485AEA700EEAFFFE13147F9314>I
E /Fm 39 121 df<B512F8A715077F921B>45 D<EB01C01303130F137FEA1FFFB5FC13BF
EAE03F1200B3B1007FB512F0A31C2E7AAD28>49 D<EB3FE03801FFFE0007EBFF80D80F80
13C0391E003FE00038EB1FF0007CEB0FF8007EEB07FCB4FC018013FEA21403A2EA7F0000
3E1307C7FC15FCA2EC0FF8A215F0EC1FE015C0EC3F80EC7F00147E14F8495A495A495A49
C7FC011E130E5B133849131E49131C485A48C7123C48B512FC5A5A5A4814F8B6FCA31F2E
7CAD28>I<EB1FF890B5FC000314C03907E01FF0390F0007F8D81F807FEA3FC06E7EA4EA
1F80380F0007C75BA25D4A5A4A5AEC3F8002FFC7FCEB3FF8ECFF809038001FE06E7E6E7E
6E7E816E7EA21680A3121C123E127FEAFF801600A24A5AEA7F00007E495A003C5C391FC0
1FF06CB512C0000391C7FC38003FF8212E7DAD28>I<157015F0140114031407140FA214
1F143F147714F714E7EB01C7EB0387EB0707130F130E131C1338137013F013E0EA01C0EA
0380EA07005A120E5A5A5A5AB712E0A3C7380FF000A9010FB512E0A3232E7EAD28>I<00
0C1430390FC007F090B512E015C0158015005C14F85C1480000EC8FCA8EB1FF0EBFFFE39
0FE03F809038000FC0000EEB07E0000C14F0C713F8140315FCA215FEA21218123E127F5A
A215FCA25A0078EB07F815F06CEB0FE06CEB1FC0390FC07F806CB51200000113FC38003F
E01F2E7CAD28>I<14FF010713E0011F7F90387F80F89038FE003CD801F8137C484813FE
00071301EA0FE0A2EA1FC0003F6D5A157892C7FC485AA338FF83FC90388FFF8090389C0F
C09038B003F06E7E01E07F01C07F140081A2491480A4127FA4003F15007F121F5D000F49
5AEA07E06C6C485A3901FC0FE06CB55A013F90C7FCEB0FFC212E7DAD28>I<1578A215FC
A34A7EA24A7EA24A7FA34A7FEC0E7F021E7FEC1C3FA202387F151F02787FEC700FA202E0
7F1507010180ECC003A249486C7EA201078191C7FC498191B6FCA24981011CC7123F013C
810138141FA24981160F01F081491407A2484881486C1403B549B512FCA336317DB03D>
65 D<B712C016FC16FFD801FEC77FEE7FE0707E161F707EA2831607A4160FA25FA24C5A
4C5A4C5A4B485ADB1FFEC7FC90B65AEEFF8049C7EA3FE0EE0FF0EE07FCA2707E83821880
A718005E5F16074C5A4C5AEEFFF0B812C094C7FC16F831317DB039>I<913A03FF800180
023FEBF00349B5EAFC0701079038003F0FD91FF8EB079FD93FC0EB01FFD9FF807F4848C8
127F4848153F0007161F49150F485A001F1607A2485A1703127FA24992C7FCA212FFA912
7FA27FEF0380123FA26C7E1707000F17006C7E6D150E0003161E6C6C151C6C6C6C1478D9
3FC05CD91FF8EB03E0D907FFEB3F800101D9FFFEC7FCD9003F13F80203138031317CB03A
>I<B712F016FF17C0C6D9800013F0EE0FF8EE03FE707E701380EF7FC0173FEF1FE018F0
170F18F8A2EF07FCA418FEAB18FCA4EF0FF8A218F0171F18E0173FEF7FC01880933801FF
004C5AEE0FFCEE7FF0B812C094C7FC16F037317EB03E>I<B812E0A3C6903880007FEE0F
F016031601A21600A21770A31738A21507A21700A35D5D5D91B5FCA3EC803F818181A592
C8FCACB612C0A32D317EB033>70 D<B61280A3C6EB8000B3B3A7B61280A319317EB01E>
73 D<B67EA3000190C9FCB3A9EE0380A416071700A25EA35E5E5E5E4B5A150FB7FCA329
317DB030>76 D<B500C00303B5FCA26E5DC61900D9EFF0150EA3D9E7F85DA2D9E3FC5DA2
D9E1FE5DA2D9E0FF5DA26E6C495AA26E6C495AA36E6C495AA26E6C130EA26E6C5BA26E6C
5BA26E6C5BA26E6C5BA392387F81C0A292383FC380A2DB1FE7C7FCA2ED0FFEA26F5AA36F
5A487EB526E001F090B6FCA26F5A48317EB04D>I<EC0FFF91B512F0903907FC03FE903A
1FE0007F80D93F80EB1FC049C76C7ED801FEEC07F848486E7E48486E7EA248486E7E001F
178049157F003F17C0A34848ED3FE0A300FF17F0AB007F17E06D157FA3003F17C0A26C6C
EDFF80A26C6C4A130000075E6D140300035E6C6C4A5A6C6C4A5AD93FC0EB3FC06D6C495A
902707FC03FEC7FC0100B512F0020F90C8FC34317CB03D>79 D<B712E016FEEEFF80C6D9
800013E0EE3FF0EE0FF8EE07FCA2EE03FEA217FFA717FEA2EE07FC17F8160FEE3FE0EEFF
C091B6120016F80280C8FCB3A2B67EA330317EB037>I<90391FF8018090B51203000314
C73907F007EF390F8000FF48C7127F003E141F150F5A150712FCA215037EA26C91C7FC13
C0EA7FF0EBFF806C13F8ECFF806C14F06C806C806C14FFC6FC013F1480010114C0D9001F
13E01401EC003FED1FF0150F1507126000E01403A316E07EA26CEC07C07EB4EC0F8001C0
EB1F00D8FBFC13FE00F1B512F8D8E03F5BD8C003138024317CB02D>83
D<007FB8FCA39039C00FF801D87E00EC003F007C82007882A200708200F01780A3481603
A5C792C7FCB3AA017FB6FCA331307DAF38>I<EBFFF0000313FF390F803F809038C00FE0
486C6C7EA26E7ED80FC07FEA0780C7FCA414FF131FEBFFE33803FC03EA0FF0EA1FC0123F
EA7F80A2EAFF00A31407A2387F800D393FC01DFE3A1FE078FFF03907FFE07FC6EB803F24
207E9F27>97 D<EA01F812FFA3120F1207ADEC3FE0ECFFFC9038FBE07F9039FF001F8049
EB0FC04914E049EB07F016F8A2ED03FCA316FEA816FCA3ED07F8A216F06DEB0FE06D14C0
01E7EB3F809039C3C0FE00903880FFF89038003FC027327EB12D>I<EB0FFF017F13C039
01FC01F03803F0033907E007F8120FEA1FC0003FEB03F0EC01E04848C7FCA312FFA8127F
A36C6C131CA2001F14386C7E000714703903F001E03901FC07C039007FFF00EB0FF81E20
7D9F24>I<ED0FC0EC07FFA3EC007F153FADEB07F8EB3FFF9038FE07BF3903F801FF3907
E0007F120F4848133F123FA2485AA312FFA8127FA36C7EA2121F6C6C137F000714FF2603
F00313E03A01FC0F3FFE38007FFEEB0FF027327DB12D>I<EB0FFC90387FFF803901FC0F
C03903F003E03907E001F0000F14F8391FC000FC003F14FEA24848137E157FA212FFA290
B6FCA20180C7FCA4127FA36C6C1307121F150E6C7E6C6C131C6C6C13783900FE03E09038
3FFFC0903807FE0020207E9F25>I<EB01FE90380FFF8090381FC3C090387F07E09038FE
0FF0120113FC1203EC07E0EC018091C7FCA8B512FCA3D803FCC7FCB3A8387FFFF0A31C32
7EB119>I<90391FF007C09039FFFE3FE03A01F83F79F03907E00FC3000F14E19039C007
E0E0001FECF000A2003F80A5001F5CA2000F5CEBE00F00075C2603F83FC7FC3806FFFE38
0E1FF090C9FC121EA2121F7F90B57E6C14F015FC6C806C801680000F15C0003FC7127F00
7EEC1FE0007C140F00FC1407A4007EEC0FC0003E1580003F141FD80FC0EB7E003907F803
FC0001B512F0D8001F90C7FC242F7E9F28>I<EA01F812FFA3120F1207ADEC07F8EC3FFE
EC783F02C013809039F9801FC0EBFB0001FE14E05BA35BB3B500C3B5FCA328327DB12D>
I<EA03C0487E487E487EA46C5A6C5A6C5AC8FCA9EA01F8127FA31207B3A7B51280A31133
7DB217>I<EA01F812FFA3120F1207B3B3A6B512C0A312327DB117>108
D<2703F007F8EB1FE000FFD93FFEEBFFF8913A783F01E0FC02C090388300FE280FF1801F
C6137F2607F30013CC01F602F8148001FC5CA3495CB3B500C3B5380FFFFCA33E207D9F43
>I<3903F007F800FFEB3FFEEC783F02C013803A0FF1801FC03807F30001F614E013FCA3
5BB3B500C3B5FCA328207D9F2D>I<EB07FC90387FFFC03901FC07F03903F001F848486C
7E4848137E001F147F003F158049133F007F15C0A300FF15E0A8007F15C0A36C6CEB7F80
A2001F15006C6C13FE00075C3903F803F83901FE0FF039007FFFC0D907FCC7FC23207E9F
28>I<3901F83FE000FFEBFFFC9038FBE07F9039FF003F80D807FEEB1FC049EB0FE04914
F0ED07F8A216FC1503A216FEA816FC1507A216F8A2ED0FF06D14E06DEB1FC06DEB3F8090
39FBC0FE009038F8FFF8EC3FC091C8FCABB512C0A3272E7E9F2D>I<3803F03F00FFEB7F
C09038F1C3E01487390FF30FF0EA07F6A29038FC07E0EC03C091C7FCA25BB2B512E0A31C
207E9F21>114 D<3801FF86000713FEEA1F00003C133E48131E140E12F8A36C90C7FCB4
7E13FC387FFFC06C13F0806C7F00077F00017FEA003F01001380143F0060131F00E0130F
A27E15007E6C131E6C131C38FF807838F3FFF038C07F8019207D9F20>I<131CA5133CA3
137CA213FC120112031207381FFFFEB5FCA2D803FCC7FCB0EC0380A71201EC0700EA00FE
EB7F0EEB3FFCEB07F0192E7FAD1F>I<D801F8EB07E000FFEB03FFA3000FEB003F000714
1FB3153FA20003147FA26C6CEBDFF03A00FE039FFF90387FFF1FEB0FFC28207D9F2D>I<
B5EB1FFCA3D80FF8EB03C0000715806D1307000315007F0001140E7F6C5CA2EC803C017F
1338ECC078013F1370ECE0F0011F5B14F1010F5B14F9903807FB80A214FF6D90C7FCA26D
5AA26D5AA21478A226207E9F2B>I<3A7FFF807FFCA33A03FC000F006C6C131E6C6C5BEC
803890387FC078013F5B90381FE1E090380FF3C0ECFF806D90C7FC6D5A13016D7E81815B
903803DFE09038078FF08190380F07FC90381E03FEEB3C01496C7E4914804848EB7FC000
03EC3FE026FFFC01B5FCA328207F9F2B>120 D E /Fn 94 127 df<127012F8B0127012
00A5127012F8A31270051C779B18>33 D<EA4010EAE038EAF078EAE038AAEA60300D0E7B
9C18>I<EA0306EA078FA6387FFFC0B512E0A26C13C0380F1E00A6387FFFC0B512E0A26C
13C0381E3C00A6EA0C18131C7E9B18>I<13C01201A3EA03F0EA0FFCEA3FFEEA7DCFEA71
C738E1C38013C7A338F1C0001279123F6C7EEA0FF8EA01FC13DE13CF13C73861C38012F1
A212E1EBC7001271EA79DEEA3FFEEA1FF8EA07E0EA01C0A3120011247D9F18>I<EA3803
387C0780A2EAEE0F1400A25B131EA2133EEA7C3CA2EA387CEA0078A213F85B12015BA212
035BA21207EB8380EB87C0120FEB0EE0A2121F121EA2123E383C07C0A23818038013247E
9F18>I<EA01C0EA07E0487EEA0E70487EA4EB73F813F313E3380FC1C0EBC38013831303
381F0700EA3F87EA7B8EEA71CEEAE1FC12E0137CEB7870A2EA70FE387FFFE0EA3FC7380F
03C0151C7F9B18>I<1238127CA2127E123E120EA3121CA2123812F812F012C0070E789B
18>I<137013F0EA01E0EA03C0EA0780EA0F00121E121C5AA25AA45AA81270A47EA27E12
1E7EEA0780EA03C0EA01F0120013700C24799F18>I<126012F012787E7E7EEA07801203
EA01C0A2EA00E0A41370A813E0A4EA01C0A2EA03801207EA0F00121E5A5A5A12600C247C
9F18>I<EA01C0A4EA41C138F1C780EAFDDF387FFF00EA1FFCEA07F0A2EA1FFCEA7FFF38
FDDF80EAF1C73841C100EA01C0A411147D9718>I<136013F0A7387FFFC0B512E0A26C13
C03800F000A7136013147E9718>I<121C123E127E127F123F121F1207120E121E127C12
F81260080C788518>I<387FFFC0B512E0A26C13C013047E8F18>I<1230127812FCA21278
12300606778518>I<1303EB0780A2130F14005B131EA2133E133C137C1378A213F85B12
015B12035BA212075B120F90C7FCA25A121E123E123CA2127C127812F85AA2126011247D
9F18>I<EA01F0EA07FC487EEA1F1FEA1C0738380380007813C0EA7001A238E000E0A9EA
F001007013C0A2EA780300381380381C0700EA1F1FEA0FFE6C5AEA01F0131C7E9B18>I<
EA01801203A21207120F123F12FF12FB12431203B0EA7FFCEAFFFEEA7FFC0F1C7B9B18>
I<EA03F0EA0FFEEA3FFF387C0F80387003C0EAE00138F000E0A21260C7FCA2EB01C0A213
03EB0780EB0F00131E5B5B5B485AEA07C0485A381E00E05AEA7FFFB5FC7E131C7E9B18>
I<EA07F8EA1FFE487E38780780EB03C0130112301200EB0380A2EB0F00EA03FF5B7F3800
0780EB03C01301EB00E0A312F0A2EB01C01303387C0780383FFF006C5AEA03F8131C7E9B
18>I<131F5B1377A213E7120113C7EA038712071307120E121E123C1238127812F0B512
F8A338000700A6EB7FF0A3151C7F9B18>I<383FFF80A30038C7FCA8EA3BF8EA3FFE7F38
3C0780383003C0EA0001EB00E0A2126012F0A238E001C0EA7003387C0F80383FFF00EA1F
FCEA03F0131C7E9B18>I<137E48B4FC00071380380F83C0EA1E03121C3838018090C7FC
5AA2EAE1F8EAE7FEB5FC38FE078038F803C0EAF001EB00E05A7E1270A3383801C0EA3C03
381E0780380FFF006C5AEA01F8131C7E9B18>I<12E0B512E0A214C038E00380EB0700C6
5A131E131C5BA25B13F05BA2485AA3485AA448C7FCA7131D7E9C18>I<EA03F8EA0FFE48
7E383E0F80EA3803387001C0A438380380EA3C07381FFF00EA07FC487EEA1F1F383C0780
387001C000F013E0EAE000A4387001C0EA7803383E0F80381FFF006C5AEA03F8131C7E9B
18>I<EA03F0EA0FFC487EEA3C0F38780780EA700338E001C0A314E0A21270EA7803EA3C
0FEA1FFFEA0FFEEA03F0C7FCEB01C0A338300380EA7807EB0F00133EEA3FFCEA1FF0EA07
C0131C7E9B18>I<1230127812FCA2127812301200A81230127812FCA212781230061477
9318>I<1218123C127EA2123C12181200A81218123C127EA2123E121E120E121C123C12
7812F01260071A789318>I<14C0EB03E01307EB1FC0EB3F80EBFE00485AEA07F0485AEA
3F8048C7FC12FCA2127F6C7EEA0FE06C7EEA01FC6C7EEB3F80EB1FC0EB07E01303EB00C0
13187E9918>I<387FFFC0B512E0A3C8FCA4B512E0A36C13C0130C7E9318>I<126012F87E
127F6C7EEA0FE06C7EEA01FC6C7EEB3F80EB1FC0EB07E0A2EB1FC0EB3F80EBFE00485AEA
07F0485AEA3F8048C7FC12FC5A126013187E9918>I<EA0FF0EA3FFC48B4FCEA700F38F0
0380A2EA600738000F00133E5BEA01F05B485AA55BC8FCA5EA0380487EA36C5A111C7D9B
18>I<137CEA01FEEA07FF380F8780381E03C0EA3C1DEA387F3870FFE0EA71E313C112E1
EAE380A638E1C1C0127113E33870FF8038387F00EA3C1C381E00E0EA0F833807FFC00001
138038007E00131C7E9B18>I<137013F8A213D8A2EA01DCA3138CEA038EA4EA0707A538
0FFF80A3EA0E03381C01C0A3387F07F000FF13F8007F13F0151C7F9B18>I<EA7FFCB5FC
6C1380381C03C01301EB00E0A4130114C01307381FFF80140014C0EA1C03EB00E014F014
70A414F014E01303387FFFC0B51280387FFE00141C7F9B18>I<EBF8E0EA03FEEA07FFEA
0F07EA1E03EA3C01EA38005AA214005AA8127014E0A27E123C381E01C0EA0F073807FF80
3803FE00EA00F8131C7E9B18>I<EA7FF8EAFFFE6C7E381C0F80EB03C0A2EB01E01300A2
14F01470A814F014E0A2130114C01303EB0F80387FFF00485AEA7FF8141C7F9B18>I<B5
12F0A3381C0070A41400A2130EA3EA1FFEA3EA1C0EA390C7FCA21438A5B512F8A3151C7F
9B18>I<B512F8A3381C0038A41400A21307A3EA1FFFA3EA1C07A390C7FCA7EAFFC0A315
1C7F9B18>I<3801F1C0EA03FDEA0FFFEA1F0FEA1C03123813011270A290C7FC5AA5EB0F
F0131F130F387001C0A213031238A2EA1C07EA1F0FEA0FFFEA03FDEA01F1141C7E9B18>
I<387F07F038FF8FF8387F07F0381C01C0A9EA1FFFA3EA1C01AA387F07F038FF8FF8387F
07F0151C7F9B18>I<EA7FFFB512806C1300EA01C0B3A4EA7FFFB512806C1300111C7D9B
18>I<3801FFC0A338000E00B312F0A2133CEA7FFCEA3FF0EA0FC0121C7D9B18>I<387F07
F038FF87F8387F07F0381C03C0EB07801400130E131E5B13385B13F0121DA2EA1FB8A213
1C121EEA1C0EA27FA2EB0380A2EB01C0387F03F038FF87F8387F03F0151C7F9B18>I<EA
FFC0A3001CC7FCB114E0A5B5FCA3131C7E9B18>I<38FC01F8EAFE03A2383B06E0A4138E
A2EA398CA213DCA3EA38D8A213F81370A21300A638FE03F8A3151C7F9B18>I<387E07F0
38FF0FF8387F07F0381D81C0A313C1121CA213E1A313611371A213311339A31319A2131D
130DA3EA7F07EAFF87EA7F03151C7F9B18>I<EA0FFE383FFF804813C0EA7803EA700100
F013E0EAE000B0EAF001007013C0EA7C07EA7FFF6C1380380FFE00131C7E9B18>I<EAFF
FEEBFF8014C0EA1C03EB01E013001470A514E01301EB03C0EA1FFF1480EBFE00001CC7FC
A8B47EA3141C7F9B18>I<EA0FFE383FFF804813C0EA7803EA700100F013E0EAE000AE13
70A2EAF079387039C0EA783FEA7FFF6C1380380FFE00EA000FEB0780A2EB03C01301A213
227E9B18>I<EA7FF8EAFFFE6C7E381C0F80130314C01301A313031480130F381FFF005B
A2EA1C0F7FEB0380A5149CA3387F01F8EAFF81387F00F0161C7F9B18>I<3803F1C0EA1F
FF5AEA7C0FEA7003EAE001A390C7FC12701278123FEA1FF0EA07FEC67EEB0F80EB03C013
01EB00E0A2126012E0130100F013C038F80780B5FCEBFE00EAE7F8131C7E9B18>I<387F
FFF8B5FCA238E07038A400001300B2EA07FFA3151C7F9B18>I<38FF83FEA3381C0070B3
6C13E0EA0F01380783C03803FF806C1300EA007C171C809B18>I<38FE03F8EAFF07EAFE
03383C01E0001C13C0A3EA1E03000E1380A438070700A4EA038EA4EA018C13DCA3EA00D8
13F8A21370151C7F9B18>I<38FE03F8A338700070A36C13E0A513F8EA39FC13DCA20019
13C0A3138CA2EA1D8DA31305000D1380EA0F07A2EA0E03151C7F9B18>I<387F0FE0139F
130F380E0700120FEA070E138EEA039C13DCEA01F8A212005B137013F07F487E13DCEA03
9E138EEA070F7F000E13801303001E13C0387F07F000FF13F8007F13F0151C7F9B18>I<
38FE03F8EAFF07EAFE03381C01C0EA1E03000E1380EA0F0700071300A2EA038EA2EA01DC
A3EA00F8A21370A9EA01FC487E6C5A151C7F9B18>I<383FFFE05AA2387001C01303EB07
801400C65A131E131C133C5B137013F0485A5B1203485A90C7FC5A001E13E0121C123C5A
1270B5FCA3131C7E9B18>I<EAFFF8A3EAE000B3ACEAFFF8A30D24779F18>I<126012F0A2
7E1278127C123CA2123E121E121F7EA27F12077F1203A27F12017F12007F1378A2137C13
3C133E131EA2131F7F14801307A2EB030011247D9F18>I<EAFFF8A3EA0038B3ACEAFFF8
A30D247F9F18>I<EA0180EA07C0EA1FF0EA7EFCEAF83EEAE00E0F067C9B18>I<387FFFC0
B512E0A26C13C013047E7F18>I<1206121E123E12381270A212E0A312F812FC127CA212
38070E789E18>I<EA0FF0EA1FFC487EEA3C0FEA180738000380A213FF1207121FEA7F03
127812E0A3EAF007EA780F383FFFF8EA1FFDEA07F015147E9318>I<127E12FE127E120E
A5133EEBFF80000F13C0EBC1E01380EB0070120E1438A6000F1370A2EB80E013C1EBFFC0
000E138038063E00151C809B18>I<EA01FEEA07FF001F1380EA3E073838030048C7FCA2
5AA61270EB01C01238EA3E03381FFF8000071300EA01FC12147D9318>I<EB1F80133F13
1F1303A5EA03E3EA0FFBEA1FFFEA3C1FEA380FEA7007130312E0A6EA7007A2EA380FEA3C
1F381FFFF0380FFBF83803E3F0151C7E9B18>I<EA01F0EA07FCEA1FFEEA3E0F38380780
EA7003A238E001C0A2B5FCA300E0C7FC1270EB01C01238EA3E07381FFF8000071300EA01
F812147D9318>I<EB1F80EB7FC0EBFFE013E13801C0C01400A3387FFFC0B5FCA23801C0
00AEEA7FFFA3131C7F9B18>I<3801E1F03807FFF85A381E1E30381C0E00487EA5EA1C0E
EA1E1EEA1FFC5BEA39E00038C7FC7EEA1FFEEBFFC04813E0387801F038700070481338A4
007813F0EA7E03381FFFC06C13803801FC00151F7F9318>I<127E12FE127E120EA5133E
EBFF80000F13C013C1EB80E01300120EAB387FC7FC38FFE7FE387FC7FC171C809B18>I<
EA0380EA07C0A3EA0380C7FCA4EA7FC012FF127F1201AEB5FCA3101D7C9C18>I<133813
7CA313381300A4EA0FFCA3EA001CB3A4EA6038EAF078EAFFF0EA7FE0EA3F800E277E9C18
>I<127E12FE127E120EA5EB3FF0A3EB0780EB0F00131E5B5B5BEA0FF87F139C130EEA0E
0F7FEB038014C0387FC7F812FF127F151C7F9B18>I<EAFFC0A31201B3A4B51280A3111C
7D9B18>I<38F9C1C038FFF7F013FF383E3E38EA3C3CA2EA3838AB38FE3E3EEB7E7EEB3E
3E1714809318>I<EA7E3E38FEFF80007F13C0EA0FC1EB80E01300120EAB387FC7FC38FF
E7FE387FC7FC1714809318>I<EA01F0EA0FFE487E383E0F80EA3803387001C0A238E000
E0A5EAF001007013C0EA7803383C0780EA3E0F381FFF006C5AEA01F013147E9318>I<EA
7E3E38FEFF80007F13C0380FC1E01380EB0070120E1438A6000F1370A2EB80E013C1EBFF
C0000E1380EB3E0090C7FCA7EA7FC0487E6C5A151E809318>I<3801F380EA07FBEA1FFF
EA3E1FEA380FEA7007A2EAE003A6EA7007A2EA380FEA3C1FEA1FFFEA0FFBEA03E3EA0003
A7EB1FF0EB3FF8EB1FF0151E7E9318>I<38FF0FC0EB3FE0EB7FF0EA07F0EBE060EBC000
5BA290C7FCA9EAFFFC7F5B14147E9318>I<EA07F7EA3FFF5AEA780FEAE007A3007CC7FC
EA7FE0EA1FFCEA03FEEA001F38600780EAE003A212F038F80F00B5FC13FCEAE7F011147D
9318>I<487E1203A4387FFFC0B5FCA238038000A9144014E0A33801C1C013FF6C1380EB
3E0013197F9818>I<387E07E0EAFE0FEA7E07EA0E00AC1301EA0F033807FFFC6C13FE38
01FCFC1714809318>I<387F8FF000FF13F8007F13F0381C01C0380E0380A338070700A3
138FEA038EA3EA01DCA3EA00F8A2137015147F9318>I<38FF07F8138F1307383800E0A4
381C01C0137113F9A213D9EA1DDD000D1380A3138DEA0F8FA23807070015147F9318>I<
387F8FF0139F138F380F0700EA078EEA039EEA01DC13F81200137013F07FEA01DCEA039E
138EEA0707000E1380387F8FF000FF13F8007F13F015147F9318>I<387F8FF000FF13F8
007F13F0380E01C0EB0380A21207EB0700A2EA0387A2138EEA01CEA213CC120013DC1378
A31370A313F05B1279EA7BC0EA7F806CC7FC121E151E7F9318>I<383FFFF05AA2387001
E0EB03C0EB078038000F00131E5B13F8485AEA03C0485A380F0070121E5A5AB512F0A314
147F9318>I<EB07E0131F137FEB780013E0AB1201EA7FC0485AA26C7EEA01E01200AB13
78EB7FE0131F130713247E9F18>I<126012F0B3B012600424769F18>I<127CB4FC13C012
03C67EAB7FEB7FC0EB3FE0A2EB7FC0EBF0005BABEA03C012FF90C7FC127C13247E9F18>
I<EA060CEA1F1EEA3FBEEAFBF8EAF1F0EA60C00F067C9B18>I E
/Fo 4 42 df<B612C0A21A027C8B23>0 D<14FF010713E090381F00F80178131E01E013
07D80180EB018048C812C000061560481530A248151848150CA2481506A4481503A90060
1506A46C150CA26C15186C1530A26C15606C15C06C6CEB0180D800E0EB07000178131E01
1F13F8903807FFE0010090C7FC282B7EA02D>13 D<EA03F0EA0FFC487E487E481380A2B5
12C0A66C1380A26C13006C5A6C5AEA03F012127E9317>15 D<15C0A21560A2818181007F
B512FEB7FCC8EA01C0ED00E0163C160F163C1670ED01C0ED0380B6EAFE006C5CC81218A2
5D5DA25DA2281A7E972D>41 D E /Fp 53 122 df<B51280A611067F9016>45
D<121C127FA2EAFF80A3EA7F00A2121C09097B8813>I<130E131E137EEA07FE12FFA212
F81200B3ABB512FEA317277BA622>49 D<EBFF80000713F04813FC381E03FE393800FF80
007C133F00FE14C06C131F15E0140FA2127E003C131FC7FC15C0A2EC3F801500147E5C5C
495A495AEB078049C7FC131E4913E013705B3901C001C0EA0380EA0600000FB5FC5A5A5A
B61280A31B277DA622>I<EB7F803803FFF04813FC380F81FE381F007FEA3F80EC3F80A3
121F1300C7EA7F00A2147E5C495AEB07F0EBFFC0A2EB01F8EB007E801580EC1FC0A215E0
A2123C127EB4FCA215C0143F481480007CEB7F00383F01FE6CB45A000713F0C613801B27
7DA622>I<140FA25C5C5C5C5BA2EB03BFEB073F130E131C133C1338137013E0EA01C0EA
038012071300120E5A5A5A12F0B612F8A3C7EA7F00A890381FFFF8A31D277EA622>I<00
181303381F801FEBFFFE5C5C5C14C091C7FC001CC8FCA7EB7FC0381DFFF8381F80FC381E
003F1208C7EA1F8015C0A215E0A21218127C12FEA315C05A0078EB3F80A26CEB7F00381F
01FE6CB45A000313F0C613801B277DA622>I<EB07F8EB3FFE90B5FC3901FC07803903F0
0FC03807C01FEA0F80121F130048EB0F8091C7FC127EA3EAFE02EB1FF0EB3FFCEB603EEB
801F00FF14809038000FC0A24814E0A4127EA4123E003F14C07EEC1F80D80F8013003807
E07E6CB45A6C5B38003FC01B277DA622>I<1238123E003FB512F0A34814E015C0158015
003870000EA25C485B5C5CC6485AA2495A130791C7FC5B5B131E133EA2137E137CA213FC
A41201A76C5A13701C297CA822>I<EB3FC03801FFF04813FC3807C07E48C67E001E7FEC
0F80123EA2123F138001C01300EBF01F381FFC1E6D5A380FFFF86C13E06C7F6C13FC8000
077FD80F0F1380D81E0713C0EA3E01397C007FE0141F48130F14071403A315C0127C007E
EB07806CEB0F00381FC03F380FFFFC00035B38007FC01B277DA622>I<EB7F803801FFF0
00077F380FC0FC381F803E48487E007E1480A2140F00FE14C0A315E0A5007E131FA26C13
3F6C132F380F80CF3807FF8F0001130FEA0008010013C0A3EC1F80123E127FEC3F00143E
147E007E5B383E03F8381FFFE06C1380D801FEC7FC1B277DA622>I<EC0780A24A7EA34A
7EA24A7EA3EC77F8A2ECF7FC14E3A2903801C1FEA201037F1480A249486C7EA24980010E
133FA2496D7EA2013FB57EA39039700007F8A201F080491303000181491301A2000381D8
FFFE013F13FCA32E297EA833>65 D<B612F815FF16C03A03F8001FE0ED0FF0ED07F81503
16FCA21501A3150316F8A2ED07F0150FED1FC0EDFF8090B5EAFE00EDFFC09039F8000FF0
ED03F8ED01FC16FE1500A216FFA616FE1501ED03FC1507ED1FF8B712E016C0EDFE002829
7DA830>I<91387FE003903907FFFC07011FEBFF0F90397FF00F9F9039FF0001FFD801FC
7F4848147F4848143F4848141F485A160F485A1607127FA290C9FC5AA97E7F1607123FA2
6C7E160E6C7E6C6C141C6C6C143C6C6C14786CB4EB01F090397FF007C0011FB512800107
EBFE009038007FF028297CA831>I<B612FCEDFF8016E03A03FC001FF8ED03FCED00FE16
7FEE3F80EE1FC0A2EE0FE0A2EE07F0A417F8AA17F0A3EE0FE0A217C0161FEE3F80EE7F00
5EED03FCED1FF8B75A168003FCC7FC2D297EA834>I<B712E0A33903FC001FED07F01501
A215001670A3913801C0781638A302031300A2140F90B5FCA3EBFC0F1403A20201130EA3
161C91C7FCA3163C1638167816F815011503151FB712F0A327297EA82C>I<B712C0A339
03FC003FED0FE015031501A21500A316F0913801C070A316001403A2140F90B5FCA3EBFC
0F1403A21401A491C8FCA9B512FCA324297EA82A>I<B5D8F00FB5FCA3D803FCC7EA3FC0
AF90B7FCA301FCC7123FB1B5D8F00FB5FCA330297EA835>72 D<B512F0A33803FC00B3B1
B512F0A314297EA819>I<B500F0EBFFFEA3D803FCC7EA0F00161E5E5E16E0ED03C04B5A
4BC7FC151E5D15F04A5A4A5A1407140F4A7EEC7FF04A7EEBFDE79038FFC3FCEC83FE9038
FE01FF497E6F7E826F7E151F6F7E8215076F7E6F7E8281EE7F80B539F00FFFFEA32F297E
A835>75 D<B512FCA3D803FCC8FCB3A3ED01C0A415031680A21507A2150FA2151F157F91
3801FF00B7FCA322297EA828>I<D8FFFE92383FFF80A26D5D0003EFE000A2D9BF8014EF
A2D99FC0EB01CFA2D98FE0EB038FA3D987F0EB070FA2D983F8130EA2D981FC131CA3D980
FE1338A2027F1370A291383F80E0A391381FC1C0A291380FE380A2913807F700A3EC03FE
A26E5AA26E5AD8FFFE0203B51280A2157039297DA840>I<D8FFFCEC7FFF7F7F00036DEB
01C080EBBFE0139F80EB8FF8EB87FCEB83FEEB81FF01801380147F15C0EC3FE0EC1FF0EC
0FF8EC07FC140315FEEC01FF6E1381ED7FC1ED3FE1ED1FF1150F16F9ED07FDED03FF8181
167FA2163F161F160F1607D8FFFE14031601A230297EA835>I<ECFFC0010F13FC90383F
807F9039FE001FC0D801F8EB07E048486D7E48486D7E000F8148486D7EA24848147FA200
7F168090C8123FA34816C0AA6C16806D147FA2003F1600A26C6C14FEA26C6C495A6C6C49
5A6C6C495A6C6C495A6C6C495A90263FC0FFC7FC90380FFFFC010013C02A297CA833>I<
B612F815FF16C03A03FC003FE0ED07F0ED03F816FC150116FEA716FC150316F8ED07F0ED
3FE090B61280EDFE0001FCC8FCB0B512F0A327297EA82E>I<ECFFC0010F13FC90383FC0
FF9039FE001FC048486D7ED803F0EB03F000078148486D7E48486D7EA24848147FA2007F
1680A290C8123FA24816C0AA6C16806D147FA2003F1600A26C6C14FE143E3A0FE07F81FC
00079038C1C1F83A03F18063F0D801F9EB67E0D800FFEB3FC090263FC07FC7FC90380FFF
FC01004913C0EC003C811601ED1F8316FF6F1380A21700816F5A6F5A6F5A2A357CA833>
I<B612E015FE6F7E3A03FC003FE0ED0FF06F7E6F7E150182A65E4B5A1507ED0FE0ED3FC0
90B500FEC7FCA29039FC00FF80ED3FC06F7E6F7E6F7EA9170EA21503923801FC1CB538F0
00FEEE7FF8EE0FE02F297EA832>I<9038FF80600003EBF0E0000F13F8381F80FD383F00
1F003E1307481303A200FC1301A214007EA26C140013C0EA7FFCEBFFE06C13F86C13FE80
000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E01303A46C14E0A26C13076C
14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA825>I<007FB71280A39039
807F807FD87C00140F00781507A20070150300F016C0A2481501A5C791C7FCB3A490B612
C0A32A287EA72F>I<B500F0EBFFFEA3D803FCC7EA0380B3AA0001ED07007F0000150E13
7F6D143CD91FC05B90390FF003F06DB55A01001480DA1FFCC7FC2F297EA834>I<B500F0
EB7FFFA3D803FEC7EA01C00001ED0380A26D14076C16006E5B017F140E80013F5CA26E13
3C011F14386E1378010F14708001075CA26D6C485AA2ECFE0301015CECFF076D91C7FC15
87EC7F8EA215DEEC3FDC15FC6E5AA26E5AA36E5AA26E5AA230297FA833>I<3803FF8000
0F13F0381F01FC383F80FE147F801580EA1F00C7FCA4EB3FFF3801FC3FEA0FE0EA1F80EA
3F00127E5AA4145F007E13DF393F839FFC381FFE0F3803FC031E1B7E9A21>97
D<EAFFE0A3120FACEBE1FE9038EFFF809038FE07E09038F803F09038F001F89038E000FC
A2157EA2157FA8157EA315FCA29038F001F89038F803F090389C0FE090380FFF80390E01
FC00202A7EA925>I<EB3FF03801FFFC3803F03E380FC07FEA1F80EA3F00A248133E007E
90C7FCA212FEA7127EA2127F6CEB03801380001FEB0700380FE00E3803F83C3801FFF838
003FC0191B7E9A1E>I<EC7FF0A31407ACEB3F873801FFF73807F03F380FC00F381F8007
EA3F00A2127EA312FEA8127EA27EA2381F800F380FC01F3907E07FFF3801FFE738007F87
202A7EA925>I<EB3FC03801FFF03803E07C380F803E001F7F130048EB0F80127E15C0A2
00FE1307A2B6FCA248C8FCA3127EA2127F6CEB01C07E390F8003803907C007003803F01E
3800FFFCEB3FE01A1B7E9A1F>I<9038FF80F00003EBE3F8390FC1FE1C391F007C7C4813
7E003EEB3E10007EEB3F00A6003E133E003F137E6C137C380FC1F8380BFFE00018138090
C8FC1238A2123C383FFFF814FF6C14C06C14E06C14F0121F383C0007007CEB01F8481300
A4007CEB01F0A2003FEB07E0390FC01F806CB5120038007FF01E287E9A22>103
D<EAFFE0A3120FAC147E9038E1FF809038E30FC001E413E0EBE80701F813F013F0A213E0
B039FFFE3FFFA3202A7DA925>I<1207EA0F80EA1FC0EA3FE0A3EA1FC0EA0F80EA0700C7
FCA7EAFFE0A3120FB3A3EAFFFEA30F2B7EAA12>I<1307EB0F80EB1FC0EB3FE0A3EB1FC0
EB0F80EB070090C7FCA7EBFFE0A3130FB3AA127C12FE14C0EB1F801400EA7C3EEA3FFCEA
0FF0133784AA15>I<EAFFE0A3120FACEC1FFCA3EC0780EC0F00141E5C5C14E0EBE3C013
E7EBEFE0EBFFF08013F3EBE1FCEBC0FE147FA2EC3F80EC1FC0EC0FE0A2EC07F039FFFC1F
FFA3202A7FA923>I<EAFFE0A3120FB3B2EAFFFEA30F2A7EA912>I<26FFC07FEB1FC0903A
C1FFC07FF0903AC307E0C1F8D80FC49038F101FC9039C803F20001D801FE7F01D05BA201
E05BB03CFFFE3FFF8FFFE0A3331B7D9A38>I<38FFC07E9038C1FF809038C30FC0D80FC4
13E0EBC80701D813F013D0A213E0B039FFFE3FFFA3201B7D9A25>I<EB3FE03801FFFC38
03F07E390FC01F80391F800FC0393F0007E0A2007EEB03F0A300FE14F8A8007E14F0A26C
EB07E0A2391F800FC0390FC01F803907F07F003801FFFC38003FE01D1B7E9A22>I<38FF
E1FE9038EFFF809038FE0FE0390FF803F09038F001F801E013FC140015FEA2157FA8157E
15FEA215FC140101F013F89038F807F09038FC0FE09038EFFF809038E1FC0001E0C7FCA9
EAFFFEA320277E9A25>I<38FFC1F0EBC7FCEBC63E380FCC7F13D813D0A2EBF03EEBE000
B0B5FCA3181B7F9A1B>114 D<3803FE30380FFFF0EA3E03EA7800127000F01370A27E00
FE1300EAFFE06CB4FC14C06C13E06C13F0000713F8C6FCEB07FC130000E0137C143C7E14
387E6C137038FF01E038E7FFC000C11300161B7E9A1B>I<13E0A41201A31203A2120712
0F381FFFE0B5FCA2380FE000AD1470A73807F0E0000313C03801FF8038007F0014267FA5
1A>I<39FFE07FF0A3000F1307B2140FA2000713173903F067FF3801FFC738007F87201B
7D9A25>I<39FFFC03FFA3390FF000F0000714E07F0003EB01C0A2EBFC0300011480EBFE
070000140013FFEB7F0EA2149EEB3F9C14FC6D5AA26D5AA36D5AA26D5AA2201B7F9A23>
I<39FFFC1FFEA33907F003803803F8079038FC0F003801FE1E00005BEB7F3814F86D5A6D
5A130F806D7E130F497EEB3CFEEB38FFEB787F9038F03F803901E01FC0D803C013E0EB80
0F39FFF03FFFA3201B7F9A23>120 D<39FFFC03FFA3390FF000F0000714E07F0003EB01
C0A2EBFC0300011480EBFE070000140013FFEB7F0EA2149EEB3F9C14FC6D5AA26D5AA36D
5AA26D5AA25CA21307003890C7FCEA7C0FEAFE0E131E131C5BEA74F0EA3FE0EA0F802027
7F9A23>I E /Fq 81 124 df<90381F83E09038F06E303901C07878380380F8903800F0
3048EB7000A7B612803907007000B2383FE3FF1D20809F1B>11 D<133FEBE0C0EA01C038
0381E0EA0701A290C7FCA6B512E0EA0700B2383FC3FC1620809F19>I<EB3FE013E0EA01
C1EA0381EA0700A8B5FCEA0700B2383FE7FC1620809F19>I<90381F81F89038F04F0439
01C07C06390380F80FEB00F05A0270C7FCA6B7FC3907007007B23A3FE3FE3FE02320809F
26>I<127012F8A71270AA1220A51200A5127012F8A3127005217CA00D>33
D<EA7038EAF87CEAFC7EA2EA743AEA0402A3EA0804A2EA1008A2EA2010EA40200F0E7F9F
17>I<1340A2EA03F0EA0C4EEA10413820408012600040134038C041C01343A238E04180
EB40001270127CEA3FC0EA1FF86C7EEA03FEEA007FEB4F801343EB41C0A2EAF040A31280
1480EA404100201300EA3042EA0C4CEA03F0EA0040A312257EA117>36
D<127012F812FCA212741204A31208A21210A212201240060E7C9F0D>39
D<13401380EA01005A12061204120C5AA212381230A212701260A412E0AC1260A4127012
30A212381218A27E120412067E7EEA008013400A2E7BA112>I<7E12407E12307E120812
0C7EA212077EA213801201A413C0AC1380A412031300A25A1206A25A120812185A12205A
5A0A2E7EA112>I<127012F012F8A212781208A31210A31220A21240050E7C840D>44
D<EAFFF0A20C02808A0F>I<127012F8A3127005057C840D>I<144014C0EB0180A3EB0300
A31306A25BA35BA35BA25BA35BA3485AA348C7FCA21206A35AA35AA25AA35AA35AA2122D
7EA117>I<EA03F0EA0E1C487EEA1806EA380738700380A400F013C0AD00701380A3EA78
0700381300EA1806EA1C0E6C5AEA03F0121F7E9D17>I<13801203120F12F31203B3A6EA
07C0EAFFFE0F1E7C9D17>I<EA03F0EA0C1CEA100E487E00401380128000F013C0EAF803
A3EA200712001480A2EB0F00130E5B5B5B13605B485A48C7FC000613405A5A00101380EA
3FFF5AB5FC121E7E9D17>I<EA03F0EA0C1CEA100EEA200F007813801307A2EA380F1200
1400A2131E131C1370EA07F0EA003C130E130FEB0780A214C0122012F8A300F013801240
EB0F00EA200EEA183CEA07F0121F7E9D17>I<1306A2130EA2131E132EA2134E138EA2EA
010E1202A212041208A212101220A2124012C0B512F038000E00A7EBFFE0141E7F9D17>
I<EA1803EA1FFE5B5B13E00010C7FCA6EA11F0EA161CEA180EEA10071480EA0003A214C0
A3127012F0A200E013801240EB0700EA20066C5AEA0838EA07E0121F7E9D17>I<137CEA
0182EA0701380E0380EA0C0712183838030090C7FC12781270A2EAF1F0EAF21CEAF406EA
F807EB0380A200F013C0A51270A214801238EB07001218EA0C0E6C5AEA01F0121F7E9D17
>I<1240387FFFE014C0A23840008038800100A21302485AA25B5BA25BA21360A213E05B
1201A41203A76C5A131F7E9D17>I<EA03F0EA0C0CEA1006EA3003382001801260A31270
38780300123EEA3F06EA1FC8EA0FF0EA03F8487EEA0C7EEA103F38300F80EA6007EB01C0
12C01300A31480EA600100201300EA1002EA0C0CEA03F0121F7E9D17>I<EA03F0EA0E18
487E487E13071270EB038012F0A214C0A5EA7007A21238EA180BEA0E13EA03E338000380
A3EB07001230EA7806130EEA700CEA2018EA1070EA0FC0121F7E9D17>I<127012F8A312
701200AA127012F8A3127005147C930D>I<127012F8A312701200AA127012F012F8A212
781208A31210A31220A21240051D7C930D>I<EA0FE0EA103CEA601EEA400EEAE00F12F0
A21260EA001E131C13381370136013C01380A2EA0100A6C7FCA5EA0380EA07C0A3EA0380
10207E9F15>63 D<5B497EA3497EA3EB09E0A3EB10F0A3EB2078A3497EA2EBC03EEB801E
A248B5FCEB000FA20002EB0780A348EB03C0A2120C001E14E039FF801FFE1F207F9F22>
65 D<B512E0380F0078141EA2801580A515005C141E147CEBFFF0EB007C141FEC0F80EC
07C0140315E0A515C014071580EC0F00143EB512F01B1F7E9E20>I<90380FE010903838
1C309038E002703803C00139078000F048C71270121E15305A1510127C127800F81400A9
1278007C1410123CA26C1420A27E6C6C13406C6C13803900E00300EB380CEB0FF01C217E
9F21>I<B512F83807801EEC0780EC03C0EC01E0EC00F015701578A2153CA3153EA8153C
A2157C1578A215F0EC01E0EC03C0EC0780EC1E00B512F81F1F7F9E23>I<B61280380F00
0F14031401140015C01540A314401500A214C0130113FF130113001440A3EC0020A31540
A315C01401EC0380140FB6FC1B1F7E9E1F>I<B61280380780071401A2140015C01540A4
EC2000A3146014E013FF138014601420A391C7FCA87FEAFFFE1A1F7F9E1E>I<90380FE0
109038381C309038E002703803C00139078000F048C71270121E15305A1510127C127800
F81400A7EC3FFEEC01F000781300127C123CA27EA27E6C7E3903C001703900E002309038
380C1090380FF0001F217E9F24>I<39FFF07FF8390F000780AD90B5FCEB0007AF39FFF0
7FF81D1F7E9E22>I<EAFFF0EA0F00B3ABEAFFF00C1F7E9E10>I<3807FFC038003E00131E
B3A3122012F8A3EAF01CEA403CEA6038EA1070EA0FC012207F9E17>I<EAFFF8EA0F8090
C7FCB21402A414061404A2140C141C147CB512FC171F7E9E1C>76
D<B46CEB07FE000715C0A2D805C0130BA2D804E01313A301701323A26D1343A36D1383A2
90380E0103A3EB0702A3EB0384A2EB01C8A3EB00F0A21460121FD8FFE0EB7FFE271F7F9E
2A>I<B4EB0FF8390F8003E0EC0080EA0BC0EA09E0A2EA08F01378A27F7FA27FEB0780A2
EB03C0EB01E0A2EB00F01478A2143C141EA2140F1407A214031401123E38FF80001D1F7E
9E22>I<EB1FE0EB70383801C00E48487E39070003804814C0001EEB01E048EB00F0A200
7C14F8A20078147800F8147CA900781478007C14F8A2003C14F0003E1301001E14E06CEB
03C06C148039038007003801E01E38007038EB1FE01E217E9F23>I<B512E0380F007C14
1E80EC0780A215C0A41580A2EC0F00141E147CEBFFE090C8FCAEEAFFF01A1F7E9E1F>I<
EB1FE0EB70383801C00E48487E39070003804814C0001EEB01E0003E14F0003C1300007C
14F8A20078147800F8147CA900781478007C14F8A2003C14F0383E0781391E0841E0390F
1023C00007148039039017003801D01E3900783804EB1FF8EB001CEC0C0CEC0E1CEC0FF8
A2140715F0EC01E01E297E9F23>I<B57E380F00F0143C8080A21580A41500A2141E5C14
F0EBFF80EB01C0EB0070A280143CA3143EA31504143F141FEC0F0839FFF00788C7EA01F0
1E207E9E21>I<3803F040380C0CC0EA1803EA3001EA6000A212E01440A36C13007E127C
EA7F80EA3FF86CB4FC00071380C613C0EB1FE013031301EB00F014707EA46C136014E06C
13C038F8018038C60300EA81FC14217E9F19>I<007FB512E038780F010060EB00600040
1420A200C0143000801410A400001400B3497E3803FFFC1C1F7E9E21>I<39FFF00FF839
0F0003E0EC0080B3A46CEB01001380120314026C6C5A6C6C5AEB3830EB0FC01D207E9E22
>I<39FFF003FE391F8000F86CC7126015206C6C1340A36C6C1380A2EBE00100011400A2
3800F002A213F8EB7804A26D5AA36D5AA2131F6D5AA2EB07C0A36D5AA36DC7FC1F207F9E
22>I<3BFFF07FF81FF03B1F000FC007C06C903907800180170015C001805C00071502EC
09E013C000035DEC19F01410D801E05CA2EC2078D800F05CA2EC403C01785CA2EC801E01
7C1460013C144090383D000F133F6D5CA2011E1307010E91C7FCA2010C7F010413022C20
7F9E2F>I<397FF81FF8390FE007C03907C0030000031302EBE0063801F00400005BEBF8
18EB78106D5AEB3E60EB1E406D5AA213076D7E497E1305EB08F0EB18F8EB1078EB207CEB
603EEB401EEB801F3901000F801407000214C000061303001FEB07E039FFC01FFE1F1F7F
9E22>I<39FFF001FF391F800078000F146012076D1340000314807F3901F001001200EB
F802EB7C06EB3C04EB3E08131EEB1F10EB0FB0EB07A014E06D5AACEB3FFC201F7F9E22>
I<387FFFFE387E003C127800701378006013F814F0384001E0130314C0EB07801200EB0F
00131EA25B137C13785B1201EBE002EA03C0A2EA0780000F13061300001E1304003E130C
123C48133C14FCB5FC171F7E9E1C>I<EA0804EA1008EA2010A2EA4020A2EA8040A3EAB8
5CEAFC7EA2EA7C3EEA381C0F0E7A9F17>92 D<120812101220A21240A21280A312B812FC
A2127C1238060E7D9F0D>96 D<EA1FE0EA3030EA7818131CEA300E1200A313FEEA078EEA
1E0E1238127800F01310A3131E127838386720380F83C014147E9317>I<121C12FC121C
AA137CEA1D87381E0180EB00C0001C13E01470A21478A6147014F014E0001E13C0381A01
8038198700EA107C15207E9F19>I<EA01FCEA0706EA1C0F123813060078C7FC127012F0
A61270127800381380A2381C0100EA0706EA01F811147F9314>I<EB01C0130F1301AAEA
01F1EA070DEA0C03EA180112381278127012F0A61270A21238EA1803120CEA070D3801F1
F815207F9F19>I<EA03F0EA0E1C487E487EA21270EB038012F0A2B5FC00F0C7FCA31270
A26C1380A2381C0100EA0706EA01F811147F9314>I<137CEA01C6EA030F1207EA0E0613
00A7EAFFF0EA0E00B2EA7FE01020809F0E>I<14E03803E330EA0E3CEA1C1C38380E00EA
780FA5EA380E6C5AEA1E38EA33E00020C7FCA21230A2EA3FFE381FFF8014C0383001E038
600070481330A4006013606C13C0381C03803803FC00141F7F9417>I<121C12FC121CAA
137C1386EA1D03001E1380A2121CAE38FF8FF014207E9F19>I<1238127CA31238C7FCA6
121C12FC121CB1EAFF80091F7F9E0C>I<13E0EA01F0A3EA00E01300A61370EA07F01200
1370B3A31260EAF06013C0EA6180EA3F000C28829E0E>I<121C12FC121CAAEB1FE0EB07
80EB060013045B5B5B136013E0EA1DF0EA1E70EA1C38133C131C7F130F7F148014C038FF
9FF014207E9F18>I<121C12FC121CB3ABEAFF8009207F9F0C>I<391C3E03E039FCC30C30
391D039038391E01E01CA2001C13C0AE3AFF8FF8FF8021147E9326>I<EA1C7CEAFC86EA
1D03001E1380A2121CAE38FF8FF014147E9319>I<EA01F8EA070E381C0380383801C0A2
387000E0A200F013F0A6007013E0A2383801C0A2381C038038070E00EA01F814147F9317
>I<EA1C7CEAFD87381E018014C0381C00E014F014701478A6147014F014E0381E01C0EB
0380381D8700EA1C7C90C7FCA8B47E151D7E9319>I<3801F04038070CC0EA0E02EA1C03
EA38011278127012F0A6127012781238EA1C03EA0C05EA0709EA01F1EA0001A8EB0FF815
1D7F9318>I<EA1CF0EAFD18EA1E3CA21318EA1C00AEEAFFC00E147E9312>I<EA0FC8EA30
38EA6018EAC008A3EAE000127CEA3FE0EA1FF0EA07F8EA003CEA800E130612C0A21304EA
E00CEAD818EA87E00F147F9312>I<1202A31206A2120EA2123EEAFFF8EA0E00AB1304A5
EA07081203EA01F00E1C7F9B12>I<381C0380EAFC1FEA1C03AE1307120CEA061B3803E3
F014147E9319>I<38FF83F8383E00E0001C13C06C1380A338070100A21383EA0382A2EA
01C4A213E4EA00E8A21370A3132015147F9318>I<39FF9FE1FC393C078070391C030060
EC8020000E1440A214C0D80704138014E0A239038861001471A23801D032143A143E3800
E01CA2EB6018EB40081E147F9321>I<38FF87F8381E03C0380E0180EB0300EA0702EA03
84EA01C813D8EA00F01370137813F8139CEA010E1202EA060738040380000C13C0003C13
E038FE07FC16147F9318>I<38FF83F8383E00E0001C13C06C1380A338070100A21383EA
0382A2EA01C4A213E4EA00E8A21370A31320A25BA3EAF080A200F1C7FC1262123C151D7F
9318>I<EA7FFFEA700E1260EA401C133813781370EA00E0120113C0EA03801207130112
0E121EEA1C03EA3802EA7006130EEAFFFE10147F9314>I<B512FC1601808C17>I
E /Fr 17 118 df<120FEA3F80EA7FC013E0EAFFF0A213F8A2127FA2123FEA0F381200A3
1370A313E0A2120113C0EA0380A2EA0700120E5A5A12100D1D79BB1B>39
D<B612FEA426007FF0C9FCB3ADEF03C0A517071880A3170FA3171FA2173F177F17FF5E04
071300163FB9FCA4323B7DBA3A>76 D<B500F00403B512E06E5EA26E5ED8007FF1C000A2
D97BFE161EA2D979FF5EA201786D5DA36E6C5DA26E6C4A5AA26E6C4A5AA36E6C4A5AA26E
6C4A5AA26E6C141EA36E6C5CA26E6D5BA26F6C5BA36F6C485AA26F6C485AA26F6C485AA2
6F6C48C7FCA3923803FE1EA26F6C5AA26F13F8A3705AA2705AA201FC6E5AB500FC4BB612
E0A2EE0F80EE0700533B7CBA5C>I<ED7FF8020FB512C0027F14F8903A01FFE01FFE0107
90390003FF80D90FFC01007FD91FF0EC3FE0D97FE0EC1FF849486E7E48496E7E91C81203
488348486F1380000F18C04981001F18E0A24848EE7FF0A3007F18F849163FA400FF18FC
AC007F18F86D167FA3003F18F0A26D16FF001F18E0A26C6C4B13C0A26C6C4B13806C1800
6E5C6C5F6C6D4A5A6D6C4A5AD93FF8EC7FF0D90FFCECFFC06DB401035B01019026E01FFE
C7FC6D6CB512F8020F14C09126007FF8C8FC3E3D7BBB49>79 D<B8FC17F017FC17FF2800
7FF0000F13C0040113E09338007FF0EF3FF8EF1FFCA218FE170FA218FFA718FEA2171F18
FC18F8173FEF7FF0933801FFE0040F138091B7120017F817C002F0C9FCB3A5B612F8A438
3B7CBA42>I<EB3FFE48B512E0000714F8390FE007FC9038F001FE486C6C7E6F7E82153F
6C48806C5A6C5AC8FCA491B5FC131F90387FF83F3803FF803807FC00EA0FF0485A123F48
5AA2485AA4157F6C7E15DF3A3FE0039FF03B1FF80F0FFFE03807FFFE0001497E39003FE0
002B267DA52F>97 D<13FE12FFA412071203B04AB4FC021F13F0027F13FC9138FC03FE90
39FFF000FF02C0EB3F8091C7EA1FC04915E0EE0FF017F8A2EE07FCA317FEA917FCA3160F
17F817F0161F6D15E06EEB3FC06EEB7F80D9F9E0EBFF009039F0FC07FE91387FFFF8D9E0
1F13E09026C003FEC7FC2F3C7DBB36>I<EE3F80ED3FFFA4150181B0ECFF80010F13F001
3F13FC9038FFC03F3901FE000F4848130348487F48487F121F485AA2127F5BA312FFA912
7FA36C7EA2121F6C6C5B6C6C5B00035CD801FE011F13C02700FF807E13FE90387FFFF801
0F13E0010113002F3C7DBB36>100 D<49B47E010F13F0017F13FC9038FF81FE3A03FE00
7F80D807F8133F4848EB1FC0ED0FE0485A003F15F01507485A16F8A212FFA290B6FCA301
C0C8FCA4127FA36C7E1678121F7F000F15F06C6C13016C6CEB03E06C6CEB0FC03A00FFC0
7F8090393FFFFE00010F13F8010013C025267DA52C>I<161FD907FEEBFF8090263FFFC1
13C090B538F3C7E03A01FE07FF0F3903F801FC3907F000FE000F9138FF07C0484890387F
8380EE8000003F81A7001F5DA26C6C49C7FC00075C6C6C485A3901FE07F848B55AD8073F
13C0260607FEC8FC000ECAFCA2120F5A7F6C7E90B512F8EDFF8016E06C816C816C814881
000F81391FC0000F48C8FC48ED7F8000FE153FA5007FED7F00A26C6C14FE6C6C495AD80F
F0EB07F8D807FEEB3FF00001B612C06C6C91C7FC010713F02B397DA630>103
D<13FE12FFA412071203B3B3AEB512F8A4153C7DBB1A>108 D<D801FCD97FC0EB0FF800
FF902603FFF8EB7FFF020F6D48B57E913C1F03FE03E07FC0913C3800FF07001FE0000749
028E80000301C0D97F98130F01FD03F8804A5C01FFC75BA3495DB3A4B5D8F81FB50003B5
12E0A44B267CA552>I<D801FCEBFF8000FF010313F0020F7F91381E03FC91383801FE00
0701607F0003497E01FD15805C01FFC7FCA35BB3A4B5D8F83F13FEA42F267CA536>I<90
3801FFC0010F13F8017F13FFD9FF807F3A03FE003FE0D807F8EB0FF048486D7EA248486D
7E003F81A248486D7EA400FF1680A9007F1600A36C6C495AA2001F5D6D1307000F5D6C6C
495AD803FEEB3FE03A00FF80FF806DB5C7FC010F13F8010113C029267DA530>I<3901FC
03F000FFEB0FFC4AB4FC91383C3F80EC707F00079038E0FFC000035BEBFD80A201FFEB7F
809138003F00151E92C7FC5BB3A3B512FCA422267DA528>114 D<90383FF0383903FFFE
7848EBFFF8381FC00F383F0003003E13005A157812FCA27E6C140013C013FC387FFFF06C
13FEECFF806C14C06C14E0000314F0C614F8011F13FCEB007FEC07FE0070130100F01300
157E7EA27E157C6C14FC6C14F890388001F09038F00FE000F9B512C0D8F07F130038C01F
F81F267DA526>I<01FEEC3F8000FFEC3FFFA400071401000380B3A45DA25D120115066C
6C4913C090267F807813FE6DB45A6D5B010313802F267CA536>117
D E end
%%EndProlog
%%BeginSetup
%%Feature: *Resolution 300dpi
TeXDict begin

%%EndSetup
%%Page: 1 1
1 0 bop 0 693 a Fr(Lam)m(b)s(daMOO)30 b(Programmer's)g(Man)m(ual)p
0 743 1950 17 v 1275 791 a Fq(F)l(or)15 b(Lam)o(b)q(daMOO)h(V)l(ersion)
g(1.8.0p6)1718 845 y(Marc)o(h)e(1997)0 2413 y Fp(b)n(y)23
b(P)n(a)n(v)n(el)h(Curtis)0 2479 y(ak)l(a)f(Haak)n(on)0
2545 y(ak)l(a)g(Lam)n(b)r(da)p 0 2570 1950 9 v eop
%%Page: 2 2
2 1 bop 0 2018 a Fq(Cop)o(yrigh)o(t)226 2017 y(c)214
2018 y Fo(\015)15 b Fq(1991,)f(1992,)f(1993,)h(1995,)g(1996)g(b)o(y)h
(P)o(a)o(v)o(el)g(Curtis.)0 2084 y(Copies)f(of)e(the)h(electronic)i
(source)e(for)g(this)g(do)q(cumen)o(t)h(can)f(b)q(e)g(obtained)h(using)
g(anon)o(ymous)f(FTP)f(on)h(the)g(In-)0 2138 y(ternet.)18
b(A)o(t)10 b(the)g(site)g Fn(ftp.research.att.com)e Fq(the)i(\014les)h
(are)f Fn(dist/eostrom/MOO/Programm)o(ersManua)o(l.*)p
Fq(;)p 1955 2148 21 42 v 0 2192 a(sev)o(eral)15 b(di\013eren)o(t)h
(\014le)g(formats)e(are)h(pro)o(vided,)g(including)j(HTML,)d(T)l
(exinfo,)h(plain)g(text,)f(and)g(P)o(ostScript.)0 2259
y(P)o(ermission)e(is)g(gran)o(ted)f(to)f(mak)o(e)h(and)h(distribute)h
(v)o(erbatim)e(copies)h(of)f(this)h(man)o(ual)g(pro)o(vided)g(the)f
(cop)o(yrigh)o(t)0 2312 y(notice)k(and)f(this)h(p)q(ermission)h(notice)
e(are)g(preserv)o(ed)h(on)f(all)h(copies.)0 2379 y(P)o(ermission)f(is)f
(gran)o(ted)f(to)h(cop)o(y)g(and)g(distribute)h(mo)q(di\014ed)h(v)o
(ersions)e(of)f(this)i(man)o(ual)f(under)h(the)f(conditions)0
2433 y(for)e(v)o(erbatim)g(cop)o(ying,)h(pro)o(vided)h(that)d(the)i(en)
o(tire)g(resulting)h(deriv)o(ed)f(w)o(ork)f(is)h(distributed)h(under)f
(the)g(terms)0 2487 y(of)i(a)g(p)q(ermission)h(notice)g(iden)o(tical)h
(to)e(this)g(one.)0 2553 y(P)o(ermission)20 b(is)g(gran)o(ted)f(to)g
(cop)o(y)h(and)f(distribute)i(translations)f(of)f(this)h(man)o(ual)f
(in)o(to)h(another)f(language,)0 2607 y(under)c(the)f(ab)q(o)o(v)o(e)g
(conditions)h(for)e(mo)q(di\014ed)j(v)o(ersions,)e(except)g(that)g
(this)g(p)q(ermission)i(notice)e(ma)o(y)g(b)q(e)h(stated)0
2661 y(in)h(a)f(translation)g(appro)o(v)o(ed)g(b)o(y)g(the)g(author.)p
eop
%%Page: 1 3
1 2 bop 0 -58 a Fq(Chapter)15 b(1:)k(In)o(tro)q(duction)1447
b(1)0 183 y Fm(1)41 b(In)n(tro)r(duction)62 299 y Fq(Lam)o(b)q(daMOO)15
b(is)h(a)e(net)o(w)o(ork-accessible,)h(m)o(ulti-user,)h(programmable,)e
(in)o(teractiv)o(e)h(system)f(w)o(ell-suited)0 353 y(to)i(the)h
(construction)g(of)g(text-based)f(adv)o(en)o(ture)h(games,)f
(conferencing)i(systems,)f(and)g(other)f(collab)q(orativ)o(e)0
407 y(soft)o(w)o(are.)22 b(Its)16 b(most)f(common)h(use,)h(ho)o(w)o(ev)
o(er,)f(is)g(as)g(a)g(m)o(ulti-participan)o(t,)i(lo)o(w-bandwidth)g
(virtual)f(realit)o(y)l(,)0 461 y(and)e(it)h(is)g(with)f(this)h(fo)q
(cus)f(in)h(mind)g(that)f(I)g(describ)q(e)i(it)f(here.)62
528 y(P)o(articipan)o(ts)11 b(\(usually)i(referred)e(to)g(as)g
Fl(pla)o(y)o(ers)r Fq(\))f(connect)i(to)f(Lam)o(b)q(daMOO)h(using)g(T)l
(elnet)g(or)f(some)g(other,)0 582 y(more)19 b(sp)q(ecialized,)24
b Fl(clien)o(t)e Fq(program.)32 b(Up)q(on)21 b(connection,)g(they)f
(are)g(usually)h(presen)o(ted)f(with)g(a)g Fl(w)o(elcome)0
636 y(message)c Fq(explaining)g(ho)o(w)e(to)f(either)i(create)f(a)f
(new)i Fl(c)o(haracter)h Fq(or)e(connect)g(to)f(an)h(existing)h(one.)20
b(Characters)0 690 y(are)15 b(the)g(em)o(b)q(o)q(dimen)o(t)h(of)f(pla)o
(y)o(ers)g(in)h(the)g(virtual)f(realit)o(y)h(that)e(is)i(Lam)o(b)q
(daMOO.)62 756 y(Ha)o(ving)22 b(connected)g(to)e(a)h(c)o(haracter,)h
(pla)o(y)o(ers)f(then)g(giv)o(e)h(one-line)h(commands)e(that)g(are)f
(parsed)i(and)0 810 y(in)o(terpreted)e(b)o(y)f(Lam)o(b)q(daMOO)h(as)f
(appropriate.)32 b(Suc)o(h)20 b(commands)f(ma)o(y)g(cause)g(c)o(hanges)
h(in)g(the)f(virtual)0 864 y(realit)o(y)l(,)13 b(suc)o(h)g(as)g(the)f
(lo)q(cation)i(of)e(a)g(c)o(haracter,)g(or)h(ma)o(y)f(simply)i(rep)q
(ort)e(on)g(the)h(curren)o(t)g(state)f(of)g(that)g(realit)o(y)l(,)0
918 y(suc)o(h)k(as)e(the)i(app)q(earance)f(of)g(some)g(ob)s(ject.)62
984 y(The)k(job)f(of)g(in)o(terpreting)h(those)f(commands)g(is)h
(shared)f(b)q(et)o(w)o(een)h(the)g(t)o(w)o(o)d(ma)s(jor)h(comp)q(onen)o
(ts)i(in)g(the)0 1038 y(Lam)o(b)q(daMOO)14 b(system:)19
b(the)13 b Fl(serv)o(er)j Fq(and)e(the)g Fl(database)p
Fq(.)k(The)c(serv)o(er)f(is)h(a)f(program,)f(written)i(in)g(a)f
(standard)0 1092 y(programming)f(language,)g(that)g(manages)f(the)i
(net)o(w)o(ork)e(connections,)i(main)o(tains)g(queues)g(of)f(commands)g
(and)0 1146 y(other)g(tasks)g(to)g(b)q(e)h(executed,)h(con)o(trols)e
(all)h(access)g(to)f(the)g(database,)h(and)f(executes)h(other)g
(programs)e(written)0 1200 y(in)19 b(the)f(MOO)g(programming)f
(language.)28 b(The)18 b(database)g(con)o(tains)g(represen)o(tations)g
(of)f(all)i(the)f(ob)s(jects)f(in)0 1254 y(the)c(virtual)g(realit)o(y)l
(,)h(including)h(the)e(MOO)g(programs)f(that)g(the)h(serv)o(er)f
(executes)i(to)e(giv)o(e)h(those)f(ob)s(jects)g(their)0
1308 y(sp)q(eci\014c)17 b(b)q(eha)o(viors.)62 1375 y(Almost)g(ev)o(ery)
f(command)g(is)h(parsed)f(b)o(y)h(the)f(serv)o(er)g(in)o(to)h(a)f(call)
h(on)g(a)f(MOO)g(pro)q(cedure,)i(or)d Fl(v)o(erb)p Fq(,)i(that)0
1429 y(actually)k(do)q(es)f(the)g(w)o(ork.)33 b(Th)o(us,)21
b(programming)e(in)i(the)f(MOO)g(language)g(is)g(a)g(cen)o(tral)g(part)
f(of)h(making)0 1483 y(non-trivial)d(extensions)f(to)e(the)h(database)g
(and)g(th)o(us,)g(the)g(virtual)h(realit)o(y)l(.)62 1549
y(In)k(the)f(next)g(c)o(hapter,)g(I)h(describ)q(e)g(the)f(structure)g
(and)g(con)o(ten)o(ts)f(of)h(a)g(Lam)o(b)q(daMOO)g(database.)31
b(The)0 1603 y(follo)o(wing)14 b(c)o(hapter)e(giv)o(es)i(a)e(complete)i
(description)g(of)f(ho)o(w)g(the)g(serv)o(er)f(p)q(erforms)h(its)g
(primary)g(dut)o(y:)19 b(parsing)0 1657 y(the)c(commands)g(t)o(yp)q(ed)
h(b)o(y)f(pla)o(y)o(ers.)20 b(Next,)15 b(I)h(describ)q(e)h(the)e
(complete)h(syn)o(tax)f(and)g(seman)o(tics)g(of)g(the)h(MOO)0
1711 y(programming)f(language.)20 b(Finally)l(,)c(I)g(describ)q(e)h
(all)f(of)e(the)i(database)e(con)o(v)o(en)o(tions)i(assumed)f(b)o(y)g
(the)g(serv)o(er.)120 1775 y Fk(Note:)32 b Fq(This)23
b(man)o(ual)f(describ)q(es)h(only)g(those)e(asp)q(ects)h(of)g(Lam)o(b)q
(daMOO)g(that)f(are)h(en)o(tirely)120 1827 y(indep)q(enden)o(t)g(of)c
(the)h(con)o(ten)o(ts)g(of)g(the)g(database.)31 b(It)19
b(do)q(es)h(not)e(describ)q(e,)k(for)c(example,)j(the)120
1879 y(commands)15 b(or)g(programming)f(in)o(terfaces)i(presen)o(t)f
(in)h(the)f(Lam)o(b)q(daCore)g(database.)p eop
%%Page: 2 4
2 3 bop 0 -58 a Fq(Chapter)15 b(2:)k(The)d(Lam)o(b)q(daMOO)g(Database)
1126 b(2)0 183 y Fm(2)41 b(The)15 b(Lam)n(b)r(daMOO)f(Database)62
285 y Fq(In)k(this)g(c)o(hapter,)f(I)h(b)q(egin)g(b)o(y)f(describing)j
(in)e(detail)g(the)f(v)m(arious)h(kinds)g(of)f(data)g(that)f(can)i(app)
q(ear)f(in)h(a)0 339 y(Lam)o(b)q(daMOO)i(database)e(and)i(that,)f
(therefore,)g(MOO)g(programs)f(can)i(manipulate.)32 b(In)20
b(a)f(few)g(places,)i(I)0 393 y(refer)c(to)g(the)h Fl(Lam)o(b)q(daCore)
h Fq(database.)26 b(This)18 b(is)g(one)g(particular)g(Lam)o(b)q(daMOO)g
(database,)f(created)g(ev)o(ery)0 447 y(so)e(often)g(b)o(y)g
(extracting)g(the)g(\\core")g(of)f(the)i(curren)o(t)f(database)f(for)h
(the)g(original)i(Lam)o(b)q(daMOO.)120 507 y Fk(Note)p
Fq(:)29 b(The)20 b(original)h(Lam)o(b)q(daMOO)g(resides)g(on)e(the)i
(host)e Fn(lambda.parc.xerox.com)e Fq(\(the)120 559 y(n)o(umeric)23
b(address)f(for)g(whic)o(h)h(is)g Fn(192.216.54.2)p Fq(\),)e(on)i(p)q
(ort)e(8888.)40 b(F)l(eel)23 b(free)g(to)e(drop)h(b)o(y!)120
611 y(A)e(cop)o(y)f(of)g(the)h(most)e(recen)o(t)i(release)g(of)f(the)h
(Lam)o(b)q(daCore)f(database)g(can)h(b)q(e)g(obtained)g(b)o(y)120
663 y(anon)o(ymous)15 b(FTP)f(from)h(host)f Fn(ftp.parc.xerox.com)f
Fq(in)j(the)f(directory)h Fn(pub/MOO)p Fq(.)0 802 y Fp(2.1)33
b(MOO)13 b(V)-6 b(alue)16 b(T)n(yp)r(es)62 893 y Fq(There)g(are)f(only)
g(a)g(few)g(kinds)h(of)f(v)m(alues)i(that)d(MOO)i(programs)e(can)h
(manipulate:)37 955 y Fo(\017)30 b Fq(in)o(tegers)15
b(\(in)h(a)f(sp)q(eci\014c,)i(large)e(range\))37 1019
y Fo(\017)30 b Fq(real)16 b(n)o(um)o(b)q(ers)f(\(represen)o(ted)g(with)
h(\015oating-p)q(oin)o(t)g(n)o(um)o(b)q(ers\))37 1083
y Fo(\017)30 b Fq(strings)15 b(\(of)g(c)o(haracters\))37
1147 y Fo(\017)30 b Fq(ob)s(jects)15 b(\(in)g(the)h(virtual)f(realit)o
(y\))37 1211 y Fo(\017)30 b Fq(errors)14 b(\(arising)i(during)g
(program)e(execution\))37 1275 y Fo(\017)30 b Fq(lists)16
b(\(of)e(all)j(of)d(the)i(ab)q(o)o(v)o(e,)e(including)k(lists\))62
1347 y(MOO)d(supp)q(orts)e(the)h(in)o(tegers)h(from)e
Fo(\000)p Fq(2)p Fn(^)p Fq(31)g(\(that)g(is,)h(negativ)o(e)g(t)o(w)o(o)
f(to)g(the)h(p)q(o)o(w)o(er)g(of)f(31\))g(up)h(to)g(2)p
Fn(^)p Fq(31)f Fo(\000)0 1401 y Fq(1)h(\(one)f(less)i(than)f(t)o(w)o(o)
e(to)i(the)g(p)q(o)o(w)o(er)f(of)g(31\);)g(that's)g(from)g
Fo(\000)p Fq(2147483648)f(to)h(2147483647,)e(enough)j(for)g(most)0
1455 y(purp)q(oses.)30 b(In)18 b(MOO)h(programs,)e(in)o(tegers)i(are)f
(written)g(just)g(as)g(y)o(ou)g(see)g(them)g(here,)h(an)g(optional)f
(min)o(us)0 1509 y(sign)e(follo)o(w)o(ed)g(b)o(y)f(a)g(non-empt)o(y)h
(sequence)g(of)f(decimal)i(digits.)22 b(In)16 b(particular,)g(y)o(ou)f
(ma)o(y)f(not)h(put)h(commas,)0 1563 y(p)q(erio)q(ds,)f(or)f(spaces)h
(in)g(the)f(middle)i(of)e(large)h(in)o(tegers,)f(as)g(w)o(e)g
(sometimes)g(do)h(in)g(English)g(and)g(other)f(natural)0
1617 y(languages)h(\(e.g.,)f(`2,147,483,6)o(47')o(\).)62
1678 y(Real)j(n)o(um)o(b)q(ers)e(in)h(MOO)g(are)f(represen)o(ted)g(as)g
(they)h(are)f(in)h(almost)e(all)j(other)e(programming)f(languages,)0
1732 y(using)h(so-called)h Fl(\015oating-p)q(oin)o(t)g
Fq(n)o(um)o(b)q(ers.)k(These)14 b(ha)o(v)o(e)g(certain)h(\(large\))f
(limits)i(on)e(size)h(and)g(precision)h(that)0 1786 y(mak)o(e)i(them)h
(useful)h(for)e(a)g(wide)h(range)g(of)f(applications.)32
b(Floating-p)q(oin)o(t)19 b(n)o(um)o(b)q(ers)g(are)f(written)h(with)g
(an)0 1840 y(optional)e(min)o(us)h(sign)f(follo)o(w)o(ed)g(b)o(y)g(a)g
(non-empt)o(y)g(sequence)h(of)e(digits)i(punctuated)f(at)f(some)h(p)q
(oin)o(t)g(with)g(a)0 1894 y(decimal)f(p)q(oin)o(t)f(\(`.'\))k(and/or)
14 b(follo)o(w)o(ed)h(b)o(y)f(a)h(scien)o(ti\014c-notation)h(mark)o(er)
e(\(the)g(letter)h(`E')f(or)g(`e')g(follo)o(w)o(ed)h(b)o(y)0
1948 y(an)g(optional)h(sign)g(and)f(one)g(or)g(more)g(digits\).)20
b(Here)c(are)e(some)h(examples)h(of)f(\015oating-p)q(oin)o(t)h(n)o(um)o
(b)q(ers:)120 2008 y Fn(325.0)71 b(325.)g(3.25e2)g(0.325E3)f(325.E1)h
(.0325e+4)g(32500e-2)0 2070 y Fq(All)22 b(of)f(these)g(examples)h(mean)
f(the)g(same)g(n)o(um)o(b)q(er.)38 b(The)21 b(third)h(of)f(these,)h(as)
f(an)g(example)h(of)e(scien)o(ti\014c)0 2124 y(notation,)14
b(should)j(b)q(e)f(read)f(\\3.25)e(times)j(10)e(to)h(the)g(p)q(o)o(w)o
(er)g(of)g(2".)120 2183 y Fl(Fine)j(p)q(oin)o(ts:)26
b Fq(The)18 b(MOO)f(represen)o(ts)h(\015oating-p)q(oin)o(t)g(n)o(um)o
(b)q(ers)g(using)g(the)g(lo)q(cal)g(meaning)g(of)120
2235 y(the)k(C-language)h Fn(double)e Fq(t)o(yp)q(e,)j(whic)o(h)f(is)f
(almost)g(alw)o(a)o(ys)f(equiv)m(alen)o(t)j(to)e(IEEE)g(754)g(dou-)120
2287 y(ble)g(precision)g(\015oating)f(p)q(oin)o(t.)37
b(If)21 b(so,)h(then)f(the)g(smallest)g(p)q(ositiv)o(e)h(\015oating-p)q
(oin)o(t)g(n)o(um)o(b)q(er)120 2339 y(is)17 b(no)f(larger)g(than)g
Fn(2.2250738585072014e-308)d Fq(and)j(the)g(largest)g(\015oating-p)q
(oin)o(t)h(n)o(um)o(b)q(er)f(is)120 2391 y Fn(1.7976931348623157e+308)p
Fq(.)120 2451 y(IEEE)g(in\014nities)i(and)f(NaN)e(v)m(alues)i(are)f
(not)g(allo)o(w)o(ed)g(in)h(MOO.)f(The)g(error)f Fn(E_FLOAT)g
Fq(is)h(raised)120 2502 y(whenev)o(er)c(an)g(in\014nit)o(y)h(w)o(ould)f
(otherwise)g(b)q(e)g(computed;)h Fn(E_INVARG)e Fq(is)h(raised)g(whenev)
o(er)h(a)e(NaN)120 2554 y(w)o(ould)16 b(otherwise)f(arise.)20
b(The)c(v)m(alue)g Fn(0.0)f Fq(is)g(alw)o(a)o(ys)g(returned)g(on)h
(under\015o)o(w.)62 2616 y(Character)i Fl(strings)j Fq(are)d
(arbitrarily-long)i(sequences)f(of)g(normal,)g(ASCI)q(I)h(prin)o(ting)f
(c)o(haracters.)30 b(When)0 2670 y(written)15 b(as)g(v)m(alues)h(in)g
(a)f(program,)f(strings)h(are)g(enclosed)i(in)f(double-quotes,)g(lik)o
(e)g(this:)p eop
%%Page: 3 5
3 4 bop 0 -58 a Fq(Chapter)15 b(2:)k(The)d(Lam)o(b)q(daMOO)g(Database)
1126 b(3)120 183 y Fn("This)23 b(is)h(a)f(character)g(string.")0
251 y Fq(T)l(o)15 b(include)i(a)e(double-quote)i(in)f(the)f(string,)g
(precede)h(it)g(with)f(a)g(bac)o(kslash)h(\(`)p Fn(\\)p
Fq('\),)d(lik)o(e)j(this:)120 316 y Fn("His)23 b(name)h(was)f
(\\"Leroy\\",)g(but)g(nobody)g(ever)g(called)g(him)h(that.")0
384 y Fq(Finally)l(,)17 b(to)d(include)k(a)d(bac)o(kslash)g(in)h(a)f
(string,)g(double)h(it:)120 449 y Fn("Some)23 b(people)g(use)h
(backslash)e(\('\\\\'\))h(to)h(mean)f(set)h(difference.")0
516 y Fq(MOO)12 b(strings)h(ma)o(y)e(not)h(include)i(sp)q(ecial)g(ASCI)
q(I)g(c)o(haracters)d(lik)o(e)i(carriage-return,)g(line-feed,)h(b)q
(ell,)h(etc.)k(The)0 570 y(only)d(non-prin)o(ting)g(c)o(haracters)f
(allo)o(w)o(ed)g(are)g(spaces)h(and)f(tabs.)120 636 y
Fl(Fine)i(p)q(oin)o(t:)23 b Fq(There)17 b(is)g(a)f(sp)q(ecial)i(kind)g
(of)e(string)g(used)h(for)f(represen)o(ting)h(the)f(arbitrary)g(b)o
(ytes)120 688 y(used)j(in)g(general,)g(binary)f(input)h(and)g(output.)
28 b(In)19 b(a)f Fl(binary)g(string)p Fq(,)h(an)o(y)f(b)o(yte)f(that)h
(isn't)g(an)120 740 y(ASCI)q(I)g(prin)o(ting)h(c)o(haracter)d(or)h(the)
g(space)g(c)o(haracter)g(is)h(represen)o(ted)f(as)g(the)g(three-c)o
(haracter)120 792 y(substring)k Fn("~)p Fq(XX)p Fn(")p
Fq(,)h(where)g(XX)f(is)h(the)f(hexadecimal)h(represen)o(tation)g(of)e
(the)h(b)o(yte;)j(the)d(in-)120 843 y(put)c(c)o(haracter)g(`)p
Fn(~)p Fq(')g(is)g(represen)o(ted)h(b)o(y)g(the)f(three-c)o(haracter)g
(substring)h Fn("~)p Fq(7E)p Fn(")p Fq(.)25 b(This)18
b(sp)q(ecial)120 895 y(represen)o(tation)f(is)h(used)g(b)o(y)f(the)g
(functions)h Fn(encode_binary\(\))d Fq(and)j Fn(decode_binary\(\))d
Fq(and)120 947 y(b)o(y)k(the)g(functions)g Fn(notify\(\))f
Fq(and)h Fn(read\(\))f Fq(with)h(net)o(w)o(ork)e(connections)j(that)e
(are)h(in)g(binary)120 999 y(mo)q(de.)h(See)15 b(the)f(descriptions)i
(of)e(the)h Fn(set_connection_option\(\))p Fq(,)c Fn(encode_binary\(\))
p Fq(,)h(and)120 1051 y Fn(decode_binary\(\))h Fq(functions)j(for)f
(more)f(details.)62 1118 y Fl(Ob)s(jects)i Fq(are)d(the)g(bac)o(kb)q
(one)h(of)f(the)g(MOO)h(database)f(and,)h(as)f(suc)o(h,)g(deserv)o(e)h
(a)f(great)g(deal)h(of)f(discussion;)0 1172 y(the)18
b(en)o(tire)g(next)g(section)g(is)h(dev)o(oted)e(to)h(them.)27
b(F)l(or)17 b(no)o(w,)h(let)g(it)g(su\016ce)g(to)g(sa)o(y)f(that)g(ev)o
(ery)g(ob)s(ject)h(has)f(a)0 1226 y(n)o(um)o(b)q(er,)d(unique)i(to)d
(that)h(ob)s(ject.)k(In)d(programs,)e(w)o(e)h(write)g(a)f(reference)i
(to)f(a)f(particular)i(ob)s(ject)f(b)o(y)g(putting)0
1280 y(a)h(hash)g(mark)g(\(`)p Fn(#)p Fq('\))e(follo)o(w)o(ed)j(b)o(y)f
(the)g(n)o(um)o(b)q(er,)g(lik)o(e)i(this:)120 1346 y
Fn(#495)0 1413 y Fq(Ob)s(ject)e(n)o(um)o(b)q(ers)h(are)f(alw)o(a)o(ys)f
(in)o(tegers.)62 1481 y(There)e(are)g(three)f(sp)q(ecial)j(ob)s(ject)d
(n)o(um)o(b)q(ers)h(used)g(for)g(a)f(v)m(ariet)o(y)h(of)f(purp)q(oses:)
19 b Fn(#-1)p Fq(,)11 b Fn(#-2)p Fq(,)h(and)g Fn(#-3)p
Fq(,)g(usually)0 1535 y(referred)19 b(to)f(in)i(the)f(Lam)o(b)q(daCore)
g(database)f(as)h Fn($nothing)p Fq(,)f Fn($ambiguous_match)p
Fq(,)f(and)i Fn($failed_match)p Fq(,)0 1589 y(resp)q(ectiv)o(ely)l(.)62
1656 y Fl(Errors)14 b Fq(are,)e(b)o(y)h(far,)f(the)h(least)g(frequen)o
(tly)g(used)g(v)m(alues)h(in)f(MOO.)g(In)g(the)g(normal)g(case,)g(when)
g(a)f(program)0 1710 y(attempts)h(an)h(op)q(eration)g(that)f(is)h
(erroneous)g(for)f(some)h(reason)f(\(for)g(example,)i(trying)f(to)f
(add)h(a)g(n)o(um)o(b)q(er)g(to)f(a)0 1764 y(c)o(haracter)h(string\),)f
(the)i(serv)o(er)f(stops)f(running)j(the)e(program)f(and)i(prin)o(ts)f
(out)g(an)h(error)e(message.)19 b(Ho)o(w)o(ev)o(er,)0
1818 y(it)g(is)f(p)q(ossible)j(for)c(a)h(program)g(to)f(stipulate)j
(that)d(suc)o(h)i(errors)f(should)h(not)f(stop)g(execution;)i(instead,)
g(the)0 1872 y(serv)o(er)15 b(should)i(just)f(let)g(the)g(v)m(alue)h
(of)e(the)h(op)q(eration)g(b)q(e)h(an)e(error)h(v)m(alue.)23
b(The)16 b(program)e(can)i(then)g(test)g(for)0 1926 y(suc)o(h)k(a)f
(result)h(and)f(tak)o(e)g(some)g(appropriate)g(kind)i(of)e(reco)o(v)o
(ery)g(action.)32 b(In)20 b(programs,)f(error)g(v)m(alues)h(are)0
1980 y(written)14 b(as)f(w)o(ords)g(b)q(eginning)j(with)e(`)p
Fn(E_)p Fq('.)k(The)c(complete)h(list)f(of)g(error)f(v)m(alues,)i
(along)e(with)h(their)h(asso)q(ciated)0 2034 y(messages,)f(is)i(as)f
(follo)o(ws:)120 2099 y Fn(E_NONE)142 b Fq(No)15 b(error)120
2151 y Fn(E_TYPE)142 b Fq(T)o(yp)q(e)16 b(mismatc)o(h)120
2203 y Fn(E_DIV)166 b Fq(Division)17 b(b)o(y)e(zero)120
2255 y Fn(E_PERM)142 b Fq(P)o(ermission)16 b(denied)120
2307 y Fn(E_PROPNF)94 b Fq(Prop)q(ert)o(y)15 b(not)g(found)120
2359 y Fn(E_VERBNF)94 b Fq(V)l(erb)16 b(not)f(found)120
2411 y Fn(E_VARNF)118 b Fq(V)l(ariable)17 b(not)e(found)120
2462 y Fn(E_INVIND)94 b Fq(In)o(v)m(alid)18 b(indirection)120
2514 y Fn(E_RECMOVE)70 b Fq(Recursiv)o(e)17 b(mo)o(v)o(e)120
2566 y Fn(E_MAXREC)94 b Fq(T)l(o)q(o)15 b(man)o(y)g(v)o(erb)g(calls)120
2618 y Fn(E_RANGE)118 b Fq(Range)16 b(error)120 2670
y Fn(E_ARGS)142 b Fq(Incorrect)16 b(n)o(um)o(b)q(er)f(of)g(argumen)o
(ts)p eop
%%Page: 4 6
4 5 bop 0 -58 a Fq(Chapter)15 b(2:)k(The)d(Lam)o(b)q(daMOO)g(Database)
1126 b(4)120 183 y Fn(E_NACC)142 b Fq(Mo)o(v)o(e)15 b(refused)g(b)o(y)g
(destination)120 235 y Fn(E_INVARG)94 b Fq(In)o(v)m(alid)18
b(argumen)o(t)120 287 y Fn(E_QUOTA)118 b Fq(Resource)16
b(limit)h(exceeded)120 339 y Fn(E_FLOAT)118 b Fq(Floating-p)q(oin)o(t)
16 b(arithmetic)g(error)62 404 y(The)f(\014nal)g(kind)g(of)e(v)m(alue)j
(in)f(MOO)f(programs)f(is)i Fl(lists)p Fq(.)20 b(A)14
b(list)h(is)g(a)e(sequence)j(of)d(arbitrary)h(MOO)g(v)m(alues,)0
458 y(p)q(ossibly)g(including)i(other)c(lists.)20 b(In)13
b(programs,)f(lists)h(are)g(written)g(in)g(mathematical)g(set)f
(notation)h(with)g(eac)o(h)0 512 y(of)h(the)h(elemen)o(ts)h(written)e
(out)h(in)g(order,)g(separated)f(b)o(y)h(commas,)f(the)h(whole)g
(enclosed)h(in)g(curly)f(braces)g(\(`)p Fn({)p Fq(')0
566 y(and)g(`)p Fn(})p Fq('\).)k(F)l(or)c(example,)g(a)g(list)h(of)f
(the)g(names)g(of)g(the)g(da)o(ys)g(of)g(the)g(w)o(eek)g(is)h(written)f
(lik)o(e)i(this:)120 629 y Fn({"Sunday",)22 b("Monday",)h("Tuesday",)g
("Wednesday",)144 681 y("Thursday",)f("Friday",)h("Saturday"})0
746 y Fq(Note)12 b(that)g(it)h(do)q(esn't)f(matter)f(that)h(w)o(e)g
(put)h(a)f(line-break)i(in)g(the)e(middle)i(of)e(the)h(list.)20
b(This)13 b(is)g(true)f(in)h(general)0 800 y(in)19 b(MOO:)g(an)o
(ywhere)f(that)f(a)h(space)h(can)g(go,)f(a)g(line-break)i(can)e(go,)h
(with)f(the)h(same)f(meaning.)30 b(The)18 b(only)0 854
y(exception)e(is)g(inside)h(c)o(haracter)e(strings,)f(where)i
(line-breaks)h(are)d(not)h(allo)o(w)o(ed.)0 1004 y Fp(2.2)33
b(Ob)t(jects)13 b(in)j(the)g(MOO)e(Database)62 1098 y
Fq(Ob)s(jects)i(are,)e(in)i(a)f(sense,)h(the)f(whole)h(p)q(oin)o(t)g
(of)f(the)g(MOO)h(programming)f(language.)20 b(They)c(are)f(used)h(to)0
1152 y(represen)o(t)c(ob)s(jects)g(in)h(the)f(virtual)h(realit)o(y)l(,)
g(lik)o(e)g(p)q(eople,)h(ro)q(oms,)e(exits,)g(and)h(other)f(concrete)g
(things.)19 b(Because)0 1206 y(of)14 b(this,)h(MOO)g(mak)o(es)f(a)g
(bigger)h(deal)g(out)f(of)g(creating)h(ob)s(jects)f(than)g(it)h(do)q
(es)g(for)f(other)g(kinds)h(of)f(v)m(alue,)i(lik)o(e)0
1260 y(in)o(tegers.)62 1325 y(Num)o(b)q(ers)k(alw)o(a)o(ys)e(exist,)j
(in)f(a)f(sense;)i(y)o(ou)e(ha)o(v)o(e)g(only)g(to)g(write)g(them)g(do)
o(wn)g(in)h(order)f(to)g(op)q(erate)g(on)0 1379 y(them.)h(With)14
b(ob)s(jects,)f(it)i(is)g(di\013eren)o(t.)20 b(The)14
b(ob)s(ject)g(with)g(n)o(um)o(b)q(er)h(`)p Fn(#958)p
Fq(')e(do)q(es)i(not)e(exist)i(just)f(b)q(ecause)h(y)o(ou)0
1433 y(write)g(do)o(wn)g(its)h(n)o(um)o(b)q(er.)k(An)15
b(explicit)j(op)q(eration,)d(the)g(`)p Fn(create\(\))p
Fq(')e(function)j(describ)q(ed)h(later,)e(is)h(required)0
1487 y(to)e(bring)h(an)g(ob)s(ject)f(in)o(to)g(existence.)21
b(Symmetrically)l(,)16 b(once)f(created,)f(ob)s(jects)g(con)o(tin)o(ue)
h(to)f(exist)h(un)o(til)h(they)0 1541 y(are)f(explicitly)j(destro)o(y)o
(ed)d(b)o(y)g(the)g(`)p Fn(recycle\(\))p Fq(')e(function)j(\(also)f
(describ)q(ed)i(later\).)62 1606 y(The)c(iden)o(tifying)h(n)o(um)o(b)q
(er)f(asso)q(ciated)f(with)h(an)f(ob)s(ject)g(is)h(unique)h(to)e(that)f
(ob)s(ject.)19 b(It)12 b(w)o(as)g(assigned)g(when)0 1660
y(the)j(ob)s(ject)f(w)o(as)g(created)h(and)g(will)h(nev)o(er)f(b)q(e)g
(reused,)g(ev)o(en)g(if)h(the)e(ob)s(ject)h(is)g(destro)o(y)o(ed.)k(Th)
o(us,)c(if)g(w)o(e)f(create)0 1714 y(an)19 b(ob)s(ject)f(and)i(it)f(is)
h(assigned)f(the)g(n)o(um)o(b)q(er)h(`)p Fn(#1076)p Fq(',)e(the)h(next)
g(ob)s(ject)g(to)f(b)q(e)i(created)f(will)i(b)q(e)e(assigned)0
1768 y(`)p Fn(#1077)p Fq(',)13 b(ev)o(en)j(if)g(`)p Fn(#1076)p
Fq(')d(is)j(destro)o(y)o(ed)f(in)h(the)f(mean)o(time.)62
1834 y(Ev)o(ery)i(ob)s(ject)g(is)g(made)h(up)f(of)g(three)g(kinds)h(of)
f(pieces)i(that)d(together)h(de\014ne)h(its)f(b)q(eha)o(vior:)25
b Fl(attributes)p Fq(,)0 1888 y Fl(prop)q(erties)p Fq(,)16
b(and)f Fl(v)o(erbs)p Fq(.)0 2021 y Fj(2.2.1)30 b(F)-5
b(undamen)n(tal)15 b(Ob)s(ject)g(A)n(ttributes)62 2115
y Fq(There)h(are)f(three)g(fundamen)o(tal)h Fl(attributes)g
Fq(to)f(ev)o(ery)g(ob)s(ject:)25 2180 y(1.)29 b(A)15
b(\015ag)g(\(either)h(true)f(or)f(false\))i(sp)q(ecifying)h(whether)e
(or)g(not)g(the)g(ob)s(ject)g(represen)o(ts)g(a)g(pla)o(y)o(er,)25
2246 y(2.)29 b(The)15 b(ob)s(ject)g(that)g(is)g(its)h
Fl(paren)o(t)p Fq(,)e(and)25 2312 y(3.)29 b(A)17 b(list)g(of)g(the)g
(ob)s(jects)f(that)g(are)g(its)h Fl(c)o(hildren)p Fq(;)i(that)d(is,)h
(those)g(ob)s(jects)f(for)g(whic)o(h)i(this)f(ob)s(ject)f(is)h(their)90
2366 y(paren)o(t.)62 2443 y(The)g(act)e(of)h(creating)g(a)g(c)o
(haracter)f(sets)h(the)g(pla)o(y)o(er)g(attribute)g(of)g(an)g(ob)s
(ject)f(and)i(only)f(a)g(wizard)h(\(using)0 2497 y(the)d(function)g
Fn(set_player_flag\(\))p Fq(\))e(can)i(c)o(hange)f(that)g(setting.)20
b(Only)15 b(c)o(haracters)e(ha)o(v)o(e)g(the)h(pla)o(y)o(er)g(bit)g
(set)0 2551 y(to)h(1.)62 2616 y(The)i(paren)o(t/c)o(hild)g(hierarc)o(h)
o(y)g(is)f(used)h(for)f(classifying)h(ob)s(jects)f(in)o(to)g(general)h
(classes)g(and)f(then)h(sharing)0 2670 y(b)q(eha)o(vior)i(among)f(all)h
(mem)o(b)q(ers)g(of)f(that)g(class.)30 b(F)l(or)18 b(example,)i(the)e
(Lam)o(b)q(daCore)g(database)g(con)o(tains)h(an)p eop
%%Page: 5 7
5 6 bop 0 -58 a Fq(Chapter)15 b(2:)k(The)d(Lam)o(b)q(daMOO)g(Database)
1126 b(5)0 183 y(ob)s(ject)19 b(represen)o(ting)g(a)g(sort)f(of)h
(\\generic")h(ro)q(om.)31 b(All)20 b(other)f(ro)q(oms)f(are)h
Fl(descendan)o(ts)j Fq(\(i.e.,)d(c)o(hildren)i(or)0 237
y(c)o(hildren's)c(c)o(hildren,)g(or)e Fi(:)8 b(:)g(:)n
Fq(\))15 b(of)g(that)g(one.)21 b(The)16 b(generic)h(ro)q(om)e
(de\014nes)h(those)f(pieces)i(of)e(b)q(eha)o(vior)h(that)f(are)0
291 y(common)g(to)h(all)g(ro)q(oms;)f(other)h(ro)q(oms)f(sp)q(ecialize)
k(that)c(b)q(eha)o(vior)h(for)f(their)i(o)o(wn)e(purp)q(oses.)22
b(The)16 b(notion)g(of)0 345 y(classes)j(and)h(sp)q(ecialization)h(is)f
(the)f(v)o(ery)f(essence)i(of)f(what)f(is)i(mean)o(t)e(b)o(y)h
Fl(ob)s(ject-orien)o(ted)i Fq(programming.)0 399 y(Only)13
b(the)g(functions)g Fn(create\(\))p Fq(,)e Fn(recycle\(\))p
Fq(,)g Fn(chparent\(\))p Fq(,)g(and)h Fn(renumber\(\))f
Fq(can)h(c)o(hange)h(the)f(paren)o(t)g(and)0 453 y(c)o(hildren)17
b(attributes.)0 621 y Fj(2.2.2)30 b(Prop)r(erties)15
b(on)g(Ob)s(jects)62 723 y Fq(A)f Fl(prop)q(ert)o(y)k
Fq(is)c(a)f(named)i(\\slot")e(in)h(an)g(ob)s(ject)f(that)h(can)g(hold)g
(an)g(arbitrary)f(MOO)h(v)m(alue.)21 b(Ev)o(ery)14 b(ob)s(ject)0
777 y(has)g(eigh)o(t)g(built-in)i(prop)q(erties)e(whose)g(v)m(alues)h
(are)e(constrained)h(to)f(b)q(e)i(of)e(particular)i(t)o(yp)q(es.)k(In)
14 b(addition,)h(an)0 831 y(ob)s(ject)f(can)g(ha)o(v)o(e)g(an)o(y)h(n)o
(um)o(b)q(er)f(of)g(other)g(prop)q(erties,)h(none)g(of)f(whic)o(h)h(ha)
o(v)o(e)f(t)o(yp)q(e)h(constrain)o(ts.)k(The)c(built-in)0
885 y(prop)q(erties)h(are)f(as)g(follo)o(ws:)120 955
y Fn(name)214 b Fq(a)15 b(string,)g(the)g(usual)h(name)f(for)g(this)h
(ob)s(ject)120 1007 y Fn(owner)190 b Fq(an)15 b(ob)s(ject,)g(the)g(pla)
o(y)o(er)g(who)g(con)o(trols)g(access)g(to)g(it)120 1059
y Fn(location)118 b Fq(an)15 b(ob)s(ject,)g(where)g(the)g(ob)s(ject)g
(is)h(in)g(virtual)g(realit)o(y)120 1111 y Fn(contents)118
b Fq(a)15 b(list)h(of)f(ob)s(jects,)f(the)h(in)o(v)o(erse)h(of)f(`)p
Fn(location)p Fq(')120 1163 y Fn(programmer)70 b Fq(a)15
b(bit,)g(do)q(es)h(the)f(ob)s(ject)g(ha)o(v)o(e)g(programmer)f(righ)o
(ts?)120 1215 y Fn(wizard)166 b Fq(a)15 b(bit,)g(do)q(es)h(the)f(ob)s
(ject)g(ha)o(v)o(e)g(wizard)g(righ)o(ts?)120 1267 y Fn(r)286
b Fq(a)15 b(bit,)g(is)h(the)f(ob)s(ject)g(publicly)j(readable?)120
1319 y Fn(w)286 b Fq(a)15 b(bit,)g(is)h(the)f(ob)s(ject)g(publicly)j
(writable?)120 1371 y Fn(f)286 b Fq(a)15 b(bit,)g(is)h(the)f(ob)s(ject)
g(fertile?)62 1443 y(The)i(`)p Fn(name)p Fq(')f(prop)q(ert)o(y)g(is)i
(used)f(to)g(iden)o(tify)h(the)f(ob)s(ject)f(in)i(v)m(arious)f(prin)o
(ted)h(messages.)24 b(It)17 b(can)g(only)g(b)q(e)0 1497
y(set)e(b)o(y)g(a)g(wizard)h(or)f(b)o(y)g(the)g(o)o(wner)g(of)g(the)g
(ob)s(ject.)20 b(F)l(or)14 b(pla)o(y)o(er)i(ob)s(jects,)e(the)h(`)p
Fn(name)p Fq(')f(prop)q(ert)o(y)h(can)g(only)h(b)q(e)0
1551 y(set)g(b)o(y)g(a)g(wizard;)h(this)f(allo)o(ws)h(the)f(wizards,)g
(for)g(example,)h(to)e(c)o(hec)o(k)i(that)e(no)h(t)o(w)o(o)f(pla)o(y)o
(ers)h(ha)o(v)o(e)g(the)g(same)0 1605 y(name.)62 1678
y(The)c(`)p Fn(owner)p Fq(')d(iden)o(ti\014es)k(the)f(ob)s(ject)e(that)
h(has)g(o)o(wner)f(righ)o(ts)h(to)g(this)g(ob)s(ject,)g(allo)o(wing)h
(them,)g(for)e(example,)0 1732 y(to)15 b(c)o(hange)g(the)g(`)p
Fn(name)p Fq(')f(prop)q(ert)o(y)l(.)20 b(Only)c(a)f(wizard)h(can)f(c)o
(hange)g(the)g(v)m(alue)i(of)e(this)g(prop)q(ert)o(y)l(.)62
1804 y(The)20 b(`)p Fn(location)p Fq(')e(and)h(`)p Fn(contents)p
Fq(')f(prop)q(erties)i(describ)q(e)h(a)e(hierarc)o(h)o(y)h(of)f(ob)s
(ject)g(con)o(tainmen)o(t)h(in)g(the)0 1858 y(virtual)f(realit)o(y)l(.)
28 b(Most)17 b(ob)s(jects)g(are)h(lo)q(cated)g(\\inside")h(some)f
(other)f(ob)s(ject)h(and)g(that)f(other)g(ob)s(ject)g(is)i(the)0
1912 y(v)m(alue)e(of)d(the)i(`)p Fn(location)p Fq(')d(prop)q(ert)o(y)l
(.)20 b(The)c(`)p Fn(contents)p Fq(')d(prop)q(ert)o(y)i(is)h(a)f(list)h
(of)f(those)g(ob)s(jects)g(for)f(whic)o(h)j(this)0 1966
y(ob)s(ject)e(is)i(their)f(lo)q(cation.)23 b(In)16 b(order)g(to)f(main)
o(tain)i(the)f(consistency)g(of)g(these)g(prop)q(erties,)g(only)h(the)f
Fn(move\(\))0 2020 y Fq(function)g(is)g(able)g(to)e(c)o(hange)i(them.)
62 2093 y(The)23 b(`)p Fn(wizard)p Fq(')e(and)i(`)p Fn(programmer)p
Fq(')d(bits)j(are)f(only)h(applicable)i(to)d(c)o(haracters,)h(ob)s
(jects)f(represen)o(ting)0 2147 y(pla)o(y)o(ers.)e(They)c(con)o(trol)f
(p)q(ermission)i(to)d(use)i(certain)g(facilities)h(in)f(the)g(serv)o
(er.)k(They)15 b(ma)o(y)g(only)h(b)q(e)g(set)f(b)o(y)g(a)0
2201 y(wizard.)62 2274 y(The)k(`)p Fn(r)p Fq(')f(bit)i(con)o(trols)e
(whether)h(or)g(not)f(pla)o(y)o(ers)h(other)g(than)g(the)g(o)o(wner)f
(of)g(this)i(ob)s(ject)e(can)h(obtain)g(a)0 2328 y(list)h(of)f(the)h
(prop)q(erties)g(or)f(v)o(erbs)h(in)g(the)g(ob)s(ject.)32
b(Symmetrically)l(,)22 b(the)e(`)p Fn(w)p Fq(')e(bit)i(con)o(trols)g
(whether)f(or)g(not)0 2381 y(non-o)o(wners)c(can)g(add)g(or)f(delete)i
(prop)q(erties)f(and/or)g(v)o(erbs)f(on)h(this)g(ob)s(ject.)k(The)c(`)p
Fn(r)p Fq(')f(and)h(`)p Fn(w)p Fq(')f(bits)h(can)g(only)0
2435 y(b)q(e)h(set)f(b)o(y)g(a)g(wizard)g(or)g(b)o(y)g(the)h(o)o(wner)e
(of)h(the)g(ob)s(ject.)62 2508 y(The)h(`)p Fn(f)p Fq(')f(bit)h(sp)q
(eci\014es)h(whether)f(or)f(not)g(this)h(ob)s(ject)f(is)h
Fl(fertile)p Fq(,)g(whether)g(or)f(not)g(pla)o(y)o(ers)g(other)g(than)h
(the)0 2562 y(o)o(wner)g(of)h(this)g(ob)s(ject)g(can)g(create)f(new)h
(ob)s(jects)g(with)g(this)g(one)g(as)g(the)g(paren)o(t.)24
b(It)17 b(also)g(con)o(trols)g(whether)0 2616 y(or)f(not)g(non-o)o
(wners)g(can)h(use)f(the)h Fn(chparent\(\))e Fq(built-in)k(function)e
(to)f(mak)o(e)g(this)h(ob)s(ject)e(the)i(paren)o(t)f(of)g(an)0
2670 y(existing)g(ob)s(ject.)j(The)d(`)p Fn(f)p Fq(')e(bit)i(can)f
(only)h(b)q(e)g(set)f(b)o(y)g(a)g(wizard)g(or)g(b)o(y)g(the)h(o)o(wner)
e(of)h(the)g(ob)s(ject.)p eop
%%Page: 6 8
6 7 bop 0 -58 a Fq(Chapter)15 b(2:)k(The)d(Lam)o(b)q(daMOO)g(Database)
1126 b(6)62 183 y(All)15 b(of)e(the)g(built-in)j(prop)q(erties)e(on)f
(an)o(y)g(ob)s(ject)g(can,)g(b)o(y)h(default,)g(b)q(e)g(read)f(b)o(y)g
(an)o(y)g(pla)o(y)o(er.)19 b(It)14 b(is)g(p)q(ossible,)0
237 y(ho)o(w)o(ev)o(er,)c(to)g(o)o(v)o(erride)g(this)h(b)q(eha)o(vior)g
(from)f(within)i(the)e(database,)h(making)f(an)o(y)g(of)g(these)h(prop)
q(erties)g(readable)0 291 y(only)16 b(b)o(y)f(wizards.)20
b(See)c(the)f(c)o(hapter)g(on)g(serv)o(er)g(assumptions)g(ab)q(out)h
(the)f(database)f(for)h(details.)62 358 y(As)j(men)o(tioned)g(ab)q(o)o
(v)o(e,)f(it)h(is)g(p)q(ossible,)h(and)f(v)o(ery)f(useful,)i(for)d(ob)s
(jects)h(to)g(ha)o(v)o(e)g(other)g(prop)q(erties)h(aside)0
412 y(from)c(the)i(built-in)h(ones.)j(These)c(can)f(come)g(from)g(t)o
(w)o(o)f(sources.)62 478 y(First,)g(an)g(ob)s(ject)f(has)h(a)g(prop)q
(ert)o(y)f(corresp)q(onding)i(to)f(ev)o(ery)g(prop)q(ert)o(y)f(in)i
(its)f(paren)o(t)g(ob)s(ject.)19 b(T)l(o)14 b(use)g(the)0
532 y(jargon)f(of)h(ob)s(ject-orien)o(ted)g(programming,)g(this)g(is)h
(a)f(kind)h(of)f Fl(inheritance)p Fq(.)21 b(If)15 b(some)f(ob)s(ject)f
(has)h(a)g(prop)q(ert)o(y)0 586 y(named)h(`)p Fn(foo)p
Fq(',)f(then)i(so)e(will)j(all)f(of)f(its)h(c)o(hildren)h(and)e(th)o
(us)g(its)g(c)o(hildren's)i(c)o(hildren,)g(and)e(so)g(on.)62
652 y(Second,)22 b(an)e(ob)s(ject)f(ma)o(y)h(ha)o(v)o(e)f(a)h(new)g
(prop)q(ert)o(y)g(de\014ned)h(only)g(on)f(itself)g(and)h(its)f
(descendan)o(ts.)35 b(F)l(or)0 706 y(example,)16 b(an)f(ob)s(ject)g
(represen)o(ting)h(a)f(ro)q(c)o(k)g(migh)o(t)g(ha)o(v)o(e)g(prop)q
(erties)h(indicating)h(its)f(w)o(eigh)o(t,)e(c)o(hemical)j(com-)0
760 y(p)q(osition,)d(and/or)f(p)q(oin)o(tiness,)h(dep)q(ending)h(up)q
(on)f(the)f(uses)g(to)g(whic)o(h)g(the)g(ro)q(c)o(k)g(w)o(as)f(to)h(b)q
(e)g(put)g(in)h(the)f(virtual)0 814 y(realit)o(y)l(.)62
881 y(Ev)o(ery)k(de\014ned)h(prop)q(ert)o(y)f(\(as)f(opp)q(osed)i(to)e
(those)h(that)g(are)f(built-in\))j(has)e(an)g(o)o(wner)g(and)g(a)g(set)
g(of)f(p)q(er-)0 935 y(missions)h(for)e(non-o)o(wners.)22
b(The)17 b(o)o(wner)e(of)h(the)g(prop)q(ert)o(y)f(can)i(get)e(and)h
(set)g(the)g(prop)q(ert)o(y's)f(v)m(alue)j(and)e(can)0
989 y(c)o(hange)f(the)h(non-o)o(wner)f(p)q(ermissions.)21
b(Only)16 b(a)f(wizard)h(can)f(c)o(hange)g(the)h(o)o(wner)e(of)h(a)g
(prop)q(ert)o(y)l(.)62 1055 y(The)i(initial)h(o)o(wner)e(of)g(a)h(prop)
q(ert)o(y)f(is)h(the)f(pla)o(y)o(er)h(who)f(added)h(it;)g(this)g(is)g
(usually)l(,)h(but)e(not)g(alw)o(a)o(ys,)g(the)0 1109
y(pla)o(y)o(er)f(who)g(o)o(wns)g(the)h(ob)s(ject)e(to)h(whic)o(h)h(the)
g(prop)q(ert)o(y)f(w)o(as)f(added.)21 b(This)16 b(is)g(b)q(ecause)g
(prop)q(erties)g(can)f(only)0 1163 y(b)q(e)e(added)f(b)o(y)g(the)g(ob)s
(ject)f(o)o(wner)h(or)f(a)h(wizard,)g(unless)h(the)f(ob)s(ject)g(is)g
(publicly)j(writable)d(\(i.e.,)g(its)g(`)p Fn(w)p Fq(')f(prop)q(ert)o
(y)0 1217 y(is)18 b(1\),)f(whic)o(h)h(is)g(rare.)26 b(Th)o(us,)18
b(the)g(o)o(wner)f(of)g(an)g(ob)s(ject)g(ma)o(y)g(not)g(necessarily)i
(b)q(e)f(the)f(o)o(wner)g(of)g(ev)o(ery)h(\(or)0 1271
y(ev)o(en)e(an)o(y\))e(prop)q(ert)o(y)h(on)g(that)g(ob)s(ject.)62
1337 y(The)i(p)q(ermissions)i(on)d(prop)q(erties)i(are)e(dra)o(wn)h
(from)f(this)h(set:)23 b(`)p Fn(r)p Fq(')16 b(\(read\),)g(`)p
Fn(w)p Fq(')g(\(write\),)g(and)h(`)p Fn(c)p Fq(')f(\(c)o(hange)0
1391 y(o)o(wnership)g(in)g(descendan)o(ts\).)21 b(Read)c(p)q(ermission)
g(lets)e(non-o)o(wners)h(get)f(the)g(v)m(alue)i(of)e(the)h(prop)q(ert)o
(y)f(and,)g(of)0 1445 y(course,)d(write)f(p)q(ermission)i(lets)e(them)h
(set)e(that)h(v)m(alue.)20 b(The)11 b(`)p Fn(c)p Fq(')g(p)q(ermission)h
(bit)g(is)g(a)f(little)h(more)f(complicated.)62 1512
y(Recall)18 b(that)e(ev)o(ery)g(ob)s(ject)f(has)h(all)h(of)f(the)g
(prop)q(erties)h(that)e(its)i(paren)o(t)e(do)q(es)i(and)f(p)q(erhaps)h
(some)f(more.)0 1566 y(Ordinarily)l(,)g(when)f(a)f(c)o(hild)i(ob)s
(ject)d(inherits)j(a)e(prop)q(ert)o(y)g(from)f(its)i(paren)o(t,)e(the)i
(o)o(wner)e(of)h(the)g(c)o(hild)i(b)q(ecomes)0 1620 y(the)f(o)o(wner)g
(of)g(that)f(prop)q(ert)o(y)l(.)20 b(This)c(is)f(b)q(ecause)i(the)e(`)p
Fn(c)p Fq(')f(p)q(ermission)j(bit)f(is)f(\\on")g(b)o(y)g(default.)20
b(If)c(the)f(`)p Fn(c)p Fq(')f(bit)0 1674 y(is)i(not)f(on,)f(then)i
(the)f(inherited)i(prop)q(ert)o(y)e(has)g(the)g(same)g(o)o(wner)g(in)h
(the)f(c)o(hild)i(as)e(it)g(do)q(es)h(in)g(the)f(paren)o(t.)62
1740 y(As)f(an)g(example)h(of)f(where)g(this)g(can)g(b)q(e)h(useful,)g
(the)f(Lam)o(b)q(daCore)g(database)f(ensures)i(that)e(ev)o(ery)h(pla)o
(y)o(er)0 1794 y(has)k(a)f(`)p Fn(password)p Fq(')f(prop)q(ert)o(y)i
(con)o(taining)h(the)f(encrypted)g(v)o(ersion)g(of)g(the)g(pla)o(y)o
(er's)f(connection)i(passw)o(ord.)0 1848 y(F)l(or)d(securit)o(y)i
(reasons,)e(w)o(e)h(don't)g(w)o(an)o(t)f(other)g(pla)o(y)o(ers)h(to)g
(b)q(e)g(able)h(to)f(see)g(ev)o(en)g(the)g(encrypted)h(v)o(ersion)f(of)
0 1902 y(the)g(passw)o(ord,)g(so)g(w)o(e)g(turn)g(o\013)f(the)h(`)p
Fn(r)p Fq(')g(p)q(ermission)h(bit.)27 b(T)l(o)17 b(ensure)h(that)e(the)
h(passw)o(ord)g(is)g(only)h(set)f(in)h(a)0 1956 y(consisten)o(t)e(w)o
(a)o(y)e(\(i.e.,)h(to)g(the)h(encrypted)g(v)o(ersion)g(of)f(a)g(pla)o
(y)o(er's)h(passw)o(ord\),)e(w)o(e)h(don't)g(w)o(an)o(t)f(to)h(let)h
(an)o(y)o(one)0 2010 y(but)i(a)g(wizard)h(c)o(hange)f(the)g(prop)q(ert)
o(y)l(.)29 b(Th)o(us,)19 b(in)g(the)f(paren)o(t)g(ob)s(ject)f(for)h
(all)h(pla)o(y)o(ers,)g(w)o(e)e(made)i(a)f(wizard)0 2064
y(the)i(o)o(wner)g(of)g(the)g(passw)o(ord)g(prop)q(ert)o(y)g(and)g(set)
g(the)h(p)q(ermissions)g(to)f(the)g(empt)o(y)g(string,)h
Fn("")p Fq(.)35 b(That)20 b(is,)0 2118 y(non-o)o(wners)d(cannot)f(read)
h(or)f(write)h(the)f(prop)q(ert)o(y)h(and,)g(b)q(ecause)g(the)g(`)p
Fn(c)p Fq(')f(bit)h(is)g(not)g(set,)f(the)h(wizard)g(who)0
2172 y(o)o(wns)e(the)g(prop)q(ert)o(y)g(on)g(the)g(paren)o(t)g(class)h
(also)f(o)o(wns)f(it)i(on)f(all)h(of)f(the)g(descendan)o(ts)h(of)f
(that)f(class.)62 2238 y(Another,)23 b(p)q(erhaps)g(more)f(do)o
(wn-to-earth)f(example)h(arose)g(when)g(a)g(c)o(haracter)f(named)h(F)l
(ord)g(started)0 2292 y(building)d(ob)s(jects)d(he)g(called)i
(\\radios")e(and)h(another)e(c)o(haracter,)h(yduJ,)h(w)o(an)o(ted)e(to)
h(o)o(wn)g(one.)23 b(F)l(ord)16 b(kindly)0 2346 y(made)h(the)h(generic)
g(radio)f(ob)s(ject)g(fertile,)i(allo)o(wing)f(yduJ)g(to)f(create)g(a)g
(c)o(hild)i(ob)s(ject)d(of)h(it,)h(her)f(o)o(wn)g(radio.)0
2400 y(Radios)c(had)g(a)f(prop)q(ert)o(y)g(called)i(`)p
Fn(channel)p Fq(')d(that)h(iden)o(ti\014ed)j(something)d(corresp)q
(onding)i(to)e(the)g(frequency)i(to)0 2454 y(whic)o(h)i(the)f(radio)g
(w)o(as)g(tuned.)20 b(F)l(ord)15 b(had)g(written)g(nice)h(programs)e
(on)h(radios)g(\(v)o(erbs,)g(discussed)h(b)q(elo)o(w\))g(for)0
2508 y(turning)e(the)f(c)o(hannel)i(selector)e(on)g(the)h(fron)o(t)e
(of)h(the)g(radio,)g(whic)o(h)h(w)o(ould)g(mak)o(e)f(a)g(corresp)q
(onding)h(c)o(hange)f(in)0 2562 y(the)f(v)m(alue)g(of)f(the)h(`)p
Fn(channel)p Fq(')e(prop)q(ert)o(y)l(.)18 b(Ho)o(w)o(ev)o(er,)11
b(whenev)o(er)h(an)o(y)o(one)f(tried)h(to)f(turn)g(the)h(c)o(hannel)g
(selector)g(on)0 2616 y(yduJ's)j(radio,)f(they)g(got)g(a)g(p)q
(ermissions)h(error.)k(The)c(problem)g(concerned)g(the)g(o)o(wnership)f
(of)g(the)h(`)p Fn(channel)p Fq(')0 2670 y(prop)q(ert)o(y)l(.)p
eop
%%Page: 7 9
7 8 bop 0 -58 a Fq(Chapter)15 b(2:)k(The)d(Lam)o(b)q(daMOO)g(Database)
1126 b(7)62 183 y(As)17 b(I)g(explain)i(later,)d(programs)g(run)h(with)
g(the)g(p)q(ermissions)h(of)e(their)i(author.)23 b(So,)17
b(in)h(this)f(case,)g(F)l(ord's)0 237 y(nice)e(v)o(erb)e(for)g(setting)
g(the)h(c)o(hannel)g(ran)g(with)f(his)i(p)q(ermissions.)20
b(But,)14 b(since)g(the)g(`)p Fn(channel)p Fq(')e(prop)q(ert)o(y)h(in)h
(the)0 291 y(generic)i(radio)f(had)g(the)h(`)p Fn(c)p
Fq(')e(p)q(ermission)i(bit)g(set,)e(the)h(`)p Fn(channel)p
Fq(')f(prop)q(ert)o(y)g(on)h(yduJ's)h(radio)f(w)o(as)f(o)o(wned)h(b)o
(y)0 345 y(her.)23 b(F)l(ord)15 b(didn't)i(ha)o(v)o(e)f(p)q(ermission)h
(to)f(c)o(hange)g(it!)23 b(The)16 b(\014x)g(w)o(as)f(simple.)24
b(F)l(ord)16 b(c)o(hanged)g(the)h(p)q(ermissions)0 399
y(on)g(the)f(`)p Fn(channel)p Fq(')f(prop)q(ert)o(y)i(of)f(the)h
(generic)h(radio)e(to)g(b)q(e)i(just)e(`)p Fn(r)p Fq(',)g(without)h
(the)g(`)p Fn(c)p Fq(')e(bit,)j(and)e(yduJ)i(made)0 453
y(a)d(new)h(radio.)22 b(This)17 b(time,)e(when)i(yduJ's)f(radio)g
(inherited)h(the)f(`)p Fn(channel)p Fq(')e(prop)q(ert)o(y)l(,)i(yduJ)g
(did)h(not)f(inherit)0 507 y(o)o(wnership)e(of)e(it;)i(F)l(ord)e
(remained)i(the)f(o)o(wner.)19 b(No)o(w)12 b(the)h(radio)g(w)o(ork)o
(ed)g(prop)q(erly)l(,)h(b)q(ecause)g(F)l(ord's)e(v)o(erb)h(had)0
561 y(p)q(ermission)k(to)d(c)o(hange)h(the)h(c)o(hannel.)0
719 y Fj(2.2.3)30 b(V)-5 b(erbs)16 b(on)e(Ob)s(jects)62
818 y Fq(The)i(\014nal)f(kind)i(of)d(piece)j(making)e(up)g(an)g(ob)s
(ject)g(is)g Fl(v)o(erbs)p Fq(.)20 b(A)15 b(v)o(erb)g(is)h(a)e(named)i
(MOO)f(program)f(that)g(is)0 872 y(asso)q(ciated)f(with)h(a)f
(particular)g(ob)s(ject.)19 b(Most)12 b(v)o(erbs)h(implemen)o(t)i
(commands)e(that)f(a)h(pla)o(y)o(er)g(migh)o(t)g(t)o(yp)q(e;)h(for)0
926 y(example,)j(in)g(the)f(Lam)o(b)q(daCore)g(database,)g(there)g(is)h
(a)f(v)o(erb)g(on)h(all)g(ob)s(jects)e(represen)o(ting)i(con)o(tainers)
g(that)0 980 y(implemen)o(ts)f(commands)e(of)g(the)g(form)g(`put)g
Fl(ob)s(ject)g Fq(in)i Fl(con)o(tainer)s Fq('.)j(It)c(is)f(also)h(p)q
(ossible)h(for)d(MOO)i(programs)0 1034 y(to)d(in)o(v)o(ok)o(e)g(the)h
(v)o(erbs)f(de\014ned)i(on)e(ob)s(jects.)18 b(Some)13
b(v)o(erbs,)f(in)i(fact,)e(are)g(designed)i(to)d(b)q(e)i(used)g(only)g
(from)f(inside)0 1088 y(MOO)j(co)q(de;)f(they)h(do)f(not)f(corresp)q
(ond)i(to)f(an)o(y)f(particular)i(pla)o(y)o(er)f(command)h(at)e(all.)21
b(Th)o(us,)14 b(v)o(erbs)g(in)h(MOO)0 1142 y(are)g(lik)o(e)h(the)g
(`pro)q(cedures')f(or)f(`metho)q(ds')h(found)h(in)g(some)f(other)f
(programming)h(languages.)62 1213 y(As)h(with)g(prop)q(erties,)g(ev)o
(ery)f(v)o(erb)h(has)f(an)h(o)o(wner)f(and)h(a)f(set)h(of)f(p)q
(ermission)i(bits.)22 b(The)15 b(o)o(wner)h(of)f(a)g(v)o(erb)0
1267 y(can)h(c)o(hange)f(its)h(program,)e(its)h(p)q(ermission)i(bits,)f
(and)f(its)h(argumen)o(t)e(sp)q(eci\014ers)j(\(discussed)g(b)q(elo)o
(w\).)k(Only)16 b(a)0 1321 y(wizard)g(can)f(c)o(hange)g(the)h(o)o(wner)
e(of)h(a)g(v)o(erb.)20 b(The)c(o)o(wner)e(of)h(a)g(v)o(erb)g(also)g
(determines)i(the)e(p)q(ermissions)i(with)0 1375 y(whic)o(h)e(that)f(v)
o(erb)h(runs;)f(that)g(is,)h(the)g(program)e(in)i(a)g(v)o(erb)f(can)h
(do)f(whatev)o(er)g(op)q(erations)h(the)f(o)o(wner)h(of)f(that)0
1429 y(v)o(erb)g(is)h(allo)o(w)o(ed)g(to)e(do)i(and)f(no)g(others.)19
b(Th)o(us,)14 b(for)g(example,)h(a)f(v)o(erb)g(o)o(wned)g(b)o(y)h(a)f
(wizard)g(m)o(ust)g(b)q(e)h(written)0 1483 y(v)o(ery)g(carefully)l(,)h
(since)h(wizards)e(are)g(allo)o(w)o(ed)h(to)e(do)h(just)g(ab)q(out)g
(an)o(ything.)62 1553 y(The)22 b(p)q(ermission)g(bits)g(on)f(v)o(erbs)f
(are)h(dra)o(wn)g(from)f(this)i(set:)31 b(`)p Fn(r)p
Fq(')20 b(\(read\),)h(`)p Fn(w)p Fq(')g(\(write\),)g(`)p
Fn(x)p Fq(')f(\(execute\),)0 1607 y(and)c(`)p Fn(d)p
Fq(')f(\(debug\).)23 b(Read)16 b(p)q(ermission)i(lets)e(non-o)o(wners)g
(see)h(the)f(program)f(for)g(a)h(v)o(erb)g(and,)g(symmetrically)l(,)0
1661 y(write)i(p)q(ermission)g(lets)g(them)g(c)o(hange)f(that)g
(program.)25 b(The)18 b(other)f(t)o(w)o(o)f(bits)i(are)f(not,)g(prop)q
(erly)h(sp)q(eaking,)0 1715 y(p)q(ermission)f(bits)e(at)g(all;)h(they)f
(ha)o(v)o(e)g(a)g(univ)o(ersal)h(e\013ect,)e(co)o(v)o(ering)i(b)q(oth)f
(the)g(o)o(wner)g(and)g(non-o)o(wners.)62 1786 y(The)d(execute)h(bit)g
(determines)g(whether)f(or)f(not)h(the)g(v)o(erb)g(can)g(b)q(e)h(in)o
(v)o(ok)o(ed)f(from)f(within)i(a)f(MOO)g(program)0 1840
y(\(as)j(opp)q(osed)h(to)f(from)g(the)h(command)g(line,)h(lik)o(e)g
(the)e(`)p Fn(put)p Fq(')g(v)o(erb)h(on)f(con)o(tainers\).)21
b(If)16 b(the)g(`)p Fn(x)p Fq(')f(bit)h(is)g(not)g(set,)0
1894 y(the)f(v)o(erb)g(cannot)g(b)q(e)h(called)h(from)e(inside)i(a)d
(program.)19 b(The)d(`)p Fn(x)p Fq(')e(bit)i(is)f(usually)i(set.)62
1964 y(The)d(setting)f(of)g(the)g(debug)h(bit)g(determines)g(what)f
(happ)q(ens)h(when)g(the)f(v)o(erb's)g(program)f(do)q(es)i(something)0
2018 y(erroneous,)i(lik)o(e)i(subtracting)f(a)f(n)o(um)o(b)q(er)h(from)
f(a)g(c)o(haracter)g(string.)25 b(If)16 b(the)h(`)p Fn(d)p
Fq(')f(bit)h(is)g(set,)g(then)g(the)f(serv)o(er)0 2072
y Fl(raises)g Fq(an)f(error)e(v)m(alue;)j(suc)o(h)f(raised)f(errors)g
(can)h(b)q(e)g Fl(caugh)o(t)g Fq(b)o(y)f(certain)h(other)f(pieces)h(of)
f(MOO)h(co)q(de.)20 b(If)15 b(the)0 2126 y(error)h(is)i(not)e(caugh)o
(t,)h(ho)o(w)o(ev)o(er,)f(the)h(serv)o(er)g(ab)q(orts)f(execution)i(of)
f(the)g(command)g(and,)g(b)o(y)g(default,)h(prin)o(ts)0
2180 y(an)13 b(error)g(message)g(on)g(the)h(terminal)g(of)f(the)g(pla)o
(y)o(er)h(whose)f(command)g(is)h(b)q(eing)h(executed.)20
b(\(See)14 b(the)f(c)o(hapter)0 2234 y(on)j(serv)o(er)f(assumptions)h
(ab)q(out)f(the)h(database)f(for)g(details)i(on)e(ho)o(w)h(uncaugh)o(t)
f(errors)g(are)g(handled.\))23 b(If)16 b(the)0 2288 y(`)p
Fn(d)p Fq(')f(bit)i(is)f(not)g(set,)g(then)g(no)g(error)f(is)i(raised,)
f(no)g(message)g(is)g(prin)o(ted,)h(and)f(the)g(command)g(is)h(not)e
(ab)q(orted;)0 2342 y(instead)h(the)f(error)g(v)m(alue)h(is)g(returned)
f(as)g(the)g(result)h(of)f(the)g(erroneous)g(op)q(eration.)120
2411 y Fk(Note:)k Fq(the)14 b(`)p Fn(d)p Fq(')f(bit)i(exists)f(only)h
(for)e(historical)j(reasons;)d(it)i(used)g(to)e(b)q(e)i(the)f(only)h(w)
o(a)o(y)e(for)h(MOO)120 2462 y(co)q(de)j(to)f(catc)o(h)h(and)g(handle)h
(errors.)23 b(With)17 b(the)g(in)o(tro)q(duction)g(of)g(the)f
Fn(try)p Fq(-)p Fn(except)g Fq(statemen)o(t)120 2514
y(and)f(the)g(error-catc)o(hing)g(expression,)h(the)f(`)p
Fn(d)p Fq(')f(bit)h(is)h(no)e(longer)i(useful.)21 b(All)16
b(new)f(v)o(erbs)g(should)120 2566 y(ha)o(v)o(e)g(the)h(`)p
Fn(d)p Fq(')f(bit)h(set,)f(using)i(the)f(new)o(er)f(facilities)j(for)d
(error)g(handling)i(if)g(desired.)22 b(Ov)o(er)16 b(time,)120
2618 y(old)h(v)o(erbs)f(written)h(assuming)g(the)f(`)p
Fn(d)p Fq(')g(bit)h(w)o(ould)f(not)h(b)q(e)g(set)f(should)h(b)q(e)g(c)o
(hanged)g(to)f(use)h(the)120 2670 y(new)e(facilities)j(instead.)p
eop
%%Page: 8 10
8 9 bop 0 -58 a Fq(Chapter)15 b(2:)k(The)d(Lam)o(b)q(daMOO)g(Database)
1126 b(8)62 183 y(In)18 b(addition)h(to)e(an)g(o)o(wner)g(and)g(some)h
(p)q(ermission)g(bits,)g(ev)o(ery)g(v)o(erb)f(has)g(three)h(`argumen)o
(t)e(sp)q(eci\014ers',)0 237 y(one)j(eac)o(h)f(for)g(the)h(direct)g(ob)
s(ject,)g(the)f(prep)q(osition,)j(and)d(the)h(indirect)h(ob)s(ject.)30
b(The)18 b(direct)i(and)e(indirect)0 291 y(sp)q(eci\014ers)e(are)e(eac)
o(h)g(dra)o(wn)g(from)g(this)h(set:)k(`)p Fn(this)p Fq(',)13
b(`)p Fn(any)p Fq(',)g(or)g(`)p Fn(none)p Fq('.)19 b(The)14
b(prep)q(osition)i(sp)q(eci\014er)g(is)f(`)p Fn(none)p
Fq(',)0 345 y(`)p Fn(any)p Fq(',)f(or)g(one)i(of)e(the)i(items)f(in)h
(this)g(list:)120 409 y Fn(with)p Fq(/)p Fn(using)120
461 y(at)p Fq(/)p Fn(to)120 513 y(in)24 b(front)f(of)120
565 y(in)p Fq(/)p Fn(inside)p Fq(/)p Fn(into)120 617
y(on)h(top)f(of)p Fq(/)p Fn(on)p Fq(/)p Fn(onto)p Fq(/)p
Fn(upon)120 669 y(out)g(of)p Fq(/)p Fn(from)g(inside)p
Fq(/)p Fn(from)120 721 y(over)120 773 y(through)120 825
y(under)p Fq(/)p Fn(underneath)p Fq(/)p Fn(beneath)120
876 y(behind)120 928 y(beside)120 980 y(for)p Fq(/)p
Fn(about)120 1032 y(is)120 1084 y(as)120 1136 y(off)p
Fq(/)p Fn(off)g(of)62 1202 y Fq(The)d(argumen)o(t)e(sp)q(eci\014ers)j
(are)e(used)h(in)h(the)e(pro)q(cess)h(of)f(parsing)g(commands,)h
(describ)q(ed)h(in)f(the)g(next)0 1256 y(c)o(hapter.)p
eop
%%Page: 9 11
9 10 bop 0 -58 a Fq(Chapter)15 b(3:)k(The)d(Built-in)h(Command)e(P)o
(arser)1086 b(9)0 183 y Fm(3)41 b(The)15 b(Built-in)e(Command)k(P)n
(arser)62 301 y Fq(The)d(MOO)g(serv)o(er)f(is)i(able)f(to)f(do)h(a)f
(small)i(amoun)o(t)d(of)i(parsing)g(on)f(the)h(commands)g(that)e(a)i
(pla)o(y)o(er)g(en)o(ters.)0 355 y(In)i(particular,)f(it)h(can)f(break)
g(apart)g(commands)g(that)f(follo)o(w)h(one)h(of)e(the)i(follo)o(wing)g
(forms:)120 420 y Fl(v)o(erb)120 472 y(v)o(erb)25 b(direct-ob)s(ject)
120 524 y(v)o(erb)g(direct-ob)s(ject)g(prep)q(osition)g(indirect-ob)s
(ject)62 591 y Fq(Real)16 b(examples)g(of)f(these)h(forms,)e
(meaningful)i(in)g(the)f(Lam)o(b)q(daCore)g(database,)g(are)g(as)f
(follo)o(ws:)120 655 y Fn(look)120 707 y(take)23 b(yellow)g(bird)120
759 y(put)g(yellow)g(bird)h(in)f(cuckoo)g(clock)62 826
y Fq(Note)15 b(that)g(English)i(articles)f(\(i.e.,)f(`)p
Fn(the)p Fq(',)f(`)p Fn(a)p Fq(',)g(and)i(`)p Fn(an)p
Fq('\))e(are)h(not)g(generally)h(used)g(in)h(MOO)f(commands;)0
880 y(the)f(parser)g(do)q(es)h(not)e(kno)o(w)h(that)g(they)g(are)g(not)
g(imp)q(ortan)o(t)f(parts)h(of)g(ob)s(jects')f(names.)62
947 y(T)l(o)20 b(ha)o(v)o(e)g(an)o(y)f(of)h(this)g(mak)o(e)g(real)g
(sense,)i(it)e(is)g(imp)q(ortan)o(t)g(to)f(understand)i(precisely)h(ho)
o(w)d(the)h(serv)o(er)0 1001 y(decides)d(what)d(to)h(do)g(when)h(a)f
(pla)o(y)o(er)g(t)o(yp)q(es)g(a)g(command.)62 1068 y(First,)h(the)g
(serv)o(er)g(c)o(hec)o(ks)g(whether)g(or)g(not)g(the)g(\014rst)g
(non-blank)h(c)o(haracter)e(in)i(the)g(command)f(is)g(one)g(of)0
1122 y(the)f(follo)o(wing:)120 1187 y Fn(")191 b(:)g(;)0
1254 y Fq(If)15 b(so,)g(that)f(c)o(haracter)h(is)h(replaced)g(b)o(y)f
(the)g(corresp)q(onding)i(command)e(b)q(elo)o(w,)g(follo)o(w)o(ed)h(b)o
(y)f(a)g(space:)120 1318 y Fn(say)143 b(emote)95 b(eval)0
1385 y Fq(F)l(or)15 b(example,)g(the)h(command)120 1450
y Fn("Hi,)23 b(there.)0 1517 y Fq(is)16 b(treated)e(exactly)i(as)f(if)g
(it)h(w)o(ere)f(as)g(follo)o(ws:)120 1582 y Fn(say)23
b(Hi,)h(there.)62 1649 y Fq(The)d(serv)o(er)f(next)g(breaks)g(up)h(the)
g(command)f(in)o(to)g(w)o(ords.)35 b(In)21 b(the)f(simplest)i(case,)f
(the)f(command)g(is)0 1703 y(brok)o(en)13 b(in)o(to)g(w)o(ords)f(at)g
(ev)o(ery)h(run)g(of)f(space)h(c)o(haracters;)g(for)f(example,)i(the)f
(command)f(`)p Fn(foo)j(bar)g(baz)p Fq(')d(w)o(ould)0
1757 y(b)q(e)j(brok)o(en)f(in)o(to)h(the)f(w)o(ords)g(`)p
Fn(foo)p Fq(',)f(`)p Fn(bar)p Fq(',)g(and)h(`)p Fn(baz)p
Fq('.)19 b(T)l(o)14 b(force)g(the)g(serv)o(er)g(to)g(include)j(spaces)d
(in)i(a)e(\\w)o(ord",)0 1811 y(all)i(or)f(part)f(of)h(a)g(w)o(ord)g
(can)g(b)q(e)h(enclosed)g(in)g(double-quotes.)21 b(F)l(or)15
b(example,)h(the)f(command)120 1876 y Fn(foo)23 b("bar)h(mumble")f
(baz")g("fr"otz")g(bl"o"rt)0 1943 y Fq(is)13 b(brok)o(en)f(in)o(to)g
(the)g(w)o(ords)f(`)p Fn(foo)p Fq(',)h(`)p Fn(bar)i(mumble)p
Fq(',)d(`)p Fn(baz)k(frotz)p Fq(',)c(and)h(`)p Fn(blort)p
Fq('.)18 b(Finally)l(,)c(to)d(include)k(a)d(double-)0
1997 y(quote)j(or)g(a)g(bac)o(kslash)g(in)h(a)f(w)o(ord,)f(they)h(can)h
(b)q(e)g(preceded)g(b)o(y)f(a)g(bac)o(kslash,)g(just)g(lik)o(e)i(in)f
(MOO)f(strings.)62 2063 y(Ha)o(ving)c(th)o(us)g(brok)o(en)g(the)g
(string)f(in)o(to)h(w)o(ords,)g(the)g(serv)o(er)f(next)h(c)o(hec)o(ks)g
(to)f(see)i(if)f(the)g(\014rst)f(w)o(ord)g(names)h(an)o(y)0
2117 y(of)k(the)g(six)h(\\built-in")h(commands:)j(`)p
Fn(.program)p Fq(',)13 b(`)p Fn(PREFIX)p Fq(',)g(`)p
Fn(OUTPUTPREFIX)p Fq(',)f(`)p Fn(SUFFIX)p Fq(',)i(`)p
Fn(OUTPUTSUFFIX)p Fq(',)0 2171 y(or)i(the)h(connection's)g(de\014ned)h
Fl(\015ush)f Fq(command,)f(if)h(an)o(y)f(\(`)p Fn(.flush)p
Fq(')f(b)o(y)h(default\).)24 b(The)17 b(\014rst)f(one)h(of)f(these)g
(is)0 2225 y(only)g(a)o(v)m(ailable)g(to)f(programmers,)e(the)i(next)h
(four)e(are)h(in)o(tended)i(for)d(use)i(b)o(y)f(clien)o(t)h(programs,)e
(and)h(the)g(last)0 2279 y(can)h(v)m(ary)g(from)g(database)f(to)h
(database)f(or)h(ev)o(en)g(connection)i(to)d(connection;)i(all)g(six)g
(are)f(describ)q(ed)i(in)f(the)0 2333 y(\014nal)g(c)o(hapter)f(of)f
(this)h(do)q(cumen)o(t,)h(\\Serv)o(er)e(Commands)h(and)g(Database)f
(Assumptions".)22 b(If)16 b(the)g(\014rst)g(w)o(ord)0
2387 y(isn't)f(one)h(of)e(the)i(ab)q(o)o(v)o(e,)e(then)i(w)o(e)f(get)f
(to)h(the)g(usual)h(case:)k(a)15 b(normal)g(MOO)h(command.)62
2454 y(The)g(serv)o(er)g(next)g(giv)o(es)g(co)q(de)g(in)h(the)f
(database)f(a)h(c)o(hance)g(to)f(handle)i(the)f(command.)22
b(If)16 b(the)g(v)o(erb)g Fn($do_)0 2508 y(command\(\))e
Fq(exists,)h(it)g(is)g(called)i(with)e(the)g(w)o(ords)f(of)h(the)g
(command)g(passed)g(as)f(its)i(argumen)o(ts)e(and)h Fn(argstr)0
2562 y Fq(set)h(to)g(the)h(ra)o(w)f(command)g(t)o(yp)q(ed)h(b)o(y)g
(the)g(user.)24 b(If)17 b Fn($do_command\(\))e Fq(do)q(es)i(not)f
(exist,)h(or)g(if)g(that)f(v)o(erb-call)0 2616 y(completes)e(normally)h
(\(i.e.,)e(without)h(susp)q(ending)h(or)e(ab)q(orting\))h(and)g
(returns)f(a)h(false)g(v)m(alue,)h(then)f(the)f(built-)0
2670 y(in)h(command)e(parser)h(is)g(in)o(v)o(ok)o(ed)g(to)f(handle)i
(the)f(command)f(as)h(describ)q(ed)h(b)q(elo)o(w.)20
b(Otherwise,)14 b(it)f(is)g(assumed)p eop
%%Page: 10 12
10 11 bop 0 -58 a Fq(Chapter)15 b(3:)k(The)d(Built-in)h(Command)e(P)o
(arser)1064 b(10)0 183 y(that)18 b(the)h(database)g(co)q(de)g(handled)i
(the)e(command)g(completely)h(and)f(no)g(further)g(action)g(is)g(tak)o
(en)g(b)o(y)g(the)0 237 y(serv)o(er)c(for)f(that)h(command.)62
305 y(If)j(the)f(built-in)j(command)d(parser)g(is)h(in)o(v)o(ok)o(ed,)g
(the)f(serv)o(er)g(tries)h(to)e(parse)h(the)h(command)f(in)o(to)g(a)g
(v)o(erb,)0 359 y(direct)g(ob)s(ject,)g(prep)q(osition)g(and)g
(indirect)i(ob)s(ject.)k(The)17 b(\014rst)g(w)o(ord)f(is)h(tak)o(en)f
(to)g(b)q(e)h(the)g(v)o(erb.)24 b(The)17 b(serv)o(er)0
413 y(then)g(tries)g(to)g(\014nd)h(one)f(of)f(the)h(prep)q(ositional)i
(phrases)e(listed)h(at)f(the)g(end)g(of)g(the)g(previous)h(section,)f
(using)0 467 y(the)g(matc)o(h)g(that)f(o)q(ccurs)i(earliest)g(in)g(the)
f(command.)26 b(F)l(or)17 b(example,)h(in)g(the)f(v)o(ery)g(o)q(dd)h
(command)f(`)p Fn(foo)d(as)0 521 y(bar)h(to)g(baz)p Fq(',)f(the)h(serv)
o(er)g(w)o(ould)g(tak)o(e)g(`)p Fn(as)p Fq(')f(as)h(the)g(prep)q
(osition,)h(not)f(`)p Fn(to)p Fq('.)62 589 y(If)h(the)f(serv)o(er)g
(succeeds)i(in)f(\014nding)h(a)e(prep)q(osition,)h(it)g(considers)g
(the)f(w)o(ords)g(b)q(et)o(w)o(een)h(the)f(v)o(erb)g(and)h(the)0
643 y(prep)q(osition)k(to)e(b)q(e)h(the)g(direct)g(ob)s(ject)f(and)h
(those)g(after)f(the)g(prep)q(osition)i(to)e(b)q(e)i(the)e(indirect)j
(ob)s(ject.)29 b(In)0 697 y(b)q(oth)14 b(cases,)g(the)g(sequence)h(of)f
(w)o(ords)f(is)h(turned)h(in)o(to)f(a)f(string)h(b)o(y)g(putting)g(one)
h(space)f(b)q(et)o(w)o(een)g(eac)o(h)g(pair)g(of)0 751
y(w)o(ords.)22 b(Th)o(us,)16 b(in)h(the)f(o)q(dd)h(command)f(from)g
(the)g(previous)h(paragraph,)e(there)h(are)g(no)g(w)o(ords)g(in)h(the)f
(direct)0 805 y(ob)s(ject)f(\(i.e.,)f(it)i(is)f(considered)i(to)d(b)q
(e)i(the)g(empt)o(y)f(string,)f Fn("")p Fq(\))h(and)g(the)h(indirect)g
(ob)s(ject)f(is)h Fn("bar)e(to)h(baz")p Fq(.)62 873 y(If)g(there)h(w)o
(as)e(no)h(prep)q(osition,)h(then)f(the)g(direct)h(ob)s(ject)e(is)i
(tak)o(en)e(to)g(b)q(e)i(all)g(of)e(the)i(w)o(ords)e(after)g(the)h(v)o
(erb)0 927 y(and)g(the)h(indirect)g(ob)s(ject)f(is)h(the)f(empt)o(y)g
(string.)62 995 y(The)i(next)f(step)h(is)g(to)e(try)h(to)g(\014nd)h
(MOO)g(ob)s(jects)f(that)f(are)h(named)h(b)o(y)f(the)h(direct)g(and)g
(indirect)h(ob)s(ject)0 1049 y(strings.)62 1116 y(First,)d(if)h(an)g
(ob)s(ject)f(string)g(is)i(empt)o(y)l(,)e(then)h(the)f(corresp)q
(onding)i(ob)s(ject)e(is)h(the)g(sp)q(ecial)h(ob)s(ject)e
Fn(#-1)g Fq(\(ak)m(a)0 1170 y Fn($nothing)d Fq(in)j(Lam)o(b)q
(daCore\).)k(If)14 b(an)f(ob)s(ject)g(string)h(has)f(the)h(form)f(of)g
(an)g(ob)s(ject)g(n)o(um)o(b)q(er)h(\(i.e.,)g(a)f(hash)h(mark)0
1224 y(\(`)p Fn(#)p Fq('\))i(follo)o(w)o(ed)i(b)o(y)g(digits\),)g(and)g
(the)f(ob)s(ject)g(with)h(that)f(n)o(um)o(b)q(er)h(exists,)g(then)g
(that)f(is)h(the)g(named)g(ob)s(ject.)0 1278 y(If)g(the)g(ob)s(ject)f
(string)g(is)h(either)h Fn("me")e Fq(or)g Fn("here")p
Fq(,)g(then)h(the)f(pla)o(y)o(er)h(ob)s(ject)f(itself)h(or)f(its)h(lo)q
(cation)h(is)f(used,)0 1332 y(resp)q(ectiv)o(ely)l(.)62
1400 y(Otherwise,)h(the)g(serv)o(er)e(considers)i(all)g(of)f(the)g(ob)s
(jects)f(whose)h(lo)q(cation)h(is)g(either)g(the)f(pla)o(y)o(er)g
(\(i.e.,)g(the)0 1454 y(ob)s(jects)f(the)g(pla)o(y)o(er)h(is)g
(\\holding",)g(so)f(to)g(sp)q(eak\))g(or)g(the)g(ro)q(om)g(the)h(pla)o
(y)o(er)f(is)h(in)g(\(i.e.,)f(the)h(ob)s(jects)f(in)h(the)0
1508 y(same)13 b(ro)q(om)g(as)h(the)g(pla)o(y)o(er\);)f(it)h(will)i
(try)d(to)g(matc)o(h)g(the)h(ob)s(ject)f(string)h(against)f(the)h(v)m
(arious)g(names)g(for)f(these)0 1562 y(ob)s(jects.)62
1630 y(The)h(matc)o(hing)f(done)h(b)o(y)f(the)g(serv)o(er)g(uses)g(the)
h(`)p Fn(aliases)p Fq(')d(prop)q(ert)o(y)i(of)g(eac)o(h)g(of)g(the)g
(ob)s(jects)g(it)g(considers.)0 1684 y(The)g(v)m(alue)h(of)e(this)h
(prop)q(ert)o(y)f(should)i(b)q(e)g(a)e(list)h(of)g(strings,)f(the)h(v)m
(arious)g(alternativ)o(es)g(for)f(naming)h(the)g(ob)s(ject.)0
1738 y(If)h(it)g(is)h(not)f(a)f(list,)i(or)e(the)h(ob)s(ject)g(do)q(es)
g(not)g(ha)o(v)o(e)f(an)h(`)p Fn(aliases)p Fq(')e(prop)q(ert)o(y)l(,)i
(then)g(the)g(empt)o(y)g(list)h(is)f(used.)20 b(In)0
1792 y(an)o(y)15 b(case,)g(the)g(v)m(alue)h(of)f(the)g(`)p
Fn(name)p Fq(')f(prop)q(ert)o(y)h(is)h(added)g(to)e(the)i(list)g(for)e
(the)h(purp)q(oses)h(of)f(matc)o(hing.)62 1860 y(The)20
b(serv)o(er)g(c)o(hec)o(ks)g(to)f(see)h(if)g(the)g(ob)s(ject)f(string)h
(in)h(the)f(command)f(is)i(either)f(exactly)g(equal)h(to)e(or)g(a)0
1914 y(pre\014x)e(of)g(an)o(y)f(alias;)i(if)g(there)f(are)f(an)o(y)h
(exact)f(matc)o(hes,)h(the)g(pre\014x)g(matc)o(hes)f(are)h(ignored.)25
b(If)18 b(exactly)f(one)0 1968 y(of)f(the)h(ob)s(jects)f(b)q(eing)i
(considered)g(has)f(a)f(matc)o(hing)h(alias,)g(that)f(ob)s(ject)g(is)h
(used.)25 b(If)17 b(more)f(than)h(one)g(has)f(a)0 2022
y(matc)o(h,)g(then)g(the)h(sp)q(ecial)h(ob)s(ject)d Fn(#-2)h
Fq(\(ak)m(a)g Fn($ambiguous_match)e Fq(in)j(Lam)o(b)q(daCore\))f(is)h
(used.)23 b(If)17 b(there)f(are)0 2076 y(no)f(matc)o(hes,)g(then)g(the)
g(sp)q(ecial)i(ob)s(ject)e Fn(#-3)g Fq(\(ak)m(a)f Fn($failed_match)g
Fq(in)i(Lam)o(b)q(daCore\))e(is)i(used.)62 2144 y(So,)i(no)o(w)g(the)g
(serv)o(er)g(has)f(iden)o(ti\014ed)j(a)e(v)o(erb)g(string,)g(a)g(prep)q
(osition)h(string,)f(and)g(direct-)h(and)f(indirect-)0
2198 y(ob)s(ject)d(strings)g(and)h(ob)s(jects.)k(It)15
b(then)h(lo)q(oks)f(at)g(eac)o(h)h(of)e(the)i(v)o(erbs)f(de\014ned)i
(on)e(eac)o(h)h(of)f(the)g(follo)o(wing)h(four)0 2252
y(ob)s(jects,)e(in)i(order:)25 2319 y(1.)29 b(the)15
b(pla)o(y)o(er)h(who)e(t)o(yp)q(ed)i(the)f(command,)25
2387 y(2.)29 b(the)15 b(ro)q(om)g(the)g(pla)o(y)o(er)g(is)h(in,)25
2454 y(3.)29 b(the)15 b(direct)h(ob)s(ject,)e(if)i(an)o(y)l(,)f(and)25
2521 y(4.)29 b(the)15 b(indirect)i(ob)s(ject,)d(if)i(an)o(y)l(.)0
2602 y(F)l(or)f(eac)o(h)g(of)g(these)g(v)o(erbs)g(in)h(turn,)f(it)g
(tests)g(if)h(all)g(of)e(the)i(the)f(follo)o(wing)h(are)f(true:)37
2670 y Fo(\017)30 b Fq(the)15 b(v)o(erb)g(string)h(in)g(the)f(command)g
(matc)o(hes)g(one)g(of)g(the)g(names)g(for)g(the)g(v)o(erb,)p
eop
%%Page: 11 13
11 12 bop 0 -58 a Fq(Chapter)15 b(3:)k(The)d(Built-in)h(Command)e(P)o
(arser)1064 b(11)37 183 y Fo(\017)30 b Fq(the)21 b(direct-)g(and)g
(indirect-ob)s(ject)h(v)m(alues)f(found)g(b)o(y)g(matc)o(hing)g(are)f
(allo)o(w)o(ed)h(b)o(y)f(the)h(corresp)q(onding)90 237
y(argumen)o(t)14 b(sp)q(eci\014ers)j(for)e(the)g(v)o(erb,)g(and)37
303 y Fo(\017)30 b Fq(the)15 b(prep)q(osition)i(string)e(in)h(the)f
(command)g(is)h(matc)o(hed)f(b)o(y)g(the)h(prep)q(osition)g(sp)q
(eci\014er)h(for)d(the)i(v)o(erb.)0 381 y(I'll)g(explain)h(eac)o(h)f
(of)e(these)i(criteria)g(in)g(turn.)62 446 y(Ev)o(ery)i(v)o(erb)f(has)h
(one)g(or)f(more)h(names;)g(all)h(of)e(the)h(names)g(are)g(k)o(ept)f
(in)i(a)e(single)i(string,)f(separated)g(b)o(y)0 500
y(spaces.)32 b(In)19 b(the)h(simplest)g(case,)f(a)g(v)o(erb-name)g(is)h
(just)f(a)g(w)o(ord)f(made)h(up)h(of)e(an)o(y)h(c)o(haracters)f(other)h
(than)0 554 y(spaces)14 b(and)g(stars)e(\(i.e.,)h(`)g(')h(and)f(`)p
Fn(*)p Fq('\).)18 b(In)d(this)f(case,)f(the)h(v)o(erb-name)g(matc)o
(hes)f(only)h(itself;)g(that)f(is,)h(the)g(name)0 608
y(m)o(ust)h(b)q(e)g(matc)o(hed)h(exactly)l(.)62 674 y(If)h(the)g(name)g
(con)o(tains)f(a)h(single)h(star,)e(ho)o(w)o(ev)o(er,)f(then)i(the)g
(name)g(matc)o(hes)f(an)o(y)g(pre\014x)i(of)e(itself)h(that)f(is)0
728 y(at)e(least)i(as)e(long)i(as)f(the)g(part)f(b)q(efore)i(the)f
(star.)k(F)l(or)14 b(example,)i(the)f(v)o(erb-name)h(`)p
Fn(foo*bar)p Fq(')d(matc)o(hes)i(an)o(y)f(of)0 782 y(the)g(strings)h(`)
p Fn(foo)p Fq(',)d(`)p Fn(foob)p Fq(',)h(`)p Fn(fooba)p
Fq(',)g(or)h(`)p Fn(foobar)p Fq(';)e(note)i(that)g(the)g(star)g(itself)
h(is)g(not)f(considered)h(part)f(of)g(the)0 836 y(name.)62
902 y(If)19 b(the)g(v)o(erb)f(name)h Fl(ends)i Fq(in)e(a)f(star,)g
(then)h(it)g(matc)o(hes)f(an)o(y)g(string)h(that)f(b)q(egins)h(with)g
(the)g(part)f(b)q(efore)0 955 y(the)e(star.)j(F)l(or)c(example,)h(the)g
(v)o(erb-name)g(`)p Fn(foo*)p Fq(')e(matc)o(hes)h(an)o(y)g(of)g(the)h
(strings)f(`)p Fn(foo)p Fq(',)f(`)p Fn(foobar)p Fq(',)g(`)p
Fn(food)p Fq(',)f(or)0 1009 y(`)p Fn(foogleman)p Fq(',)i(among)h(man)o
(y)h(others.)25 b(As)17 b(a)g(sp)q(ecial)h(case,)g(if)f(the)g(v)o
(erb-name)g(is)h(`)p Fn(*)p Fq(')e(\(i.e.,)h(a)g(single)h(star)e(all)0
1063 y(b)o(y)f(itself)t(\),)g(then)h(it)f(matc)o(hes)g(an)o(ything)g
(at)g(all.)62 1129 y(Recall)20 b(that)c(the)i(argumen)o(t)f(sp)q
(eci\014ers)i(for)d(the)i(direct)g(and)g(indirect)h(ob)s(jects)e(are)g
(dra)o(wn)g(from)g(the)g(set)0 1183 y(`)p Fn(none)p Fq(',)12
b(`)p Fn(any)p Fq(',)f(and)i(`)p Fn(this)p Fq('.)18 b(If)13
b(the)g(sp)q(eci\014er)i(is)e(`)p Fn(none)p Fq(',)f(then)h(the)g
(corresp)q(onding)h(ob)s(ject)e(v)m(alue)j(m)o(ust)d(b)q(e)h
Fn(#-1)0 1237 y Fq(\(ak)m(a)j Fn($nothing)g Fq(in)h(Lam)o(b)q
(daCore\);)f(that)g(is,)h(it)g(m)o(ust)f(not)g(ha)o(v)o(e)h(b)q(een)g
(sp)q(eci\014ed.)27 b(If)16 b(the)h(sp)q(eci\014er)h(is)g(`)p
Fn(any)p Fq(',)0 1291 y(then)d(the)g(corresp)q(onding)h(ob)s(ject)e(v)m
(alue)i(ma)o(y)e(b)q(e)h(an)o(ything)g(at)f(all.)21 b(Finally)l(,)16
b(if)f(the)g(sp)q(eci\014er)h(is)g(`)p Fn(this)p Fq(',)d(then)0
1345 y(the)18 b(corresp)q(onding)g(ob)s(ject)f(v)m(alue)i(m)o(ust)e(b)q
(e)h(the)g(same)f(as)g(the)h(ob)s(ject)f(on)h(whic)o(h)g(w)o(e)f(found)
h(this)g(v)o(erb;)h(for)0 1399 y(example,)14 b(if)g(w)o(e)f(are)g
(considering)i(v)o(erbs)e(on)g(the)h(pla)o(y)o(er,)f(then)h(the)f(ob)s
(ject)g(v)m(alue)h(m)o(ust)f(b)q(e)h(the)g(pla)o(y)o(er)f(ob)s(ject.)62
1464 y(Finally)l(,)20 b(recall)f(that)e(the)g(argumen)o(t)g(sp)q
(eci\014er)j(for)d(the)h(prep)q(osition)g(is)h(either)f(`)p
Fn(none)p Fq(',)f(`)p Fn(any)p Fq(',)f(or)i(one)f(of)0
1518 y(sev)o(eral)g(sets)g(of)f(prep)q(ositional)j(phrases,)e(giv)o(en)
g(ab)q(o)o(v)o(e.)25 b(A)17 b(sp)q(eci\014er)h(of)f(`)p
Fn(none)p Fq(')e(matc)o(hes)i(only)g(if)h(there)f(w)o(as)0
1572 y(no)j(prep)q(osition)i(found)f(in)g(the)f(command.)35
b(A)21 b(sp)q(eci\014er)h(of)e(`)p Fn(any)p Fq(')f(alw)o(a)o(ys)g(matc)
o(hes,)i(regardless)g(of)f(what)0 1626 y(prep)q(osition)d(w)o(as)e
(found,)h(if)h(an)o(y)l(.)22 b(If)16 b(the)g(sp)q(eci\014er)i(is)e(a)g
(set)f(of)h(prep)q(ositional)h(phrases,)f(then)h(the)f(one)g(found)0
1680 y(m)o(ust)f(b)q(e)g(in)i(that)d(set)h(for)g(the)g(sp)q(eci\014er)i
(to)d(matc)o(h.)62 1746 y(So,)g(the)h(serv)o(er)f(considers)i(sev)o
(eral)e(ob)s(jects)g(in)i(turn,)e(c)o(hec)o(king)h(eac)o(h)g(of)f
(their)h(v)o(erbs)g(in)g(turn,)f(lo)q(oking)i(for)0 1800
y(the)d(\014rst)g(one)h(that)e(meets)i(all)g(of)f(the)g(criteria)h
(just)f(explained.)22 b(If)13 b(it)h(\014nds)g(one,)f(then)h(that)f(is)
g(the)h(v)o(erb)f(whose)0 1854 y(program)k(will)i(b)q(e)f(executed)h
(for)e(this)h(command.)28 b(If)18 b(not,)f(then)h(it)g(lo)q(oks)g(for)g
(a)f(v)o(erb)h(named)g(`)p Fn(huh)p Fq(')e(on)i(the)0
1908 y(ro)q(om)d(that)g(the)h(pla)o(y)o(er)g(is)g(in;)h(if)f(one)g(is)g
(found,)g(then)g(that)g(v)o(erb)f(will)j(b)q(e)e(called.)23
b(This)17 b(feature)e(is)i(useful)g(for)0 1962 y(implemen)o(ting)d(ro)q
(om-sp)q(eci\014c)g(command)f(parsing)g(or)f(error)g(reco)o(v)o(ery)l
(.)18 b(If)13 b(the)g(serv)o(er)f(can't)g(ev)o(en)h(\014nd)g(a)f(`)p
Fn(huh)p Fq(')0 2016 y(v)o(erb)17 b(to)g(run,)g(it)g(prin)o(ts)h(an)f
(error)f(message)h(lik)o(e)h(`)p Fn(I)d(couldn't)f(understand)g(that.)p
Fq(')i(and)h(the)g(command)g(is)0 2070 y(considered)g(complete.)62
2135 y(A)o(t)d(long)g(last,)f(w)o(e)h(ha)o(v)o(e)f(a)h(program)f(to)g
(run)h(in)h(resp)q(onse)f(to)f(the)h(command)g(t)o(yp)q(ed)g(b)o(y)g
(the)g(pla)o(y)o(er.)20 b(When)0 2189 y(the)c(co)q(de)g(for)g(the)g
(program)e(b)q(egins)j(execution,)g(the)f(follo)o(wing)h(built-in)h(v)m
(ariables)f(will)h(ha)o(v)o(e)d(the)h(indicated)0 2243
y(v)m(alues:)120 2307 y Fn(player)95 b Fq(an)15 b(ob)s(ject,)f(the)h
(pla)o(y)o(er)h(who)e(t)o(yp)q(ed)i(the)f(command)120
2359 y Fn(this)143 b Fq(an)15 b(ob)s(ject,)f(the)h(ob)s(ject)g(on)g
(whic)o(h)h(this)g(v)o(erb)f(w)o(as)f(found)120 2411
y Fn(caller)95 b Fq(an)15 b(ob)s(ject,)f(the)h(same)g(as)g(`)p
Fn(player)p Fq(')120 2462 y Fn(verb)143 b Fq(a)15 b(string,)f(the)i
(\014rst)e(w)o(ord)h(of)g(the)g(command)120 2514 y Fn(argstr)95
b Fq(a)15 b(string,)f(ev)o(erything)i(after)e(the)i(\014rst)e(w)o(ord)h
(of)g(the)g(command)120 2566 y Fn(args)143 b Fq(a)15
b(list)h(of)e(strings,)h(the)g(w)o(ords)g(in)h(`)p Fn(argstr)p
Fq(')120 2618 y Fn(dobjstr)71 b Fq(a)15 b(string,)f(the)i(direct)g(ob)s
(ject)e(string)h(found)h(during)g(parsing)120 2670 y
Fn(dobj)143 b Fq(an)15 b(ob)s(ject,)f(the)h(direct)h(ob)s(ject)f(v)m
(alue)h(found)g(during)g(matc)o(hing)p eop
%%Page: 12 14
12 13 bop 0 -58 a Fq(Chapter)15 b(3:)k(The)d(Built-in)h(Command)e(P)o
(arser)1064 b(12)120 183 y Fn(prepstr)71 b Fq(a)15 b(string,)f(the)i
(prep)q(ositional)g(phrase)g(found)f(during)h(parsing)120
235 y Fn(iobjstr)71 b Fq(a)15 b(string,)f(the)i(indirect)g(ob)s(ject)f
(string)120 287 y Fn(iobj)143 b Fq(an)15 b(ob)s(ject,)f(the)h(indirect)
i(ob)s(ject)e(v)m(alue)0 353 y(The)g(v)m(alue)i(returned)e(b)o(y)h(the)
f(program,)f(if)h(an)o(y)l(,)g(is)h(ignored)f(b)o(y)h(the)f(serv)o(er.)
p eop
%%Page: 13 15
13 14 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(13)0 183 y Fm(4)41 b(The)15 b(MOO)f(Programming)i
(Language)62 295 y Fq(MOO)j(stands)g(for)f(\\MUD,)g(Ob)s(ject)h(Orien)o
(ted.")32 b(MUD,)18 b(in)i(turn,)f(has)g(b)q(een)h(said)f(to)f(stand)h
(for)f(man)o(y)0 349 y(di\013eren)o(t)g(things,)g(but)g(I)g(tend)g(to)f
(think)i(of)e(it)h(as)g(\\Multi-User)g(Dungeon")g(in)g(the)g(spirit)h
(of)e(those)g(ancien)o(t)0 403 y(precursors)e(to)g(MUDs,)f(Adv)o(en)o
(ture)h(and)h(Zork.)62 467 y(MOO,)21 b(the)h(programming)e(language,)j
(is)f(a)f(relativ)o(ely)h(small)g(and)g(simple)g(ob)s(ject-orien)o(ted)
g(language)0 521 y(designed)c(to)e(b)q(e)i(easy)e(to)g(learn)i(for)e
(most)g(non-programmers;)g(most)g(complex)h(systems)g(still)h(require)f
(some)0 575 y(signi\014can)o(t)f(programming)f(abilit)o(y)h(to)f
(accomplish,)h(ho)o(w)o(ev)o(er.)62 640 y(Ha)o(ving)f(giv)o(en)g(y)o
(ou)f(enough)h(con)o(text)e(to)h(allo)o(w)h(y)o(ou)f(to)g(understand)h
(exactly)f(what)g(MOO)h(co)q(de)g(is)g(doing,)0 694 y(I)e(no)o(w)f
(explain)i(what)e(MOO)h(co)q(de)g(lo)q(oks)g(lik)o(e)h(and)f(what)f(it)
h(means.)19 b(I)13 b(b)q(egin)h(with)e(the)h(syn)o(tax)f(and)h(seman)o
(tics)0 748 y(of)h(expressions,)i(those)e(pieces)j(of)d(co)q(de)i(that)
e(ha)o(v)o(e)g(v)m(alues.)21 b(After)15 b(that,)f(I)h(co)o(v)o(er)f
(statemen)o(ts,)g(the)h(next)g(lev)o(el)0 802 y(of)e(structure)h(up)g
(from)f(expressions.)21 b(Next,)13 b(I)h(discuss)h(the)f(concept)h(of)e
(a)g(task,)h(the)f(kind)i(of)f(running)h(pro)q(cess)0
856 y(initiated)23 b(b)o(y)f(pla)o(y)o(ers)f(en)o(tering)h(commands,)h
(among)e(other)g(causes.)39 b(Finally)l(,)25 b(I)d(list)g(all)h(of)e
(the)h(built-in)0 910 y(functions)16 b(a)o(v)m(ailable)h(to)d(MOO)i(co)
q(de)g(and)f(describ)q(e)i(what)e(they)g(do.)62 975 y(First,)i(though,)
g(let)h(me)f(men)o(tion)g(commen)o(ts.)25 b(Y)l(ou)17
b(can)g(include)j(bits)d(of)g(text)f(in)i(y)o(our)f(MOO)g(program)0
1029 y(that)12 b(are)h(ignored)g(b)o(y)g(the)g(serv)o(er.)18
b(The)13 b(idea)h(is)f(to)g(allo)o(w)g(y)o(ou)f(to)g(put)h(in)h(notes)f
(to)f(y)o(ourself)h(and)g(others)f(ab)q(out)0 1083 y(what)17
b(the)i(co)q(de)f(is)h(doing.)28 b(T)l(o)18 b(do)g(this,)h(b)q(egin)g
(the)f(text)g(of)f(the)h(commen)o(t)g(with)g(the)g(t)o(w)o(o)f(c)o
(haracters)g(`)p Fn(/*)p Fq(')0 1137 y(and)d(end)h(it)f(with)g(the)g(t)
o(w)o(o)e(c)o(haracters)h(`)p Fn(*/)p Fq(';)g(this)h(is)h(just)e(lik)o
(e)i(commen)o(ts)f(in)g(the)g(C)g(programming)f(language.)0
1191 y(Note)j(that)g(the)h(serv)o(er)f(will)i(completely)g(ignore)f
(that)e(text;)i(it)g(will)h Fl(not)f Fq(b)q(e)g(sa)o(v)o(ed)f(in)h(the)
g(database.)23 b(Th)o(us,)0 1244 y(suc)o(h)16 b(commen)o(ts)e(are)h
(only)h(useful)g(in)g(\014les)g(of)f(co)q(de)h(that)e(y)o(ou)h(main)o
(tain)h(outside)g(the)f(database.)62 1309 y(T)l(o)k(include)j(a)d(more)
g(p)q(ersisten)o(t)g(commen)o(t)g(in)h(y)o(our)f(co)q(de,)h(try)f
(using)h(a)f(c)o(haracter)g(string)g(literal)h(as)f(a)0
1363 y(statemen)o(t.)37 b(F)l(or)21 b(example,)i(the)e(sen)o(tence)h
(ab)q(out)f(p)q(ean)o(ut)h(butter)f(in)h(the)g(follo)o(wing)g(co)q(de)g
(is)f(essen)o(tially)0 1417 y(ignored)16 b(during)g(execution)g(but)f
(will)i(b)q(e)f(main)o(tained)g(in)g(the)g(database:)120
1480 y Fn(for)23 b(x)h(in)g(\(players\(\)\))168 1532
y("Grendel)e(eats)i(peanut)f(butter!";)168 1584 y(player:tell\(x.name,)
e(")j(\(",)f(x,)h("\)"\);)120 1636 y(endfor)0 1784 y
Fp(4.1)33 b(MOO)13 b(Language)i(Expressions)62 1878 y
Fq(Expressions)h(are)f(those)g(pieces)h(of)f(MOO)h(co)q(de)f(that)g
(generate)g(v)m(alues;)h(for)e(example,)i(the)f(MOO)h(co)q(de)120
1941 y Fn(3)24 b(+)f(4)0 2006 y Fq(is)f(an)f(expression)h(that)f
(generates)f(\(or)h(\\has")f(or)h(\\returns"\))f(the)i(v)m(alue)g(7.)38
b(There)21 b(are)g(man)o(y)g(kinds)h(of)0 2060 y(expressions)16
b(in)g(MOO,)f(all)h(of)f(them)g(discussed)i(b)q(elo)o(w.)0
2192 y Fj(4.1.1)30 b(Errors)15 b(While)h(Ev)m(aluating)f(Expressions)62
2286 y Fq(Most)g(kinds)j(of)d(expressions)i(can,)g(under)f(some)g
(circumstances,)h(cause)g(an)f(error)f(to)h(b)q(e)h(generated.)23
b(F)l(or)0 2340 y(example,)13 b(the)e(expression)h Fn(x)j(/)g(y)c
Fq(will)i(generate)e(the)h(error)e Fn(E_DIV)h Fq(if)h
Fn(y)f Fq(is)h(equal)g(to)f(zero.)18 b(When)12 b(an)f(expression)0
2393 y(generates)k(an)h(error,)e(the)i(b)q(eha)o(vior)g(of)f(the)h
(serv)o(er)f(is)h(con)o(trolled)h(b)o(y)e(setting)h(of)f(the)h(`)p
Fn(d)p Fq(')f(\(debug\))g(bit)h(on)g(the)0 2447 y(v)o(erb)k(con)o
(taining)g(that)f(expression.)35 b(If)20 b(the)f(`)p
Fn(d)p Fq(')g(bit)i(is)f(not)f(set,)h(then)h(the)e(error)g(is)i
(e\013ectiv)o(ely)f(squelc)o(hed)0 2501 y(immediately)15
b(up)q(on)f(generation;)g(the)g(error)e(v)m(alue)j(is)f(simply)h
(returned)f(as)f(the)g(v)m(alue)i(of)e(the)g(expression)i(that)0
2555 y(generated)g(it.)120 2618 y Fk(Note:)33 b Fq(this)22
b(error-squelc)o(hing)h(b)q(eha)o(vior)f(is)h(v)o(ery)e(error)h(prone,)
h(since)g(it)f(a\013ects)f Fl(all)k Fq(errors,)120 2670
y(including)20 b(ones)d(the)g(programmer)f(ma)o(y)h(not)g(ha)o(v)o(e)f
(an)o(ticipated.)27 b(The)17 b(`)p Fn(d)p Fq(')g(bit)g(exists)h(only)g
(for)p eop
%%Page: 14 16
14 15 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(14)120 183 y(historical)14 b(reasons;)e(it)h(w)o(as)f
(once)h(the)g(only)g(w)o(a)o(y)f(for)g(MOO)h(programmers)e(to)h(catc)o
(h)h(and)g(handle)120 235 y(errors.)27 b(The)18 b(error-catc)o(hing)g
(expression)g(and)g(the)g Fn(try)p Fq(-)p Fn(except)f
Fq(statemen)o(t,)g(b)q(oth)h(describ)q(ed)120 287 y(b)q(elo)o(w,)d(are)
g(far)g(b)q(etter)g(w)o(a)o(ys)f(of)h(accomplishing)i(the)e(same)g
(thing.)62 353 y(If)f(the)f(`)p Fn(d)p Fq(')f(bit)i(is)f(set,)g(as)g
(it)g(usually)i(is,)e(then)h(the)f(error)f(is)i Fl(raised)h
Fq(and)f(can)f(b)q(e)h(caugh)o(t)e(and)i(handled)g(either)0
407 y(b)o(y)h(co)q(de)h(surrounding)g(the)f(expression)h(in)g(question)
g(or)f(b)o(y)g(v)o(erbs)g(higher)h(up)f(on)g(the)h(c)o(hain)g(of)e
(calls)j(leading)0 461 y(to)11 b(the)i(curren)o(t)f(v)o(erb.)19
b(If)12 b(the)g(error)g(is)g(not)g(caugh)o(t,)g(then)g(the)h(serv)o(er)
e(ab)q(orts)h(the)g(en)o(tire)h(task)e(and,)i(b)o(y)f(default,)0
515 y(prin)o(ts)18 b(a)f(message)g(to)g(the)h(curren)o(t)f(pla)o(y)o
(er.)27 b(See)18 b(the)g(descriptions)h(of)e(the)h(error-catc)o(hing)f
(expression)i(and)0 569 y(the)e Fn(try)p Fq(-)p Fn(except)f
Fq(statemen)o(t)g(for)h(the)g(details)i(of)d(ho)o(w)h(errors)f(can)i(b)
q(e)g(caugh)o(t,)f(and)g(the)g(c)o(hapter)g(on)g(serv)o(er)0
623 y(assumptions)e(ab)q(out)g(the)h(database)e(for)h(details)h(on)f
(the)g(handling)i(of)e(uncaugh)o(t)g(errors.)0 759 y
Fj(4.1.2)30 b(W)-5 b(riting)15 b(V)-5 b(alues)16 b(Directly)f(in)h(V)-5
b(erbs)62 855 y Fq(The)13 b(simplest)h(kind)g(of)e(expression)i(is)f(a)
f(literal)i(MOO)f(v)m(alue,)h(just)f(as)f(describ)q(ed)j(in)e(the)g
(section)g(on)g(v)m(alues)0 909 y(at)i(the)g(b)q(eginning)i(of)e(this)h
(do)q(cumen)o(t.)k(F)l(or)14 b(example,)i(the)f(follo)o(wing)h(are)f
(all)h(expressions:)120 973 y Fn(17)120 1025 y(#893)120
1076 y("This)23 b(is)h(a)f(character)g(string.")120 1128
y(E_TYPE)120 1180 y({"This",)g("is",)g("a",)g("list",)g("of",)g
("words"})62 1246 y Fq(In)e(the)f(case)f(of)h(lists,)h(lik)o(e)g(the)f
(last)g(example)g(ab)q(o)o(v)o(e,)h(note)e(that)g(the)h(list)h
(expression)f(con)o(tains)g(other)0 1300 y(expressions,)15
b(sev)o(eral)h(c)o(haracter)e(strings)h(in)h(this)f(case.)20
b(In)c(general,)f(those)g(expressions)h(can)f(b)q(e)h(of)e(an)o(y)h
(kind)0 1354 y(at)g(all,)g(not)g(necessarily)i(literal)f(v)m(alues.)21
b(F)l(or)15 b(example,)120 1418 y Fn({3)24 b(+)f(4,)h(3)g(-)f(4,)h(3)g
(*)f(4})0 1485 y Fq(is)16 b(an)f(expression)h(whose)f(v)m(alue)h(is)g
(the)f(list)h Fn({7,)f(-1,)g(12})p Fq(.)0 1621 y Fj(4.1.3)30
b(Naming)15 b(V)-5 b(alues)15 b(Within)h(a)f(V)-5 b(erb)62
1716 y Fq(As)18 b(discussed)i(earlier,)f(it)g(is)f(p)q(ossible)i(to)e
(store)f(v)m(alues)i(in)g(prop)q(erties)g(on)f(ob)s(jects;)g(the)h
(prop)q(erties)f(will)0 1770 y(k)o(eep)f(those)f(v)m(alues)i(forev)o
(er,)e(or)g(un)o(til)h(another)g(v)m(alue)g(is)g(explicitly)j(put)c
(there.)24 b(Quite)18 b(often,)e(though,)h(it)f(is)0
1824 y(useful)h(to)f(ha)o(v)o(e)g(a)g(place)h(to)f(put)g(a)g(v)m(alue)i
(for)d(just)h(a)g(little)i(while.)25 b(MOO)16 b(pro)o(vides)h(lo)q(cal)
g(v)m(ariables)h(for)e(this)0 1878 y(purp)q(ose.)62 1944
y(V)l(ariables)h(are)e(named)h(places)h(to)e(hold)h(v)m(alues;)h(y)o
(ou)e(can)h(get)f(and)h(set)g(the)f(v)m(alue)i(in)g(a)e(giv)o(en)h(v)m
(ariable)h(as)0 1998 y(man)o(y)e(times)h(as)f(y)o(ou)g(lik)o(e.)22
b(V)l(ariables)16 b(are)f(temp)q(orary)l(,)g(though;)g(they)h(only)g
(last)f(while)i(a)e(particular)h(v)o(erb)f(is)0 2052
y(running;)20 b(after)d(it)h(\014nishes,)i(all)f(of)e(the)h(v)m
(ariables)i(giv)o(en)e(v)m(alues)h(there)f(cease)g(to)g(exist)g(and)g
(the)g(v)m(alues)h(are)0 2106 y(forgotten.)62 2172 y(V)l(ariables)g
(are)e(also)h(\\lo)q(cal")g(to)f(a)g(particular)h(v)o(erb;)g(ev)o(ery)g
(v)o(erb)f(has)g(its)h(o)o(wn)f(set)g(of)g(them.)27 b(Th)o(us,)18
b(the)0 2226 y(v)m(ariables)f(set)d(in)j(one)e(v)o(erb)g(are)g(not)g
(visible)i(to)e(the)g(co)q(de)h(of)e(other)h(v)o(erbs.)62
2292 y(The)f(name)g(for)g(a)f(v)m(ariable)j(is)e(made)g(up)h(en)o
(tirely)g(of)e(letters,)h(digits,)h(and)f(the)g(underscore)g(c)o
(haracter)g(\(`)p Fn(_)p Fq('\))0 2346 y(and)h(do)q(es)h(not)f(b)q
(egin)h(with)g(a)f(digit.)20 b(The)c(follo)o(wing)g(are)f(all)h(v)m
(alid)h(v)m(ariable)f(names:)120 2411 y Fn(foo)120 2462
y(_foo)120 2514 y(this2that)120 2566 y(M68000)120 2618
y(two_words)120 2670 y(This_is_a_very_long_multiw)o(ord_var)o(iable_na)
o(me)p eop
%%Page: 15 17
15 16 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(15)62 183 y(Note)15 b(that,)f(along)i(with)f(almost)g
(ev)o(erything)h(else)g(in)g(MOO,)f(the)h(case)f(of)g(the)g(letters)g
(in)h(v)m(ariable)h(names)0 237 y(is)f(insigni\014can)o(t.)21
b(F)l(or)15 b(example,)h(these)f(are)g(all)h(names)f(for)g(the)g(same)g
(v)m(ariable:)120 301 y Fn(fubar)120 353 y(Fubar)120
405 y(FUBAR)120 457 y(fUbAr)62 523 y Fq(A)e(v)m(ariable)h(name)e(is)h
(itself)g(an)g(expression;)g(its)g(v)m(alue)h(is)f(the)f(v)m(alue)i(of)
e(the)g(named)h(v)m(ariable.)20 b(When)13 b(a)f(v)o(erb)0
577 y(b)q(egins,)18 b(almost)f(no)g(v)m(ariables)i(ha)o(v)o(e)d(v)m
(alues)j(y)o(et;)e(if)h(y)o(ou)e(try)h(to)f(use)i(the)f(v)m(alue)i(of)d
(a)h(v)m(ariable)i(that)d(do)q(esn't)0 631 y(ha)o(v)o(e)g(one,)h(the)g
(error)f(v)m(alue)i Fn(E_VARNF)e Fq(is)h(raised.)25 b(\(MOO)17
b(is)g(unlik)o(e)h(man)o(y)e(other)h(programming)f(languages)0
685 y(in)k(whic)o(h)f(one)g(m)o(ust)g(`declare')g(eac)o(h)g(v)m
(ariable)h(b)q(efore)f(using)h(it;)g(MOO)g(has)e(no)h(suc)o(h)g
(declarations.\))32 b(The)0 739 y(follo)o(wing)16 b(v)m(ariables)g(alw)
o(a)o(ys)f(ha)o(v)o(e)g(v)m(alues:)120 803 y Fn(INT)214
b(FLOAT)191 b(OBJ)120 855 y(STR)214 b(LIST)h(ERR)120
906 y(player)142 b(this)215 b(caller)120 958 y(verb)190
b(args)215 b(argstr)120 1010 y(dobj)190 b(dobjstr)143
b(prepstr)120 1062 y(iobj)190 b(iobjstr)143 b(NUM)62
1128 y Fq(The)16 b(v)m(alues)g(of)f(some)g(of)f(these)i(v)m(ariables)g
(alw)o(a)o(ys)f(start)f(out)h(the)g(same:)0 1206 y Fn(INT)168
b Fq(an)19 b(in)o(teger,)g(the)g(t)o(yp)q(e)g(co)q(de)g(for)f(in)o
(tegers)h(\(see)g(the)g(description)h(of)e(the)h(function)g
Fn(typeof\(\))p Fq(,)240 1260 y(b)q(elo)o(w\))0 1339
y Fn(NUM)168 b Fq(the)15 b(same)g(as)g Fn(INT)g Fq(\(for)f(historical)i
(reasons\))0 1417 y Fn(FLOAT)120 b Fq(an)15 b(in)o(teger,)g(the)g(t)o
(yp)q(e)h(co)q(de)f(for)g(\015oating-p)q(oin)o(t)h(n)o(um)o(b)q(ers)0
1496 y Fn(LIST)144 b Fq(an)15 b(in)o(teger,)g(the)g(t)o(yp)q(e)h(co)q
(de)f(for)g(lists)0 1574 y Fn(STR)168 b Fq(an)15 b(in)o(teger,)g(the)g
(t)o(yp)q(e)h(co)q(de)f(for)g(strings)0 1653 y Fn(OBJ)168
b Fq(an)15 b(in)o(teger,)g(the)g(t)o(yp)q(e)h(co)q(de)f(for)g(ob)s
(jects)0 1731 y Fn(ERR)168 b Fq(an)15 b(in)o(teger,)g(the)g(t)o(yp)q(e)
h(co)q(de)f(for)g(error)g(v)m(alues)62 1810 y(F)l(or)f(others,)f(the)i
(general)f(meaning)h(of)f(the)g(v)m(alue)h(is)g(consisten)o(t,)f
(though)g(the)g(v)m(alue)i(itself)f(is)f(di\013eren)o(t)h(for)0
1864 y(di\013eren)o(t)g(situations:)0 1942 y Fn(player)96
b Fq(an)21 b(ob)s(ject,)i(the)e(pla)o(y)o(er)h(who)f(t)o(yp)q(ed)h(the)
g(command)f(that)g(started)g(the)g(task)g(that)g(in)o(v)o(olv)o(ed)240
1996 y(running)16 b(this)g(piece)h(of)d(co)q(de.)0 2074
y Fn(this)144 b Fq(an)15 b(ob)s(ject,)f(the)i(ob)s(ject)e(on)h(whic)o
(h)h(the)g(curren)o(tly-running)h(v)o(erb)e(w)o(as)f(found.)0
2153 y Fn(caller)96 b Fq(an)20 b(ob)s(ject,)g(the)h(ob)s(ject)e(on)h
(whic)o(h)h(the)f(v)o(erb)g(that)g(called)i(the)e(curren)o(tly-running)
i(v)o(erb)e(w)o(as)240 2207 y(found.)k(F)l(or)16 b(the)g(\014rst)g(v)o
(erb)g(called)i(for)e(a)g(giv)o(en)h(command,)f(`)p Fn(caller)p
Fq(')f(has)h(the)h(same)f(v)m(alue)h(as)240 2261 y(`)p
Fn(player)p Fq('.)0 2339 y Fn(verb)144 b Fq(a)15 b(string,)g(the)g
(name)g(b)o(y)g(whic)o(h)h(the)g(curren)o(tly-running)h(v)o(erb)e(w)o
(as)f(iden)o(ti\014ed.)0 2418 y Fn(args)144 b Fq(a)14
b(list,)h(the)g(argumen)o(ts)e(giv)o(en)i(to)f(this)h(v)o(erb.)k(F)l
(or)14 b(the)g(\014rst)g(v)o(erb)h(called)h(for)d(a)i(giv)o(en)f
(command,)240 2472 y(this)i(is)f(a)g(list)h(of)f(strings,)g(the)g(w)o
(ords)f(on)i(the)f(command)g(line.)62 2550 y(The)h(rest)f(of)g(the)h
(so-called)h(\\built-in")g(v)m(ariables)g(are)e(only)h(really)g
(meaningful)h(for)e(the)h(\014rst)f(v)o(erb)g(called)0
2604 y(for)g(a)f(giv)o(en)i(command.)k(Their)c(seman)o(tics)f(is)h(giv)
o(en)f(in)h(the)g(discussion)h(of)d(command)h(parsing,)h(ab)q(o)o(v)o
(e.)62 2670 y(T)l(o)f(c)o(hange)g(what)g(v)m(alue)h(is)g(stored)f(in)h
(a)f(v)m(ariable,)h(use)g(an)f Fl(assignmen)o(t)h Fq(expression:)p
eop
%%Page: 16 18
16 17 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(16)120 183 y Fl(v)m(ariable)28 b Fn(=)c
Fl(expression)62 253 y Fq(F)l(or)14 b(example,)g(to)g(c)o(hange)g(the)g
(v)m(ariable)h(named)f(`)p Fn(x)p Fq(')f(to)g(ha)o(v)o(e)h(the)g(v)m
(alue)h(17,)e(y)o(ou)h(w)o(ould)g(write)g(`)p Fn(x)h(=)g(17)p
Fq(')e(as)0 307 y(an)i(expression.)21 b(An)15 b(assignmen)o(t)g
(expression)i(do)q(es)e(t)o(w)o(o)f(things:)37 376 y
Fo(\017)30 b Fq(it)15 b(c)o(hanges)h(the)f(v)m(alue)h(of)f(of)g(the)g
(named)h(v)m(ariable,)g(and)37 444 y Fo(\017)30 b Fq(it)15
b(returns)h(the)f(new)g(v)m(alue)i(of)d(that)h(v)m(ariable.)0
528 y(Th)o(us,)g(the)g(expression)120 596 y Fn(13)24
b(+)f(\(x)h(=)g(17\))0 665 y Fq(c)o(hanges)15 b(the)g(v)m(alue)i(of)e
(`)p Fn(x)p Fq(')f(to)g(b)q(e)i(17)f(and)g(returns)g(30.)0
818 y Fj(4.1.4)30 b(Arithmetic)16 b(Op)r(erators)62 917
y Fq(All)h(of)e(the)g(usual)h(simple)g(op)q(erations)g(on)f(n)o(um)o(b)
q(ers)g(are)g(a)o(v)m(ailable)i(to)e(MOO)g(programs:)120
984 y Fn(+)95 b(-)h(*)f(/)g(\045)62 1054 y Fq(These)18
b(are,)f(in)h(order,)f(addition,)i(subtraction,)f(m)o(ultiplication,)h
(division,)h(and)d(remainder.)27 b(In)18 b(the)g(fol-)0
1108 y(lo)o(wing)e(table,)f(the)g(expressions)h(on)f(the)h(left)f(ha)o
(v)o(e)g(the)g(corresp)q(onding)h(v)m(alues)h(on)e(the)g(righ)o(t:)120
1175 y Fn(5)24 b(+)f(2)407 1172 y Fo(\))526 1175 y Fn(7)120
1227 y(5)h(-)f(2)407 1224 y Fo(\))526 1227 y Fn(3)120
1279 y(5)h(*)f(2)407 1276 y Fo(\))526 1279 y Fn(10)120
1331 y(5)h(/)f(2)407 1328 y Fo(\))526 1331 y Fn(2)120
1383 y(5.0)g(/)h(2.0)407 1380 y Fo(\))526 1383 y Fn(2.5)120
1435 y(5)g(\045)f(2)407 1432 y Fo(\))526 1435 y Fn(1)120
1486 y(5.0)g(\045)h(2.0)407 1483 y Fo(\))526 1486 y Fn(1.0)120
1538 y(5)g(\045)f(-2)407 1535 y Fo(\))526 1538 y Fn(1)120
1590 y(-5)h(\045)f(2)407 1587 y Fo(\))526 1590 y Fn(-1)120
1642 y(-5)h(\045)f(-2)407 1639 y Fo(\))526 1642 y Fn(-1)120
1694 y(-\(5)g(+)h(2\))407 1691 y Fo(\))526 1694 y Fn(-7)62
1764 y Fq(Note)18 b(that)g(in)o(teger)g(division)j(in)e(MOO)g(thro)o
(ws)e(a)o(w)o(a)o(y)g(the)h(remainder)h(and)g(that)e(the)i(result)f(of)
g(the)h(re-)0 1818 y(mainder)c(op)q(erator)f(\(`)p Fn(\045)p
Fq('\))f(has)h(the)h(same)f(sign)h(as)g(the)f(left-hand)i(op)q(erand.)k
(Also,)15 b(note)f(that)g(`)p Fn(-)p Fq(')f(can)i(b)q(e)g(used)0
1872 y(without)g(a)g(left-hand)h(op)q(erand)g(to)e(negate)h(a)g(n)o
(umeric)h(expression.)120 1939 y Fl(Fine)21 b(p)q(oin)o(t:)32
b Fq(In)o(tegers)20 b(and)h(\015oating-p)q(oin)o(t)g(n)o(um)o(b)q(ers)g
(cannot)f(b)q(e)h(mixed)h(in)f(an)o(y)f(particular)120
1991 y(use)g(of)g(these)g(arithmetic)g(op)q(erators;)h(unlik)o(e)h
(some)d(other)h(programming)f(languages,)i(MOO)120 2043
y(do)q(es)e(not)e(automatically)i(co)q(erce)g(in)o(tegers)f(in)o(to)g
(\015oating-p)q(oin)o(t)h(n)o(um)o(b)q(ers.)29 b(Y)l(ou)19
b(can)f(use)h(the)120 2095 y Fn(tofloat\(\))14 b Fq(function)i(to)f(p)q
(erform)f(an)i(explicit)h(con)o(v)o(ersion.)62 2164 y(The)f(`)p
Fn(+)p Fq(')e(op)q(erator)g(can)i(also)f(b)q(e)h(used)f(to)g(app)q(end)
h(t)o(w)o(o)e(strings.)20 b(The)15 b(expression)120 2232
y Fn("foo")23 b(+)h("bar")0 2301 y Fq(has)15 b(the)g(v)m(alue)120
2369 y Fn("foobar")62 2439 y Fq(Unless)h(b)q(oth)f(op)q(erands)g(to)f
(an)g(arithmetic)i(op)q(erator)d(are)i(n)o(um)o(b)q(ers)g(of)f(the)h
(same)f(kind)i(\(or,)d(for)h(`)p Fn(+)p Fq(',)g(b)q(oth)0
2492 y(strings\),)i(the)g(error)f(v)m(alue)j Fn(E_TYPE)d
Fq(is)i(raised.)23 b(If)17 b(the)f(righ)o(t-hand)h(op)q(erand)f(for)g
(the)g(division)j(or)c(remainder)0 2546 y(op)q(erators)f(\(`)p
Fn(/)p Fq(')g(or)h(`)p Fn(\045)p Fq('\))f(is)i(zero,)e(the)i(error)e(v)
m(alue)i Fn(E_DIV)f Fq(is)h(raised.)62 2616 y(MOO)e(also)f(supp)q(orts)
h(the)f(exp)q(onen)o(tiation)i(op)q(eration,)e(also)h(kno)o(wn)f(as)g
(\\raising)g(to)g(a)g(p)q(o)o(w)o(er,")g(using)h(the)0
2670 y(`)p Fn(^)p Fq(')g(op)q(erator:)p eop
%%Page: 17 19
17 18 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(17)120 183 y Fn(3)24 b(^)f(4)407 180
y Fo(\))526 183 y Fn(81)120 235 y(3)h(^)f(4.5)p 417 206
109 3 v 417 247 3 41 v 428 237 a Fh(erro)o(r)p 523 247
V 417 249 109 3 v 621 235 a Fn(E_TYPE)120 287 y(3.5)g(^)h(4)407
284 y Fo(\))526 287 y Fn(150.0625)120 339 y(3.5)f(^)h(4.5)407
336 y Fo(\))526 339 y Fn(280.741230801382)0 418 y Fq(Note)13
b(that)g(if)h(the)g(\014rst)f(op)q(erand)h(is)g(an)g(in)o(teger,)f
(then)h(the)g(second)g(op)q(erand)g(m)o(ust)f(also)h(b)q(e)g(an)g(in)o
(teger.)19 b(If)14 b(the)0 472 y(\014rst)j(op)q(erand)i(is)f(a)g
(\015oating-p)q(oin)o(t)g(n)o(um)o(b)q(er,)h(then)f(the)g(second)g(op)q
(erand)h(can)f(b)q(e)g(either)h(kind)g(of)e(n)o(um)o(b)q(er.)0
526 y(Although)f(it)f(is)h(legal)g(to)f(raise)g(an)g(in)o(teger)g(to)g
(a)g(negativ)o(e)g(p)q(o)o(w)o(er,)g(it)g(is)h(unlik)o(ely)h(to)e(b)q
(e)h(terribly)g(useful.)0 724 y Fj(4.1.5)30 b(Comparing)15
b(V)-5 b(alues)62 832 y Fq(An)o(y)15 b(t)o(w)o(o)f(v)m(alues)i(can)f(b)
q(e)h(compared)f(for)f(equalit)o(y)i(using)g(`)p Fn(==)p
Fq(')e(and)h(`)p Fn(!=)p Fq('.)j(The)e(\014rst)e(of)h(these)g(returns)g
(1)f(if)0 886 y(the)h(t)o(w)o(o)f(v)m(alues)i(are)f(equal)h(and)g(0)f
(otherwise;)g(the)g(second)h(do)q(es)f(the)g(rev)o(erse:)120
963 y Fn(3)24 b(==)f(4)980 960 y Fo(\))1075 963 y Fn(0)120
1015 y(3)h(!=)f(4)980 1012 y Fo(\))1075 1015 y Fn(1)120
1066 y(3)h(==)f(3.0)980 1063 y Fo(\))1075 1066 y Fn(0)120
1118 y("foo")g(==)h("Foo")980 1115 y Fo(\))1075 1118
y Fn(1)120 1170 y(#34)f(!=)h(#34)980 1167 y Fo(\))1075
1170 y Fn(0)120 1222 y({1,)f(#34,)h("foo"})f(==)g({1,)h(#34,)f("FoO"})
980 1219 y Fo(\))1075 1222 y Fn(1)120 1274 y(E_DIV)g(==)h(E_TYPE)980
1271 y Fo(\))1075 1274 y Fn(0)120 1326 y(3)g(!=)f("foo")980
1323 y Fo(\))1075 1326 y Fn(1)0 1405 y Fq(Note)13 b(that)g(in)o(tegers)
g(and)h(\015oating-p)q(oin)o(t)g(n)o(um)o(b)q(ers)g(are)f(nev)o(er)g
(equal)i(to)d(one)i(another,)f(ev)o(en)h(in)g(the)g(`ob)o(vious')0
1459 y(cases.)23 b(Also)16 b(note)g(that)g(comparison)g(of)f(strings)i
(\(and)f(list)h(v)m(alues)g(con)o(taining)g(strings\))e(is)i
(case-insensitiv)o(e;)0 1513 y(that)g(is,)h(it)g(do)q(es)g(not)f
(distinguish)i(b)q(et)o(w)o(een)f(the)g(upp)q(er-)g(and)g(lo)o(w)o
(er-case)f(v)o(ersion)h(of)f(letters.)27 b(T)l(o)17 b(test)g(t)o(w)o(o)
0 1567 y(v)m(alues)f(for)f(case-sensitiv)o(e)h(equalit)o(y)l(,)g(use)g
(the)f(`)p Fn(equal)p Fq(')f(function)i(describ)q(ed)h(later.)120
1643 y Fk(W)l(arning)p Fq(:)k(It)14 b(is)g(easy)g(\(and)g(v)o(ery)f
(anno)o(ying\))h(to)f(confuse)i(the)f(equalit)o(y-testing)h(op)q
(erator)e(\(`)p Fn(==)p Fq('\))120 1695 y(with)j(the)f(assignmen)o(t)g
(op)q(erator)f(\(`)p Fn(=)p Fq('\),)f(leading)k(to)e(nast)o(y)l(,)f
(hard-to-\014nd)i(bugs.)k(Don't)14 b(do)h(this.)62 1774
y(Num)o(b)q(ers,)g(ob)s(ject)e(n)o(um)o(b)q(ers,)h(strings,)g(and)h
(error)e(v)m(alues)i(can)f(also)h(b)q(e)f(compared)g(for)g(ordering)g
(purp)q(oses)0 1828 y(using)i(the)f(follo)o(wing)h(op)q(erators:)120
1904 y Fn(<)167 b(<=)143 b(>=)g(>)0 1983 y Fq(meaning)12
b(\\less)g(than,")g(\\less)g(than)g(or)f(equal,")h(\\greater)f(than)h
(or)f(equal,")h(and)g(\\greater)f(than,")g(resp)q(ectiv)o(ely)l(.)0
2037 y(As)k(with)g(the)g(equalit)o(y)h(op)q(erators,)d(these)j(return)e
(1)h(when)g(their)h(op)q(erands)f(are)g(in)g(the)g(appropriate)g
(relation)0 2091 y(and)g(0)g(otherwise:)120 2168 y Fn(3)24
b(<)f(4)503 2165 y Fo(\))597 2168 y Fn(1)120 2220 y(3)h(<)f(4.0)p
512 2191 V 512 2231 3 41 v 524 2221 a Fh(erro)o(r)p 618
2231 V 512 2233 109 3 v 693 2220 a Fn(E_TYPE)120 2272
y(#34)g(>=)h(#32)503 2269 y Fo(\))597 2272 y Fn(1)120
2324 y("foo")f(<=)h("Boo")503 2321 y Fo(\))597 2324 y
Fn(0)120 2375 y(E_DIV)f(>)h(E_TYPE)503 2372 y Fo(\))597
2375 y Fn(1)0 2454 y Fq(Note)18 b(that,)g(as)f(with)i(the)f(equalit)o
(y)h(op)q(erators,)f(strings)g(are)g(compared)g(case-insensitiv)o(ely)l
(.)31 b(T)l(o)18 b(p)q(erform)g(a)0 2508 y(case-sensitiv)o(e)k(string)f
(comparison,)h(use)f(the)g(`)p Fn(strcmp)p Fq(')e(function)j(describ)q
(ed)h(later.)37 b(Also)21 b(note)g(that)f(the)0 2562
y(error)13 b(v)m(alues)i(are)f(ordered)g(as)f(giv)o(en)i(in)f(the)g
(table)g(in)h(the)f(section)g(on)g(v)m(alues.)21 b(If)14
b(the)g(op)q(erands)g(to)f(these)h(four)0 2616 y(comparison)d(op)q
(erators)g(are)g(of)g(di\013eren)o(t)g(t)o(yp)q(es)h(\(ev)o(en)f(in)o
(tegers)g(and)h(\015oating-p)q(oin)o(t)g(n)o(um)o(b)q(ers)g(are)f
(considered)0 2670 y(di\013eren)o(t)k(t)o(yp)q(es\),)g(or)g(if)g(they)h
(are)e(lists,)i(then)g Fn(E_TYPE)e Fq(is)i(raised.)p
eop
%%Page: 18 20
18 19 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(18)0 183 y Fj(4.1.6)30 b(V)-5 b(alues)15
b(as)h(T)-5 b(rue)14 b(and)i(F)-5 b(alse)62 275 y Fq(There)18
b(is)g(a)f(notion)h(in)g(MOO)g(of)f Fl(true)i Fq(and)f
Fl(false)i Fq(v)m(alues;)g(ev)o(ery)d(v)m(alue)h(is)g(one)g(or)f(the)g
(other.)26 b(The)18 b(true)0 329 y(v)m(alues)e(are)f(as)g(follo)o(ws:)
37 391 y Fo(\017)30 b Fq(all)16 b(in)o(tegers)f(other)g(than)g(zero,)37
455 y Fo(\017)30 b Fq(all)16 b(\015oating-p)q(oin)o(t)g(n)o(um)o(b)q
(ers)f(not)g(equal)h(to)f Fn(0.0)p Fq(,)37 520 y Fo(\017)30
b Fq(all)16 b(non-empt)o(y)f(strings)h(\(i.e.,)e(other)h(than)g(`)p
Fn("")p Fq('\),)e(and)37 584 y Fo(\017)30 b Fq(all)16
b(non-empt)o(y)f(lists)h(\(i.e.,)f(other)g(than)g(`)p
Fn({})p Fq('\).)0 657 y(All)h(other)f(v)m(alues)i(are)e(false:)37
719 y Fo(\017)30 b Fq(the)15 b(in)o(teger)h(zero,)37
784 y Fo(\017)30 b Fq(the)15 b(\015oating-p)q(oin)o(t)h(n)o(um)o(b)q
(ers)g Fn(0.0)e Fq(and)i Fn(-0.0)p Fq(,)37 848 y Fo(\017)30
b Fq(the)15 b(empt)o(y)g(string)g(\(`)p Fn("")p Fq('\),)37
912 y Fo(\017)30 b Fq(the)15 b(empt)o(y)g(list)h(\(`)p
Fn({})p Fq('\),)37 977 y Fo(\017)30 b Fq(all)16 b(ob)s(ject)f(n)o(um)o
(b)q(ers,)g(and)37 1041 y Fo(\017)30 b Fq(all)16 b(error)f(v)m(alues.)
62 1114 y(There)h(are)e(four)h(kinds)h(of)e(expressions)i(and)f(t)o(w)o
(o)f(kinds)i(of)f(statemen)o(ts)e(that)i(dep)q(end)h(up)q(on)g(this)g
(classi\014-)0 1168 y(cation)g(of)g(MOO)h(v)m(alues.)24
b(In)16 b(describing)i(them,)f(I)f(sometimes)g(refer)g(to)g(the)g
Fl(truth)g(v)m(alue)k Fq(of)c(a)g(MOO)g(v)m(alue;)0 1222
y(this)g(is)f(just)g Fl(true)j Fq(or)d Fl(false)p Fq(,)g(the)g
(category)f(in)o(to)h(whic)o(h)h(that)f(MOO)g(v)m(alue)i(is)f
(classi\014ed.)62 1284 y(The)g(conditional)h(expression)f(in)g(MOO)f
(has)g(the)h(follo)o(wing)f(form:)120 1345 y Fl(expression-1)28
b Fn(?)c Fl(expression-2)k Fn(|)c Fl(expression-3)62
1407 y Fq(First,)18 b Fl(expression-1)k Fq(is)c(ev)m(aluated.)28
b(If)17 b(it)h(returns)g(a)f(true)g(v)m(alue,)i(then)f
Fl(expression-2)k Fq(is)c(ev)m(aluated)h(and)0 1461 y(whatev)o(er)12
b(it)h(returns)f(is)h(returned)g(as)f(the)h(v)m(alue)h(of)e(the)h
(conditional)h(expression)f(as)g(a)f(whole.)19 b(If)13
b Fl(expression-1)0 1515 y Fq(returns)19 b(a)f(false)i(v)m(alue,)g
(then)g Fl(expression-3)j Fq(is)d(ev)m(aluated)g(instead)f(and)g(its)g
(v)m(alue)i(is)e(used)h(as)e(that)g(of)h(the)0 1569 y(conditional)e
(expression.)120 1629 y Fn(1)24 b(?)f(2)h(|)g(3)598 1626
y Fo(\))693 1629 y Fn(2)120 1681 y(0)g(?)f(2)h(|)g(3)598
1678 y Fo(\))693 1681 y Fn(3)120 1733 y("foo")f(?)h(17)f(|)h({#34})598
1730 y Fo(\))693 1733 y Fn(17)0 1795 y Fq(Note)15 b(that)f(only)i(one)f
(of)g Fl(expression-2)20 b Fq(and)15 b Fl(expression-3)20
b Fq(is)15 b(ev)m(aluated,)h(nev)o(er)g(b)q(oth.)62 1858
y(T)l(o)f(negate)g(the)g(truth)g(v)m(alue)i(of)d(a)h(MOO)h(v)m(alue,)g
(use)f(the)h(`)p Fn(!)p Fq(')e(op)q(erator:)120 1918
y Fn(!)24 b Fl(expression)62 1980 y Fq(If)16 b(the)f(v)m(alue)h(of)f
Fl(expression)h Fq(is)g(true,)f(`)p Fn(!)p Fq(')f(returns)h(0;)g
(otherwise,)g(it)g(returns)g(1:)120 2041 y Fn(!)24 b("foo")407
2038 y Fo(\))502 2041 y Fn(0)120 2093 y(!)g(\(3)f(>=)h(4\))407
2090 y Fo(\))502 2093 y Fn(1)0 2155 y Fq(The)15 b(negation)h(op)q
(erator)e(is)i(usually)g(read)g(as)e(\\not.")62 2217
y(It)19 b(is)g(frequen)o(tly)f(useful)i(to)e(test)f(more)h(than)h(one)f
(condition)i(to)d(see)i(if)g(some)f(or)g(all)h(of)f(them)g(are)g(true.)
0 2271 y(MOO)e(pro)o(vides)f(t)o(w)o(o)f(op)q(erators)g(for)h(this:)120
2331 y Fl(expression-1)28 b Fn(&&)c Fl(expression-2)120
2383 y(expression-1)k Fn(||)c Fl(expression-2)0 2446
y Fq(These)16 b(op)q(erators)e(are)h(usually)h(read)f(as)g(\\and")g
(and)g(\\or,")f(resp)q(ectiv)o(ely)l(.)62 2508 y(The)19
b(`)p Fn(&&)p Fq(')e(op)q(erator)h(\014rst)g(ev)m(aluates)h
Fl(expression-1)p Fq(.)30 b(If)19 b(it)f(returns)h(a)f(true)g(v)m
(alue,)i(then)f Fl(expression-2)j Fq(is)0 2562 y(ev)m(aluated)15
b(and)f(its)h(v)m(alue)g(b)q(ecomes)g(the)f(v)m(alue)h(of)f(the)g(`)p
Fn(&&)p Fq(')f(expression)i(as)e(a)h(whole;)h(otherwise,)f(the)g(v)m
(alue)h(of)0 2616 y Fl(expression-1)k Fq(is)c(used)g(as)f(the)h(v)m
(alue)g(of)f(the)h(`)p Fn(&&)p Fq(')f(expression.)20
b(Note)14 b(that)g Fl(expression-2)19 b Fq(is)c(only)g(ev)m(aluated)g
(if)0 2670 y Fl(expression-1)20 b Fq(returns)15 b(a)g(true)g(v)m(alue.)
21 b(The)15 b(`)p Fn(&&)p Fq(')f(expression)i(is)g(equiv)m(alen)o(t)h
(to)e(the)g(conditional)i(expression)p eop
%%Page: 19 21
19 20 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(19)120 183 y Fl(expression-1)28 b Fn(?)c
Fl(expression-2)k Fn(|)c Fl(expression-1)0 257 y Fq(except)16
b(that)e Fl(expression-1)20 b Fq(is)15 b(only)h(ev)m(aluated)g(once.)62
331 y(The)21 b(`)p Fn(||)p Fq(')e(op)q(erator)h(w)o(orks)g(similarly)l
(,)j(except)e(that)f Fl(expression-2)25 b Fq(is)c(ev)m(aluated)g(only)g
(if)g Fl(expression-1)0 385 y Fq(returns)15 b(a)g(false)g(v)m(alue.)22
b(It)15 b(is)h(equiv)m(alen)o(t)g(to)f(the)g(conditional)i(expression)
120 456 y Fl(expression-1)28 b Fn(?)c Fl(expression-1)k
Fn(|)c Fl(expression-2)0 530 y Fq(except)16 b(that,)e(as)h(with)g(`)p
Fn(&&)p Fq(',)f Fl(expression-1)19 b Fq(is)d(only)g(ev)m(aluated)g
(once.)62 604 y(These)g(t)o(w)o(o)e(op)q(erators)g(b)q(eha)o(v)o(e)h(v)
o(ery)g(m)o(uc)o(h)h(lik)o(e)g(\\and")f(and)g(\\or")f(in)i(English:)120
676 y Fn(1)24 b(&&)f(1)694 673 y Fo(\))788 676 y Fn(1)120
728 y(0)h(&&)f(1)694 725 y Fo(\))788 728 y Fn(0)120 780
y(0)h(&&)f(0)694 777 y Fo(\))788 780 y Fn(0)120 831 y(1)h(||)f(1)694
828 y Fo(\))788 831 y Fn(1)120 883 y(0)h(||)f(1)694 880
y Fo(\))788 883 y Fn(1)120 935 y(0)h(||)f(0)694 932 y
Fo(\))788 935 y Fn(0)120 987 y(17)h(<=)f(23)48 b(&&)f(23)24
b(<=)f(27)694 984 y Fo(\))788 987 y Fn(1)0 1161 y Fj(4.1.7)30
b(Indexing)15 b(in)n(to)g(Lists)h(and)f(Strings)62 1264
y Fq(Both)h(strings)g(and)g(lists)h(can)f(b)q(e)h(seen)f(as)g(ordered)g
(sequences)h(of)f(MOO)g(v)m(alues.)23 b(In)17 b(the)f(case)g(of)f
(strings,)0 1318 y(eac)o(h)g(is)h(a)f(sequence)i(of)e(single-c)o
(haracter)h(strings;)f(that)f(is,)i(one)f(can)h(view)g(the)f(string)g
Fn("bar")g Fq(as)g(a)g(sequence)0 1372 y(of)h(the)g(strings)g
Fn("b")p Fq(,)g Fn("a")p Fq(,)g(and)g Fn("r")p Fq(.)23
b(MOO)16 b(allo)o(ws)h(y)o(ou)f(to)f(refer)i(to)e(the)i(elemen)o(ts)g
(of)e(lists)i(and)g(strings)f(b)o(y)0 1426 y(n)o(um)o(b)q(er,)f(b)o(y)h
(the)f Fl(index)20 b Fq(of)15 b(that)g(elemen)o(t)h(in)g(the)f(list)h
(or)f(string.)21 b(The)15 b(\014rst)g(elemen)o(t)h(in)h(a)e(list)h(or)f
(string)g(has)0 1480 y(index)h(1,)f(the)g(second)h(has)f(index)i(2,)d
(and)h(so)g(on.)0 1653 y Fj(4.1.7.1)30 b(Extracting)15
b(an)g(Elemen)n(t)h(from)f(a)g(List)g(or)g(String)62
1756 y Fq(The)h(indexing)h(expression)f(in)g(MOO)f(extracts)g(a)g(sp)q
(eci\014ed)i(elemen)o(t)f(from)e(a)h(list)h(or)f(string:)120
1828 y Fl(expression-1)t Fn([)p Fl(expression-2)t Fn(])62
1902 y Fq(First,)c Fl(expression-1)k Fq(is)c(ev)m(aluated;)i(it)d(m)o
(ust)g(return)h(a)f(list)h(or)f(a)g(string)g(\(the)h
Fl(sequence)s Fq(\).)18 b(Then,)12 b Fl(expression-)0
1956 y(2)21 b Fq(is)e(ev)m(aluated)g(and)f(m)o(ust)g(return)g(an)g(in)o
(teger)g(\(the)g Fl(index)s Fq(\).)30 b(If)18 b(either)h(of)e(the)h
(expressions)h(returns)f(some)0 2010 y(other)j(t)o(yp)q(e)g(of)g(v)m
(alue,)j Fn(E_TYPE)c Fq(is)i(returned.)38 b(The)22 b(index)g(m)o(ust)f
(b)q(e)h(b)q(et)o(w)o(een)f(1)g(and)h(the)f(length)h(of)f(the)0
2064 y(sequence,)16 b(inclusiv)o(e;)h(if)e(it)g(is)g(not,)f(then)h
Fn(E_RANGE)f Fq(is)h(raised.)20 b(The)15 b(v)m(alue)h(of)f(the)f
(indexing)j(expression)f(is)f(the)0 2118 y(index'th)i(elemen)o(t)g(in)g
(the)f(sequence.)25 b(An)o(ywhere)16 b(within)i Fl(expression-2)p
Fq(,)e(y)o(ou)g(can)h(use)f(the)h(sym)o(b)q(ol)f Fn($)g
Fq(as)g(an)0 2171 y(expression)g(returning)g(the)f(length)h(of)f(the)g
(v)m(alue)h(of)f Fl(expression-1)p Fq(.)120 2243 y Fn("fob"[2])694
2240 y Fo(\))788 2243 y Fn("o")120 2295 y("fob"[1])694
2292 y Fo(\))788 2295 y Fn("f")120 2347 y({#12,)23 b(#23,)g(#34}[$)h(-)
f(1])694 2344 y Fo(\))788 2347 y Fn(#23)0 2421 y Fq(Note)13
b(that)h(there)f(are)h(no)g(legal)g(indices)i(for)e(the)f(empt)o(y)h
(string)g(or)f(list,)i(since)g(there)e(are)h(no)g(in)o(tegers)g(b)q(et)
o(w)o(een)0 2475 y(1)h(and)g(0)g(\(the)g(length)h(of)f(the)g(empt)o(y)g
(string)g(or)g(list\).)120 2546 y Fl(Fine)g(p)q(oin)o(t:)21
b Fq(The)14 b Fn($)h Fq(expression)g(actually)g(returns)g(the)f(length)
h(of)f(the)h(v)m(alue)h(of)e(the)g(expression)120 2598
y(just)h(b)q(efore)g(the)h(nearest)f(enclosing)h Fn([)p
Fi(:)8 b(:)g(:)n Fn(])15 b Fq(indexing)i(or)e(subranging)h(brac)o(k)o
(ets.)j(F)l(or)14 b(example:)240 2670 y Fn("frob"[{3,)22
b(2,)i(4}[$]])838 2667 y Fo(\))932 2670 y Fn("b")p eop
%%Page: 20 22
20 21 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(20)0 183 y Fj(4.1.7.2)30 b(Replacing)15
b(an)g(Elemen)n(t)g(of)g(a)g(List)g(or)g(String)62 283
y Fq(It)i(often)g(happ)q(ens)i(that)d(one)h(w)o(an)o(ts)f(to)h(c)o
(hange)g(just)g(one)g(particular)h(slot)f(of)g(a)g(list)h(or)e(string,)
h(whic)o(h)h(is)0 336 y(stored)h(in)h(a)f(v)m(ariable)i(or)e(a)g(prop)q
(ert)o(y)l(.)32 b(This)20 b(can)f(b)q(e)h(done)g(con)o(v)o(enien)o(tly)
h(using)f(an)f Fl(indexed)i(assignmen)o(t)0 390 y Fq(ha)o(ving)15
b(one)h(of)f(the)g(follo)o(wing)h(forms:)120 459 y Fl(v)m(ariable)s
Fn([)p Fl(index-expr)s Fn(])27 b(=)c Fl(result-expr)120
510 y(ob)s(ject-expr)p Fn(.)p Fl(name)s Fn([)p Fl(index-expr)s
Fn(])i(=)f Fl(result-expr)120 562 y(ob)s(ject-expr)p
Fn(.\()p Fl(name-expr)s Fn(\)[)p Fl(index-expr)s Fn(])i(=)d
Fl(result-expr)120 614 y Fn($)p Fl(name)s Fn([)p Fl(index-expr)s
Fn(])i(=)f Fl(result-expr)0 684 y Fq(The)12 b(\014rst)f(form)g(writes)h
(in)o(to)g(a)f(v)m(ariable,)j(and)e(the)f(last)h(three)g(forms)f(write)
h(in)o(to)f(a)h(prop)q(ert)o(y)l(.)18 b(The)12 b(usual)h(errors)0
738 y(\()p Fn(E_TYPE)p Fq(,)g Fn(E_INVIND)p Fq(,)h Fn(E_PROPNF)f
Fq(and)i Fn(E_PERM)f Fq(for)h(lac)o(k)g(of)f(read/write)h(p)q
(ermission)h(on)f(the)g(prop)q(ert)o(y\))f(ma)o(y)0 792
y(b)q(e)h(raised,)g(just)g(as)f(in)h(reading)g(and)g(writing)g(an)o(y)g
(ob)s(ject)f(prop)q(ert)o(y;)g(see)h(the)g(discussion)h(of)e(ob)s(ject)
g(prop)q(ert)o(y)0 846 y(expressions)19 b(b)q(elo)o(w)g(for)f(details.)
30 b(Corresp)q(ondingly)l(,)20 b(if)e Fl(v)m(ariable)23
b Fq(do)q(es)18 b(not)g(y)o(et)g(ha)o(v)o(e)g(a)g(v)m(alue)h(\(i.e.,)g
(it)f(has)0 900 y(nev)o(er)d(b)q(een)i(assigned)e(to\),)f
Fn(E_VARNF)h Fq(will)h(b)q(e)g(raised.)62 971 y(If)g
Fl(index-expr)k Fq(is)c(not)f(an)g(in)o(teger,)g(or)g(if)g(the)h(v)m
(alue)g(of)f Fl(v)m(ariable)k Fq(or)c(the)g(prop)q(ert)o(y)g(is)h(not)f
(a)g(list)h(or)e(string,)0 1024 y Fn(E_TYPE)i Fq(is)h(raised.)24
b(If)17 b Fl(result-expr)j Fq(is)d(a)f(string,)h(but)f(not)g(of)h
(length)g(1,)f Fn(E_INVARG)f Fq(is)i(raised.)24 b(No)o(w)16
b(supp)q(ose)0 1078 y Fl(index-expr)24 b Fq(ev)m(aluates)19
b(to)f(an)h(in)o(teger)g Fl(k)p Fq(.)31 b(If)19 b Fl(k)i
Fq(is)f(outside)f(the)g(range)f(of)h(the)g(list)g(or)g(string)f(\(i.e.)
31 b(smaller)0 1132 y(than)17 b(1)h(or)f(greater)g(than)g(the)h(length)
g(of)f(the)h(list)g(or)g(string\),)f Fn(E_RANGE)g Fq(is)h(raised.)27
b(Otherwise,)19 b(the)f(actual)0 1186 y(assignmen)o(t)13
b(tak)o(es)f(place.)20 b(F)l(or)12 b(lists,)i(the)f(v)m(ariable)i(or)d
(the)h(prop)q(ert)o(y)g(is)g(assigned)h(a)e(new)i(list)f(that)g(is)g
(iden)o(tical)0 1240 y(to)g(the)i(original)g(one)f(except)g(at)g(the)g
Fl(k)p Fq(-th)g(p)q(osition,)h(where)f(the)h(new)f(list)h(con)o(tains)f
(the)g(result)g(of)g Fl(result-expr)0 1294 y Fq(instead.)26
b(F)l(or)16 b(strings,)h(the)g(v)m(ariable)h(or)f(the)g(prop)q(ert)o(y)
f(is)i(assigned)f(a)g(new)g(string)g(that)f(is)i(iden)o(tical)h(to)d
(the)0 1348 y(original)g(one,)f(except)h(the)f Fl(k)p
Fq(-th)g(c)o(haracter)g(is)h(c)o(hanged)f(to)g(b)q(e)h
Fl(result-expr)p Fq(.)62 1418 y(The)i(assignmen)o(t)g(expression)g
(itself)h(returns)e(the)h(v)m(alue)h(of)e Fl(result-expr)p
Fq(.)28 b(F)l(or)17 b(the)h(follo)o(wing)h(examples,)0
1472 y(assume)13 b(that)g Fn(l)h Fq(initially)i(con)o(tains)e(the)g
(list)g Fn({1,)h(2,)g(3})e Fq(and)h(that)f Fn(s)g Fq(initially)j(con)o
(tains)e(the)g(string)f Fn(")p Fq(fo)q(obar)p Fn(")p
Fq(:)120 1541 y Fn(l[5])23 b(=)h(3)p 560 1512 109 3 v
560 1552 3 41 v 572 1542 a Fh(erro)o(r)p 666 1552 V 560
1554 109 3 v 764 1541 a Fn(E_RANGE)120 1592 y(l["first"])e(=)i(4)p
560 1564 V 560 1604 3 41 v 572 1594 a Fh(erro)o(r)p 666
1604 V 560 1606 109 3 v 764 1592 a Fn(E_TYPE)120 1644
y(s[3])f(=)h("baz")p 560 1616 V 560 1656 3 41 v 572 1646
a Fh(erro)o(r)p 666 1656 V 560 1658 109 3 v 764 1644
a Fn(E_INVARG)120 1696 y(l[2])f(=)h(l[2])f(+)h(3)551
1693 y Fo(\))669 1696 y Fn(5)120 1748 y(l)551 1745 y
Fo(\))669 1748 y Fn({1,)f(5,)h(3})120 1800 y(l[2])f(=)h("foo")551
1797 y Fo(\))669 1800 y Fn("foo")120 1852 y(l)551 1849
y Fo(\))669 1852 y Fn({1,)f("foo",)g(3})120 1904 y(s[2])g(=)h("u")551
1901 y Fo(\))669 1904 y Fn("u")120 1956 y(s)551 1953
y Fo(\))669 1956 y Fn("fuobar")120 2008 y(s[$])f(=)h("z")551
2005 y Fo(\))669 2008 y Fn("z")120 2059 y(s)551 2056
y Fo(\))669 2059 y Fn("fuobaz")0 2130 y Fq(Note)19 b(that)f(the)h
Fn($)f Fq(expression)i(ma)o(y)e(also)h(b)q(e)h(used)f(in)h(indexed)g
(assignmen)o(ts)f(with)g(the)g(same)g(meaning)g(as)0
2184 y(b)q(efore.)120 2252 y Fl(Fine)e(p)q(oin)o(t:)22
b Fq(After)15 b(an)h(indexed)h(assignmen)o(t,)f(the)g(v)m(ariable)h(or)
e(prop)q(ert)o(y)h(con)o(tains)g(a)f Fl(new)20 b Fq(list)120
2304 y(or)c(string,)g(a)g(cop)o(y)h(of)f(the)g(original)i(list)f(in)g
(all)h(but)e(the)h Fl(k)p Fq(-th)f(place,)i(where)e(it)h(con)o(tains)g
(a)f(new)120 2356 y(v)m(alue.)26 b(In)17 b(programming-language)f
(jargon,)g(the)h(original)h(list)f(is)g(not)g(m)o(utated,)f(and)h
(there)f(is)120 2407 y(no)f(aliasing.)21 b(\(Indeed,)16
b(no)f(MOO)h(v)m(alue)g(is)g(m)o(utable)g(and)f(no)g(aliasing)h(ev)o
(er)g(o)q(ccurs.\))62 2478 y(In)22 b(the)g(list)g(case,)h(indexed)g
(assignmen)o(t)e(can)h(b)q(e)g(nested)g(to)e(man)o(y)h(lev)o(els,)j(to)
d(w)o(ork)f(on)i(nested)g(lists.)0 2532 y(Assume)15 b(that)g
Fn(l)g Fq(initially)j(con)o(tains)d(the)g(list)120 2600
y Fn({{1,)23 b(2,)h(3},)f({4,)h(5,)f(6},)h("foo"})0 2670
y Fq(in)16 b(the)f(follo)o(wing)h(examples:)p eop
%%Page: 21 23
21 22 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(21)120 183 y Fn(l[7])23 b(=)h(4)p 632
155 109 3 v 632 195 3 41 v 643 185 a Fh(erro)o(r)p 738
195 V 632 197 109 3 v 836 183 a Fn(E_RANGE)120 235 y(l[1][8])f(=)h(35)p
632 206 V 632 247 3 41 v 643 237 a Fh(erro)o(r)p 738
247 V 632 249 109 3 v 836 235 a Fn(E_RANGE)120 287 y(l[3][2])f(=)h(7)p
632 258 V 632 298 3 41 v 643 288 a Fh(erro)o(r)p 738
298 V 632 301 109 3 v 836 287 a Fn(E_TYPE)120 339 y(l[1][1][1])e(=)i(3)
p 632 310 V 632 350 3 41 v 643 340 a Fh(erro)o(r)p 738
350 V 632 353 109 3 v 836 339 a Fn(E_TYPE)120 391 y(l[2][2])f(=)h
(-l[2][2])622 388 y Fo(\))740 391 y Fn(-5)120 443 y(l)622
440 y Fo(\))740 443 y Fn({{1,)g(2,)f(3},)h({4,)f(-5,)h(6},)f("foo"})120
495 y(l[2])g(=)h("bar")622 492 y Fo(\))740 495 y Fn("bar")120
546 y(l)622 543 y Fo(\))740 546 y Fn({{1,)g(2,)f(3},)h("bar",)f("foo"})
120 598 y(l[2][$])g(=)h("z")622 595 y Fo(\))740 598 y
Fn("z")120 650 y(l)622 647 y Fo(\))740 650 y Fn({{1,)g(2,)f(3},)h
("baz",)f("foo"})0 715 y Fq(The)17 b(\014rst)e(t)o(w)o(o)g(examples)j
(raise)e Fn(E_RANGE)f Fq(b)q(ecause)j(7)e(is)h(out)e(of)h(the)h(range)f
(of)g Fn(l)g Fq(and)g(8)g(is)h(out)f(of)g(the)g(range)0
769 y(of)f Fn(l[1])p Fq(.)k(The)c(next)h(t)o(w)o(o)e(examples)i(raise)f
Fn(E_TYPE)f Fq(b)q(ecause)j Fn(l[3])d Fq(and)i Fn(l[1][1])e
Fq(are)h(not)f(lists.)0 902 y Fj(4.1.7.3)30 b(Extracting)15
b(a)g(Subsequence)i(of)d(a)h(List)g(or)g(String)62 996
y Fq(The)h(range)f(expression)h(extracts)e(a)h(sp)q(eci\014ed)i
(subsequence)g(from)d(a)h(list)h(or)f(string:)120 1059
y Fl(expression-1)t Fn([)p Fl(expression-2)p Fn(..)p
Fl(expression-3)t Fn(])62 1124 y Fq(The)20 b(three)g(expressions)g(are)
f(ev)m(aluated)i(in)f(order.)33 b Fl(Expression-1)24
b Fq(m)o(ust)19 b(return)g(a)g(list)i(or)e(string)g(\(the)0
1178 y Fl(sequence)s Fq(\))g(and)f(the)g(other)g(t)o(w)o(o)f
(expressions)i(m)o(ust)e(return)h(in)o(tegers)g(\(the)g
Fl(lo)o(w)k Fq(and)d Fl(high)f Fq(indices,)j(resp)q(ec-)0
1232 y(tiv)o(ely\);)15 b(otherwise,)f Fn(E_TYPE)g Fq(is)g(raised.)20
b(The)15 b Fn($)f Fq(expression)h(can)g(b)q(e)g(used)g(in)g(either)g
(or)f(b)q(oth)g(of)g Fl(expression-2)0 1286 y Fq(and)h
Fl(expression-3)20 b Fq(just)15 b(as)g(b)q(efore,)g(meaning)h(the)f
(length)h(of)f(the)g(v)m(alue)h(of)f Fl(expression-1)p
Fq(.)62 1351 y(If)23 b(the)g(lo)o(w)g(index)h(is)f(greater)f(than)g
(the)h(high)h(index,)h(then)e(the)g(empt)o(y)f(string)h(or)f(list)i(is)
f(returned,)0 1405 y(dep)q(ending)18 b(on)d(whether)h(the)g(sequence)h
(is)f(a)f(string)h(or)f(a)g(list.)23 b(Otherwise,)16
b(b)q(oth)g(indices)h(m)o(ust)e(b)q(e)i(b)q(et)o(w)o(een)0
1459 y(1)d(and)g(the)g(length)h(of)f(the)g(sequence;)h
Fn(E_RANGE)e Fq(is)i(raised)f(if)h(they)f(are)g(not.)19
b(A)14 b(new)g(list)h(or)f(string)g(is)h(returned)0 1513
y(that)f(con)o(tains)i(just)f(the)g(elemen)o(ts)h(of)f(the)g(sequence)h
(with)g(indices)h(b)q(et)o(w)o(een)f(the)f(lo)o(w)g(and)g(high)h(b)q
(ounds.)120 1576 y Fn("foobar"[2..$])1004 1573 y Fo(\))1098
1576 y Fn("oobar")120 1628 y("foobar"[3..3])1004 1625
y Fo(\))1098 1628 y Fn("o")120 1680 y("foobar"[17..12])1004
1677 y Fo(\))1098 1680 y Fn("")120 1732 y({"one",)23
b("two",)g("three"}[$)f(-)i(1..$])1004 1729 y Fo(\))1098
1732 y Fn({"two",)f("three"})120 1784 y({"one",)g("two",)g
("three"}[3..3])1004 1781 y Fo(\))1098 1784 y Fn({"three"})120
1836 y({"one",)g("two",)g("three"}[17..12])1004 1833
y Fo(\))1098 1836 y Fn({})0 1968 y Fj(4.1.7.4)30 b(Replacing)15
b(a)f(Subsequence)j(of)e(a)g(List)g(or)g(String)62 2063
y Fq(The)22 b(subrange)f(assigmen)o(t)g(replaces)i(a)e(sp)q(eci\014ed)i
(subsequence)g(of)e(a)g(list)i(or)d(string)i(with)g(a)f(supplied)0
2116 y(subsequence.)g(The)16 b(allo)o(w)o(ed)g(forms)e(are:)120
2179 y Fl(v)m(ariable)s Fn([)p Fl(start-index-expr)p
Fn(..)p Fl(end-index-)q(expr)s Fn(])27 b(=)d Fl(result-expr)120
2231 y(ob)s(ject-expr)p Fn(.)p Fl(name)s Fn([)p Fl(start-index-expr)p
Fn(..)p Fl(end-index-expr)s Fn(])i(=)e Fl(result-expr)120
2283 y(ob)s(ject-expr)p Fn(.\()p Fl(name-expr)s Fn(\)[)p
Fl(start-index-expr)p Fn(..)p Fl(end-index-expr)s Fn(])j(=)d
Fl(result-expr)120 2335 y Fn($)p Fl(name)s Fn([)p Fl(start-index-expr)p
Fn(..)p Fl(end-index-expr)s Fn(])i(=)e Fl(result-expr)62
2400 y Fq(As)15 b(with)f(indexed)i(assigmen)o(ts,)e(the)h(\014rst)f
(form)f(writes)i(in)o(to)f(a)g(v)m(ariable,)i(and)e(the)h(last)f(three)
g(forms)g(write)0 2454 y(in)o(to)h(a)g(prop)q(ert)o(y)l(.)20
b(The)15 b(same)g(errors)f(\()p Fn(E_TYPE)p Fq(,)g Fn(E_INVIND)p
Fq(,)f Fn(E_PROPNF)h Fq(and)h Fn(E_PERM)g Fq(for)f(lac)o(k)h(of)g
(read/write)0 2508 y(p)q(ermission)h(on)f(the)g(prop)q(ert)o(y\))f(ma)o
(y)h(b)q(e)g(raised.)20 b(If)15 b Fl(v)m(ariable)k Fq(do)q(es)d(not)e
(y)o(et)g(ha)o(v)o(e)h(a)g(v)m(alue)h(\(i.e.,)e(it)h(has)g(nev)o(er)0
2562 y(b)q(een)i(assigned)f(to\),)e Fn(E_VARNF)g Fq(will)j(b)q(e)g
(raised.)k(As)15 b(b)q(efore,)h(the)f Fn($)g Fq(expression)i(can)e(b)q
(e)i(used)f(in)g(either)g Fl(start-)0 2616 y(index-expr)i
Fq(or)13 b Fl(end-index-expr)p Fq(,)i(meaning)f(the)f(length)h(of)f
(the)g(original)h(v)m(alue)h(of)e(the)g(expression)h(just)f(b)q(efore)0
2670 y(the)i Fn([)p Fi(:)8 b(:)g(:)n Fn(])15 b Fq(part.)p
eop
%%Page: 22 24
22 23 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(22)62 183 y(If)17 b Fl(start-index-expr)j
Fq(or)c Fl(end-index-expr)22 b Fq(is)16 b(not)g(an)g(in)o(teger,)h(if)f
(the)h(v)m(alue)g(of)f Fl(v)m(ariable)k Fq(or)c(the)g(prop)q(ert)o(y)0
237 y(is)j(not)e(a)h(list)h(or)f(string,)g(or)g Fl(result-expr)k
Fq(is)c(not)g(the)g(same)g(t)o(yp)q(e)g(as)g Fl(v)m(ariable)k
Fq(or)c(the)g(prop)q(ert)o(y)l(,)g Fn(E_TYPE)f Fq(is)0
291 y(raised.)25 b Fn(E_RANGE)16 b Fq(is)i(raised)f(if)g
Fl(end-index-expr)23 b Fq(is)17 b(less)h(than)f(zero)f(or)h(if)g
Fl(start-index-expr)k Fq(is)c(greater)f(than)0 345 y(the)h(length)h(of)
f(the)h(list)g(or)e(string)i(plus)g(one.)26 b(Note:)e(the)17
b(length)h(of)f Fl(result-expr)22 b Fq(do)q(es)17 b(not)g(need)h(to)f
(b)q(e)h(the)0 399 y(same)d(as)g(the)g(length)h(of)f(the)g(sp)q
(eci\014ed)i(range.)62 467 y(In)f(precise)g(terms,)f(the)g(subrange)g
(assigmen)o(t)120 533 y Fl(v)t Fn([)p Fl(start)p Fn(..)p
Fl(end)r Fn(])23 b(=)g Fl(v)m(alue)62 601 y Fq(is)16
b(equiv)m(alen)o(t)h(to)120 667 y Fl(v)28 b Fn(=)23 b({@)p
Fl(v)t Fn([1..)p Fl(start)g Fn(-)h(1],)f(@)p Fl(v)m(alue)p
Fn(,)i(@)p Fl(v)t Fn([)p Fl(end)h Fn(+)e(1..$]})62 735
y Fq(if)16 b Fl(v)j Fq(is)d(a)f(list)h(and)f(to)120 801
y Fl(v)28 b Fn(=)23 b Fl(v)t Fn([1..)p Fl(start)g Fn(-)h(1])g(+)g
Fl(v)m(alue)j Fn(+)d Fl(v)t Fn([)p Fl(end)i Fn(+)e(1..$])62
869 y Fq(if)16 b Fl(v)j Fq(is)d(a)f(string.)62 937 y(The)20
b(assigmen)o(t)f(expression)h(itself)h(returns)e(the)h(v)m(alue)g(of)f
Fl(result-expr)p Fq(.)34 b(F)l(or)19 b(the)g(follo)o(wing)i(examples,)0
991 y(assume)13 b(that)g Fn(l)h Fq(initially)i(con)o(tains)e(the)g
(list)g Fn({1,)h(2,)g(3})e Fq(and)h(that)f Fn(s)g Fq(initially)j(con)o
(tains)e(the)g(string)f Fn(")p Fq(fo)q(obar)p Fn(")p
Fq(:)120 1057 y Fn(l[5..6])23 b(=)h({7,)f(8})p 679 1029
109 3 v 679 1069 3 41 v 691 1059 a Fh(erro)o(r)p 785
1069 V 679 1071 109 3 v 884 1057 a Fn(E_RANGE)120 1109
y(l[2..3])g(=)h(4)p 679 1081 V 679 1121 3 41 v 691 1111
a Fh(erro)o(r)p 785 1121 V 679 1123 109 3 v 884 1109
a Fn(E_TYPE)120 1161 y(l[#2..3])f(=)g({7})p 679 1132
V 679 1173 3 41 v 691 1163 a Fh(erro)o(r)p 785 1173 V
679 1175 109 3 v 884 1161 a Fn(E_TYPE)120 1213 y(s[2..3])g(=)h({6})p
679 1184 V 679 1224 3 41 v 691 1215 a Fh(erro)o(r)p 785
1224 V 679 1227 109 3 v 884 1213 a Fn(E_TYPE)120 1265
y(l[2..3])f(=)h({6,)f(7,)h(8,)f(9})670 1262 y Fo(\))788
1265 y Fn({6,)h(7,)f(8,)h(9})120 1317 y(l)670 1314 y
Fo(\))788 1317 y Fn({1,)g(6,)f(7,)h(8,)f(9})120 1369
y(l[2..1])g(=)h({10,)f("foo"})670 1366 y Fo(\))788 1369
y Fn({10,)g("foo"})120 1421 y(l)670 1418 y Fo(\))788
1421 y Fn({1,)h(10,)f("foo",)g(6,)h(7,)f(8,)h(9})120
1472 y(l[3][2..$])e(=)i("u")670 1469 y Fo(\))788 1472
y Fn("u")120 1524 y(l)670 1521 y Fo(\))788 1524 y Fn({1,)g(10,)f("fu",)
g(6,)h(7,)f(8,)h(9})120 1576 y(s[7..12])f(=)g("baz")670
1573 y Fo(\))788 1576 y Fn("baz")120 1628 y(s)670 1625
y Fo(\))788 1628 y Fn("foobarbaz")120 1680 y(s[1..3])g(=)h("fu")670
1677 y Fo(\))788 1680 y Fn("fu")120 1732 y(s)670 1729
y Fo(\))788 1732 y Fn("fubarbaz")120 1784 y(s[1..0])f(=)h("test")670
1781 y Fo(\))788 1784 y Fn("test")120 1836 y(s)670 1833
y Fo(\))788 1836 y Fn("testfubarbaz")0 1981 y Fj(4.1.8)30
b(Other)15 b(Op)r(erations)g(on)g(Lists)62 2078 y Fq(As)j(w)o(as)f(men)
o(tioned)h(earlier,)h(lists)f(can)g(b)q(e)g(constructed)g(b)o(y)f
(writing)h(a)g(comma-separated)f(sequence)h(of)0 2132
y(expressions)e(inside)h(curly)f(braces:)120 2198 y Fn({)p
Fl(expression-1)p Fn(,)24 b Fl(expression-2)p Fn(,)h
Fi(:)8 b(:)g(:)n Fn(,)24 b Fl(expression-N)5 b Fn(})0
2266 y Fq(The)20 b(resulting)i(list)f(has)f(the)g(v)m(alue)h(of)f
Fl(expression-1)25 b Fq(as)19 b(its)i(\014rst)f(elemen)o(t,)h(that)f
(of)g Fl(expression-2)k Fq(as)c(the)0 2320 y(second,)15
b(etc.)120 2386 y Fn({3)24 b(<)f(4,)h(3)g(<=)f(4,)h(3)g(>=)f(4,)h(3)f
(>)h(4})885 2383 y Fo(\))979 2386 y Fn({1,)g(1,)f(0,)h(0})62
2454 y Fq(Additionally)l(,)d(one)c(ma)o(y)g(precede)i(an)o(y)e(of)g
(these)g(expressions)i(b)o(y)e(the)h(splicing)h(op)q(erator,)e(`)p
Fn(@)p Fq('.)26 b(Suc)o(h)18 b(an)0 2508 y(expression)d(m)o(ust)e
(return)h(a)f(list;)i(rather)e(than)h(the)g(old)g(list)g(itself)h(b)q
(ecoming)g(an)f(elemen)o(t)g(of)g(the)f(new)i(list,)f(all)0
2562 y(of)g(the)g(elemen)o(ts)i(of)e(the)g(old)h(list)g(are)f(included)
j(in)f(the)e(new)h(list.)20 b(This)15 b(concept)g(is)g(easy)f(to)g
(understand,)h(but)0 2616 y(hard)f(to)f(explain)j(in)e(w)o(ords,)f(so)h
(here)g(are)g(some)f(examples.)21 b(F)l(or)13 b(these)h(examples,)h
(assume)e(that)h(the)g(v)m(ariable)0 2670 y Fn(a)h Fq(has)g(the)g(v)m
(alue)i Fn({2,)e(3,)f(4})h Fq(and)h(that)e Fn(b)h Fq(has)g(the)h(v)m
(alue)g Fn({"Foo",)e("Bar"})p Fq(:)p eop
%%Page: 23 25
23 24 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(23)120 183 y Fn({1,)23 b(a,)h(5})407
180 y Fo(\))502 183 y Fn({1,)f({2,)h(3,)f(4},)h(5})120
235 y({1,)f(@a,)h(5})407 232 y Fo(\))502 235 y Fn({1,)f(2,)h(3,)f(4,)h
(5})120 287 y({a,)f(@a})407 284 y Fo(\))502 287 y Fn({{2,)g(3,)h(4},)f
(2,)h(3,)f(4})120 339 y({@a,)g(@b})407 336 y Fo(\))502
339 y Fn({2,)g(3,)h(4,)f("Foo",)g("Bar"})62 406 y Fq(If)c(the)g
(splicing)i(op)q(erator)c(\(`)p Fn(@)p Fq('\))g(precedes)j(an)e
(expression)i(whose)e(v)m(alue)i(is)f(not)g(a)f(list,)i(then)f
Fn(E_TYPE)e Fq(is)0 460 y(raised)f(as)f(the)g(v)m(alue)h(of)f(the)g
(list)h(construction)g(as)f(a)f(whole.)62 528 y(The)f(list)g(mem)o(b)q
(ership)h(expression)g(tests)e(whether)g(or)g(not)g(a)h(giv)o(en)g(MOO)
g(v)m(alue)g(is)g(an)g(elemen)o(t)g(of)f(a)g(giv)o(en)0
582 y(list)k(and,)f(if)h(so,)e(with)i(what)e(index:)120
647 y Fl(expression-1)28 b Fn(in)c Fl(expression-2)62
715 y(Expression-2)d Fq(m)o(ust)c(return)g(a)g(list;)h(otherwise,)f
Fn(E_TYPE)f Fq(is)i(raised.)26 b(If)17 b(the)g(v)m(alue)i(of)d
Fl(expression-1)22 b Fq(is)17 b(in)0 768 y(that)d(list,)h(then)g(the)f
(index)i(of)e(its)g(\014rst)h(o)q(ccurrence)g(in)g(the)g(list)g(is)g
(returned;)g(otherwise,)f(the)h(`)p Fn(in)p Fq(')e(expression)0
822 y(returns)i(0.)120 888 y Fn(2)24 b(in)f({5,)h(8,)f(2,)h(3})885
885 y Fo(\))979 888 y Fn(3)120 940 y(7)g(in)f({5,)h(8,)f(2,)h(3})885
937 y Fo(\))979 940 y Fn(0)120 992 y("bar")f(in)h({"Foo",)f("Bar",)g
("Baz"})885 989 y Fo(\))979 992 y Fn(2)0 1059 y Fq(Note)15
b(that)g(the)g(list)i(mem)o(b)q(ership)f(op)q(erator)f(is)h
(case-insensitiv)o(e)i(in)e(comparing)g(strings,)f(just)g(lik)o(e)h
(the)g(com-)0 1113 y(parison)g(op)q(erators.)21 b(T)l(o)15
b(p)q(erform)h(a)f(case-sensitiv)o(e)j(list)e(mem)o(b)q(ership)h(test,)
e(use)h(the)g(`)p Fn(is_member)p Fq(')e(function)0 1167
y(describ)q(ed)k(later.)j(Note)15 b(also)h(that)f(since)i(it)e(returns)
h(zero)g(only)g(if)g(the)g(giv)o(en)g(v)m(alue)h(is)f(not)f(in)i(the)e
(giv)o(en)i(list,)0 1221 y(the)e(`)p Fn(in)p Fq(')f(expression)i(can)g
(b)q(e)g(used)f(either)h(as)f(a)g(mem)o(b)q(ership)i(test)d(or)h(as)g
(an)g(elemen)o(t)h(lo)q(cator.)0 1363 y Fj(4.1.9)30 b(Spreading)15
b(List)g(Elemen)n(ts)h(Among)f(V)-5 b(ariables)62 1460
y Fq(It)19 b(is)f(often)h(the)f(case)g(in)h(MOO)g(programming)f(that)f
(y)o(ou)h(will)i(w)o(an)o(t)e(to)f(access)i(the)f(elemen)o(ts)h(of)f(a)
g(list)0 1513 y(individuall)q(y)l(,)i(with)e(eac)o(h)f(elemen)o(t)h
(stored)f(in)h(a)f(separate)f(v)m(ariables.)27 b(This)18
b(desire)g(arises,)g(for)e(example,)j(at)0 1567 y(the)13
b(b)q(eginning)h(of)e(almost)h(ev)o(ery)f(MOO)h(v)o(erb,)g(since)g(the)
g(argumen)o(ts)f(to)g(all)h(v)o(erbs)f(are)h(deliv)o(ered)h(all)g(bunc)
o(hed)0 1621 y(together)g(in)i(a)f(single)i(list.)k(In)15
b(suc)o(h)h(circumstances,)g(y)o(ou)e Fl(could)k Fq(write)e(statemen)o
(ts)e(lik)o(e)i(these:)120 1687 y Fn(first)23 b(=)h(args[1];)120
1739 y(second)f(=)h(args[2];)120 1791 y(if)g(\(length\(args\))e(>)h
(2\))168 1842 y(third)g(=)h(args[3];)120 1894 y(else)168
1946 y(third)f(=)h(0;)120 1998 y(endif)0 2066 y Fq(This)13
b(approac)o(h)g(gets)f(prett)o(y)g(tedious,)h(b)q(oth)g(to)f(read)g
(and)h(to)f(write,)h(and)g(it's)f(prone)h(to)f(errors)g(if)h(y)o(ou)f
(mist)o(yp)q(e)0 2120 y(one)f(of)g(the)g(indices.)20
b(Also,)12 b(y)o(ou)f(often)f(w)o(an)o(t)g(to)h(c)o(hec)o(k)g(whether)g
(or)g(not)f(an)o(y)h Fl(extra)f Fq(list)i(elemen)o(ts)g(w)o(ere)e
(presen)o(t,)0 2173 y(adding)16 b(to)f(the)g(tedium.)62
2241 y(MOO)h(pro)o(vides)g(a)g(sp)q(ecial)h(kind)g(of)e(assignmen)o(t)g
(expression,)i(called)g Fl(scattering)e(assignmen)o(t)i
Fq(made)e(just)0 2295 y(for)g(cases)g(suc)o(h)g(as)g(these.)20
b(A)15 b(scattering)g(assignmen)o(t)g(expression)i(lo)q(oks)e(lik)o(e)h
(this:)120 2360 y Fn({)p Fl(target)p Fn(,)22 b Fi(:)8
b(:)g(:)n Fn(})24 b(=)g Fl(expr)0 2428 y Fq(where)16
b(eac)o(h)f Fl(target)h Fq(describ)q(es)h(a)e(place)i(to)e(store)f
(elemen)o(ts)j(of)e(the)g(list)i(that)e(results)h(from)e(ev)m(aluating)
j Fl(expr)p Fq(.)0 2482 y(A)e Fl(target)g Fq(has)g(one)h(of)e(the)i
(follo)o(wing)g(forms:)0 2562 y Fl(v)m(ariable)86 b Fq(This)14
b(is)g(the)f(simplest)i(target,)d(just)h(a)g(simple)i(v)m(ariable;)g
(the)e(list)h(elemen)o(t)g(in)h(the)e(corresp)q(onding)240
2616 y(p)q(osition)e(is)g(assigned)h(to)d(the)i(v)m(ariable.)20
b(This)11 b(is)g(called)h(a)e Fl(required)j Fq(target,)d(since)i(the)e
(assignmen)o(t)240 2670 y(is)16 b(required)g(to)f(put)g(one)g(of)g(the)
g(list)h(elemen)o(ts)g(in)o(to)f(the)h(v)m(ariable.)p
eop
%%Page: 24 26
24 25 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(24)0 183 y Fn(?)p Fl(v)m(ariable)62 b
Fq(This)19 b(is)f(called)i(an)e Fl(optional)j Fq(target,)c(since)j(it)e
(do)q(esn't)g(alw)o(a)o(ys)g(get)f(assigned)i(an)f(elemen)o(t.)30
b(If)240 237 y(there)12 b(are)g(an)o(y)f(list)i(elemen)o(ts)g(left)f(o)
o(v)o(er)f(after)h(all)h(of)e(the)h(required)h(targets)e(ha)o(v)o(e)h
(b)q(een)h(accoun)o(ted)240 291 y(for)j(\(along)h(with)g(all)h(of)f
(the)g(other)f(optionals)i(to)e(the)h(left)h(of)e(this)i(one\),)e(then)
i(this)f(v)m(ariable)h(is)240 345 y(treated)11 b(lik)o(e)i(a)f
(required)h(one)f(and)g(the)g(list)g(elemen)o(t)h(in)f(the)g(corresp)q
(onding)h(p)q(osition)g(is)f(assigned)240 399 y(to)17
b(the)g(v)m(ariable.)28 b(If)17 b(there)h(aren't)e(enough)i(elemen)o
(ts)g(to)f(assign)g(one)h(to)e(this)i(target,)e(then)i(no)240
453 y(assignmen)o(t)d(is)h(made)f(to)g(this)g(v)m(ariable,)h(lea)o
(ving)g(it)g(with)f(whatev)o(er)g(its)g(previous)h(v)m(alue)h(w)o(as.)0
536 y Fn(?)p Fl(v)m(ariable)i Fn(=)c Fl(default-expr)240
590 y Fq(This)c(is)g(also)f(an)h(optional)g(target,)f(but)g(if)h(there)
g(aren't)f(enough)g(list)i(elemen)o(ts)f(a)o(v)m(ailable)h(to)e(assign)
240 644 y(one)k(to)g(this)h(target,)e(the)h(result)h(of)f(ev)m
(aluating)i Fl(default-expr)i Fq(is)d(assigned)g(to)f(it)g(instead.)20
b(Th)o(us,)240 698 y Fl(default-expr)i Fq(pro)o(vides)d(a)f
Fl(default)h(v)m(alue)j Fq(for)c(the)g(v)m(ariable.)30
b(The)19 b(default)g(v)m(alue)g(expressions)240 752 y(are)13
b(ev)m(aluated)i(and)f(assigned)g(w)o(orking)g(from)f(left)h(to)f(righ)
o(t)g Fl(after)j Fq(all)f(of)e(the)h(other)f(assignmen)o(ts)240
806 y(ha)o(v)o(e)i(b)q(een)h(p)q(erformed.)0 889 y Fn(@)p
Fl(v)m(ariable)62 b Fq(By)16 b(analogy)f(with)h(the)f
Fn(@)g Fq(syn)o(tax)g(in)h(list)h(construction,)e(this)h(v)m(ariable)h
(is)f(assigned)g(a)f(list)h(of)f(all)240 943 y(of)h(the)h(`lefto)o(v)o
(er')e(list)j(elemen)o(ts)f(in)g(this)g(part)f(of)h(the)f(list)i(after)
d(all)j(of)e(the)h(other)f(targets)f(ha)o(v)o(e)240 997
y(b)q(een)i(\014lled)g(in.)22 b(It)16 b(is)g(assigned)g(the)g(empt)o(y)
f(list)i(if)f(there)g(aren't)e(an)o(y)i(elemen)o(ts)g(left)g(o)o(v)o
(er.)k(This)240 1051 y(is)15 b(called)h(a)d Fl(rest)i
Fq(target,)e(since)i(it)g(gets)f(the)g(rest)g(of)f(the)i(elemen)o(ts.)
20 b(There)14 b(ma)o(y)g(b)q(e)h(at)e(most)h(one)240
1105 y(rest)h(target)f(in)i(eac)o(h)f(scattering)g(assignmen)o(t)g
(expression.)0 1189 y(If)d(there)f(aren't)g(enough)h(list)g(elemen)o
(ts)g(to)f(\014ll)i(all)g(of)e(the)g(required)i(targets,)d(or)h(if)h
(there)g(are)f(more)g(than)h(enough)0 1243 y(to)i(\014ll)i(all)f(of)f
(the)h(required)g(and)g(optional)g(targets)e(but)i(there)f(isn't)h(a)f
(rest)g(target)f(to)h(tak)o(e)g(the)g(lefto)o(v)o(er)g(ones,)0
1297 y(then)i Fn(E_ARGS)e Fq(is)i(raised.)62 1368 y(Here)h(are)g(some)f
(examples)h(of)g(ho)o(w)f(this)h(w)o(orks.)23 b(Assume)17
b(\014rst)f(that)g(the)h(v)o(erb)g Fn(me:foo\(\))e Fq(con)o(tains)i
(the)0 1422 y(follo)o(wing)f(co)q(de:)120 1490 y Fn(b)24
b(=)f(c)h(=)g(e)g(=)f(17;)120 1542 y({a,)g(?b,)h(?c)f(=)h(8,)g(@d,)f
(?e)h(=)g(9,)f(f})h(=)f(args;)120 1594 y(return)g({a,)g(b,)h(c,)g(d,)f
(e,)h(f};)0 1664 y Fq(Then)16 b(the)f(follo)o(wing)h(calls)g(return)f
(the)h(giv)o(en)f(v)m(alues:)120 1733 y Fn(me:foo\(1\))p
918 1704 109 3 v 918 1744 3 41 v 930 1734 a Fh(erro)o(r)p
1024 1744 V 918 1747 109 3 v 1122 1733 a Fn(E_ARGS)120
1785 y(me:foo\(1,)23 b(2\))909 1782 y Fo(\))1027 1785
y Fn({1,)g(17,)h(8,)f({},)h(9,)f(2})120 1837 y(me:foo\(1,)g(2,)g(3\))
909 1834 y Fo(\))1027 1837 y Fn({1,)g(2,)h(8,)f({},)h(9,)f(3})120
1889 y(me:foo\(1,)g(2,)g(3,)h(4\))909 1886 y Fo(\))1027
1889 y Fn({1,)f(2,)h(3,)f({},)h(9,)f(4})120 1940 y(me:foo\(1,)g(2,)g
(3,)h(4,)f(5\))909 1937 y Fo(\))1027 1940 y Fn({1,)g(2,)h(3,)f({},)h
(4,)f(5})120 1992 y(me:foo\(1,)g(2,)g(3,)h(4,)f(5,)h(6\))909
1989 y Fo(\))1027 1992 y Fn({1,)f(2,)h(3,)f({4},)h(5,)f(6})120
2044 y(me:foo\(1,)g(2,)g(3,)h(4,)f(5,)h(6,)g(7\))909
2041 y Fo(\))1027 2044 y Fn({1,)f(2,)h(3,)f({4,)h(5},)f(6,)h(7})120
2096 y(me:foo\(1,)f(2,)g(3,)h(4,)f(5,)h(6,)g(7,)f(8\))909
2093 y Fo(\))1027 2096 y Fn({1,)g(2,)h(3,)f({4,)h(5,)f(6},)h(7,)g(8})62
2167 y Fq(Using)13 b(scattering)f(assignmen)o(t,)g(the)h(example)g(at)e
(the)i(b)q(egining)h(of)e(this)g(section)h(could)g(b)q(e)g(rewritten)f
(more)0 2220 y(simply)l(,)k(reliably)l(,)h(and)f(readably:)120
2289 y Fn({first,)23 b(second,)g(?third)g(=)h(0})f(=)h(args;)0
2359 y Fq(It)15 b(is)g(go)q(o)q(d)f(MOO)h(programming)f(st)o(yle)h(to)f
(use)h(a)f(scattering)h(assignmen)o(t)f(at)g(the)h(top)f(of)h(nearly)g
(ev)o(ery)f(v)o(erb,)0 2413 y(since)i(it)g(sho)o(ws)e(so)h(clearly)i
(just)d(what)h(kinds)h(of)f(argumen)o(ts)f(the)i(v)o(erb)f(exp)q(ects.)
0 2570 y Fj(4.1.10)29 b(Getting)15 b(and)h(Setting)e(the)h(V)-5
b(alues)16 b(of)f(Prop)r(erties)62 2670 y Fq(Usually)l(,)h(one)g(can)f
(read)g(the)h(v)m(alue)g(of)f(a)g(prop)q(ert)o(y)g(on)g(an)g(ob)s(ject)
f(with)i(a)f(simple)h(expression:)p eop
%%Page: 25 27
25 26 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(25)120 183 y Fl(expression)p Fn(.)p Fl(name)62
251 y(Expression)21 b Fq(m)o(ust)f(return)g(an)g(ob)s(ject)g(n)o(um)o
(b)q(er;)j(if)e(not,)f Fn(E_TYPE)g Fq(is)h(raised.)35
b(If)21 b(the)f(ob)s(ject)g(with)h(that)0 305 y(n)o(um)o(b)q(er)15
b(do)q(es)g(not)g(exist,)g Fn(E_INVIND)e Fq(is)j(raised.)k(Otherwise,)
15 b(if)h(the)e(ob)s(ject)h(do)q(es)g(not)f(ha)o(v)o(e)h(a)f(prop)q
(ert)o(y)h(with)0 359 y(that)d(name,)h(then)g Fn(E_PROPNF)f
Fq(is)i(raised.)19 b(Otherwise,)14 b(if)f(the)g(named)h(prop)q(ert)o(y)
e(is)h(not)g(readable)h(b)o(y)e(the)h(o)o(wner)0 413
y(of)19 b(the)h(curren)o(t)f(v)o(erb,)h(then)g Fn(E_PERM)e
Fq(is)i(raised.)33 b(Finally)l(,)22 b(assuming)e(that)e(none)i(of)f
(these)h(terrible)h(things)0 467 y(happ)q(ens,)16 b(the)f(v)m(alue)i
(of)d(the)i(named)f(prop)q(ert)o(y)g(on)g(the)g(giv)o(en)h(ob)s(ject)f
(is)g(returned.)62 535 y(I)h(said)g(\\usually")g(in)g(the)f(paragraph)g
(ab)q(o)o(v)o(e)g(b)q(ecause)h(that)f(simple)h(expression)h(only)e(w)o
(orks)g(if)h(the)f(name)0 589 y(of)g(the)g(prop)q(ert)o(y)g(ob)q(eys)g
(the)h(same)e(rules)i(as)f(for)g(the)g(names)g(of)g(v)m(ariables)h
(\(i.e.,)f(consists)g(en)o(tirely)i(of)d(letters,)0 643
y(digits,)h(and)g(underscores,)h(and)f(do)q(esn't)f(b)q(egin)j(with)e
(a)f(digit\).)21 b(Prop)q(ert)o(y)14 b(names)h(are)f(not)h(restricted)g
(to)g(this)0 697 y(set,)i(though.)26 b(Also,)18 b(it)g(is)g(sometimes)f
(useful)h(to)f(b)q(e)h(able)g(to)f(\014gure)g(out)g(what)g(prop)q(ert)o
(y)g(to)g(read)g(b)o(y)g(some)0 751 y(computation.)j(F)l(or)14
b(these)i(more)f(general)g(uses,)g(the)h(follo)o(wing)g(syn)o(tax)e(is)
i(also)f(allo)o(w)o(ed:)120 817 y Fl(expression-1)p Fn(.\()p
Fl(expression-2)t Fn(\))62 885 y Fq(As)h(b)q(efore,)g
Fl(expression-1)k Fq(m)o(ust)15 b(return)h(an)g(ob)s(ject)f(n)o(um)o(b)
q(er.)22 b Fl(Expression-2)e Fq(m)o(ust)15 b(return)h(a)f(string,)h
(the)0 938 y(name)g(of)f(the)h(prop)q(ert)o(y)g(to)f(b)q(e)h(read;)g
Fn(E_TYPE)f Fq(is)h(raised)g(otherwise.)22 b(Using)17
b(this)f(syn)o(tax,)f(an)o(y)g(prop)q(ert)o(y)h(can)0
992 y(b)q(e)g(read,)f(regardless)g(of)g(its)g(name.)62
1060 y(Note)e(that,)g(as)g(with)h(almost)f(ev)o(erything)g(in)i(MOO,)e
(case)g(is)h(not)f(signi\014can)o(t)i(in)f(the)f(names)h(of)f(prop)q
(erties.)0 1114 y(Th)o(us,)i(the)g(follo)o(wing)h(expressions)g(are)f
(all)h(equiv)m(alen)o(t:)120 1180 y Fn(foo.bar)120 1232
y(foo.Bar)120 1284 y(foo.\("bAr"\))62 1352 y Fq(The)g(Lam)o(b)q(daCore)
e(database)h(uses)g(sev)o(eral)g(prop)q(erties)h(on)f
Fn(#0)p Fq(,)f(the)i Fl(system)e(ob)s(ject)p Fq(,)g(for)h(v)m(arious)g
(sp)q(ecial)0 1406 y(purp)q(oses.)20 b(F)l(or)13 b(example,)i(the)f(v)m
(alue)h(of)f Fn(#0.room)f Fq(is)h(the)g(\\generic)h(ro)q(om")e(ob)s
(ject,)g Fn(#0.exit)g Fq(is)h(the)g(\\generic)0 1460
y(exit")20 b(ob)s(ject,)g(etc.)34 b(This)21 b(allo)o(ws)f(MOO)g
(programs)f(to)g(refer)h(to)f(these)h(useful)h(ob)s(jects)f(more)f
(easily)i(\(and)0 1514 y(more)14 b(readably\))g(than)g(using)g(their)h
(ob)s(ject)e(n)o(um)o(b)q(ers)i(directly)l(.)21 b(T)l(o)14
b(mak)o(e)f(this)i(usage)e(ev)o(en)i(easier)f(and)g(more)0
1568 y(readable,)i(the)f(expression)120 1634 y Fn($)p
Fl(name)0 1701 y Fq(\(where)g Fl(name)j Fq(ob)q(eys)d(the)h(rules)g
(for)e(v)m(ariable)j(names\))e(is)g(an)g(abbreviation)h(for)120
1767 y Fn(#0.)p Fl(name)0 1835 y Fq(Th)o(us,)f(for)f(example,)i(the)f
(v)m(alue)i Fn($nothing)d Fq(men)o(tioned)i(earlier)g(is)g(really)g
Fn(#-1)p Fq(,)e(the)h(v)m(alue)i(of)e Fn(#0.nothing)p
Fq(.)62 1903 y(As)f(with)h(v)m(ariables,)g(one)f(uses)h(the)f
(assignmen)o(t)g(op)q(erator)f(\(`)p Fn(=)p Fq('\))g(to)g(c)o(hange)h
(the)g(v)m(alue)i(of)d(a)h(prop)q(ert)o(y)l(.)20 b(F)l(or)0
1957 y(example,)c(the)f(expression)120 2023 y Fn(14)24
b(+)f(\(#27.foo)g(=)h(17\))0 2091 y Fq(c)o(hanges)17
b(the)g(v)m(alue)i(of)d(the)h(`)p Fn(foo)p Fq(')f(prop)q(ert)o(y)h(of)g
(the)g(ob)s(ject)f(n)o(um)o(b)q(ered)i(27)f(to)f(b)q(e)i(17)e(and)i
(then)f(returns)g(31.)0 2145 y(Assignmen)o(ts)h(to)g(prop)q(erties)h(c)
o(hec)o(k)f(that)g(the)g(o)o(wner)g(of)g(the)g(curren)o(t)g(v)o(erb)h
(has)f(write)g(p)q(ermission)i(on)e(the)0 2199 y(giv)o(en)e(prop)q(ert)
o(y)l(,)e(raising)i Fn(E_PERM)f Fq(otherwise.)20 b(Read)15
b(p)q(ermission)i(is)f(not)f(required.)0 2343 y Fj(4.1.11)29
b(Calling)16 b(Built-in)f(F)-5 b(unctions)15 b(and)g(Other)g(V)-5
b(erbs)62 2440 y Fq(MOO)17 b(pro)o(vides)g(a)g(large)g(n)o(um)o(b)q(er)
g(of)f(useful)i(functions)f(for)f(p)q(erforming)h(a)g(wide)g(v)m(ariet)
o(y)g(of)f(op)q(erations;)0 2494 y(a)f(complete)h(list,)g(giving)g
(their)f(names,)g(argumen)o(ts,)f(and)i(seman)o(tics,)f(app)q(ears)g
(in)h(a)f(separate)g(section)g(later.)0 2548 y(As)g(an)h(example)g(to)e
(giv)o(e)i(y)o(ou)f(the)g(idea,)h(there)g(is)g(a)f(function)h(named)f
(`)p Fn(length)p Fq(')f(that)h(returns)g(the)g(length)h(of)0
2602 y(a)f(giv)o(en)h(string)f(or)f(list.)62 2670 y(The)i(syn)o(tax)e
(of)h(a)g(call)h(to)f(a)g(function)h(is)f(as)g(follo)o(ws:)p
eop
%%Page: 26 28
26 27 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(26)120 183 y Fl(name)s Fn(\()p Fl(expr-1)p
Fn(,)23 b Fl(expr-2)p Fn(,)h Fi(:)8 b(:)g(:)n Fn(,)24
b Fl(expr-N)5 b Fn(\))0 254 y Fq(where)14 b Fl(name)j
Fq(is)d(the)g(name)h(of)e(one)h(of)g(the)g(built-in)i(functions.)21
b(The)14 b(expressions)h(b)q(et)o(w)o(een)f(the)g(paren)o(theses,)0
308 y(called)20 b Fl(argumen)o(ts)p Fq(,)d(are)h(eac)o(h)g(ev)m
(aluated)h(in)f(turn)g(and)g(then)h(giv)o(en)f(to)f(the)h(named)h
(function)f(to)g(use)g(in)h(its)0 362 y(appropriate)d(w)o(a)o(y)l(.)k
(Most)15 b(functions)i(require)f(that)f(a)h(sp)q(eci\014c)h(n)o(um)o(b)
q(er)f(of)g(argumen)o(ts)f(b)q(e)h(giv)o(en;)g(otherwise,)0
416 y Fn(E_ARGS)d Fq(is)h(raised.)20 b(Most)12 b(also)i(require)g(that)
f(certain)h(of)f(the)h(argumen)o(ts)f(ha)o(v)o(e)g(certain)h(sp)q
(eci\014ed)i(t)o(yp)q(es)e(\(e.g.,)0 469 y(the)g Fn(length\(\))e
Fq(function)j(requires)f(a)g(list)g(or)g(a)f(string)h(as)f(its)h
(argumen)o(t\);)f Fn(E_TYPE)g Fq(is)h(raised)g(if)g(an)o(y)g(argumen)o
(t)0 523 y(has)h(the)g(wrong)g(t)o(yp)q(e.)62 594 y(As)i(with)g(list)h
(construction,)f(the)g(splicing)i(op)q(erator)d(`)p Fn(@)p
Fq(')g(can)h(precede)h(an)o(y)f(argumen)o(t)f(expression.)26
b(The)0 648 y(v)m(alue)15 b(of)f(suc)o(h)h(an)f(expression)h(m)o(ust)e
(b)q(e)i(a)f(list;)h Fn(E_TYPE)e Fq(is)i(raised)g(otherwise.)20
b(The)14 b(elemen)o(ts)h(of)f(this)g(list)h(are)0 702
y(passed)g(as)g(individual)k(argumen)o(ts,)14 b(in)i(place)g(of)f(the)g
(list)h(as)f(a)g(whole.)62 772 y(V)l(erbs)h(can)f(also)g(call)i(other)e
(v)o(erbs,)f(usually)j(using)f(this)f(syn)o(tax:)120
840 y Fl(expr-0)t Fn(:)p Fl(name)s Fn(\()p Fl(expr-1)p
Fn(,)23 b Fl(expr-2)p Fn(,)h Fi(:)8 b(:)g(:)n Fn(,)24
b Fl(expr-N)5 b Fn(\))0 911 y Fl(Expr-0)18 b Fq(m)o(ust)d(return)f(an)h
(ob)s(ject)f(n)o(um)o(b)q(er;)h Fn(E_TYPE)f Fq(is)i(raised)f
(otherwise.)20 b(If)15 b(the)g(ob)s(ject)f(with)h(that)g(n)o(um)o(b)q
(er)0 965 y(do)q(es)j(not)f(exist,)g Fn(E_INVIND)f Fq(is)i(raised.)27
b(If)17 b(this)h(task)f(is)h(to)q(o)e(deeply)j(nested)f(in)g(v)o(erbs)f
(calling)i(v)o(erbs)e(calling)0 1019 y(v)o(erbs,)f(then)g
Fn(E_MAXREC)e Fq(is)j(raised;)f(the)g(default)h(limit)g(is)f(50)g(lev)o
(els,)h(but)f(this)g(can)g(b)q(e)g(c)o(hanged)h(from)e(within)0
1073 y(the)21 b(database;)h(see)f(the)f(c)o(hapter)g(on)h(serv)o(er)f
(assumptions)h(ab)q(out)f(the)h(database)f(for)f(details.)37
b(If)21 b(neither)0 1127 y(the)e(ob)s(ject)f(nor)g(an)o(y)h(of)f(its)h
(ancestors)f(de\014nes)h(a)g(v)o(erb)f(matc)o(hing)h(the)g(giv)o(en)g
(name,)g Fn(E_VERBNF)f Fq(is)h(raised.)0 1181 y(Otherwise,)c(if)f(none)
h(of)e(these)h(nast)o(y)g(things)g(happ)q(ens,)h(the)f(named)h(v)o(erb)
f(on)g(the)g(giv)o(en)g(ob)s(ject)g(is)g(called;)i(the)0
1235 y(v)m(arious)g(built-in)h(v)m(ariables)g(ha)o(v)o(e)e(the)g(follo)
o(wing)h(initial)h(v)m(alues)f(in)h(the)e(called)i(v)o(erb:)0
1319 y Fn(this)144 b Fq(an)15 b(ob)s(ject,)f(the)i(v)m(alue)g(of)f
Fl(expr-0)0 1402 y Fn(verb)144 b Fq(a)15 b(string,)g(the)g
Fl(name)j Fq(used)e(in)g(calling)g(this)g(v)o(erb)0 1485
y Fn(args)144 b Fq(a)15 b(list,)h(the)f(v)m(alues)h(of)f
Fl(expr-1)p Fq(,)g Fl(expr-2)p Fq(,)g(etc.)0 1568 y Fn(caller)96
b Fq(an)15 b(ob)s(ject,)f(the)i(v)m(alue)g(of)f Fn(this)f
Fq(in)i(the)g(calling)h(v)o(erb)0 1651 y Fn(player)96
b Fq(an)15 b(ob)s(ject,)e(the)i(same)f(v)m(alue)i(as)e(it)h(had)g
(initially)i(in)f(the)e(calling)j(v)o(erb)d(or,)g(if)h(the)g(calling)h
(v)o(erb)e(is)240 1705 y(running)i(with)g(wizard)f(p)q(ermissions,)i
(the)e(same)g(as)g(the)g(curren)o(t)g(v)m(alue)h(in)g(the)g(calling)h
(v)o(erb.)0 1789 y(All)h(other)e(built-in)j(v)m(ariables)f(\()p
Fn(argstr)p Fq(,)d Fn(dobj)p Fq(,)h(etc.\))24 b(are)17
b(initialized)j(with)c(the)h(same)f(v)m(alues)i(they)f(ha)o(v)o(e)f(in)
0 1843 y(the)f(calling)i(v)o(erb.)62 1914 y(As)i(with)g(the)g
(discussion)h(of)f(prop)q(ert)o(y)f(references)i(ab)q(o)o(v)o(e,)f(I)g
(said)g(\\usually")h(at)e(the)h(b)q(eginning)i(of)d(the)0
1968 y(previous)13 b(paragraph)f(b)q(ecause)h(that)f(syn)o(tax)g(is)h
(only)g(allo)o(w)o(ed)g(when)g(the)f Fl(name)j Fq(follo)o(ws)e(the)f
(rules)i(for)e(allo)o(w)o(ed)0 2022 y(v)m(ariable)20
b(names.)30 b(Also)19 b(as)f(with)h(prop)q(ert)o(y)g(reference,)g
(there)g(is)g(a)f(syn)o(tax)g(allo)o(wing)i(y)o(ou)e(to)g(compute)h
(the)0 2076 y(name)c(of)g(the)g(v)o(erb:)120 2144 y Fl(expr-0)t
Fn(:\()p Fl(expr-00)t Fn(\)\()p Fl(expr-1)p Fn(,)23 b
Fl(expr-2)p Fn(,)g Fi(:)8 b(:)g(:)n Fn(,)24 b Fl(expr-N)5
b Fn(\))0 2214 y Fq(The)15 b(expression)i Fl(expr-00)h
Fq(m)o(ust)d(return)g(a)g(string;)g Fn(E_TYPE)f Fq(is)i(raised)f
(otherwise.)62 2285 y(The)d(splicing)i(op)q(erator)d(\(`)p
Fn(@)p Fq('\))f(can)i(b)q(e)h(used)f(with)g(v)o(erb-call)h(argumen)o
(ts,)f(to)q(o,)f(just)g(as)h(with)g(the)g(argumen)o(ts)0
2339 y(to)j(built-in)i(functions.)62 2409 y(In)e(man)o(y)f(databases,)g
(a)g(n)o(um)o(b)q(er)g(of)g(imp)q(ortan)o(t)g(v)o(erbs)g(are)g
(de\014ned)i(on)e Fn(#0)p Fq(,)g(the)g Fl(system)g(ob)s(ject)p
Fq(.)19 b(As)c(with)0 2463 y(the)f(`)p Fn($foo)p Fq(')f(notation)h(for)
g(prop)q(erties)h(on)f Fn(#0)p Fq(,)g(the)g(serv)o(er)g(de\014nes)i(a)e
(sp)q(ecial)i(syn)o(tax)d(for)h(calling)i(v)o(erbs)e(on)h
Fn(#0)p Fq(:)120 2531 y Fn($)p Fl(name)s Fn(\()p Fl(expr-1)p
Fn(,)23 b Fl(expr-2)p Fn(,)h Fi(:)8 b(:)g(:)n Fn(,)24
b Fl(expr-N)5 b Fn(\))0 2602 y Fq(\(where)15 b Fl(name)j
Fq(ob)q(eys)d(the)h(rules)g(for)e(v)m(ariable)j(names\))e(is)g(an)g
(abbreviation)h(for)120 2670 y Fn(#0:)p Fl(name)s Fn(\()p
Fl(expr-1)p Fn(,)23 b Fl(expr-2)p Fn(,)h Fi(:)8 b(:)g(:)n
Fn(,)24 b Fl(expr-N)5 b Fn(\))p eop
%%Page: 27 29
27 28 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(27)0 183 y Fj(4.1.12)29 b(Catc)n(hing)16
b(Errors)g(in)f(Expressions)62 275 y Fq(It)i(is)g(often)f(useful)i(to)e
(b)q(e)h(able)g(to)f Fl(catc)o(h)g Fq(an)h(error)e(that)h(an)h
(expression)g(raises,)g(to)e(k)o(eep)i(the)g(error)f(from)0
329 y(ab)q(orting)d(the)h(whole)f(task,)g(and)g(to)g(k)o(eep)g(on)h
(running)g(as)f(if)h(the)f(expression)h(had)f(returned)h(some)f(other)g
(v)m(alue)0 383 y(normally)l(.)21 b(The)15 b(follo)o(wing)h(expression)
g(accomplishes)h(this:)120 443 y Fn(`)24 b Fl(expr-1)j
Fn(!)d Fl(co)q(des)i Fn(=>)e Fl(expr-2)k Fn(')0 505 y
Fk(Note:)22 b Fq(the)16 b(op)q(en-)h(and)g(close-quotation)g(marks)f
(in)h(the)f(previous)h(line)i(are)d(really)h(part)f(of)g(the)g(syn)o
(tax;)g(y)o(ou)0 559 y(m)o(ust)f(actually)h(t)o(yp)q(e)f(them)g(as)g
(part)f(of)h(y)o(our)g(MOO)g(program)f(for)h(this)h(kind)g(of)f
(expression.)62 621 y(The)20 b Fl(co)q(des)h Fq(part)d(is)i(either)g
(the)f(k)o(eyw)o(ord)f Fn(ANY)h Fq(or)f(else)i(a)f(comma-separated)f
(list)i(of)f(expressions,)h(just)0 675 y(lik)o(e)c(an)f(argumen)o(t)g
(list.)20 b(As)15 b(in)h(an)g(argumen)o(t)e(list,)h(the)h(splicing)h
(op)q(erator)d(\(`)p Fn(@)p Fq('\))g(can)h(b)q(e)h(used)g(here.)k(The)
15 b Fn(=>)0 729 y Fl(expr-2)k Fq(part)c(of)f(the)i(error-catc)o(hing)f
(expression)h(is)f(optional.)62 791 y(First,)g(the)g
Fl(co)q(des)i Fq(part)e(is)h(ev)m(aluated,)g(yielding)h(a)e(list)h(of)e
(error)h(co)q(des)h(that)e(should)i(b)q(e)g(caugh)o(t)f(if)g(they're)0
845 y(raised;)g(if)h Fl(co)q(des)i Fq(is)d Fn(ANY)p Fq(,)g(then)g(it)h
(is)f(equiv)m(alen)o(t)i(to)e(the)g(list)h(of)f(all)h(p)q(ossible)h
(MOO)e(v)m(alues.)62 908 y(Next,)22 b Fl(expr-1)j Fq(is)c(ev)m
(aluated.)38 b(If)21 b(it)g(ev)m(aluates)h(normally)l(,)g(without)f
(raising)h(an)e(error,)i(then)f(its)g(v)m(alue)0 962
y(b)q(ecomes)c(the)g(v)m(alue)h(of)e(the)g(en)o(tire)i(error-catc)o
(hing)e(expression.)25 b(If)17 b(ev)m(aluating)g Fl(expr-1)k
Fq(results)c(in)g(an)g(error)0 1016 y(b)q(eing)22 b(raised,)g(then)e
(call)i(that)e(error)g Fl(E)p Fq(.)g(If)g Fl(E)j Fq(is)e(in)h(the)e
(list)h(resulting)h(from)e(ev)m(aluating)h Fl(co)q(des)p
Fq(,)h(then)f Fl(E)0 1070 y Fq(is)e(considered)h Fl(caugh)o(t)g
Fq(b)o(y)e(this)i(error-catc)o(hing)e(expression.)32
b(In)19 b(suc)o(h)g(a)g(case,)g(if)g Fl(expr-2)k Fq(w)o(as)18
b(giv)o(en,)h(it)g(is)0 1124 y(ev)m(aluated)f(to)f(get)g(the)g(outcome)
g(of)g(the)g(en)o(tire)h(error-catc)o(hing)f(expression;)i(if)f
Fl(expr-2)j Fq(w)o(as)16 b(omitted,)i(then)0 1177 y Fl(E)f
Fq(b)q(ecomes)f(the)f(v)m(alue)h(of)e(the)h(en)o(tire)h(expression.)k
(If)15 b Fl(E)j Fq(is)d Fl(not)h Fq(in)f(the)g(list)h(resulting)g(from)
e Fl(co)q(des)p Fq(,)h(then)h(this)0 1231 y(expression)i(do)q(es)g(not)
e(catc)o(h)h(the)g(error)g(at)f(all)j(and)e(it)g(con)o(tin)o(ues)h(to)f
(b)q(e)g(raised,)h(p)q(ossibly)h(to)d(b)q(e)i(caugh)o(t)f(b)o(y)0
1285 y(some)e(piece)i(of)d(co)q(de)i(either)g(surrounding)g(this)g
(expression)g(or)e(higher)i(up)g(on)f(the)h(v)o(erb-call)g(stac)o(k.)0
1348 y(Here)f(are)g(some)g(examples)h(of)f(the)g(use)h(of)f(this)g
(kind)h(of)f(expression:)120 1408 y Fn(`x)24 b(+)f(1)h(!)g(E_TYPE)f(=>)
g(0')0 1470 y Fq(Returns)c Fn(x)c(+)g(1)j Fq(if)g Fn(x)g
Fq(is)h(an)f(in)o(teger,)g(returns)g Fn(0)g Fq(if)h Fn(x)f
Fq(is)g(not)g(an)g(in)o(teger,)h(and)f(raises)g Fn(E_VARNF)g
Fq(if)g Fn(x)g Fq(do)q(esn't)0 1524 y(ha)o(v)o(e)d(a)g(v)m(alue.)120
1584 y Fn(`x.y)23 b(!)h(E_PROPNF,)f(E_PERM)g(=>)g(17')0
1647 y Fq(Returns)15 b Fn(x.y)f Fq(if)h(that)f(do)q(esn't)h(cause)f(an)
h(error,)f Fn(17)g Fq(if)h Fn(x)f Fq(do)q(esn't)h(ha)o(v)o(e)f(a)g
Fn(y)h Fq(prop)q(ert)o(y)f(or)g(that)g(prop)q(ert)o(y)g(isn't)0
1701 y(readable,)i(and)f(raises)g(some)g(other)g(kind)h(of)f(error)g
(\(lik)o(e)h Fn(E_INVIND)p Fq(\))d(if)j Fn(x.y)f Fq(do)q(es.)120
1761 y Fn(`1)24 b(/)f(0)h(!)g(ANY')0 1823 y Fq(Returns)16
b Fn(E_DIV)p Fq(.)0 1948 y Fj(4.1.13)29 b(P)n(aren)n(theses)17
b(and)e(Op)r(erator)f(Precedence)62 2039 y Fq(As)k(sho)o(wn)f(in)h(a)f
(few)g(examples)h(ab)q(o)o(v)o(e,)f(MOO)h(allo)o(ws)g(y)o(ou)f(to)f
(use)i(paren)o(theses)f(to)g(mak)o(e)g(it)h(clear)f(ho)o(w)0
2093 y(y)o(ou)e(in)o(tend)h(for)f(complex)h(expressions)g(to)e(b)q(e)i
(group)q(ed.)k(F)l(or)15 b(example,)h(the)f(expression)120
2153 y Fn(3)24 b(*)f(\(4)h(+)g(5\))0 2215 y Fq(p)q(erforms)15
b(the)g(addition)h(of)f(4)g(and)h(5)e(b)q(efore)i(m)o(ultiplying)h(the)
f(result)f(b)o(y)g(3.)62 2278 y(If)g(y)o(ou)f(lea)o(v)o(e)g(out)g(the)h
(paren)o(theses,)f(MOO)g(will)i(\014gure)f(out)f(ho)o(w)g(to)f(group)h
(the)h(expression)g(according)g(to)0 2332 y(certain)c(rules.)19
b(The)12 b(\014rst)e(of)g(these)i(is)f(that)f(some)h(op)q(erators)e(ha)
o(v)o(e)i(higher)h Fl(precedence)j Fq(than)10 b(others;)i(op)q(erators)
0 2386 y(with)j(higher)h(precedence)g(will)h(more)d(tigh)o(tly)i(bind)g
(to)e(their)h(op)q(erands)h(than)e(those)h(with)g(lo)o(w)o(er)g
(precedence.)0 2440 y(F)l(or)e(example,)h(m)o(ultiplication)i(has)e
(higher)g(precedence)i(than)d(addition;)i(th)o(us,)e(if)i(the)e(paren)o
(theses)h(had)g(b)q(een)0 2494 y(left)i(out)e(of)h(the)g(expression)h
(in)h(the)e(previous)h(paragraph,)e(MOO)h(w)o(ould)h(ha)o(v)o(e)f
(group)q(ed)g(it)h(as)f(follo)o(ws:)120 2554 y Fn(\(3)24
b(*)f(4\))h(+)g(5)62 2616 y Fq(The)15 b(table)h(b)q(elo)o(w)f(giv)o(es)
g(the)g(relativ)o(e)h(precedence)h(of)d(all)i(of)e(the)h(MOO)h(op)q
(erators;)d(op)q(erators)h(on)h(higher)0 2670 y(lines)i(in)f(the)f
(table)h(ha)o(v)o(e)f(higher)h(precedence)g(and)g(those)f(on)g(the)g
(same)g(line)i(ha)o(v)o(e)e(iden)o(tical)i(precedence:)p
eop
%%Page: 28 30
28 29 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(28)120 183 y Fn(!)167 b(-)24 b Fq(\(without)15
b(a)f(left)i(op)q(erand\))120 235 y Fn(^)120 287 y(*)167
b(/)g(\045)120 339 y(+)g(-)120 391 y(==)143 b(!=)g(<)167
b(<=)143 b(>)167 b(>=)142 b(in)120 443 y(&&)h(||)120
495 y Fi(:)8 b(:)g(:)22 b Fn(?)i Fi(:)8 b(:)g(:)22 b
Fn(|)h Fi(:)8 b(:)g(:)22 b Fq(\(the)15 b(conditional)i(expression\))120
546 y Fn(=)0 617 y Fq(Th)o(us,)e(the)g(horrendous)g(expression)120
685 y Fn(x)24 b(=)f(a)h(<)g(b)g(&&)f(c)h(>)g(d)f(+)h(e)g(*)g(f)f(?)h(w)
g(in)f(y)h(|)g(-)g(q)f(-)h(r)0 755 y Fq(w)o(ould)16 b(b)q(e)f(group)q
(ed)h(as)f(follo)o(ws:)120 823 y Fn(x)24 b(=)f(\(\(\(a)h(<)f(b\))h(&&)g
(\(c)f(>)h(\(d)g(+)f(\(e)h(*)g(f\)\)\)\))f(?)h(\(w)f(in)h(y\))f(|)h
(\(\(-)f(q\))h(-)g(r\)\))0 894 y Fq(It)e(is)g(b)q(est)f(to)g(k)o(eep)h
(expressions)g(simpler)h(than)e(this)h(and)g(to)f(use)h(paren)o(theses)
f(lib)q(erally)k(to)20 b(mak)o(e)h(y)o(our)0 948 y(meaning)16
b(clear)g(to)e(other)h(h)o(umans.)0 1120 y Fp(4.2)33
b(MOO)13 b(Language)i(Statemen)n(ts)62 1220 y Fq(Statemen)o(ts)20
b(are)g(MOO)h(constructs)f(that,)h(in)g(con)o(trast)e(to)h
(expressions,)j(p)q(erform)d(some)g(useful,)j(non-)0
1274 y(v)m(alue-pro)q(ducing)h(op)q(eration.)39 b(F)l(or)21
b(example,)i(there)f(are)f(sev)o(eral)g(kinds)i(of)e(statemen)o(ts,)g
(called)i(`lo)q(oping)0 1327 y(constructs',)c(that)g(rep)q(eatedly)i(p)
q(erform)e(some)h(set)f(of)g(op)q(erations.)33 b(F)l(ortunately)l(,)20
b(there)g(are)f(man)o(y)g(few)o(er)0 1381 y(kinds)d(of)f(statemen)o(ts)
f(in)i(MOO)g(than)f(there)g(are)g(kinds)h(of)f(expressions.)0
1538 y Fj(4.2.1)30 b(Errors)15 b(While)h(Executing)g(Statemen)n(ts)62
1637 y Fq(Statemen)o(ts)c(do)h(not)f(return)h(v)m(alues,)h(but)f(some)g
(kinds)g(of)g(statemen)o(ts)e(can,)i(under)h(certain)f(circumstances)0
1691 y(describ)q(ed)19 b(b)q(elo)o(w,)f(generate)g(errors.)25
b(If)18 b(suc)o(h)g(an)f(error)g(is)g(generated)h(in)g(a)f(v)o(erb)g
(whose)h(`)p Fn(d)p Fq(')e(\(debug\))i(bit)f(is)0 1745
y(not)e(set,)f(then)h(the)g(error)g(is)g(ignored)h(and)f(the)g
(statemen)o(t)f(that)g(generated)h(it)h(is)f(simply)h(skipp)q(ed;)h
(execution)0 1799 y(pro)q(ceeds)f(with)g(the)f(next)g(statemen)o(t.)120
1867 y Fk(Note:)j Fq(this)c(error-ignoring)g(b)q(eha)o(vior)g(is)g(v)o
(ery)g(error)e(prone,)i(since)h(it)f(a\013ects)f Fl(all)j
Fq(errors,)d(includ-)120 1919 y(ing)f(ones)g(the)g(programmer)e(ma)o(y)
h(not)h(ha)o(v)o(e)f(an)o(ticipated.)20 b(The)11 b(`)p
Fn(d)p Fq(')g(bit)h(exists)g(only)h(for)e(historical)120
1971 y(reasons;)17 b(it)f(w)o(as)g(once)h(the)g(only)g(w)o(a)o(y)f(for)
g(MOO)h(programmers)e(to)h(catc)o(h)g(and)h(handle)h(errors.)120
2023 y(The)i(error-catc)o(hing)h(expression)g(and)f(the)g
Fn(try)p Fq(-)p Fn(except)f Fq(statemen)o(t)h(are)f(far)h(b)q(etter)g
(w)o(a)o(ys)f(of)120 2074 y(accomplishing)e(the)e(same)g(thing.)62
2145 y(If)f(the)f(`)p Fn(d)p Fq(')f(bit)i(is)f(set,)g(as)g(it)g
(usually)i(is,)e(then)h(the)f(error)f(is)i Fl(raised)h
Fq(and)f(can)f(b)q(e)h(caugh)o(t)e(and)i(handled)g(either)0
2199 y(b)o(y)h(co)q(de)h(surrounding)g(the)f(expression)h(in)g
(question)g(or)f(b)o(y)g(v)o(erbs)g(higher)h(up)f(on)g(the)h(c)o(hain)g
(of)e(calls)j(leading)0 2253 y(to)11 b(the)i(curren)o(t)f(v)o(erb.)19
b(If)12 b(the)g(error)g(is)g(not)g(caugh)o(t,)g(then)g(the)h(serv)o(er)
e(ab)q(orts)h(the)g(en)o(tire)h(task)e(and,)i(b)o(y)f(default,)0
2307 y(prin)o(ts)18 b(a)f(message)g(to)g(the)h(curren)o(t)f(pla)o(y)o
(er.)27 b(See)18 b(the)g(descriptions)h(of)e(the)h(error-catc)o(hing)f
(expression)i(and)0 2361 y(the)e Fn(try)p Fq(-)p Fn(except)f
Fq(statemen)o(t)g(for)h(the)g(details)i(of)d(ho)o(w)h(errors)f(can)i(b)
q(e)g(caugh)o(t,)f(and)g(the)g(c)o(hapter)g(on)g(serv)o(er)0
2415 y(assumptions)e(ab)q(out)g(the)h(database)e(for)h(details)h(on)f
(the)g(handling)i(of)e(uncaugh)o(t)g(errors.)0 2571 y
Fj(4.2.2)30 b(Simple)15 b(Statemen)n(ts)62 2670 y Fq(The)h(simplest)g
(kind)g(of)f(statemen)o(t)f(is)i(the)f Fl(n)o(ull)k Fq(statemen)o(t,)13
b(consisting)j(of)f(just)g(a)g(semicolon:)p eop
%%Page: 29 31
29 30 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(29)120 183 y Fn(;)0 252 y Fq(It)15 b(do)q(esn't)g(do)g
(an)o(ything)h(at)e(all,)i(but)f(it)h(do)q(es)f(it)h(v)o(ery)f(quic)o
(kly)l(.)62 321 y(The)c(next)f(simplest)h(statemen)o(t)e(is)i(also)f
(one)g(of)g(the)g(most)g(common,)g(the)g(expression)h(statemen)o(t,)f
(consisting)0 375 y(of)15 b(an)o(y)g(expression)h(follo)o(w)o(ed)f(b)o
(y)g(a)g(semicolon:)120 442 y Fl(expression)p Fn(;)0
511 y Fq(The)21 b(giv)o(en)g(expression)h(is)f(ev)m(aluated)g(and)g
(the)g(resulting)h(v)m(alue)g(is)f(ignored.)36 b(Commonly-used)22
b(kinds)f(of)0 565 y(expressions)d(for)f(suc)o(h)h(statemen)o(ts)e
(include)k(assignmen)o(ts)d(and)g(v)o(erb)h(calls.)27
b(Of)18 b(course,)f(there's)h(no)f(use)h(for)0 619 y(suc)o(h)i(a)g
(statemen)o(t)e(unless)j(the)f(ev)m(aluation)h(of)f Fl(expression)g
Fq(has)g(some)g(side-e\013ect,)h(suc)o(h)f(as)g(c)o(hanging)g(the)0
673 y(v)m(alue)c(of)f(some)g(v)m(ariable)i(or)d(prop)q(ert)o(y)l(,)h
(prin)o(ting)h(some)f(text)g(on)g(someone's)f(screen,)i(etc.)0
823 y Fj(4.2.3)30 b(Statemen)n(ts)15 b(for)g(T)-5 b(esting)14
b(Conditions)62 921 y Fq(The)j(`)p Fn(if)p Fq(')f(statemen)o(t)g(allo)o
(ws)h(y)o(ou)f(to)g(decide)j(whether)e(or)f(not)g(to)g(p)q(erform)h
(some)f(statemen)o(ts)g(based)h(on)0 975 y(the)e(v)m(alue)i(of)d(an)i
(arbitrary)e(expression:)120 1042 y Fn(if)24 b(\()p Fl(expression)p
Fn(\))168 1093 y Fl(statemen)o(ts)120 1145 y Fn(endif)0
1214 y Fl(Expression)15 b Fq(is)g(ev)m(aluated)g(and,)g(if)f(it)h
(returns)f(a)g(true)h(v)m(alue,)g(the)f(statemen)o(ts)g(are)g(executed)
h(in)g(order;)f(other-)0 1268 y(wise,)h(nothing)h(more)f(is)h(done.)62
1337 y(One)f(frequen)o(tly)g(w)o(an)o(ts)e(to)g(p)q(erform)h(one)g(set)
g(of)g(statemen)o(ts)f(if)h(some)g(condition)i(is)e(true)g(and)h(some)e
(other)0 1391 y(set)h(of)g(statemen)o(ts)f(otherwise.)20
b(The)14 b(optional)h(`)p Fn(else)p Fq(')e(phrase)i(in)g(an)f(`)p
Fn(if)p Fq(')f(statemen)o(t)h(allo)o(ws)g(y)o(ou)g(to)g(do)g(this:)120
1458 y Fn(if)24 b(\()p Fl(expression)p Fn(\))168 1510
y Fl(statemen)o(ts-1)120 1562 y Fn(else)168 1614 y Fl(statemen)o(ts-2)
120 1666 y Fn(endif)0 1735 y Fq(This)d(statemen)o(t)e(is)h(executed)i
(just)d(lik)o(e)j(the)e(previous)h(one,)g(except)g(that)e
Fl(statemen)o(ts-1)k Fq(are)c(executed)i(if)0 1789 y
Fl(expression)16 b Fq(returns)f(a)g(true)g(v)m(alue)i(and)e
Fl(statemen)o(ts-2)i Fq(are)e(executed)h(otherwise.)62
1858 y(Sometimes,)f(one)h(needs)g(to)e(test)h(sev)o(eral)g(conditions)i
(in)f(a)f(kind)h(of)f(nested)g(fashion:)120 1924 y Fn(if)24
b(\()p Fl(expression-1)t Fn(\))168 1976 y Fl(statemen)o(ts-1)120
2028 y Fn(else)168 2080 y(if)f(\()p Fl(expression-2)t
Fn(\))215 2132 y Fl(statemen)o(ts-2)168 2184 y Fn(else)215
2236 y(if)h(\()p Fl(expression-3)t Fn(\))263 2288 y Fl(statemen)o(ts-3)
215 2340 y Fn(else)263 2391 y Fl(statemen)o(ts-4)215
2443 y Fn(endif)168 2495 y(endif)120 2547 y(endif)0 2616
y Fq(Suc)o(h)c(co)q(de)f(can)g(easily)h(b)q(ecome)g(tedious)f(to)g
(write)g(and)g(di\016cult)h(to)e(read.)31 b(MOO)20 b(pro)o(vides)f(a)g
(somewhat)0 2670 y(simpler)d(notation)f(for)g(suc)o(h)g(cases:)p
eop
%%Page: 30 32
30 31 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(30)120 183 y Fn(if)24 b(\()p Fl(expression-1)t
Fn(\))168 235 y Fl(statemen)o(ts-1)120 287 y Fn(elseif)f(\()p
Fl(expression-2)t Fn(\))168 339 y Fl(statemen)o(ts-2)120
391 y Fn(elseif)g(\()p Fl(expression-3)t Fn(\))168 443
y Fl(statemen)o(ts-3)120 495 y Fn(else)168 546 y Fl(statemen)o(ts-4)120
598 y Fn(endif)0 670 y Fq(Note)17 b(that)f(`)p Fn(elseif)p
Fq(')f(is)j(written)f(as)g(a)g(single)h(w)o(ord,)e(without)h(an)o(y)g
(spaces.)26 b(This)17 b(simpler)i(v)o(ersion)e(has)g(the)0
724 y(v)o(ery)g(same)f(meaning)i(as)f(the)g(original:)25
b(ev)m(aluate)17 b Fl(expression-i)22 b Fq(for)16 b Fl(i)k
Fq(equal)e(to)e(1,)h(2,)g(and)g(3,)g(in)h(turn,)f(un)o(til)0
778 y(one)d(of)g(them)h(returns)f(a)g(true)g(v)m(alue;)i(then)e
(execute)h(the)g Fl(statemen)o(ts-i)h Fq(asso)q(ciated)f(with)g(that)e
(expression.)21 b(If)0 832 y(none)16 b(of)e(the)i Fl(expression-i)j
Fq(return)c(a)g(true)g(v)m(alue,)h(then)g(execute)f Fl(statemen)o(ts-4)
p Fq(.)62 904 y(An)o(y)g(n)o(um)o(b)q(er)h(of)f(`)p Fn(elseif)p
Fq(')e(phrases)j(can)f(app)q(ear,)g(eac)o(h)g(ha)o(ving)h(this)f(form:)
120 974 y Fn(elseif)23 b(\()p Fl(expression)p Fn(\))i
Fl(statemen)o(ts)62 1046 y Fq(The)16 b(complete)g(syn)o(tax)e(of)h(the)
g(`)p Fn(if)p Fq(')f(statemen)o(t,)g(therefore,)h(is)g(as)g(follo)o
(ws:)120 1117 y Fn(if)24 b(\()p Fl(expression)p Fn(\))168
1168 y Fl(statemen)o(ts)120 1220 y(zero-or-more-elseif-phrases)120
1272 y(an-optional-else-phrase)120 1324 y Fn(endif)0
1489 y Fj(4.2.4)30 b(Statemen)n(ts)15 b(for)g(Lo)r(oping)62
1591 y Fq(MOO)i(pro)o(vides)f(three)h(di\013eren)o(t)f(kinds)h(of)f(lo)
q(oping)h(statemen)o(ts,)e(allo)o(wing)i(y)o(ou)f(to)f(ha)o(v)o(e)h(a)g
(set)g(of)g(state-)0 1644 y(men)o(ts)d(executed)i(\(1\))e(once)h(for)f
(eac)o(h)g(elemen)o(t)i(of)e(a)g(giv)o(en)i(list,)f(\(2\))f(once)h(for)
f(eac)o(h)h(in)o(teger)f(or)h(ob)s(ject)f(n)o(um)o(b)q(er)0
1698 y(in)j(a)f(giv)o(en)h(range,)e(and)h(\(3\))g(o)o(v)o(er)f(and)h(o)
o(v)o(er)g(un)o(til)h(a)f(giv)o(en)h(condition)g(stops)f(b)q(eing)h
(true.)62 1771 y(T)l(o)f(p)q(erform)g(some)g(statemen)o(ts)f(once)i
(for)e(eac)o(h)h(elemen)o(t)h(of)f(a)g(giv)o(en)h(list,)f(use)h(this)g
(syn)o(tax:)120 1841 y Fn(for)23 b Fl(v)m(ariable)28
b Fn(in)c(\()p Fl(expression)p Fn(\))168 1892 y Fl(statemen)o(ts)120
1944 y Fn(endfor)0 2016 y Fq(The)12 b(expression)h(is)f(ev)m(aluated)h
(and)f(should)h(return)e(a)h(list;)h(if)g(it)f(do)q(es)g(not,)g
Fn(E_TYPE)f Fq(is)h(raised.)19 b(The)12 b Fl(statemen)o(ts)0
2070 y Fq(are)g(then)g(executed)h(once)g(for)f(eac)o(h)g(elemen)o(t)h
(of)e(that)h(list)h(in)g(turn;)g(eac)o(h)f(time,)h(the)f(giv)o(en)h
Fl(v)m(ariable)j Fq(is)c(assigned)0 2124 y(the)j(v)m(alue)i(of)d(the)i
(elemen)o(t)g(in)g(question.)k(F)l(or)15 b(example,)g(consider)i(the)e
(follo)o(wing)h(statemen)o(ts:)120 2194 y Fn(odds)23
b(=)h({1,)f(3,)h(5,)g(7,)f(9};)120 2246 y(evens)g(=)h({};)120
2298 y(for)f(n)h(in)g(\(odds\))168 2350 y(evens)f(=)h({@evens,)e(n)i(+)
g(1};)120 2402 y(endfor)0 2474 y Fq(The)15 b(v)m(alue)i(of)e(the)g(v)m
(ariable)h(`)p Fn(evens)p Fq(')e(after)h(executing)h(these)f(statemen)o
(ts)f(is)i(the)f(list)120 2544 y Fn({2,)23 b(4,)h(6,)g(8,)f(10})62
2616 y Fq(T)l(o)14 b(p)q(erform)g(a)f(set)h(of)f(statemen)o(ts)g(once)h
(for)f(eac)o(h)h(in)o(teger)g(or)g(ob)s(ject)f(n)o(um)o(b)q(er)h(in)h
(a)e(giv)o(en)i(range,)e(use)i(this)0 2670 y(syn)o(tax:)p
eop
%%Page: 31 33
31 32 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(31)120 183 y Fn(for)23 b Fl(v)m(ariable)28
b Fn(in)c([)p Fl(expression-1)p Fn(..)p Fl(expression-2)t
Fn(])168 235 y Fl(statemen)o(ts)120 287 y Fn(endfor)0
353 y Fq(The)18 b(t)o(w)o(o)e(expressions)j(are)e(ev)m(aluated)i(in)f
(turn)g(and)g(should)g(either)h(b)q(oth)f(return)f(in)o(tegers)h(or)f
(b)q(oth)h(return)0 407 y(ob)s(ject)11 b(n)o(um)o(b)q(ers;)i
Fn(E_TYPE)e Fq(is)i(raised)f(otherwise.)19 b(The)13 b
Fl(statemen)o(ts)f Fq(are)g(then)g(executed)h(once)f(for)g(eac)o(h)g
(in)o(teger)0 461 y(\(or)h(ob)s(ject)g(n)o(um)o(b)q(er,)i(as)e
(appropriate\))h(greater)f(than)g(or)h(equal)g(to)g(the)g(v)m(alue)h
(of)e Fl(expression-1)18 b Fq(and)d(less)f(than)0 515
y(or)g(equal)g(to)g(the)g(result)h(of)e Fl(expression-2)p
Fq(,)i(in)g(increasing)g(order.)k(Eac)o(h)14 b(time,)h(the)f(giv)o(en)g
(v)m(ariable)i(is)e(assigned)0 569 y(the)h(in)o(teger)h(or)e(ob)s(ject)
h(n)o(um)o(b)q(er)h(in)g(question.)k(F)l(or)15 b(example,)g(consider)h
(the)g(follo)o(wing)g(statemen)o(ts:)120 633 y Fn(evens)23
b(=)h({};)120 685 y(for)f(n)h(in)g([1..5])168 737 y(evens)f(=)h
({@evens,)e(2)i(*)g(n};)120 789 y(endfor)0 855 y Fq(The)12
b(v)m(alue)h(of)e(the)h(v)m(ariable)h(`)p Fn(evens)p
Fq(')d(after)h(executing)i(these)f(statemen)o(ts)e(is)i(just)g(as)f(in)
h(the)g(previous)g(example:)0 909 y(the)j(list)120 973
y Fn({2,)23 b(4,)h(6,)g(8,)f(10})62 1039 y Fq(The)17
b(follo)o(wing)g(lo)q(op)f(o)o(v)o(er)g(ob)s(ject)f(n)o(um)o(b)q(ers)i
(prin)o(ts)f(out)g(the)h(n)o(um)o(b)q(er)f(and)h(name)f(of)g(ev)o(ery)g
(v)m(alid)i(ob)s(ject)0 1093 y(in)e(the)f(database:)120
1157 y Fn(for)23 b(o)h(in)g([#0..max_object\(\)])168
1209 y(if)f(\(valid\(o\)\))215 1261 y(notify\(player,)f(tostr\(o,)h(":)
h(",)f(o.name\)\);)168 1313 y(endif)120 1365 y(endfor)62
1431 y Fq(The)f(\014nal)h(kind)g(of)f(lo)q(op)g(in)h(MOO)f(executes)h
(a)e(set)h(of)g(statemen)o(ts)e(rep)q(eatedly)k(as)d(long)h(as)g(a)f
(giv)o(en)0 1485 y(condition)16 b(remains)g(true:)120
1549 y Fn(while)23 b(\()p Fl(expression)p Fn(\))168 1601
y Fl(statemen)o(ts)120 1653 y Fn(endwhile)0 1719 y Fq(The)e(expression)
h(is)g(ev)m(aluated)g(and,)g(if)f(it)h(returns)e(a)h(true)g(v)m(alue,)i
(the)e Fl(statemen)o(ts)h Fq(are)f(executed;)j(then,)0
1773 y(execution)e(of)e(the)h(`)p Fn(while)p Fq(')e(statemen)o(t)h(b)q
(egins)i(all)f(o)o(v)o(er)f(again)h(with)g(the)f(ev)m(aluation)i(of)f
(the)f(expression.)0 1827 y(That)13 b(is,)h(execution)h(alternates)f(b)
q(et)o(w)o(een)g(ev)m(aluating)g(the)g(expression)h(and)f(executing)h
(the)e(statemen)o(ts)g(un)o(til)0 1881 y(the)k(expression)h(returns)f
(a)g(false)g(v)m(alue.)27 b(The)17 b(follo)o(wing)h(example)g(co)q(de)g
(has)f(precisely)i(the)e(same)g(e\013ect)f(as)0 1935
y(the)f(lo)q(op)h(just)f(sho)o(wn)g(ab)q(o)o(v)o(e:)120
1999 y Fn(evens)23 b(=)h({};)120 2051 y(n)g(=)f(1;)120
2102 y(while)g(\(n)h(<=)f(5\))168 2154 y(evens)g(=)h({@evens,)e(2)i(*)g
(n};)168 2206 y(n)f(=)h(n)g(+)g(1;)120 2258 y(endwhile)120
2322 y Fl(Fine)16 b(p)q(oin)o(t:)21 b Fq(It)15 b(is)h(also)f(p)q
(ossible)i(to)e(giv)o(e)g(a)g(`name')f(to)h(a)g(`)p Fn(while)p
Fq(')e(lo)q(op,)j(using)g(this)f(syn)o(tax:)240 2386
y Fn(while)23 b Fl(name)k Fn(\()p Fl(expression)p Fn(\))288
2438 y Fl(statemen)o(ts)240 2490 y Fn(endwhile)120 2554
y Fq(whic)o(h)16 b(has)f(precisely)i(the)e(same)g(e\013ect)g(as)240
2618 y Fn(while)23 b(\()p Fl(name)k Fn(=)c Fl(expression)p
Fn(\))288 2670 y Fl(statemen)o(ts)p eop
%%Page: 32 34
32 33 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(32)240 183 y Fn(endwhile)120 251 y Fq(This)12
b(naming)f(facilit)o(y)i(is)e(only)h(really)g(useful)h(in)f
(conjunction)g(with)f(the)h(`)p Fn(break)p Fq(')d(and)j(`)p
Fn(continue)p Fq(')120 303 y(statemen)o(ts,)i(describ)q(ed)j(in)f(the)f
(next)g(section.)62 372 y(With)k(eac)o(h)g(kind)h(of)e(lo)q(op,)i(it)f
(is)h(p)q(ossible)g(that)e(the)h(statemen)o(ts)f(in)h(the)g(b)q(o)q(dy)
h(of)e(the)h(lo)q(op)g(will)i(nev)o(er)0 426 y(b)q(e)c(executed)h(at)d
(all.)25 b(F)l(or)16 b(iteration)h(o)o(v)o(er)f(lists,)h(this)g(happ)q
(ens)g(when)g(the)g(list)g(returned)g(b)o(y)f(the)h(expression)0
480 y(is)j(empt)o(y)l(.)33 b(F)l(or)20 b(iteration)g(on)f(in)o(tegers,)
i(it)f(happ)q(ens)g(when)h Fl(expression-1)j Fq(returns)19
b(a)h(larger)f(in)o(teger)h(than)0 534 y Fl(expression-2)p
Fq(.)29 b(Finally)l(,)21 b(for)c(the)h(`)p Fn(while)p
Fq(')f(lo)q(op,)i(it)f(happ)q(ens)h(if)g(the)f(expression)h(returns)f
(a)g(false)h(v)m(alue)g(the)0 588 y(v)o(ery)c(\014rst)g(time)g(it)h(is)
f(ev)m(aluated.)0 741 y Fj(4.2.5)30 b(T)-5 b(erminating)14
b(One)i(or)f(All)g(Iterations)g(of)f(a)h(Lo)r(op)62 840
y Fq(Sometimes,)i(it)g(is)g(useful)g(to)f(exit)h(a)f(lo)q(op)h(b)q
(efore)g(it)g(\014nishes)h(all)f(of)f(its)h(iterations.)24
b(F)l(or)16 b(example,)h(if)g(the)0 894 y(lo)q(op)h(is)f(used)h(to)e
(searc)o(h)h(for)f(a)h(particular)g(kind)h(of)f(elemen)o(t)h(of)e(a)h
(list,)h(then)f(it)g(migh)o(t)g(mak)o(e)g(sense)g(to)f(stop)0
948 y(lo)q(oping)i(as)f(so)q(on)g(as)g(the)g(righ)o(t)g(kind)h(of)f
(elemen)o(t)h(is)g(found,)f(ev)o(en)h(if)f(there)g(are)g(more)g(elemen)
o(ts)h(y)o(et)f(to)f(see.)0 1002 y(The)f(`)p Fn(break)p
Fq(')f(statemen)o(t)g(is)i(used)g(for)e(this)i(purp)q(ose;)f(it)h(has)f
(the)g(form)120 1069 y Fn(break;)0 1139 y Fq(or)120 1206
y Fn(break)23 b Fl(name)s Fn(;)0 1276 y Fq(Eac)o(h)16
b(`)p Fn(break)p Fq(')f(statemen)o(t)g(indicates)j(a)e(sp)q(eci\014c)j
(surrounding)e(lo)q(op;)g(if)g Fl(name)i Fq(is)e(not)f(giv)o(en,)h(the)
f(statemen)o(t)0 1330 y(refers)f(to)h(the)f(innermost)h(one.)22
b(If)16 b(it)g(is)g(giv)o(en,)g Fl(name)i Fq(m)o(ust)d(b)q(e)i(the)f
(name)f(app)q(earing)i(righ)o(t)e(after)g(the)h(`)p Fn(for)p
Fq(')0 1384 y(or)j(`)p Fn(while)p Fq(')f(k)o(eyw)o(ord)g(of)h(the)h
(desired)g(enclosing)h(lo)q(op.)33 b(When)20 b(the)f(`)p
Fn(break)p Fq(')f(statemen)o(t)g(is)i(executed,)h(the)0
1438 y(indicated)15 b(lo)q(op)e(is)h(immediately)g(terminated)g(and)f
(executing)h(con)o(tin)o(ues)f(just)g(as)g(if)g(the)g(lo)q(op)h(had)f
(completed)0 1492 y(its)i(iterations)h(normally)l(.)62
1562 y(MOO)h(also)g(allo)o(ws)g(y)o(ou)f(to)g(terminate)h(just)f(the)h
(curren)o(t)g(iteration)g(of)f(a)g(lo)q(op,)i(making)e(it)h
(immediately)0 1615 y(go)e(on)g(to)f(the)h(next)g(one,)g(if)h(an)o(y)l
(.)j(The)d(`)p Fn(continue)p Fq(')d(statemen)o(t)h(do)q(es)h(this;)h
(it)f(has)g(precisely)i(the)e(same)g(forms)0 1669 y(as)g(the)g(`)p
Fn(break)p Fq(')f(statemen)o(t:)120 1737 y Fn(continue;)0
1807 y Fq(or)120 1874 y Fn(continue)23 b Fl(name)s Fn(;)0
2027 y Fj(4.2.6)30 b(Returning)15 b(a)g(V)-5 b(alue)15
b(from)g(a)g(V)-5 b(erb)62 2126 y Fq(The)13 b(MOO)f(program)g(in)h(a)f
(v)o(erb)g(is)h(just)f(a)g(sequence)i(of)d(statemen)o(ts.)18
b(Normally)l(,)13 b(when)g(the)g(v)o(erb)f(is)h(called,)0
2180 y(those)g(statemen)o(ts)f(are)h(simply)i(executed)f(in)g(order)f
(and)g(then)h(the)f(in)o(teger)h(0)f(is)h(returned)f(as)g(the)h(v)m
(alue)g(of)f(the)0 2234 y(v)o(erb-call)19 b(expression.)29
b(Using)19 b(the)f(`)p Fn(return)p Fq(')e(statemen)o(t,)h(one)h(can)g
(c)o(hange)g(this)h(b)q(eha)o(vior.)28 b(The)19 b(`)p
Fn(return)p Fq(')0 2288 y(statemen)o(t)14 b(has)h(one)h(of)e(the)i
(follo)o(wing)f(t)o(w)o(o)f(forms:)120 2355 y Fn(return;)0
2425 y Fq(or)120 2492 y Fn(return)23 b Fl(expression)p
Fn(;)0 2562 y Fq(When)16 b(it)g(is)g(executed,)h(execution)f(of)g(the)f
(curren)o(t)h(v)o(erb)g(is)g(terminated)g(immediately)h(after)e(ev)m
(aluating)i(the)0 2616 y(giv)o(en)22 b Fl(expression)p
Fq(,)h(if)e(an)o(y)l(.)38 b(The)21 b(v)o(erb-call)i(expression)f(that)e
(started)h(the)g(execution)h(of)f(this)h(v)o(erb)f(then)0
2670 y(returns)15 b(either)h(the)f(v)m(alue)i(of)d Fl(expression)j
Fq(or)d(the)h(in)o(teger)h(0,)e(if)i(no)f Fl(expression)h
Fq(w)o(as)f(pro)o(vided.)p eop
%%Page: 33 35
33 34 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(33)0 183 y Fj(4.2.7)30 b(Handling)15
b(Errors)g(in)h(Statemen)n(ts)62 278 y Fq(Normally)l(,)24
b(whenev)o(er)e(a)f(piece)i(of)e(MOO)h(co)q(de)g(raises)f(an)h(error,)g
(the)f(en)o(tire)h(task)f(is)h(ab)q(orted)g(and)f(a)0
332 y(message)15 b(prin)o(ted)h(to)f(the)h(user.)21 b(Often,)15
b(suc)o(h)h(errors)f(can)h(b)q(e)g(an)o(ticipated)g(in)h(adv)m(ance)f
(b)o(y)g(the)f(programmer)0 386 y(and)g(co)q(de)h(written)f(to)g(deal)h
(with)f(them)g(in)h(a)f(more)g(graceful)g(manner.)20
b(The)c Fn(try)p Fq(-)p Fn(except)e Fq(statemen)o(t)g(allo)o(ws)0
440 y(y)o(ou)h(to)f(do)i(this;)f(the)g(syn)o(tax)g(is)g(as)g(follo)o
(ws:)120 503 y Fn(try)168 555 y Fl(statemen)o(ts-0)120
607 y Fn(except)23 b Fl(v)m(ariable-1)29 b Fn(\()p Fl(co)q(des-1)t
Fn(\))168 658 y Fl(statemen)o(ts-1)120 710 y Fn(except)23
b Fl(v)m(ariable-2)29 b Fn(\()p Fl(co)q(des-2)t Fn(\))168
762 y Fl(statemen)o(ts-2)120 814 y Fi(:)8 b(:)g(:)120
866 y Fn(endtry)0 931 y Fq(where)13 b(the)f Fl(v)m(ariable)s
Fq(s)i(ma)o(y)d(b)q(e)i(omitted)g(and)f(eac)o(h)h Fl(co)q(des)i
Fq(part)d(is)h(either)g(the)f(k)o(eyw)o(ord)g Fn(ANY)g
Fq(or)g(else)h(a)f(comma-)0 985 y(separated)f(list)i(of)e(expressions,)
i(just)f(lik)o(e)g(an)g(argumen)o(t)f(list.)19 b(As)12
b(in)h(an)e(argumen)o(t)g(list,)i(the)f(splicing)i(op)q(erator)0
1039 y(\(`)p Fn(@)p Fq('\))g(can)h(b)q(e)h(used)g(here.)k(There)15
b(can)h(b)q(e)g(an)o(ywhere)f(from)f(1)h(to)g(255)f Fn(except)g
Fq(clauses.)62 1104 y(First,)g(eac)o(h)f Fl(co)q(des)j
Fq(part)e(is)g(ev)m(aluated,)g(yielding)i(a)e(list)g(of)g(error)f(co)q
(des)h(that)f(should)h(b)q(e)h(caugh)o(t)e(if)h(they're)0
1158 y(raised;)h(if)h(a)f Fl(co)q(des)i Fq(is)f Fn(ANY)p
Fq(,)f(then)g(it)h(is)f(equiv)m(alen)o(t)i(to)e(the)g(list)h(of)f(all)h
(p)q(ossible)h(MOO)e(v)m(alues.)62 1224 y(Next,)g Fl(statemen)o(ts-0)j
Fq(is)e(executed;)g(if)g(it)f(do)q(esn't)h(raise)f(an)g(error,)g(then)g
(that's)g(all)h(that)f(happ)q(ens)h(for)f(the)0 1278
y(en)o(tire)k Fn(try)p Fq(-)p Fn(except)e Fq(statemen)o(t.)27
b(Otherwise,)19 b(let)g Fl(E)h Fq(b)q(e)f(the)f(error)g(it)g(raises.)29
b(F)l(rom)17 b(top)h(to)f(b)q(ottom,)h Fl(E)i Fq(is)0
1332 y(searc)o(hed)f(for)f(in)i(the)f(lists)h(resulting)g(from)e(the)h
(v)m(arious)h Fl(co)q(des)h Fq(parts;)f(if)f(it)g(isn't)g(found)h(in)f
(an)o(y)g(of)f(them,)0 1386 y(then)d(it)h(con)o(tin)o(ues)f(to)g(b)q(e)
g(raised,)g(p)q(ossibly)i(to)d(b)q(e)i(caugh)o(t)f(b)o(y)g(some)f
(piece)j(of)d(co)q(de)i(either)g(surrounding)g(this)0
1440 y Fn(try)p Fq(-)p Fn(except)e Fq(statemen)o(t)g(or)h(higher)h(up)g
(on)f(the)g(v)o(erb-call)h(stac)o(k.)62 1505 y(If)i Fl(E)h
Fq(is)f(found)g(\014rst)f(in)h Fl(co)q(des-i)p Fq(,)g(then)g
Fl(v)m(ariable-i)k Fq(\(if)17 b(pro)o(vided\))h(is)f(assigned)h(a)f(v)m
(alue)i(con)o(taining)f(infor-)0 1559 y(mation)d(ab)q(out)f(the)h
(error)f(b)q(eing)i(raised)f(and)g Fl(statemen)o(ts-i)i
Fq(is)e(executed.)21 b(The)14 b(v)m(alue)i(assigned)g(to)e
Fl(v)m(ariable-i)0 1613 y Fq(is)i(a)f(list)h(of)e(four)h(elemen)o(ts:)
120 1676 y Fn({)p Fl(co)q(de)p Fn(,)24 b Fl(message)p
Fn(,)g Fl(v)m(alue)p Fn(,)h Fl(tracebac)o(k)s Fn(})0
1741 y Fq(where)15 b Fl(co)q(de)i Fq(is)e Fl(E)p Fq(,)f(the)g(error)g
(b)q(eing)h(raised,)g Fl(message)h Fq(and)f Fl(v)m(alue)j
Fq(are)c(as)g(pro)o(vided)h(b)o(y)f(the)h(co)q(de)g(that)e(raised)0
1795 y(the)20 b(error,)g(and)g Fl(tracebac)o(k)i Fq(is)e(a)f(list)i
(lik)o(e)g(that)e(returned)h(b)o(y)g(the)g(`)p Fn(callers\(\))p
Fq(')d(function,)22 b(including)g(line)0 1849 y(n)o(um)o(b)q(ers.)35
b(The)20 b Fl(tracebac)o(k)j Fq(list)d(con)o(tains)h(en)o(tries)f(for)g
(ev)o(ery)g(v)o(erb)g(from)f(the)h(one)g(that)g(raised)g(the)h(error)0
1903 y(through)15 b(the)g(one)g(con)o(taining)h(this)g
Fn(try)p Fq(-)p Fn(except)e Fq(statemen)o(t.)62 1969
y(Unless)22 b(otherwise)e(men)o(tioned,)i(all)f(of)f(the)g(built-in)j
(errors)d(raised)h(b)o(y)f(expressions,)i(statemen)o(ts,)e(and)0
2023 y(functions)c(pro)o(vide)g Fn(tostr\()p Fl(co)q(de)s
Fn(\))e Fq(as)h Fl(message)i Fq(and)f(zero)f(as)f Fl(v)m(alue)p
Fq(.)62 2088 y(Here's)h(an)g(example)h(of)f(the)g(use)h(of)f(this)g
(kind)i(of)d(statemen)o(t:)120 2151 y Fn(try)168 2203
y(result)23 b(=)g(object:\(command\)\(@arguments\);)168
2255 y(player:tell\("=>)f(",)h(toliteral\(result\)\);)120
2307 y(except)g(v)h(\(ANY\))168 2359 y(tb)f(=)h(v[4];)168
2411 y(if)f(\(length\(tb\))g(==)g(1\))215 2462 y(player:tell\("**)f
(Illegal)h(command:)g(",)h(v[2]\);)168 2514 y(else)215
2566 y(top)g(=)g(tb[1];)215 2618 y(tb[1..1])f(=)h({};)215
2670 y(player:tell\(top[1],)e(":",)h(top[2],)g(",)h(line)f(",)g
(top[6],)g(":",)p eop
%%Page: 34 36
34 35 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(34)502 183 y Fn(v[2]\);)215 235 y(for)24
b(fr)f(in)h(\(tb\))263 287 y(player:tell\("...)e(called)h(from)g(",)h
(fr[1],)f(":",)g(fr[2],)550 339 y(",)g(line)g(",)h(fr[6]\);)215
391 y(endfor)215 443 y(player:tell\("\(End)e(of)i(traceback\)"\);)168
495 y(endif)120 546 y(endtry)0 668 y Fj(4.2.8)30 b(Cleaning)15
b(Up)g(After)h(Errors)62 759 y Fq(Whenev)o(er)c(an)g(error)f(is)h
(raised,)h(it)f(is)g(usually)h(the)f(case)g(that)f(at)g(least)h(some)g
(MOO)g(co)q(de)g(gets)f(skipp)q(ed)j(o)o(v)o(er)0 812
y(and)f(nev)o(er)h(executed.)20 b(Sometimes,)13 b(it's)g(imp)q(ortan)o
(t)g(that)g(a)g(piece)h(of)f(co)q(de)h Fl(alw)o(a)o(ys)g
Fq(b)q(e)g(executed,)g(whether)f(or)0 866 y(not)i(an)g(error)f(is)i
(raised.)21 b(Use)15 b(the)g Fn(try)p Fq(-)p Fn(finally)f
Fq(statemen)o(t)g(for)h(these)g(cases;)g(it)g(has)g(the)h(follo)o(wing)
g(syn)o(tax:)120 926 y Fn(try)168 978 y Fl(statemen)o(ts-1)120
1029 y Fn(finally)168 1081 y Fl(statemen)o(ts-2)120 1133
y Fn(endtry)0 1195 y Fq(First,)g Fl(statemen)o(ts-1)i
Fq(is)f(executed;)g(if)g(it)f(completes)h(without)f(raising)h(an)f
(error,)g(returning)g(from)g(this)g(v)o(erb,)0 1249 y(or)g(terminating)
i(the)f(curren)o(t)g(iteration)g(of)f(a)h(surrounding)h(lo)q(op)f(\(w)o
(e)g(call)h(these)f(p)q(ossibilities)j Fl(transferring)0
1302 y(con)o(trol)r Fq(\),)h(then)f Fl(statemen)o(ts-2)j
Fq(is)e(executed)h(and)f(that's)e(all)i(that)f(happ)q(ens)i(for)e(the)g
(en)o(tire)h Fn(try)p Fq(-)p Fn(finally)0 1356 y Fq(statemen)o(t.)62
1418 y(Otherwise,)h(the)e(pro)q(cess)g(of)f(transferring)h(con)o(trol)f
(is)i(in)o(terrupted)f(and)g Fl(statmen)o(ts-2)i Fq(is)f(executed.)35
b(If)0 1472 y Fl(statemen)o(ts-2)18 b Fq(itself)f(completes)f(without)g
(transferring)f(con)o(trol,)g(then)h(the)g(in)o(terrupted)g(con)o(trol)
g(transfer)e(is)0 1526 y(resumed)j(just)e(where)i(it)f(left)h(o\013.)22
b(If)16 b Fl(statemen)o(ts-2)j Fq(do)q(es)d(transfer)f(con)o(trol,)h
(then)h(the)f(in)o(terrupted)h(transfer)0 1580 y(is)f(simply)g
(forgotten)e(in)i(fa)o(v)o(or)e(of)h(the)g(new)g(one.)62
1641 y(In)h(short,)e(this)h(statemen)o(t)f(ensures)h(that)g
Fl(statemen)o(ts-2)i Fq(is)e(executed)h(after)f(con)o(trol)f(lea)o(v)o
(es)h Fl(statemen)o(ts-1)0 1695 y Fq(for)g(whatev)o(er)f(reason;)h(it)g
(can)h(th)o(us)f(b)q(e)h(used)f(to)g(mak)o(e)g(sure)g(that)g(some)g
(piece)h(of)f(clean)o(up)i(co)q(de)e(is)h(run)g(ev)o(en)0
1749 y(if)g Fl(statemen)o(ts-1)h Fq(do)q(esn't)e(simply)i(run)e
(normally)h(to)f(completion.)62 1810 y(Here's)g(an)g(example:)120
1869 y Fn(try)168 1921 y(start)23 b(=)h(time\(\);)168
1973 y(object:\(command\)\(@argume)o(nts\);)120 2025
y(finally)168 2077 y(end)f(=)h(time\(\);)168 2129 y
(this:charge_user_for_sec)o(onds\(pl)o(ayer,)d(end)i(-)h(start\);)120
2181 y(endtry)0 2302 y Fj(4.2.9)30 b(Executing)16 b(Statemen)n(ts)f(at)
g(a)g(Later)g(Time)62 2393 y Fq(It)20 b(is)g(sometimes)f(useful)i(to)e
(ha)o(v)o(e)g(some)g(sequence)i(of)e(statemen)o(ts)g(execute)h(at)f(a)g
(later)g(time,)i(without)0 2447 y(h)o(uman)f(in)o(terv)o(en)o(tion.)36
b(F)l(or)20 b(example,)i(one)e(migh)o(t)g(implemen)o(t)i(an)e(ob)s
(ject)g(that,)g(when)h(thro)o(wn)f(in)o(to)g(the)0 2501
y(air,)c(ev)o(en)o(tually)h(falls)f(bac)o(k)g(to)f(the)h(ground;)g(the)
g(`)p Fn(throw)p Fq(')f(v)o(erb)g(on)h(that)f(ob)s(ject)h(should)h
(arrange)e(to)g(prin)o(t)h(a)0 2555 y(message)f(ab)q(out)f(the)i(ob)s
(ject)e(landing)i(on)f(the)h(ground,)e(but)h(the)g(message)g(shouldn't)
h(b)q(e)f(prin)o(ted)h(un)o(til)g(some)0 2609 y(n)o(um)o(b)q(er)g(of)e
(seconds)i(ha)o(v)o(e)f(passed.)62 2670 y(The)h(`)p Fn(fork)p
Fq(')e(statemen)o(t)g(is)h(in)o(tended)i(for)e(just)f(suc)o(h)i
(situations)g(and)f(has)g(the)g(follo)o(wing)h(syn)o(tax:)p
eop
%%Page: 35 37
35 36 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(35)120 183 y Fn(fork)23 b(\()p Fl(expression)p
Fn(\))168 235 y Fl(statemen)o(ts)120 287 y Fn(endfork)0
356 y Fq(The)14 b(`)p Fn(fork)p Fq(')d(statemen)o(t)i(\014rst)g
(executes)g(the)h(expression,)g(whic)o(h)g(m)o(ust)f(return)g(a)g(in)o
(teger;)h(call)g(that)f(in)o(teger)g Fl(n)p Fq(.)0 410
y(It)i(then)g(creates)g(a)g(new)g(MOO)g Fl(task)i Fq(that)e(will,)h
(after)e(at)h(least)g Fl(n)g Fq(seconds,)g(execute)h(the)f(statemen)o
(ts.)k(When)0 464 y(the)12 b(new)h(task)e(b)q(egins,)j(all)f(v)m
(ariables)g(will)h(ha)o(v)o(e)e(the)g(v)m(alues)i(they)e(had)g(at)g
(the)g(time)h(the)f(`)p Fn(fork)p Fq(')f(statemen)o(t)g(w)o(as)0
517 y(executed.)21 b(The)15 b(task)g(executing)h(the)f(`)p
Fn(fork)p Fq(')f(statemen)o(t)g(immediately)j(con)o(tin)o(ues)f
(execution.)21 b(The)15 b(concept)0 571 y(of)g(tasks)f(is)i(discussed)h
(in)f(detail)g(in)g(the)f(next)g(section.)62 640 y(By)i(default,)g
(there)f(is)h(no)g(limit)h(to)d(the)i(n)o(um)o(b)q(er)g(of)f(tasks)f
(an)o(y)h(pla)o(y)o(er)h(ma)o(y)f(fork,)f(but)i(suc)o(h)g(a)f(limit)i
(can)0 694 y(b)q(e)f(imp)q(osed)g(from)f(within)h(the)g(database.)22
b(See)17 b(the)f(c)o(hapter)h(on)f(serv)o(er)g(assumptions)g(ab)q(out)g
(the)h(database)0 748 y(for)e(details.)62 817 y(Occasionally)l(,)k(one)
e(w)o(ould)g(lik)o(e)h(to)e(b)q(e)h(able)h(to)e(kill)i(a)f(fork)o(ed)f
(task)g(b)q(efore)h(it)g(ev)o(en)g(starts;)e(for)h(example,)0
870 y(some)g(pla)o(y)o(er)h(migh)o(t)g(ha)o(v)o(e)f(caugh)o(t)g(the)h
(ob)s(ject)f(that)g(w)o(as)g(thro)o(wn)f(in)o(to)i(the)g(air,)g(so)f
(no)g(message)h(should)g(b)q(e)0 924 y(prin)o(ted)f(ab)q(out)e(it)h
(hitting)h(the)f(ground.)20 b(If)15 b(a)g(v)m(ariable)h(name)f(is)g
(giv)o(en)g(after)g(the)g(`)p Fn(fork)p Fq(')e(k)o(eyw)o(ord,)h(lik)o
(e)i(this:)120 991 y Fn(fork)23 b Fl(name)k Fn(\()p Fl(expression)p
Fn(\))168 1043 y Fl(statemen)o(ts)120 1095 y Fn(endfork)0
1163 y Fq(then)17 b(that)e(v)m(ariable)j(is)f(assigned)g(the)f
Fl(task)f(ID)k Fq(of)d(the)g(newly-created)i(task.)k(The)17
b(v)m(alue)g(of)f(this)h(v)m(ariable)g(is)0 1217 y(visible)i(b)q(oth)e
(to)g(the)g(task)f(executing)j(the)e(fork)f(statemen)o(t)g(and)h(to)g
(the)g(statemen)o(ts)f(in)i(the)f(newly-created)0 1271
y(task.)22 b(This)16 b(ID)g(can)g(b)q(e)h(passed)f(to)f(the)i
Fn(kill_task\(\))d Fq(function)j(to)e(k)o(eep)h(the)h(task)e(from)g
(running)i(and)f(will)0 1325 y(b)q(e)g(the)f(v)m(alue)i(of)d
Fn(task_id\(\))g Fq(once)i(the)f(task)g(b)q(egins)h(execution.)0
1490 y Fp(4.3)33 b(MOO)13 b(T)-6 b(asks)62 1587 y Fq(A)16
b Fl(task)h Fq(is)e(an)h(execution)g(of)f(a)g(MOO)g(program.)k(There)c
(are)g(\014v)o(e)g(kinds)i(of)d(tasks)h(in)h(Lam)o(b)q(daMOO:)37
1656 y Fo(\017)30 b Fq(Ev)o(ery)19 b(time)g(a)f(pla)o(y)o(er)h(t)o(yp)q
(es)g(a)g(command,)g(a)g(task)f(is)i(created)f(to)f(execute)i(that)e
(command;)i(w)o(e)f(call)90 1710 y(these)c Fl(command)g(tasks)p
Fq(.)37 1777 y Fo(\017)30 b Fq(Whenev)o(er)22 b(a)f(pla)o(y)o(er)g
(connects)g(or)g(disconnects)i(from)d(the)i(MOO,)f(the)g(serv)o(er)g
(starts)f(a)h(task)f(to)h(do)90 1831 y(whatev)o(er)14
b(pro)q(cessing)i(is)f(necessary)l(,)g(suc)o(h)h(as)e(prin)o(ting)i
(out)f(`)p Fn(Munchkin)e(has)i(connected)p Fq(')e(to)i(all)g(of)g(the)
90 1885 y(pla)o(y)o(ers)g(in)h(the)f(same)g(ro)q(om;)g(these)g(are)g
(called)i Fl(serv)o(er)d(tasks)p Fq(.)37 1953 y Fo(\017)30
b Fq(The)15 b(`)p Fn(fork)p Fq(')f(statemen)o(t)g(in)j(the)e
(programming)f(language)i(creates)f(a)g(task)f(whose)h(execution)i(is)e
(dela)o(y)o(ed)90 2007 y(for)g(at)f(least)h(some)g(giv)o(en)h(n)o(um)o
(b)q(er)g(of)e(seconds;)i(these)f(are)g Fl(fork)o(ed)g(tasks)p
Fq(.)37 2074 y Fo(\017)30 b Fq(The)21 b Fn(suspend\(\))f
Fq(function)i(susp)q(ends)h(the)e(execution)h(of)f(the)g(curren)o(t)g
(task.)37 b(A)21 b(snapshot)g(is)g(tak)o(en)90 2128 y(of)e(whole)i
(state)e(of)g(the)h(execution,)i(and)e(the)g(execution)h(will)g(b)q(e)g
(resumed)f(later.)34 b(These)20 b(are)f(called)90 2182
y Fl(susp)q(ended)e(tasks)p Fq(.)37 2250 y Fo(\017)30
b Fq(The)16 b Fn(read\(\))g Fq(function)h(also)f(susp)q(ends)h(the)g
(execution)g(of)f(the)g(curren)o(t)g(task,)f(in)i(this)g(case)f(w)o
(aiting)h(for)90 2303 y(the)d(pla)o(y)o(er)f(to)g(t)o(yp)q(e)h(a)f
(line)i(of)e(input.)21 b(When)14 b(the)f(line)i(is)f(receiv)o(ed,)h
(the)f(task)f(resumes)g(with)h(the)g Fn(read\(\))90 2357
y Fq(function)i(returning)g(the)f(input)h(line)h(as)e(result.)20
b(These)c(are)f(called)h Fl(reading)g(tasks)p Fq(.)0
2440 y(The)i(last)g(three)g(kinds)h(of)f(tasks)f(ab)q(o)o(v)o(e)h(are)g
(collectiv)o(ely)i(kno)o(wn)e(as)f Fl(queued)j(tasks)f
Fq(or)e Fl(bac)o(kground)h(tasks)p Fq(,)0 2493 y(since)e(they)g(ma)o(y)
e(not)h(run)g(immediately)l(.)62 2562 y(T)l(o)i(prev)o(en)o(t)h(a)f
(maliciously-)i(or)e(incorrectly-written)i(MOO)f(program)e(from)g
(running)j(forev)o(er)e(and)g(mo-)0 2616 y(nop)q(olizing)k(the)e(serv)o
(er,)f(limits)i(are)f(placed)h(on)e(the)h(running)h(time)f(of)f(ev)o
(ery)h(task.)29 b(One)20 b(limit)g(is)f(that)f(no)0 2670
y(task)c(is)h(allo)o(w)o(ed)h(to)e(run)h(longer)g(than)f(a)h(certain)g
(n)o(um)o(b)q(er)g(of)g(seconds;)g(command)f(and)h(serv)o(er)g(tasks)e
(get)i(\014v)o(e)p eop
%%Page: 36 38
36 37 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(36)0 183 y(seconds)19 b(eac)o(h)f(while)i(other)e
(tasks)f(get)h(only)h(three)g(seconds.)29 b(This)19 b(limit)h(is,)f(in)
g(practice,)h(rarely)e(reac)o(hed.)0 237 y(The)d(reason)g(is)h(that)e
(there)i(is)f(also)h(a)e(limit)j(on)e(the)g(n)o(um)o(b)q(er)h(of)f(op)q
(erations)g(a)g(task)f(ma)o(y)h(execute.)62 311 y(The)k(serv)o(er)f
(coun)o(ts)h(do)o(wn)f Fl(tic)o(ks)i Fq(as)f(an)o(y)f(task)g(executes.)
30 b(Roughly)20 b(sp)q(eaking,)g(it)f(coun)o(ts)f(one)h(tic)o(k)g(for)0
365 y(ev)o(ery)12 b(expression)h(ev)m(aluation)h(\(other)d(than)h(v)m
(ariables)i(and)e(literals\),)i(one)e(for)f(ev)o(ery)i(`)p
Fn(if)p Fq(',)e(`)p Fn(fork)p Fq(')g(or)h(`)p Fn(return)p
Fq(')0 419 y(statemen)o(t,)17 b(and)g(one)h(for)f(ev)o(ery)g(iteration)
h(of)f(a)g(lo)q(op.)28 b(If)18 b(the)f(coun)o(t)h(gets)f(all)h(the)g(w)
o(a)o(y)e(do)o(wn)h(to)g(zero,)h(the)0 473 y(task)f(is)i(immediately)h
(and)e(unceremoniously)i(ab)q(orted.)29 b(By)18 b(default,)h(command)f
(and)h(serv)o(er)e(tasks)h(b)q(egin)0 527 y(with)g(an)g(store)g(of)f
(30,000)g(tic)o(ks;)i(this)f(is)h(enough)f(for)g(almost)f(all)i(normal)
f(uses.)29 b(F)l(ork)o(ed,)18 b(susp)q(ended,)i(and)0
581 y(reading)c(tasks)e(are)h(allotted)h(15,000)d(tic)o(ks)i(eac)o(h.)
62 654 y(These)e(limits)h(on)e(seconds)g(and)h(tic)o(ks)f(ma)o(y)g(b)q
(e)h(c)o(hanged)f(from)g(within)h(the)g(database,)f(as)g(can)g(the)g(b)
q(eha)o(vior)0 708 y(of)17 b(the)h(serv)o(er)f(after)g(it)h(ab)q(orts)f
(a)h(task)f(for)g(running)i(out;)f(see)g(the)g(c)o(hapter)f(on)h(serv)o
(er)f(assumptions)h(ab)q(out)0 762 y(the)d(database)g(for)g(details.)62
836 y(Because)h(queued)g(tasks)f(ma)o(y)f(exist)i(for)f(long)g(p)q
(erio)q(ds)h(of)f(time)h(b)q(efore)f(they)h(b)q(egin)g(execution,)g
(there)f(are)0 890 y(functions)21 b(to)e(list)h(the)g(ones)g(that)f(y)o
(ou)g(o)o(wn)h(and)g(to)f(kill)i(them)f(b)q(efore)g(they)g(execute.)34
b(These)21 b(functions,)0 944 y(among)14 b(others,)h(are)g(discussed)h
(in)g(the)g(follo)o(wing)g(section.)0 1134 y Fp(4.4)33
b(Built-in)18 b(F)-6 b(unctions)62 1236 y Fq(There)13
b(are)e(a)h(large)g(n)o(um)o(b)q(er)h(of)f(built-in)i(functions)f(a)o
(v)m(ailable)h(for)d(use)i(b)o(y)f(MOO)g(programmers.)18
b(Eac)o(h)12 b(one)0 1290 y(is)18 b(discussed)h(in)f(detail)g(in)g
(this)g(section.)26 b(The)18 b(presen)o(tation)f(is)h(brok)o(en)f(up)h
(in)o(to)f(subsections)h(b)o(y)g(grouping)0 1344 y(together)c
(functions)i(with)g(similar)g(or)f(related)h(uses.)62
1418 y(F)l(or)f(most)f(functions,)i(the)f(exp)q(ected)i(t)o(yp)q(es)e
(of)g(the)g(argumen)o(ts)g(are)g(giv)o(en;)g(if)h(the)f(actual)h
(argumen)o(ts)e(are)0 1472 y(not)i(of)g(these)g(t)o(yp)q(es,)h
Fn(E_TYPE)e Fq(is)i(raised.)24 b(Some)16 b(argumen)o(ts)g(can)g(b)q(e)h
(of)f(an)o(y)g(t)o(yp)q(e)h(at)e(all;)j(in)f(suc)o(h)g(cases,)f(no)0
1526 y(t)o(yp)q(e)j(sp)q(eci\014cation)j(is)e(giv)o(en)f(for)g(the)h
(argumen)o(t.)31 b(Also,)20 b(for)f(most)g(functions,)h(the)g(t)o(yp)q
(e)f(of)g(the)h(result)f(of)0 1580 y(the)c(function)h(is)g(giv)o(en.)k
(Some)15 b(functions)h(do)f(not)g(return)g(a)g(useful)h(result;)g(in)g
(suc)o(h)f(cases,)g(the)g(sp)q(eci\014cation)0 1634 y(`)p
Fn(none)p Fq(')h(is)h(used.)25 b(A)17 b(few)g(functions)h(can)f(p)q
(oten)o(tially)h(return)f(an)o(y)f(t)o(yp)q(e)h(of)g(v)m(alue)h(at)e
(all;)i(in)g(suc)o(h)f(cases,)g(the)0 1688 y(sp)q(eci\014cation)g(`)p
Fn(value)p Fq(')d(is)i(used.)62 1761 y(Most)h(functions)i(tak)o(e)e(a)h
(certain)g(\014xed)h(n)o(um)o(b)q(er)f(of)g(required)h(argumen)o(ts)e
(and,)i(in)f(some)g(cases,)g(one)g(or)0 1815 y(t)o(w)o(o)f(optional)j
(argumen)o(ts.)30 b(If)19 b(a)f(function)i(is)f(called)h(with)g(to)q(o)
e(man)o(y)g(or)g(to)q(o)g(few)h(argumen)o(ts,)g Fn(E_ARGS)e
Fq(is)0 1869 y(raised.)62 1943 y(F)l(unctions)i(are)f(alw)o(a)o(ys)g
(called)h(b)o(y)g(the)f(program)f(for)h(some)f(v)o(erb;)j(that)d
(program)g(is)i(running)g(with)g(the)0 1997 y(p)q(ermissions)f(of)d
(some)h(pla)o(y)o(er,)g(usually)i(the)e(o)o(wner)g(of)f(the)i(v)o(erb)f
(in)h(question)g(\(it)f(is)g(not)g(alw)o(a)o(ys)g(the)g(o)o(wner,)0
2051 y(though;)d(wizards)g(can)g(use)g Fn(set_task_perms\(\))d
Fq(to)i(c)o(hange)h(the)g(p)q(ermissions)h(`on)e(the)h(\015y'\).)18
b(In)13 b(the)g(function)0 2105 y(descriptions)k(b)q(elo)o(w,)e(w)o(e)g
(refer)g(to)g(the)g(pla)o(y)o(er)g(whose)g(p)q(ermissions)i(are)e(b)q
(eing)h(used)g(as)f(the)g Fl(programmer)p Fq(.)62 2178
y(Man)o(y)k(built-in)j(functions)e(are)f(describ)q(ed)j(b)q(elo)o(w)e
(as)f(raising)h Fn(E_PERM)f Fq(unless)h(the)g(programmer)e(meets)0
2232 y(certain)13 b(sp)q(eci\014ed)i(criteria.)20 b(It)13
b(is)g(p)q(ossible)i(to)d(restrict)h(use)g(of)f(an)o(y)h(function,)h
(ho)o(w)o(ev)o(er,)e(so)g(that)g(only)i(wizards)0 2286
y(can)h(use)h(it;)f(see)g(the)h(c)o(hapter)f(on)g(serv)o(er)g
(assumptions)g(ab)q(out)g(the)g(database)g(for)g(details.)0
2459 y Fj(4.4.1)30 b(Ob)s(ject-Orien)n(ted)16 b(Programming)62
2562 y Fq(One)h(of)g(the)f(most)g(imp)q(ortan)o(t)g(facilities)i(in)g
(an)e(ob)s(ject-orien)o(ted)g(programming)g(language)h(is)g(abilit)o(y)
h(for)0 2616 y(a)g(c)o(hild)i(ob)s(ject)d(to)h(mak)o(e)f(use)i(of)e(a)h
(paren)o(t's)f(implemen)o(tation)j(of)e(some)f(op)q(eration,)i(ev)o(en)
f(when)h(the)f(c)o(hild)0 2670 y(pro)o(vides)d(its)g(o)o(wn)g
(de\014nition)h(for)e(that)g(op)q(eration.)20 b(The)15
b Fn(pass\(\))f Fq(function)i(pro)o(vides)f(this)h(facilit)o(y)f(in)h
(MOO.)p eop
%%Page: 37 39
37 38 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(37)1725 183 y(F)l(unction)-1899 b Fg(value)20
b Ff(pass)h Fh(\()p Fl(arg)p Fn(,)14 b Fi(:)8 b(:)g(:)n
Fh(\))120 237 y Fq(Often,)17 b(it)g(is)g(useful)h(for)e(a)g(c)o(hild)i
(ob)s(ject)f(to)f(de\014ne)h(a)g(v)o(erb)f(that)g Fl(augmen)o(ts)i
Fq(the)f(b)q(eha)o(vior)g(of)f(a)120 291 y(v)o(erb)g(on)f(its)h(paren)o
(t)g(ob)s(ject.)21 b(F)l(or)15 b(example,)i(in)f(the)g(Lam)o(b)q
(daCore)g(database,)f(the)h(ro)q(ot)f(ob)s(ject)120 345
y(\(whic)o(h)j(is)f(an)g(ancestor)g(of)f(ev)o(ery)h(other)g(ob)s
(ject\))f(de\014nes)i(a)f(v)o(erb)g(called)i(`)p Fn(description)p
Fq(')c(that)120 399 y(simply)e(returns)f(the)g(v)m(alue)h(of)e
Fn(this.description)p Fq(;)f(this)j(v)o(erb)e(is)i(used)f(b)o(y)g(the)g
(implemen)o(tation)120 453 y(of)g(the)h Fn(look)e Fq(command.)19
b(In)13 b(man)o(y)f(cases,)h(a)f(programmer)f(w)o(ould)i(lik)o(e)h(the)
e(description)i(of)e(some)120 507 y(ob)s(ject)f(to)h(include)i(some)d
(non-constan)o(t)h(part;)g(for)f(example,)i(a)f(sen)o(tence)g(ab)q(out)
g(whether)g(or)f(not)120 561 y(the)i(ob)s(ject)g(w)o(as)f(`a)o(w)o(ak)o
(e')f(or)i(`sleeping'.)20 b(This)14 b(sen)o(tence)g(should)g(b)q(e)g
(added)g(on)o(to)e(the)h(end)h(of)f(the)120 615 y(normal)h
(description.)21 b(The)15 b(programmer)e(w)o(ould)h(lik)o(e)i(to)d(ha)o
(v)o(e)h(a)g(means)g(of)g(calling)i(the)e(normal)120
669 y Fn(description)h Fq(v)o(erb)h(and)g(then)h(app)q(ending)h(the)e
(sen)o(tence)h(on)o(to)e(the)i(end)g(of)e(that)h(description.)120
723 y(The)f(function)h(`)p Fn(pass\(\))p Fq(')e(is)i(for)e(exactly)i
(suc)o(h)f(situations.)120 794 y Fn(pass)c Fq(calls)i(the)f(v)o(erb)g
(with)g(the)g(same)g(name)g(as)f(the)h(curren)o(t)g(v)o(erb)g(but)g(as)
f(de\014ned)j(on)d(the)h(paren)o(t)120 848 y(of)j(the)g(ob)s(ject)g
(that)f(de\014nes)i(the)f(curren)o(t)h(v)o(erb.)j(The)d(argumen)o(ts)e
(giv)o(en)i(to)e Fn(pass)h Fq(are)g(the)g(ones)120 902
y(giv)o(en)h(to)e(the)h(called)i(v)o(erb)e(and)g(the)g(returned)h(v)m
(alue)g(of)f(the)g(called)h(v)o(erb)f(is)h(returned)g(from)e(the)120
956 y(call)j(to)f Fn(pass)p Fq(.)23 b(The)17 b(initial)h(v)m(alue)g(of)
e Fn(this)f Fq(in)j(the)e(called)i(v)o(erb)e(is)h(the)g(same)f(as)g(in)
h(the)f(calling)120 1010 y(v)o(erb.)120 1082 y(Th)o(us,)h(in)g(the)g
(example)h(ab)q(o)o(v)o(e,)e(the)h(c)o(hild-ob)s(ject's)g
Fn(description)e Fq(v)o(erb)i(migh)o(t)g(ha)o(v)o(e)f(the)h(fol-)120
1136 y(lo)o(wing)f(implemen)o(tation:)240 1205 y Fn(return)23
b(pass\(\))g(+)h(")47 b(It)24 b(is)g(")f(+)h(\(this.awake)e(?)i
("awake.")f(|)h("sleeping."\);)120 1276 y Fq(That)11
b(is,)h(it)f(calls)i(its)e(paren)o(t's)g Fn(description)e
Fq(v)o(erb)i(and)h(then)f(app)q(ends)i(to)d(the)i(result)f(a)g(sen)o
(tence)120 1330 y(whose)k(con)o(ten)o(t)g(is)g(computed)h(based)g(on)f
(the)g(v)m(alue)h(of)f(a)g(prop)q(ert)o(y)g(on)g(the)g(ob)s(ject.)120
1402 y(In)k(almost)f(all)h(cases,)g(y)o(ou)f(will)i(w)o(an)o(t)d(to)h
(call)i(`)p Fn(pass\(\))p Fq(')c(with)j(the)g(same)f(argumen)o(ts)f(as)
h(w)o(ere)120 1456 y(giv)o(en)e(to)e(the)i(curren)o(t)f(v)o(erb.)k
(This)d(is)g(easy)f(to)f(write)i(in)g(MOO;)f(just)g(call)h
Fn(pass\(@args\))p Fq(.)0 1618 y Fj(4.4.2)30 b(Manipulating)15
b(MOO)g(V)-5 b(alues)62 1718 y Fq(There)17 b(are)g(sev)o(eral)f
(functions)i(for)e(p)q(erforming)h(primitiv)o(e)h(op)q(erations)f(on)f
(MOO)h(v)m(alues,)h(and)f(they)g(can)0 1772 y(b)q(e)j(cleanly)i(split)f
(in)o(to)e(t)o(w)o(o)g(kinds:)30 b(those)19 b(that)g(do)h(v)m(arious)g
(v)o(ery)f(general)i(op)q(erations)e(that)g(apply)i(to)e(all)0
1826 y(t)o(yp)q(es)e(of)f(v)m(alues,)i(and)f(those)f(that)h(are)f(sp)q
(eci\014c)j(to)d(one)h(particular)g(t)o(yp)q(e.)25 b(There)17
b(are)f(so)h(man)o(y)f(op)q(erations)0 1880 y(concerned)k(with)g(ob)s
(jects)e(that)g(w)o(e)h(do)g(not)g(list)h(them)f(in)h(this)f(section)h
(but)f(rather)g(giv)o(e)g(them)g(their)g(o)o(wn)0 1934
y(section)d(follo)o(wing)g(this)f(one.)0 2096 y Fj(4.4.2.1)30
b(General)15 b(Op)r(erations)g(Applicable)h(to)e(all)i(V)-5
b(alues)1725 2227 y Fq(F)l(unction)-1899 b Fg(int)20
b Ff(t)n(yp)r(eof)i Fh(\()p Fl(v)m(alue)s Fh(\))120 2281
y Fq(T)l(ak)o(es)12 b(an)o(y)g(MOO)h(v)m(alue)h(and)e(returns)h(an)f
(in)o(teger)h(represen)o(ting)g(the)f(t)o(yp)q(e)h(of)f
Fl(v)m(alue)p Fq(.)20 b(The)13 b(result)120 2334 y(is)g(the)g(same)g
(as)f(the)h(initial)i(v)m(alue)f(of)e(one)h(of)g(these)g(built-in)i(v)m
(ariables:)20 b Fn(INT)p Fq(,)12 b Fn(FLOAT)p Fq(,)g
Fn(STR)p Fq(,)h Fn(LIST)p Fq(,)120 2388 y Fn(OBJ)p Fq(,)h(or)h
Fn(ERR)p Fq(.)k(Th)o(us,)c(one)h(usually)g(writes)f(co)q(de)h(lik)o(e)g
(this:)240 2458 y Fn(if)24 b(\(typeof\(x\))e(==)i(LIST\))f
Fi(:)8 b(:)g(:)120 2529 y Fq(and)15 b(not)g(lik)o(e)i(this:)240
2599 y Fn(if)24 b(\(typeof\(x\))e(==)i(3\))f Fi(:)8 b(:)g(:)120
2670 y Fq(b)q(ecause)16 b(the)f(former)g(is)h(m)o(uc)o(h)f(more)g
(readable)h(than)f(the)g(latter.)p eop
%%Page: 38 40
38 39 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(38)1725 183 y(F)l(unction)-1899 b Fg(str)20
b Ff(tostr)i Fh(\()p Fl(v)m(alue)p Fn(,)16 b Fi(:)8 b(:)g(:)n
Fh(\))120 237 y Fq(Con)o(v)o(erts)k(all)j(of)e(the)g(giv)o(en)h(MOO)g
(v)m(alues)h(in)o(to)e(strings)h(and)f(returns)h(the)f(concatenation)h
(of)f(the)120 291 y(results.)240 349 y Fn(tostr\(17\))885
346 y Fo(\))1004 349 y Fn("17")240 401 y(tostr\(1.0/3.0\))885
398 y Fo(\))1004 401 y Fn("0.333333333333333")240 453
y(tostr\(#17\))885 450 y Fo(\))1004 453 y Fn("#17")240
505 y(tostr\("foo"\))885 502 y Fo(\))1004 505 y Fn("foo")240
557 y(tostr\({1,)23 b(2}\))885 554 y Fo(\))1004 557 y
Fn("{list}")240 609 y(tostr\(E_PERM\))885 606 y Fo(\))1004
609 y Fn("Permission)f(denied")240 661 y(tostr\("3)h(+)g(4)h(=)g(",)g
(3)f(+)h(4\))885 658 y Fo(\))1004 661 y Fn("3)f(+)h(4)g(=)f(7")120
721 y Fq(Note)10 b(that)f Fn(tostr\(\))g Fq(do)q(es)i(not)f(do)g(a)g
(go)q(o)q(d)g(job)g(of)g(con)o(v)o(erting)g(lists)g(in)o(to)h(strings;)
g(all)g(lists,)h(includ-)120 775 y(ing)i(the)f(empt)o(y)g(list,)h(are)e
(con)o(v)o(erted)h(in)o(to)g(the)g(string)h Fn("{list}")p
Fq(.)k(The)13 b(function)h Fn(toliteral\(\))p Fq(,)120
829 y(b)q(elo)o(w,)h(is)h(b)q(etter)f(for)g(this)h(purp)q(ose.)1725
908 y(F)l(unction)-1899 b Fg(str)20 b Ff(toliteral)25
b Fh(\()p Fl(v)m(alue)s Fh(\))120 962 y Fq(Returns)16
b(a)g(string)g(con)o(taining)g(a)g(MOO)g(literal)h(expression)g(that,)e
(when)h(ev)m(aluated,)h(w)o(ould)f(b)q(e)120 1016 y(equal)g(to)f
Fl(v)m(alue)p Fq(.)240 1075 y Fn(toliteral\(17\))766
1072 y Fo(\))884 1075 y Fn("17")240 1127 y(toliteral\(1.0/3.0\))766
1124 y Fo(\))884 1127 y Fn("0.333333333333333")240 1178
y(toliteral\(#17\))766 1175 y Fo(\))884 1178 y Fn("#17")240
1230 y(toliteral\("foo"\))766 1227 y Fo(\))884 1230 y
Fn("\\"foo\\"")240 1282 y(toliteral\({1,)22 b(2}\))766
1279 y Fo(\))884 1282 y Fn("{1,)i(2}")240 1334 y(toliteral\(E_PERM\))
766 1331 y Fo(\))884 1334 y Fn("E_PERM")1725 1413 y Fq(F)l(unction)
-1899 b Fg(int)20 b Ff(toin)n(t)k Fh(\()p Fl(v)m(alue)s
Fh(\))1725 1467 y Fq(F)l(unction)-1899 b Fg(int)20 b
Ff(ton)n(um)h Fh(\()p Fl(v)m(alue)s Fh(\))120 1521 y
Fq(Con)o(v)o(erts)12 b(the)h(giv)o(en)g(MOO)h(v)m(alue)g(in)o(to)f(an)g
(in)o(teger)g(and)g(returns)g(that)f(in)o(teger.)19 b(Floating-p)q(oin)
o(t)120 1575 y(n)o(um)o(b)q(ers)f(are)f(rounded)h(to)o(w)o(ard)d(zero,)
j(truncating)f(their)h(fractional)g(parts.)25 b(Ob)s(ject)18
b(n)o(um)o(b)q(ers)120 1629 y(are)11 b(con)o(v)o(erted)g(in)o(to)h(the)
f(equiv)m(alen)o(t)i(in)o(tegers.)19 b(Strings)12 b(are)f(parsed)g(as)g
(the)h(decimal)h(enco)q(ding)f(of)120 1683 y(a)h(real)h(n)o(um)o(b)q
(er)g(whic)o(h)h(is)f(then)g(con)o(v)o(erted)f(to)g(an)h(in)o(teger.)19
b(Errors)13 b(are)g(con)o(v)o(erted)g(in)o(to)h(in)o(tegers)120
1737 y(ob)q(eying)23 b(the)f(same)g(ordering)h(\(with)f(resp)q(ect)h
(to)e Fn(<=)h Fq(as)g(the)g(errors)g(themselv)o(es.)41
b Fn(Toint\(\))120 1791 y Fq(raises)18 b Fn(E_TYPE)f
Fq(if)h Fl(v)m(alue)k Fq(is)c(a)g(list.)28 b(If)19 b
Fl(v)m(alue)i Fq(is)e(a)e(string)h(but)g(the)g(string)g(do)q(es)g(not)f
(con)o(tain)h(a)120 1845 y(syn)o(tactically-correct)e(n)o(um)o(b)q(er,)
f(then)h Fn(toint\(\))e Fq(returns)h(0.)240 1903 y Fn(toint\(34.7\))695
1900 y Fo(\))813 1903 y Fn(34)240 1955 y(toint\(-34.7\))695
1952 y Fo(\))813 1955 y Fn(-34)240 2007 y(toint\(#34\))695
2004 y Fo(\))813 2007 y Fn(34)240 2059 y(toint\("34"\))695
2056 y Fo(\))813 2059 y Fn(34)240 2111 y(toint\("34.7"\))695
2108 y Fo(\))813 2111 y Fn(34)240 2163 y(toint\(")23
b(-)h(34)47 b("\))695 2160 y Fo(\))813 2163 y Fn(-34)240
2215 y(toint\(E_TYPE\))695 2212 y Fo(\))813 2215 y Fn(1)1725
2294 y Fq(F)l(unction)-1899 b Fg(obj)20 b Ff(to)r(ob)s(j)h
Fh(\()p Fl(v)m(alue)s Fh(\))120 2348 y Fq(Con)o(v)o(erts)12
b(the)h(giv)o(en)h(MOO)g(v)m(alue)g(in)o(to)f(an)g(ob)s(ject)g(n)o(um)o
(b)q(er)g(and)h(returns)f(that)f(ob)s(ject)h(n)o(um)o(b)q(er.)120
2402 y(The)22 b(con)o(v)o(ersions)h(are)e(v)o(ery)h(similar)i(to)d
(those)h(for)g Fn(toint\(\))f Fq(except)h(that)g(for)f(strings,)j(the)
120 2456 y(n)o(um)o(b)q(er)16 b Fl(ma)o(y)i Fq(b)q(e)e(preceded)g(b)o
(y)f(`)p Fn(#)p Fq('.)240 2514 y Fn(toobj\("34"\))671
2511 y Fo(\))789 2514 y Fn(#34)240 2566 y(toobj\("#34"\))671
2563 y Fo(\))789 2566 y Fn(#34)240 2618 y(toobj\("foo"\))671
2615 y Fo(\))789 2618 y Fn(#0)240 2670 y(toobj\({1,)23
b(2}\))p 680 2641 109 3 v 680 2681 3 41 v 692 2671 a
Fh(erro)o(r)p 786 2681 V 680 2684 109 3 v 884 2670 a
Fn(E_TYPE)p eop
%%Page: 39 41
39 40 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(39)1725 183 y(F)l(unction)-1899 b Fg(float)20
b Ff(to\015oat)i Fh(\()p Fl(v)m(alue)s Fh(\))120 237
y Fq(Con)o(v)o(erts)13 b(the)i(giv)o(en)g(MOO)g(v)m(alue)g(in)o(to)g(a)
f(\015oating-p)q(oin)o(t)h(n)o(um)o(b)q(er)g(and)g(returns)f(that)g(n)o
(um)o(b)q(er.)120 291 y(In)o(tegers)21 b(and)f(ob)s(ject)g(n)o(um)o(b)q
(ers)h(are)g(con)o(v)o(erted)f(in)o(to)h(the)f(corresp)q(onding)i(in)o
(tegral)f(\015oating-)120 345 y(p)q(oin)o(t)f(n)o(um)o(b)q(ers.)33
b(Strings)20 b(are)f(parsed)h(as)f(the)h(decimal)h(enco)q(ding)g(of)e
(a)g(real)h(n)o(um)o(b)q(er)g(whic)o(h)120 399 y(is)e(then)g(represen)o
(ted)g(as)f(closely)i(as)f(p)q(ossible)h(as)e(a)h(\015oating-p)q(oin)o
(t)g(n)o(um)o(b)q(er.)27 b(Errors)17 b(are)g(\014rst)120
453 y(con)o(v)o(erted)i(to)g(in)o(tegers)g(as)g(in)i
Fn(toint\(\))d Fq(and)i(then)f(con)o(v)o(erted)h(as)f(in)o(tegers)g
(are.)32 b Fn(Tofloat\(\))120 507 y Fq(raises)18 b Fn(E_TYPE)f
Fq(if)h Fl(v)m(alue)k Fq(is)c(a)g(list.)28 b(If)19 b
Fl(v)m(alue)i Fq(is)e(a)e(string)h(but)g(the)g(string)g(do)q(es)g(not)f
(con)o(tain)h(a)120 561 y(syn)o(tactically-correct)e(n)o(um)o(b)q(er,)f
(then)h Fn(tofloat\(\))e Fq(returns)h(0.)240 630 y Fn(tofloat\(34\))742
627 y Fo(\))860 630 y Fn(34.0)240 682 y(tofloat\(#34\))742
679 y Fo(\))860 682 y Fn(34.0)240 734 y(tofloat\("34"\))742
731 y Fo(\))860 734 y Fn(34.0)240 786 y(tofloat\("34.7"\))742
783 y Fo(\))860 786 y Fn(34.7)240 838 y(tofloat\(E_TYPE\))742
835 y Fo(\))860 838 y Fn(1.0)1725 939 y Fq(F)l(unction)-1899
b Fg(int)20 b Ff(equal)j Fh(\()p Fl(v)m(alue1)p Fn(,)16
b Fl(v)m(alue2)t Fh(\))120 993 y Fq(Returns)i(true)g(if)g
Fl(v)m(alue1)k Fq(is)c(completely)h(indistinguishable)i(from)c
Fl(v)m(alue2)p Fq(.)28 b(This)18 b(is)g(m)o(uc)o(h)g(the)120
1047 y(same)i(op)q(eration)h(as)f(\\)p Fl(v)m(alue1)f
Fn(==)c Fl(v)m(alue2)t Fq(")21 b(except)g(that,)f(unlik)o(e)i
Fn(==)p Fq(,)f(the)g Fn(equal\(\))e Fq(function)120 1101
y(do)q(es)d(not)e(treat)h(upp)q(er-)h(and)f(lo)o(w)o(er-case)g(c)o
(haracters)g(in)h(strings)f(as)g(equal.)240 1170 y Fn("Foo")23
b(==)h("foo")790 1167 y Fo(\))908 1170 y Fn(1)240 1222
y(equal\("Foo",)e("foo"\))790 1219 y Fo(\))908 1222 y
Fn(0)240 1274 y(equal\("Foo",)g("Foo"\))790 1271 y Fo(\))908
1274 y Fn(1)1725 1374 y Fq(F)l(unction)-1899 b Fg(int)20
b Ff(v)m(alue)p 229 1374 18 3 v 21 w(b)n(ytes)j Fh(\()p
Fl(v)m(alue)s Fh(\))120 1428 y Fq(Returns)16 b(the)f(n)o(um)o(b)q(er)g
(of)g(b)o(ytes)f(of)h(the)g(serv)o(er's)f(memory)h(required)h(to)e
(store)g(the)i(giv)o(en)f Fl(v)m(alue)p Fq(.)1725 1529
y(F)l(unction)-1899 b Fg(str)20 b Ff(v)m(alue)p 229 1529
V 21 w(hash)i Fh(\()p Fl(v)m(alue)s Fh(\))120 1583 y
Fq(Returns)d(the)g(same)g(string)f(as)h Fn(string_hash\(toliteral\()p
Fl(v)m(alue)s Fn(\)\))p Fq(;)e(see)i(the)g(description)h(of)120
1637 y Fn(string_hash\(\))13 b Fq(for)i(details.)0 1798
y Fj(4.4.2.2)30 b(Op)r(erations)14 b(on)h(Num)n(b)r(ers)1725
1928 y Fq(F)l(unction)-1899 b Fg(int)20 b Ff(random)g
Fh(\()p Fk([)p Fn(int)14 b Fl(mo)q(d)r Fk(])p Fh(\))120
1982 y Fl(mo)q(d)20 b Fq(m)o(ust)d(b)q(e)i(a)f(p)q(ositiv)o(e)h(in)o
(teger;)g(otherwise,)g Fn(E_INVARG)e Fq(is)h(raised.)29
b(An)19 b(in)o(teger)f(is)h(c)o(hosen)120 2036 y(randomly)d(from)f(the)
g(range)h Fn([1..)p Fl(mo)q(d)r Fn(])e Fq(and)i(returned.)22
b(If)16 b Fl(mo)q(d)h Fq(is)f(not)f(pro)o(vided,)i(it)e(defaults)120
2090 y(to)g(the)g(largest)g(MOO)g(in)o(teger,)g(2147483647.)1725
2191 y(F)l(unction)-1899 b Fg(num)20 b Ff(min)i Fh(\()p
Fn(num)14 b Fl(x)p Fn(,)h Fi(:)8 b(:)g(:)n Fh(\))1725
2245 y Fq(F)l(unction)-1899 b Fg(num)20 b Ff(max)h Fh(\()p
Fn(num)15 b Fl(x)p Fn(,)g Fi(:)8 b(:)g(:)n Fh(\))120
2299 y Fq(These)14 b(t)o(w)o(o)f(functions)i(return)f(the)g(smallest)g
(or)g(largest)f(of)h(their)g(argumen)o(ts,)f(resp)q(ectiv)o(ely)l(.)22
b(All)120 2353 y(of)c(the)h(argumen)o(ts)f(m)o(ust)h(b)q(e)g(n)o(um)o
(b)q(ers)g(of)g(the)f(same)h(kind)h(\(i.e.,)f(either)h(in)o(teger)f(or)
f(\015oating-)120 2407 y(p)q(oin)o(t\);)d(otherwise)g
Fn(E_TYPE)g Fq(is)g(raised.)1725 2508 y(F)l(unction)-1899
b Fg(num)20 b Ff(abs)i Fh(\()p Fn(num)14 b Fl(x)s Fh(\))120
2562 y Fq(Returns)j(the)f(absolute)g(v)m(alue)i(of)d
Fl(x)p Fq(.)23 b(If)16 b Fl(x)j Fq(is)e(negativ)o(e,)f(then)g(the)g
(result)h(is)g Fn(-)p Fl(x)s Fq(;)f(otherwise,)g(the)120
2616 y(result)i(is)g Fl(x)p Fq(.)26 b(The)17 b(n)o(um)o(b)q(er)h
Fl(x)i Fq(can)d(b)q(e)h(either)g(in)o(teger)g(or)f(\015oating-p)q(oin)o
(t;)h(the)g(result)f(is)h(of)f(the)120 2670 y(same)e(kind.)p
eop
%%Page: 40 42
40 41 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(40)1725 183 y(F)l(unction)-1899 b Fg(str)20
b Ff(\015oatstr\(\015oat)h Fl(x)p Fn(,)15 b(int)g Fl(precision)i
Fk([)p Fn(,)d Fl(scien)o(ti\014c)s Fk(])p Fh(\))120 237
y Fq(Con)o(v)o(erts)25 b Fl(x)k Fq(in)o(to)d(a)f(string)h(with)g(more)g
(con)o(trol)g(than)f(pro)o(vided)i(b)o(y)f(either)h Fn(tostr\(\))d
Fq(or)120 291 y Fn(toliteral\(\))p Fq(.)f Fl(Precision)17
b Fq(is)h(the)e(n)o(um)o(b)q(er)h(of)f(digits)i(to)e(app)q(ear)h(to)f
(the)g(righ)o(t)h(of)f(the)g(decimal)120 345 y(p)q(oin)o(t,)g(capp)q
(ed)h(at)f(4)f(more)h(than)g(the)g(maxim)o(um)g(a)o(v)m(ailable)h
(precision,)h(a)e(total)f(of)g(19)h(on)g(most)120 399
y(mac)o(hines;)26 b(this)d(mak)o(es)f(it)g(p)q(ossible)i(to)e(a)o(v)o
(oid)g(rounding)h(errors)f(if)g(the)h(resulting)g(string)f(is)120
453 y(subsequen)o(tly)c(read)e(bac)o(k)g(as)g(a)g(\015oating-p)q(oin)o
(t)i(v)m(alue.)24 b(If)17 b Fl(scien)o(ti\014c)k Fq(is)c(false)g(or)e
(not)i(pro)o(vided,)120 507 y(the)f(result)g(is)h(a)f(string)g(in)g
(the)h(form)e Fn("MMMMMMM.DDDDDD")p Fq(,)e(preceded)18
b(b)o(y)e(a)f(min)o(us)i(sign)f(if)h(and)120 561 y(only)d(if)h
Fl(x)i Fq(is)d(negativ)o(e.)20 b(If)14 b Fl(scien)o(ti\014c)k
Fq(is)d(pro)o(vided)g(and)f(true,)g(the)g(result)g(is)g(a)g(string)g
(in)h(the)f(form)120 615 y Fn("M.DDDDDDe+EEE")p Fq(,)f(again)i
(preceded)h(b)o(y)g(a)e(min)o(us)i(sign)g(if)g(and)f(only)h(if)f
Fl(x)k Fq(is)c(negativ)o(e.)1725 707 y(F)l(unction)-1899
b Fg(float)20 b Ff(sqrt)i Fh(\()p Fn(float)14 b Fl(x)s
Fh(\))120 761 y Fq(Returns)i(the)f(square)g(ro)q(ot)f(of)h
Fl(x)p Fq(.)20 b(Raises)c Fn(E_INVARG)e Fq(if)i Fl(x)i
Fq(is)e(negativ)o(e.)1725 853 y(F)l(unction)-1899 b Fg(float)20
b Ff(sin)j Fh(\()p Fn(float)14 b Fl(x)s Fh(\))1725 906
y Fq(F)l(unction)-1899 b Fg(float)20 b Ff(cos)i Fh(\()p
Fn(float)14 b Fl(x)s Fh(\))1725 960 y Fq(F)l(unction)-1899
b Fg(float)20 b Ff(tan)j Fh(\()p Fn(float)14 b Fl(x)s
Fh(\))120 1014 y Fq(Returns)i(the)f(sine,)h(cosine,)g(or)e(tangen)o(t)h
(of)f Fl(x)p Fq(,)h(resp)q(ectiv)o(ely)l(.)1725 1106
y(F)l(unction)-1899 b Fg(float)20 b Ff(asin)j Fh(\()p
Fn(float)14 b Fl(x)s Fh(\))1725 1160 y Fq(F)l(unction)-1899
b Fg(float)20 b Ff(acos)i Fh(\()p Fn(float)14 b Fl(x)s
Fh(\))120 1214 y Fq(Returns)26 b(the)g(arc-sine)h(or)f(arc-cosine)g
(\(in)o(v)o(erse)g(sine)h(or)f(cosine\))g(of)g Fl(x)p
Fq(,)i(in)f(the)f(range)f Fn([-)120 1268 y(pi/2..pi/2])c
Fq(or)i Fn([0..pi])p Fq(,)g(resp)q(ectiv)o(ely)l(.)44
b(Raises)24 b Fn(E_INVARG)e Fq(if)h Fl(x)j Fq(is)d(outside)g(the)g
(range)120 1322 y Fn([-1.0..1.0])p Fq(.)1725 1414 y(F)l(unction)-1899
b Fg(float)20 b Ff(atan)i Fh(\()p Fn(float)15 b Fl(y)k
Fk([)p Fn(,)14 b(float)h Fl(x)s Fk(])p Fh(\))120 1468
y Fq(Returns)g(the)g(arc-tangen)o(t)f(\(in)o(v)o(erse)h(tangen)o(t\))f
(of)h Fl(y)j Fq(in)e(the)f(range)g Fn([-pi/2..pi/2])e
Fq(if)i Fl(x)j Fq(is)d(not)120 1522 y(pro)o(vided,)h(or)e(of)h
Fl(y)t Fn(/)p Fl(x)j Fq(in)e(the)f(range)g Fn([-pi..pi])f
Fq(if)i Fl(x)i Fq(is)e(pro)o(vided.)1725 1614 y(F)l(unction)-1899
b Fg(float)20 b Ff(sinh)j Fh(\()p Fn(float)14 b Fl(x)s
Fh(\))1725 1668 y Fq(F)l(unction)-1899 b Fg(float)20
b Ff(cosh)i Fh(\()p Fn(float)14 b Fl(x)s Fh(\))1725 1722
y Fq(F)l(unction)-1899 b Fg(float)20 b Ff(tanh)i Fh(\()p
Fn(float)14 b Fl(x)s Fh(\))120 1775 y Fq(Returns)i(the)f(h)o(yp)q(erb)q
(olic)i(sine,)f(cosine,)g(or)f(tangen)o(t)f(of)h Fl(x)p
Fq(,)f(resp)q(ectiv)o(ely)l(.)1725 1867 y(F)l(unction)-1899
b Fg(float)20 b Ff(exp)j Fh(\()p Fn(float)14 b Fl(x)s
Fh(\))120 1921 y Fq(Returns)i Fl(e)i Fq(raised)d(to)g(the)g(p)q(o)o(w)o
(er)g(of)g Fl(x)p Fq(.)1725 2013 y(F)l(unction)-1899
b Fg(float)20 b Ff(log)j Fh(\()p Fn(float)14 b Fl(x)s
Fh(\))1725 2067 y Fq(F)l(unction)-1899 b Fg(float)20
b Ff(log10)i Fh(\()p Fn(float)14 b Fl(x)s Fh(\))120 2121
y Fq(Returns)i(the)f(natural)g(or)g(base)g(10)g(logarithm)g(of)g
Fl(x)p Fq(.)20 b(Raises)c Fn(E_INVARG)e Fq(if)h Fl(x)k
Fq(is)c(not)g(p)q(ositiv)o(e.)1725 2213 y(F)l(unction)-1899
b Fg(float)20 b Ff(ceil)25 b Fh(\()p Fn(float)14 b Fl(x)s
Fh(\))120 2267 y Fq(Returns)i(the)f(smallest)h(in)o(teger)f(not)g(less)
h(than)f Fl(x)p Fq(,)g(as)f(a)h(\015oating-p)q(oin)o(t)h(n)o(um)o(b)q
(er.)1725 2359 y(F)l(unction)-1899 b Fg(float)20 b Ff(\015o)r(or)h
Fh(\()p Fn(float)14 b Fl(x)s Fh(\))120 2413 y Fq(Returns)i(the)f
(largest)g(in)o(teger)g(not)g(greater)f(than)h Fl(x)p
Fq(,)g(as)g(a)g(\015oating-p)q(oin)o(t)h(n)o(um)o(b)q(er.)1725
2504 y(F)l(unction)-1899 b Fg(float)20 b Ff(trunc)j Fh(\()p
Fn(float)14 b Fl(x)s Fh(\))120 2558 y Fq(Returns)i(the)f(in)o(teger)h
(obtained)f(b)o(y)h(truncating)f Fl(x)j Fq(at)d(the)g(decimal)i(p)q
(oin)o(t,)f(as)e(a)h(\015oating-p)q(oin)o(t)120 2612
y(n)o(um)o(b)q(er.)37 b(F)l(or)20 b(negativ)o(e)h Fl(x)p
Fq(,)h(this)f(is)g(equiv)m(alen)o(t)h(to)f Fn(ceil\(\))p
Fq(;)h(otherwise)f(it)g(is)g(equiv)m(alen)o(t)i(to)120
2666 y Fn(floor\(\))p Fq(.)p eop
%%Page: 41 43
41 42 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(41)0 183 y Fj(4.4.2.3)30 b(Op)r(erations)14
b(on)h(Strings)1725 301 y Fq(F)l(unction)-1899 b Fg(int)20
b Ff(length)j Fh(\()p Fn(str)14 b Fl(string)t Fh(\))120
355 y Fq(Returns)21 b(the)g(n)o(um)o(b)q(er)g(of)f(c)o(haracters)g(in)i
Fl(string)p Fq(.)36 b(It)21 b(is)g(also)g(p)q(ermissible)i(to)d(pass)h
(a)f(list)i(to)120 409 y Fn(length\(\))p Fq(;)14 b(see)h(the)g
(description)i(in)f(the)f(next)h(section.)240 472 y Fn(length\("foo"\))
623 469 y Fo(\))741 472 y Fn(3)240 524 y(length\(""\))623
521 y Fo(\))741 524 y Fn(0)1725 613 y Fq(F)l(unction)-1899
b Fg(str)20 b Ff(strsub)h Fh(\()p Fn(str)14 b Fl(sub)s(ject)p
Fn(,)h(str)g Fl(what)p Fn(,)g(str)f Fl(with)i Fk([)p
Fn(,)f Fl(case-matters)r Fk(])p Fh(\))120 666 y Fq(Replaces)i(all)g(o)q
(ccurrences)f(in)h Fl(sub)s(ject)f Fq(of)f Fl(what)h
Fq(with)g Fl(with)p Fq(,)g(p)q(erforming)g(string)f(substitution.)120
720 y(The)j(o)q(ccurrences)g(are)f(found)h(from)f(left)h(to)f(righ)o(t)
g(and)h(all)g(substitutions)g(happ)q(en)h(sim)o(ultane-)120
774 y(ously)l(.)h(By)14 b(default,)h(o)q(ccurrences)g(of)e
Fl(what)i Fq(are)f(searc)o(hed)g(for)f(while)j(ignoring)e(the)h(upp)q
(er/lo)o(w)o(er)120 828 y(case)e(distinction.)21 b(If)13
b Fl(case-matters)h Fq(is)f(pro)o(vided)h(and)f(true,)g(then)g(case)g
(is)g(treated)g(as)f(signi\014can)o(t)120 882 y(in)k(all)g
(comparisons.)240 945 y Fn(strsub\("\045n)22 b(is)i(a)g(fink.",)f
("\045n",)g("Fred"\))1196 942 y Fo(\))1314 945 y Fn("Fred)g(is)h(a)f
(fink.")240 997 y(strsub\("foobar",)f("OB",)h("b"\))1196
994 y Fo(\))1314 997 y Fn("fobar")240 1049 y(strsub\("foobar",)f("OB",)
h("b",)g(1\))1196 1046 y Fo(\))1314 1049 y Fn("foobar")1725
1138 y Fq(F)l(unction)-1899 b Fg(int)20 b Ff(index)j
Fh(\()p Fn(str)15 b Fl(str1)p Fn(,)f(str)h Fl(str2)j
Fk([)p Fn(,)c Fl(case-matters)r Fk(])p Fh(\))1725 1192
y Fq(F)l(unction)-1899 b Fg(int)20 b Ff(rindex)j Fh(\()p
Fn(str)14 b Fl(str1)p Fn(,)g(str)h Fl(str2)j Fk([)p Fn(,)d
Fl(case-matters)r Fk(])p Fh(\))120 1246 y Fq(The)i(function)h
Fn(index\(\))f Fq(\()p Fn(rindex\(\))p Fq(\))e(returns)i(the)g(index)i
(of)e(the)g(\014rst)g(c)o(haracter)f(of)h(the)g(\014rst)120
1300 y(\(last\))k(o)q(ccurrence)i(of)e Fl(str2)j Fq(in)f
Fl(str1)p Fq(,)f(or)f(zero)g(if)h Fl(str2)j Fq(do)q(es)d(not)f(o)q
(ccur)h(in)g Fl(str1)j Fq(at)c(all.)40 b(By)120 1354
y(default)14 b(the)f(searc)o(h)g(for)f(an)h(o)q(ccurrence)h(of)f
Fl(str2)i Fq(is)f(done)f(while)i(ignoring)e(the)h(upp)q(er/lo)o(w)o(er)
f(case)120 1408 y(distinction.)25 b(If)16 b Fl(case-matters)h
Fq(is)g(pro)o(vided)g(and)f(true,)g(then)h(case)f(is)h(treated)e(as)h
(signi\014can)o(t)h(in)120 1462 y(all)f(comparisons.)240
1525 y Fn(index\("foobar",)22 b("o"\))909 1522 y Fo(\))1027
1525 y Fn(2)240 1577 y(rindex\("foobar",)g("o"\))909
1574 y Fo(\))1027 1577 y Fn(3)240 1628 y(index\("foobar",)g("x"\))909
1625 y Fo(\))1027 1628 y Fn(0)240 1680 y(index\("foobar",)g("oba"\))909
1677 y Fo(\))1027 1680 y Fn(3)240 1732 y(index\("Foobar",)g("foo",)h
(1\))909 1729 y Fo(\))1027 1732 y Fn(0)1725 1821 y Fq(F)l(unction)-1899
b Fg(int)20 b Ff(strcmp)h Fh(\()p Fn(str)14 b Fl(str1)p
Fn(,)g(str)h Fl(str2)t Fh(\))120 1875 y Fq(P)o(erforms)k(a)g
(case-sensitiv)o(e)i(comparison)f(of)f(the)h(t)o(w)o(o)e(argumen)o(t)h
(strings.)33 b(If)20 b Fl(str1)i Fq(is)e(lexico-)120
1929 y(graphically)e(less)e(than)g Fl(str2)p Fq(,)g(the)g
Fn(strcmp\(\))f Fq(returns)h(a)g(negativ)o(e)g(in)o(teger.)23
b(If)16 b(the)g(t)o(w)o(o)f(strings)120 1983 y(are)h(iden)o(tical,)j
Fn(strcmp\(\))c Fq(returns)h(zero.)24 b(Otherwise,)18
b Fn(strcmp\(\))d Fq(returns)h(a)h(p)q(ositiv)o(e)g(in)o(teger.)120
2037 y(The)e(ASCI)q(I)i(c)o(haracter)d(ordering)i(is)g(used)f(for)g
(the)g(comparison.)1725 2125 y(F)l(unction)-1899 b Fg(list)20
b Ff(deco)r(de)p 299 2125 18 3 v 20 w(binary)j Fh(\()p
Fn(str)15 b Fl(bin-string)20 b Fk([)p Fn(,)15 b Fl(fully)t
Fk(])p Fh(\))120 2179 y Fq(Returns)21 b(a)e(list)i(of)f(strings)f
(and/or)h(in)o(tegers)g(represen)o(ting)h(the)f(b)o(ytes)f(in)i(the)f
(binary)h(string)120 2233 y Fl(bin)p 185 2233 14 2 v
17 w(string)c Fq(in)d(order.)19 b(If)13 b Fl(fully)19
b Fq(is)13 b(false)g(or)g(omitted,)g(the)g(list)h(con)o(tains)f(an)g
(in)o(teger)g(only)h(for)e(eac)o(h)120 2287 y(non-prin)o(ting,)j
(non-space)f(b)o(yte;)f(all)i(other)e(c)o(haracters)g(are)g(group)q(ed)
h(in)o(to)f(the)h(longest)f(p)q(ossible)120 2341 y(con)o(tiguous)h
(substrings.)20 b(If)14 b Fl(fully)20 b Fq(is)14 b(pro)o(vided)h(and)f
(true,)g(the)g(list)h(con)o(tains)f(only)h(in)o(tegers,)f(one)120
2395 y(for)e(eac)o(h)h(b)o(yte)f(represen)o(ted)i(in)f
Fl(bin)p 740 2395 V 18 w(string)p Fq(.)19 b(Raises)13
b Fn(E_INVARG)f Fq(if)h Fl(bin)p 1346 2395 V 17 w(string)k
Fq(is)c(not)g(a)f(prop)q(erly-)120 2449 y(formed)i(binary)i(string.)j
(\(See)c(the)g(early)g(section)h(on)e(MOO)h(v)m(alue)h(t)o(yp)q(es)f
(for)f(a)g(full)i(description)120 2503 y(of)f(binary)h(strings.\))240
2566 y Fn(decode_binary\("foo"\))1076 2563 y Fo(\))1195
2566 y Fn({"foo"})240 2618 y(decode_binary\("~~foo"\))1076
2615 y Fo(\))1195 2618 y Fn({"~foo"})240 2670 y
(decode_binary\("foo~0D~0A"\))1076 2667 y Fo(\))1195
2670 y Fn({"foo",)22 b(13,)i(10})p eop
%%Page: 42 44
42 43 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(42)240 183 y Fn(decode_binary\("foo~0Abar~0)o(Abaz"\))
1076 180 y Fo(\))1195 183 y Fn({"foo",)22 b(10,)i("bar",)f(10,)g
("baz"})p 2007 193 21 42 v 240 235 a(decode_binary\("foo~0D~0A",)d(1\))
1076 232 y Fo(\))1195 235 y Fn({102,)j(111,)g(111,)g(13,)h(10})1725
329 y Fq(F)l(unction)-1899 b Fg(str)20 b Ff(enco)r(de)p
273 329 18 3 v 20 w(binary)j Fh(\()p Fl(arg)p Fn(,)14
b Fi(:)8 b(:)g(:)n Fh(\))120 383 y Fq(Eac)o(h)k(argumen)o(t)f(m)o(ust)h
(b)q(e)h(an)f(in)o(teger)g(b)q(et)o(w)o(een)h(0)f(and)g(255,)g(a)g
(string,)g(or)g(a)f(list)i(con)o(taining)g(only)120 437
y(legal)18 b(argumen)o(ts)f(for)g(this)g(function.)28
b(This)18 b(function)g(translates)f(eac)o(h)h(in)o(teger)f(and)h
(string)f(in)120 491 y(turn)11 b(in)o(to)g(its)h(binary)f(string)h
(equiv)m(alen)o(t,)h(returning)f(the)f(concatenation)g(of)g(all)h
(these)g(substrings)120 545 y(in)o(to)22 b(a)g(single)i(binary)f
(string.)42 b(\(See)22 b(the)h(early)g(section)g(on)f(MOO)h(v)m(alue)g
(t)o(yp)q(es)g(for)f(a)g(full)120 599 y(description)17
b(of)d(binary)i(strings.\))240 664 y Fn(encode_binary\("~foo"\))1243
661 y Fo(\))1362 664 y Fn("~7Efoo")240 716 y(encode_binary\({"foo",)21
b(10},)i({"bar",)g(13}\))1243 713 y Fo(\))1362 716 y
Fn("foo~0Abar~0D")240 768 y(encode_binary\("foo",)e(10,)j("bar",)f
(13\))1243 765 y Fo(\))1362 768 y Fn("foo~0Abar~0D")1725
862 y Fq(F)l(unction)-1899 b Fg(list)20 b Ff(matc)n(h)i
Fh(\()p Fn(str)14 b Fl(sub)s(ject)p Fn(,)h(str)g Fl(pattern)g
Fk([)p Fn(,)g Fl(case-matters)r Fk(])p Fh(\))1725 916
y Fq(F)l(unction)-1899 b Fg(list)20 b Ff(rmatc)n(h)i
Fh(\()p Fn(str)14 b Fl(sub)s(ject)p Fn(,)h(str)g Fl(pattern)f
Fk([)p Fn(,)h Fl(case-matters)r Fk(])p Fh(\))120 970
y Fq(The)f(function)g Fn(match\(\))f Fq(\()p Fn(rmatch\(\))p
Fq(\))e(searc)o(hes)j(for)f(the)h(\014rst)f(\(last\))f(o)q(ccurrence)j
(of)e(the)h(regular)120 1024 y(expression)20 b Fl(pattern)e
Fq(in)i(the)f(string)g Fl(sub)s(ject)p Fq(.)30 b(If)20
b Fl(pattern)e Fq(is)h(syn)o(tactically)h(malformed,)g(then)120
1078 y Fn(E_INVARG)15 b Fq(is)j(raised.)24 b(The)17 b(pro)q(cess)g(of)f
(matc)o(hing)h(can)g(in)g(some)g(cases)f(consume)h(a)f(great)g(deal)120
1132 y(of)f(memory)f(in)i(the)f(serv)o(er;)f(should)i(this)f(memory)g
(consumption)g(b)q(ecome)h(excessiv)o(e,)g(then)f(the)120
1186 y(matc)o(hing)g(pro)q(cess)h(is)f(ab)q(orted)g(and)h
Fn(E_QUOTA)e Fq(is)i(raised.)120 1253 y(If)e(no)f(matc)o(h)g(is)h
(found,)g(the)g(empt)o(y)f(list)h(is)g(returned;)h(otherwise,)e(these)h
(functions)g(return)g(a)f(list)120 1307 y(con)o(taining)20
b(information)f(ab)q(out)f(the)h(matc)o(h)g(\(see)g(b)q(elo)o(w\).)31
b(By)19 b(default,)h(the)f(searc)o(h)g(ignores)120 1361
y(upp)q(er-/lo)o(w)o(er-case)11 b(distinctions.)20 b(If)11
b Fl(case-matters)h Fq(is)f(pro)o(vided)h(and)f(true,)g(then)g(case)f
(is)h(treated)120 1415 y(as)k(signi\014can)o(t)h(in)g(all)g
(comparisons.)120 1483 y(The)f(list)h(that)e Fn(match\(\))g
Fq(\()p Fn(rmatch\(\))p Fq(\))f(returns)i(con)o(tains)g(the)f(details)i
(ab)q(out)f(the)g(matc)o(h)f(made.)120 1537 y(The)h(list)h(is)g(in)g
(the)f(form:)240 1602 y Fn({)p Fl(start)p Fn(,)22 b Fl(end)p
Fn(,)j Fl(replacemen)o(ts)p Fn(,)f Fl(sub)s(ject)q Fn(})120
1670 y Fq(where)17 b Fl(start)f Fq(is)h(the)f(index)i(in)f
Fl(sub)s(ject)g Fq(of)f(the)h(b)q(eginning)h(of)e(the)h(matc)o(h,)e
Fl(end)k Fq(is)e(the)g(index)g(of)120 1724 y(the)g(end)g(of)f(the)g
(matc)o(h,)g Fl(replacemen)o(ts)j Fq(is)e(a)f(list)h(describ)q(ed)i(b)q
(elo)o(w,)e(and)f Fl(sub)s(ject)i Fq(is)f(the)f(same)120
1778 y(string)f(that)g(w)o(as)f(giv)o(en)i(as)f(the)g(\014rst)g
(argumen)o(t)f(to)h(the)g Fn(match\(\))f Fq(or)h Fn(rmatch\(\))p
Fq(.)120 1846 y(The)20 b Fl(replacemen)o(ts)i Fq(list)f(is)f(alw)o(a)o
(ys)f(nine)i(items)f(long,)h(eac)o(h)f(item)g(itself)h(b)q(eing)g(a)e
(list)i(of)e(t)o(w)o(o)120 1900 y(in)o(tegers,)12 b(the)g(start)e(and)i
(end)g(indices)i(in)e Fl(string)k Fq(matc)o(hed)11 b(b)o(y)h(some)f
(paren)o(thesized)i(sub-pattern)120 1954 y(of)g Fl(pattern)p
Fq(.)19 b(The)14 b(\014rst)f(item)g(in)i Fl(replacemen)o(ts)h
Fq(carries)d(the)h(indices)h(for)e(the)h(\014rst)f(paren)o(thesized)120
2008 y(sub-pattern,)19 b(the)g(second)g(item)g(carries)g(those)f(for)g
(the)h(second)g(sub-pattern,)g(and)g(so)f(on.)30 b(If)120
2061 y(there)13 b(are)g(few)o(er)g(than)h(nine)g(paren)o(thesized)h
(sub-patterns)e(in)h Fl(pattern)p Fq(,)f(or)g(if)h(some)f(sub-pattern)
120 2115 y(w)o(as)19 b(not)h(used)g(in)h(the)f(matc)o(h,)g(then)g(the)g
(corresp)q(onding)h(item)g(in)f Fl(replacemen)o(ts)j
Fq(is)d(the)g(list)120 2169 y Fn({)p Fq(0,)c(-1)p Fn(})p
Fq(.)22 b(See)17 b(the)f(discussion)h(of)f(`)p Fn(\045\))p
Fq(',)f(b)q(elo)o(w,)i(for)e(more)h(information)g(on)g(paren)o
(thesized)h(sub-)120 2223 y(patterns.)240 2289 y Fn(match\("foo",)22
b("^f*o$"\))933 2286 y Fo(\))1027 2289 y Fn({})240 2341
y(match\("foo",)g("^fo*$"\))933 2338 y Fo(\))1027 2341
y Fn({1,)i(3,)g({{0,)f(-1},)g Fi(:)8 b(:)g(:)n Fn(},)24
b("foo"})240 2393 y(match\("foobar",)e("o*b"\))933 2390
y Fo(\))1027 2393 y Fn({2,)i(4,)g({{0,)f(-1},)g Fi(:)8
b(:)g(:)n Fn(},)24 b("foobar"})240 2445 y(rmatch\("foobar",)e("o*b"\))
933 2442 y Fo(\))1027 2445 y Fn({4,)i(4,)g({{0,)f(-1},)g
Fi(:)8 b(:)g(:)n Fn(},)24 b("foobar"})240 2496 y(match\("foobar",)e
("f\045\(o*\045\)b"\))432 2545 y Fo(\))526 2548 y Fn({1,)i(4,)f({{2,)h
(3},)f({0,)h(-1},)f Fi(:)8 b(:)g(:)n Fn(},)24 b("foobar"})120
2616 y Fl(Regular)d(expression)g Fq(matc)o(hing)g(allo)o(ws)f(y)o(ou)g
(to)g(test)g(whether)g(a)g(string)h(\014ts)f(in)o(to)g(a)g(sp)q
(eci\014c)120 2670 y(syn)o(tactic)15 b(shap)q(e.)21 b(Y)l(ou)15
b(can)g(also)h(searc)o(h)f(a)f(string)i(for)e(a)h(substring)h(that)e
(\014ts)h(a)g(pattern.)p eop
%%Page: 43 45
43 44 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(43)120 183 y(A)15 b(regular)g(expression)g(describ)q
(es)i(a)d(set)h(of)f(strings.)20 b(The)15 b(simplest)h(case)f(is)g(one)
g(that)f(describ)q(es)120 237 y(a)k(particular)h(string;)h(for)e
(example,)i(the)f(string)f(`)p Fn(foo)p Fq(')g(when)h(regarded)f(as)h
(a)f(regular)g(expres-)120 291 y(sion)e(matc)o(hes)e(`)p
Fn(foo)p Fq(')g(and)i(nothing)f(else.)21 b(Non)o(trivial)16
b(regular)f(expressions)h(use)g(certain)f(sp)q(ecial)120
345 y(constructs)20 b(so)f(that)h(they)g(can)g(matc)o(h)g(more)g(than)g
(one)g(string.)34 b(F)l(or)20 b(example,)i(the)e(regular)120
399 y(expression)e(`)p Fn(foo\045|bar)p Fq(')e(matc)o(hes)h(either)i
(the)e(string)h(`)p Fn(foo)p Fq(')e(or)i(the)f(string)h(`)p
Fn(bar)p Fq(';)f(the)h(regular)120 453 y(expression)j(`)p
Fn(c[ad]*r)p Fq(')d(matc)o(hes)h(an)o(y)g(of)g(the)h(strings)g(`)p
Fn(cr)p Fq(',)f(`)p Fn(car)p Fq(',)g(`)p Fn(cdr)p Fq(',)h(`)p
Fn(caar)p Fq(',)f(`)p Fn(cadddar)p Fq(')120 507 y(and)c(all)i(other)d
(suc)o(h)i(strings)f(with)g(an)o(y)g(n)o(um)o(b)q(er)h(of)f(`)p
Fn(a)p Fq(''s)e(and)j(`)p Fn(d)p Fq(''s.)120 573 y(Regular)22
b(expressions)f(ha)o(v)o(e)g(a)g(syn)o(tax)f(in)i(whic)o(h)f(a)g(few)g
(c)o(haracters)f(are)h(sp)q(ecial)h(constructs)120 627
y(and)c(the)g(rest)f(are)h Fl(ordinary)p Fq(.)28 b(An)18
b(ordinary)g(c)o(haracter)f(is)h(a)g(simple)h(regular)f(expression)h
(that)120 681 y(matc)o(hes)13 b(that)f(c)o(haracter)h(and)g(nothing)h
(else.)20 b(The)14 b(sp)q(ecial)h(c)o(haracters)d(are)h(`)p
Fn($)p Fq(',)f(`)p Fn(^)p Fq(',)h(`)p Fn(.)p Fq(',)f(`)p
Fn(*)p Fq(',)g(`)p Fn(+)p Fq(',)120 735 y(`)p Fn(?)p
Fq(',)j(`)p Fn([)p Fq(',)f(`)p Fn(])p Fq(')h(and)h(`)p
Fn(\045)p Fq('.)21 b(An)o(y)15 b(other)h(c)o(haracter)f(app)q(earing)h
(in)h(a)e(regular)h(expression)h(is)f(ordinary)l(,)120
788 y(unless)g(a)f(`)p Fn(\045)p Fq(')f(precedes)j(it.)120
854 y(F)l(or)11 b(example,)i(`)p Fn(f)p Fq(')e(is)h(not)g(a)f(sp)q
(ecial)j(c)o(haracter,)d(so)h(it)g(is)g(ordinary)l(,)h(and)f(therefore)
f(`)p Fn(f)p Fq(')g(is)h(a)g(regular)120 908 y(expression)17
b(that)f(matc)o(hes)g(the)g(string)h(`)p Fn(f)p Fq(')e(and)i(no)f
(other)g(string.)24 b(\(It)16 b(do)q(es)h Fl(not)p Fq(,)f(for)f
(example,)120 962 y(matc)o(h)g(the)g(string)g(`)p Fn(ff)p
Fq('.\))k(Lik)o(ewise,)d(`)p Fn(o)p Fq(')e(is)i(a)f(regular)g
(expression)h(that)f(matc)o(hes)f(only)i(`)p Fn(o)p Fq('.)120
1028 y(An)o(y)21 b(t)o(w)o(o)e(regular)i(expressions)g
Fl(a)f Fq(and)h Fl(b)h Fq(can)f(b)q(e)g(concatenated.)36
b(The)21 b(result)g(is)h(a)e(regular)120 1082 y(expression)d(whic)o(h)g
(matc)o(hes)e(a)h(string)f(if)i Fl(a)e Fq(matc)o(hes)h(some)g(amoun)o
(t)f(of)g(the)h(b)q(eginning)i(of)e(that)120 1136 y(string)f(and)h
Fl(b)g Fq(matc)o(hes)f(the)g(rest)g(of)g(the)g(string.)120
1201 y(As)g(a)f(simple)i(example,)f(w)o(e)g(can)f(concatenate)h(the)f
(regular)h(expressions)h(`)p Fn(f)p Fq(')d(and)i(`)p
Fn(o)p Fq(')f(to)g(get)g(the)120 1255 y(regular)h(expression)h(`)p
Fn(fo)p Fq(',)e(whic)o(h)i(matc)o(hes)f(only)h(the)f(string)g(`)p
Fn(fo)p Fq('.)k(Still)e(trivial.)120 1321 y(The)i(follo)o(wing)h(are)f
(the)g(c)o(haracters)f(and)i(c)o(haracter)e(sequences)i(that)f(ha)o(v)o
(e)f(sp)q(ecial)j(meaning)120 1375 y(within)c(regular)e(expressions.)22
b(An)o(y)15 b(c)o(haracter)g(not)g(men)o(tioned)h(here)g(is)g(not)f(sp)
q(ecial;)i(it)f(stands)120 1429 y(for)f(exactly)g(itself)h(for)f(the)g
(purp)q(oses)h(of)f(searc)o(hing)g(and)h(matc)o(hing.)120
1506 y(`)p Fn(.)p Fq(')190 b(is)19 b(a)g(sp)q(ecial)i(c)o(haracter)d
(that)g(matc)o(hes)h(an)o(y)g(single)h(c)o(haracter.)30
b(Using)20 b(concate-)360 1560 y(nation,)k(w)o(e)d(can)h(mak)o(e)g
(regular)g(expressions)h(lik)o(e)g(`)p Fn(a.b)p Fq(',)f(whic)o(h)h
(matc)o(hes)e(an)o(y)360 1614 y(three-c)o(haracter)15
b(string)g(that)f(b)q(egins)j(with)e(`)p Fn(a)p Fq(')g(and)g(ends)h
(with)f(`)p Fn(b)p Fq('.)120 1692 y(`)p Fn(*)p Fq(')190
b(is)20 b(not)g(a)f(construct)h(b)o(y)f(itself;)k(it)d(is)g(a)g
(su\016x)g(that)f(means)h(that)f(the)g(preceding)360
1746 y(regular)f(expression)h(is)f(to)f(b)q(e)h(rep)q(eated)h(as)e(man)
o(y)g(times)h(as)g(p)q(ossible.)29 b(In)19 b(`)p Fn(fo*)p
Fq(',)360 1800 y(the)e(`)p Fn(*)p Fq(')g(applies)i(to)d(the)i(`)p
Fn(o)p Fq(',)e(so)h(`)p Fn(fo*)p Fq(')g(matc)o(hes)f(`)p
Fn(f)p Fq(')h(follo)o(w)o(ed)g(b)o(y)h(an)o(y)f(n)o(um)o(b)q(er)g(of)
360 1854 y(`)p Fn(o)p Fq(''s.)360 1920 y(The)e(case)h(of)e(zero)h(`)p
Fn(o)p Fq(''s)f(is)i(allo)o(w)o(ed:)k(`)p Fn(fo*)p Fq(')14
b(do)q(es)i(matc)o(h)e(`)p Fn(f)p Fq('.)360 1986 y(`)p
Fn(*)p Fq(')c(alw)o(a)o(ys)g(applies)j(to)d(the)h Fl(smallest)i
Fq(p)q(ossible)g(preceding)f(expression.)20 b(Th)o(us,)11
b(`)p Fn(fo*)p Fq(')360 2040 y(has)k(a)g(rep)q(eating)h(`)p
Fn(o)p Fq(',)e(not)h(a)f(rep)q(eating)i(`)p Fn(fo)p Fq('.)360
2106 y(The)f(matc)o(her)f(pro)q(cesses)h(a)g(`)p Fn(*)p
Fq(')f(construct)g(b)o(y)h(matc)o(hing,)g(immediately)l(,)h(as)e(man)o
(y)360 2160 y(rep)q(etitions)g(as)f(can)g(b)q(e)h(found.)19
b(Then)14 b(it)f(con)o(tin)o(ues)h(with)f(the)g(rest)g(of)g(the)g
(pattern.)360 2214 y(If)22 b(that)f(fails,)j(it)e(bac)o(ktrac)o(ks,)f
(discarding)i(some)f(of)f(the)h(matc)o(hes)f(of)g(the)h(`)p
Fn(*)p Fq(''d)360 2268 y(construct)16 b(in)i(case)f(that)f(mak)o(es)g
(it)h(p)q(ossible)h(to)e(matc)o(h)h(the)f(rest)h(of)f(the)h(pattern.)
360 2322 y(F)l(or)10 b(example,)i(matc)o(hing)f(`)p Fn(c[ad]*ar)p
Fq(')e(against)h(the)h(string)f(`)p Fn(caddaar)p Fq(',)g(the)g(`)p
Fn([ad]*)p Fq(')360 2376 y(\014rst)17 b(matc)o(hes)g(`)p
Fn(addaa)p Fq(',)g(but)h(this)g(do)q(es)g(not)f(allo)o(w)h(the)g(next)f
(`)p Fn(a)p Fq(')g(in)i(the)e(pattern)360 2430 y(to)d(matc)o(h.)19
b(So)14 b(the)h(last)f(of)g(the)h(matc)o(hes)f(of)g(`)p
Fn([ad])p Fq(')f(is)i(undone)g(and)g(the)f(follo)o(wing)360
2484 y(`)p Fn(a)p Fq(')g(is)i(tried)g(again.)k(No)o(w)14
b(it)i(succeeds.)120 2562 y(`)p Fn(+)p Fq(')190 b(`)p
Fn(+)p Fq(')17 b(is)i(lik)o(e)h(`)p Fn(*)p Fq(')d(except)i(that)e(at)h
(least)h(one)f(matc)o(h)g(for)f(the)i(preceding)h(pattern)d(is)360
2616 y(required)23 b(for)e(`)p Fn(+)p Fq('.)39 b(Th)o(us,)23
b(`)p Fn(c[ad]+r)p Fq(')d(do)q(es)i(not)f(matc)o(h)h(`)p
Fn(cr)p Fq(')e(but)i(do)q(es)h(matc)o(h)360 2670 y(an)o(ything)15
b(else)i(that)d(`)p Fn(c[ad]*r)p Fq(')f(w)o(ould)j(matc)o(h.)p
eop
%%Page: 44 46
44 45 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(44)120 183 y(`)p Fn(?)p Fq(')190 b(`)p
Fn(?)p Fq(')11 b(is)h(lik)o(e)i(`)p Fn(*)p Fq(')d(except)h(that)f(it)i
(allo)o(ws)f(either)g(zero)g(or)g(one)g(matc)o(h)f(for)g(the)h
(preceding)360 237 y(pattern.)19 b(Th)o(us,)c(`)p Fn(c[ad]?r)p
Fq(')f(matc)o(hes)g(`)p Fn(cr)p Fq(')h(or)f(`)p Fn(car)p
Fq(')g(or)h(`)p Fn(cdr)p Fq(',)f(and)h(nothing)h(else.)120
309 y(`)p Fn([)f Fi(:)8 b(:)g(:)13 b Fn(])p Fq(')83 b(`)p
Fn([)p Fq(')18 b(b)q(egins)i(a)f Fl(c)o(haracter)f(set)p
Fq(,)h(whic)o(h)h(is)f(terminated)h(b)o(y)f(a)f(`)p Fn(])p
Fq('.)30 b(In)20 b(the)f(simplest)360 363 y(case,)e(the)g(c)o
(haracters)g(b)q(et)o(w)o(een)g(the)g(t)o(w)o(o)f(brac)o(k)o(ets)g
(form)h(the)g(set.)25 b(Th)o(us,)17 b(`)p Fn([ad])p Fq(')360
417 y(matc)o(hes)f(either)h(`)p Fn(a)p Fq(')e(or)h(`)p
Fn(d)p Fq(',)f(and)i(`)p Fn([ad]*)p Fq(')e(matc)o(hes)h(an)o(y)g
(string)g(of)g(`)p Fn(a)p Fq(''s)f(and)h(`)p Fn(d)p Fq(''s)360
471 y(\(including)g(the)d(empt)o(y)g(string\),)g(from)f(whic)o(h)i(it)f
(follo)o(ws)h(that)e(`)p Fn(c[ad]*r)p Fq(')f(matc)o(hes)360
525 y(`)p Fn(car)p Fq(',)j(etc.)360 587 y(Character)j(ranges)h(can)g
(also)g(b)q(e)g(included)j(in)e(a)f(c)o(haracter)f(set,)h(b)o(y)g
(writing)g(t)o(w)o(o)360 641 y(c)o(haracters)13 b(with)i(a)e(`)p
Fn(-)p Fq(')h(b)q(et)o(w)o(een)g(them.)19 b(Th)o(us,)14
b(`)p Fn([a-z])p Fq(')f(matc)o(hes)g(an)o(y)h(lo)o(w)o(er-case)360
695 y(letter.)25 b(Ranges)18 b(ma)o(y)e(b)q(e)i(in)o(termixed)g(freely)
g(with)f(individual)j(c)o(haracters,)c(as)h(in)360 749
y(`)p Fn([a-z$\045.])p Fq(',)c(whic)o(h)j(matc)o(hes)f(an)o(y)g(lo)o(w)
o(er)f(case)i(letter)f(or)g(`)p Fn($)p Fq(',)f(`)p Fn(\045)p
Fq(')g(or)g(p)q(erio)q(d.)360 812 y(Note)19 b(that)f(the)h(usual)g(sp)q
(ecial)i(c)o(haracters)d(are)g(not)h(sp)q(ecial)i(an)o(y)d(more)h
(inside)h(a)360 866 y(c)o(haracter)14 b(set.)20 b(A)15
b(completely)i(di\013eren)o(t)e(set)g(of)f(sp)q(ecial)j(c)o(haracters)e
(exists)g(inside)360 920 y(c)o(haracter)f(sets:)20 b(`)p
Fn(])p Fq(',)14 b(`)p Fn(-)p Fq(')g(and)i(`)p Fn(^)p
Fq('.)360 983 y(T)l(o)i(include)i(a)e(`)p Fn(])p Fq(')f(in)i(a)f(c)o
(haracter)f(set,)h(y)o(ou)g(m)o(ust)f(mak)o(e)h(it)g(the)g(\014rst)g(c)
o(haracter.)360 1036 y(F)l(or)f(example,)h(`)p Fn([]a])p
Fq(')f(matc)o(hes)g(`)p Fn(])p Fq(')f(or)h(`)p Fn(a)p
Fq('.)26 b(T)l(o)18 b(include)i(a)d(`)p Fn(-)p Fq(',)g(y)o(ou)g(m)o
(ust)g(use)h(it)360 1090 y(in)e(a)e(con)o(text)h(where)g(it)g(cannot)g
(p)q(ossibly)h(indicate)h(a)d(range:)20 b(that)14 b(is,)h(as)f(the)h
(\014rst)360 1144 y(c)o(haracter,)f(or)h(immediately)i(after)d(a)h
(range.)120 1216 y(`)p Fn([^)g Fi(:)8 b(:)g(:)13 b Fn(])p
Fq(')59 b(`)p Fn([^)p Fq(')16 b(b)q(egins)i(a)f Fl(complemen)o(t)g(c)o
(haracter)g(set)p Fq(,)f(whic)o(h)i(matc)o(hes)f(an)o(y)f(c)o(haracter)
h(ex-)360 1270 y(cept)g(the)h(ones)f(sp)q(eci\014ed.)28
b(Th)o(us,)17 b(`)p Fn([^a-z0-9A-Z])p Fq(')e(matc)o(hes)h(all)i(c)o
(haracters)f Fl(ex-)360 1324 y(cept)f Fq(letters)g(and)f(digits.)360
1387 y(`)p Fn(^)p Fq(')k(is)i(not)f(sp)q(ecial)h(in)g(a)f(c)o(haracter)
g(set)g(unless)h(it)f(is)h(the)f(\014rst)g(c)o(haracter.)34
b(The)360 1440 y(c)o(haracter)14 b(follo)o(wing)h(the)g(`)p
Fn(^)p Fq(')e(is)i(treated)f(as)h(if)g(it)f(w)o(ere)h(\014rst)f(\(it)g
(ma)o(y)g(b)q(e)h(a)g(`)p Fn(-)p Fq(')e(or)h(a)360 1494
y(`)p Fn(])p Fq('\).)120 1566 y(`)p Fn(^)p Fq(')190 b(is)13
b(a)f(sp)q(ecial)j(c)o(haracter)d(that)g(matc)o(hes)g(the)g(empt)o(y)h
(string)f({)h(but)f(only)h(if)g(at)f(the)h(b)q(e-)360
1620 y(ginning)j(of)e(the)g(string)g(b)q(eing)i(matc)o(hed.)j
(Otherwise)c(it)g(fails)g(to)e(matc)o(h)h(an)o(ything.)360
1674 y(Th)o(us,)h(`)p Fn(^foo)p Fq(')f(matc)o(hes)g(a)h(`)p
Fn(foo)p Fq(')f(whic)o(h)i(o)q(ccurs)g(at)e(the)i(b)q(eginning)h(of)e
(the)g(string.)120 1745 y(`)p Fn($)p Fq(')190 b(is)19
b(similar)g(to)f(`)p Fn(^)p Fq(')f(but)h(matc)o(hes)g(only)h(at)f(the)g
Fl(end)j Fq(of)c(the)i(string.)29 b(Th)o(us,)18 b(`)p
Fn(xx*$)p Fq(')360 1799 y(matc)o(hes)d(a)g(string)g(of)g(one)g(or)g
(more)f(`)p Fn(x)p Fq(''s)g(at)h(the)g(end)h(of)f(the)g(string.)120
1871 y(`)p Fn(\045)p Fq(')190 b(has)18 b(t)o(w)o(o)f(functions:)27
b(it)19 b(quotes)f(the)h(ab)q(o)o(v)o(e)f(sp)q(ecial)i(c)o(haracters)e
(\(including)j(`)p Fn(\045)p Fq('\),)360 1925 y(and)15
b(it)h(in)o(tro)q(duces)g(additional)h(sp)q(ecial)g(constructs.)360
1987 y(Because)24 b(`)p Fn(\045)p Fq(')e(quotes)i(sp)q(ecial)h(c)o
(haracters,)f(`)p Fn(\045$)p Fq(')e(is)i(a)f(regular)g(expression)i
(that)360 2041 y(matc)o(hes)19 b(only)g(`)p Fn($)p Fq(',)g(and)h(`)p
Fn(\045[)p Fq(')e(is)h(a)g(regular)g(expression)h(that)f(matc)o(hes)g
(only)g(`)p Fn([)p Fq(',)360 2095 y(and)c(so)g(on.)360
2158 y(F)l(or)e(the)h(most)f(part,)g(`)p Fn(\045)p Fq(')g(follo)o(w)o
(ed)h(b)o(y)g(an)o(y)f(c)o(haracter)g(matc)o(hes)h(only)g(that)f(c)o
(harac-)360 2212 y(ter.)19 b(Ho)o(w)o(ev)o(er,)12 b(there)h(are)g(sev)o
(eral)g(exceptions:)20 b(c)o(haracters)13 b(that,)f(when)i(preceded)360
2266 y(b)o(y)k(`)p Fn(\045)p Fq(',)g(are)g(sp)q(ecial)h(constructs.)29
b(Suc)o(h)19 b(c)o(haracters)e(are)h(alw)o(a)o(ys)f(ordinary)h(when)360
2320 y(encoun)o(tered)e(on)f(their)h(o)o(wn.)360 2383
y(No)11 b(new)h(sp)q(ecial)h(c)o(haracters)d(will)j(ev)o(er)e(b)q(e)h
(de\014ned.)20 b(All)13 b(extensions)f(to)e(the)i(regular)360
2437 y(expression)j(syn)o(tax)f(are)h(made)f(b)o(y)h(de\014ning)h(new)f
(t)o(w)o(o-c)o(haracter)d(constructs)j(that)360 2491
y(b)q(egin)h(with)g(`)p Fn(\045)p Fq('.)120 2562 y(`)p
Fn(\045|)p Fq(')166 b(sp)q(eci\014es)24 b(an)f(alternativ)o(e.)42
b(Tw)o(o)21 b(regular)i(expressions)g Fl(a)f Fq(and)h
Fl(b)h Fq(with)f(`)p Fn(\045|)p Fq(')e(in)360 2616 y(b)q(et)o(w)o(een)
16 b(form)f(an)h(expression)h(that)e(matc)o(hes)g(an)o(ything)i(that)e
(either)h Fl(a)g Fq(or)f Fl(b)i Fq(will)360 2670 y(matc)o(h.)p
eop
%%Page: 45 47
45 46 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(45)360 183 y(Th)o(us,)15 b(`)p Fn(foo\045|bar)p
Fq(')e(matc)o(hes)i(either)h(`)p Fn(foo)p Fq(')e(or)g(`)p
Fn(bar)p Fq(')g(but)i(no)f(other)g(string.)360 254 y(`)p
Fn(\045|)p Fq(')j(applies)i(to)f(the)g(largest)f(p)q(ossible)j
(surrounding)e(expressions.)32 b(Only)20 b(a)f(sur-)360
308 y(rounding)d(`)p Fn(\045\()f Fi(:)8 b(:)g(:)13 b
Fn(\045\))p Fq(')h(grouping)i(can)f(limit)i(the)e(grouping)g(p)q(o)o(w)
o(er)g(of)g(`)p Fn(\045|)p Fq('.)360 378 y(F)l(ull)i(bac)o(ktrac)o
(king)d(capabilit)o(y)j(exists)e(for)g(when)h(m)o(ultiple)h(`)p
Fn(\045|)p Fq(''s)c(are)i(used.)120 465 y(`)p Fn(\045\()g
Fi(:)8 b(:)g(:)13 b Fn(\045\))p Fq(')35 b(is)16 b(a)f(grouping)g
(construct)g(that)f(serv)o(es)h(three)h(purp)q(oses:)385
535 y(1.)29 b(T)l(o)c(enclose)i(a)e(set)h(of)f(`)p Fn(\045|)p
Fq(')f(alternativ)o(es)i(for)f(other)g(op)q(erations.)51
b(Th)o(us,)450 589 y(`)p Fn(\045\(foo\045|bar\045\)x)p
Fq(')13 b(matc)o(hes)h(either)i(`)p Fn(foox)p Fq(')e(or)h(`)p
Fn(barx)p Fq('.)385 660 y(2.)29 b(T)l(o)18 b(enclose)h(a)f(complicated)
h(expression)g(for)e(a)h(follo)o(wing)h(`)p Fn(*)p Fq(',)e(`)p
Fn(+)p Fq(',)h(or)f(`)p Fn(?)p Fq(')h(to)450 714 y(op)q(erate)j(on.)36
b(Th)o(us,)22 b(`)p Fn(ba\045\(na\045\)*)p Fq(')d(matc)o(hes)i(`)p
Fn(bananana)p Fq(',)f(etc.,)h(with)g(an)o(y)450 768 y(n)o(um)o(b)q(er)
16 b(of)e(`)p Fn(na)p Fq(''s,)g(including)k(none.)385
838 y(3.)29 b(T)l(o)15 b(mark)f(a)h(matc)o(hed)g(substring)h(for)f
(future)g(reference.)360 925 y(This)20 b(last)f(application)i(is)f(not)
f(a)g(consequence)i(of)e(the)g(idea)h(of)f(a)g(paren)o(thetical)360
979 y(grouping;)d(it)g(is)g(a)g(separate)f(feature)g(that)g(happ)q(ens)
i(to)e(b)q(e)h(assigned)h(as)e(a)g(second)360 1033 y(meaning)k(to)e
(the)h(same)g(`)p Fn(\045\()c Fi(:)8 b(:)g(:)14 b Fn(\045\))p
Fq(')j(construct)h(b)q(ecause)h(there)f(is)g(no)g(con\015ict)h(in)360
1087 y(practice)c(b)q(et)o(w)o(een)f(the)g(t)o(w)o(o)f(meanings.)20
b(Here)14 b(is)h(an)f(explanation)h(of)e(this)i(feature:)120
1173 y(`)p Fn(\045)p Fl(digit)q Fq(')99 b(After)13 b(the)h(end)g(of)f
(a)g(`)p Fn(\045\()h Fi(:)8 b(:)g(:)13 b Fn(\045\))p
Fq(')g(construct,)g(the)h(matc)o(her)f(remem)o(b)q(ers)g(the)h(b)q
(egin-)360 1227 y(ning)h(and)g(end)g(of)f(the)h(text)f(matc)o(hed)g(b)o
(y)h(that)f(construct.)19 b(Then,)c(later)f(on)h(in)g(the)360
1281 y(regular)i(expression,)i(y)o(ou)e(can)g(use)h(`)p
Fn(\045)p Fq(')e(follo)o(w)o(ed)i(b)o(y)f Fl(digit)i
Fq(to)e(mean)g(\\matc)o(h)g(the)360 1335 y(same)i(text)g(matc)o(hed)g
(b)o(y)h(the)f Fl(digit)q Fq('th)h(`)p Fn(\045\()14 b
Fi(:)8 b(:)g(:)14 b Fn(\045\))p Fq(')k(construct)h(in)i(the)e
(pattern.")360 1389 y(The)e(`)p Fn(\045\()d Fi(:)8 b(:)g(:)13
b Fn(\045\))p Fq(')j(constructs)g(are)g(n)o(um)o(b)q(ered)h(in)h(the)e
(order)g(that)g(their)h(`)p Fn(\045\()p Fq(''s)e(ap-)360
1443 y(p)q(ear)g(in)h(the)g(pattern.)360 1514 y(The)j(strings)g(matc)o
(hing)g(the)g(\014rst)f(nine)i(`)p Fn(\045\()15 b Fi(:)8
b(:)g(:)13 b Fn(\045\))p Fq(')18 b(constructs)h(app)q(earing)h(in)f(a)
360 1568 y(regular)e(expression)g(are)f(assigned)h(n)o(um)o(b)q(ers)g
(1)f(through)g(9)g(in)i(order)e(of)g(their)h(b)q(e-)360
1622 y(ginnings.)29 b(`)p Fn(\0451)p Fq(')17 b(through)h(`)p
Fn(\0459)p Fq(')e(ma)o(y)i(b)q(e)g(used)h(to)e(refer)h(to)f(the)h(text)
f(matc)o(hed)h(b)o(y)360 1676 y(the)d(corresp)q(onding)h(`)p
Fn(\045\()f Fi(:)8 b(:)g(:)13 b Fn(\045\))p Fq(')i(construct.)360
1746 y(F)l(or)e(example,)i(`)p Fn(\045\(.*\045\)\0451)p
Fq(')d(matc)o(hes)i(an)o(y)f(string)h(that)f(is)i(comp)q(osed)f(of)g(t)
o(w)o(o)f(iden-)360 1800 y(tical)k(halv)o(es.)22 b(The)17
b(`)p Fn(\045\(.*\045\))p Fq(')d(matc)o(hes)i(the)g(\014rst)f(half,)h
(whic)o(h)h(ma)o(y)e(b)q(e)i(an)o(ything,)360 1854 y(but)e(the)h(`)p
Fn(\0451)p Fq(')e(that)g(follo)o(ws)h(m)o(ust)g(matc)o(h)g(the)g(same)g
(exact)g(text.)120 1941 y(`)p Fn(\045b)p Fq(')166 b(matc)o(hes)22
b(the)g(empt)o(y)g(string,)h(but)g(only)f(if)h(it)f(is)h(at)e(the)i(b)q
(eginning)h(or)e(end)g(of)360 1995 y(a)d(w)o(ord.)32
b(Th)o(us,)20 b(`)p Fn(\045bfoo\045b)p Fq(')e(matc)o(hes)h(an)o(y)g(o)q
(ccurrence)i(of)e(`)p Fn(foo)p Fq(')f(as)h(a)g(separate)360
2049 y(w)o(ord.)g(`)p Fn(\045bball\045\(s\045|\045\)\045b)p
Fq(')13 b(matc)o(hes)h(`)p Fn(ball)p Fq(')g(or)h(`)p
Fn(balls)p Fq(')f(as)g(a)h(separate)g(w)o(ord.)360 2119
y(F)l(or)c(the)h(purp)q(oses)g(of)f(this)h(construct)g(and)g(the)f
(\014v)o(e)h(that)f(follo)o(w,)h(a)f(w)o(ord)g(is)i(de\014ned)360
2173 y(to)i(b)q(e)g(a)g(sequence)i(of)d(letters)i(and/or)e(digits.)120
2260 y(`)p Fn(\045B)p Fq(')166 b(matc)o(hes)16 b(the)g(empt)o(y)h
(string,)f(pro)o(vided)h(it)g(is)g Fl(not)g Fq(at)e(the)i(b)q(eginning)
h(or)e(end)h(of)f(a)360 2314 y(w)o(ord.)120 2401 y(`)p
Fn(\045<)p Fq(')166 b(matc)o(hes)15 b(the)g(empt)o(y)g(string,)g(but)g
(only)h(if)f(it)h(is)g(at)e(the)h(b)q(eginning)j(of)d(a)f(w)o(ord.)120
2487 y(`)p Fn(\045>)p Fq(')166 b(matc)o(hes)15 b(the)g(empt)o(y)g
(string,)g(but)g(only)h(if)f(it)h(is)g(at)e(the)h(end)h(of)f(a)g(w)o
(ord.)120 2574 y(`)p Fn(\045w)p Fq(')166 b(matc)o(hes)15
b(an)o(y)g(w)o(ord-constituen)o(t)f(c)o(haracter)h(\(i.e.,)f(an)o(y)h
(letter)h(or)e(digit\).)120 2661 y(`)p Fn(\045W)p Fq(')166
b(matc)o(hes)15 b(an)o(y)g(c)o(haracter)f(that)h(is)g(not)g(a)g(w)o
(ord)f(constituen)o(t.)p eop
%%Page: 46 48
46 47 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(46)1725 183 y(F)l(unction)-1899 b Fg(str)20
b Ff(substitute)j Fh(\()p Fn(str)14 b Fl(template)p Fn(,)i(list)e
Fl(subs)r Fh(\))120 237 y Fq(P)o(erforms)g(a)g(standard)g(set)h(of)f
(substitutions)i(on)e(the)h(string)g Fl(template)p Fq(,)g(using)g(the)g
(information)120 291 y(con)o(tained)20 b(in)g Fl(subs)p
Fq(,)h(returning)f(the)g(resulting,)h(transformed)e Fl(template)p
Fq(.)33 b Fl(Subs)22 b Fq(should)e(b)q(e)g(a)120 345
y(list)d(lik)o(e)g(those)f(returned)g(b)o(y)g Fn(match\(\))f
Fq(or)h Fn(rmatch\(\))f Fq(when)h(the)g(matc)o(h)g(succeeds;)h
(otherwise,)120 399 y Fn(E_INVARG)d Fq(is)i(raised.)120
475 y(In)g Fl(template)p Fq(,)g(the)f(strings)h(`)p Fn(\0451)p
Fq(')e(through)h(`)p Fn(\0459)p Fq(')g(will)i(b)q(e)f(replaced)h(b)o(y)
e(the)h(text)f(matc)o(hed)g(b)o(y)h(the)120 529 y(\014rst)f(through)g
(nin)o(th)h(paren)o(thesized)g(sub-patterns)g(when)f
Fn(match\(\))g Fq(or)f Fn(rmatch\(\))g Fq(w)o(as)h(called.)120
583 y(The)i(string)g(`)p Fn(\0450)p Fq(')f(in)h Fl(template)j
Fq(will)e(b)q(e)g(replaced)g(b)o(y)f(the)g(text)f(matc)o(hed)h(b)o(y)g
(the)f(pattern)h(as)f(a)120 637 y(whole)k(when)f Fn(match\(\))f
Fq(or)h Fn(rmatch\(\))e Fq(w)o(as)i(called.)33 b(The)19
b(string)g(`)p Fn(\045\045)p Fq(')f(will)i(b)q(e)g(replaced)g(b)o(y)f
(a)120 691 y(single)g(`)p Fn(\045)p Fq(')e(sign.)28 b(If)18
b(`)p Fn(\045)p Fq(')f(app)q(ears)h(in)h Fl(template)h
Fq(follo)o(w)o(ed)e(b)o(y)g(an)o(y)f(other)h(c)o(haracter,)f
Fn(E_INVARG)120 744 y Fq(will)g(b)q(e)f(raised.)240 818
y Fn(subs)23 b(=)h(match\("***)f(Welcome)f(to)i(LambdaMOO!!!",)e
("\045\(\045w*\045\))h(to)g(\045\(\045w*\045\)"\);)240
870 y(substitute\("I)f(thank)h(you)h(for)f(your)g(\0451)h(here)f(in)h
(\0452.",)f(subs\))432 919 y Fo(\))550 922 y Fn("I)h(thank)f(you)g(for)
h(your)f(Welcome)g(here)g(in)h(LambdaMOO.")1725 1031
y Fq(F)l(unction)-1899 b Fg(str)20 b Ff(crypt)j Fh(\()p
Fn(str)14 b Fl(text)i Fk([)p Fn(,)f(str)f Fl(salt)q Fk(])p
Fh(\))120 1085 y Fq(Encrypts)f(the)g(giv)o(en)h Fl(text)g
Fq(using)f(the)h(standard)e(UNIX)i(encryption)g(metho)q(d.)20
b(If)13 b(pro)o(vided,)h Fl(salt)120 1139 y Fq(should)g(b)q(e)h(a)e
(string)g(at)g(least)h(t)o(w)o(o)e(c)o(haracters)h(long,)g(the)h
(\014rst)f(t)o(w)o(o)f(c)o(haracters)h(of)g(whic)o(h)h(will)h(b)q(e)120
1193 y(used)g(as)g(the)f(extra)g(encryption)i(\\salt")e(in)h(the)g
(algorithm.)20 b(If)15 b Fl(salt)g Fq(is)h(not)e(pro)o(vided,)h(a)f
(random)120 1247 y(pair)k(of)f(c)o(haracters)f(is)i(used.)27
b(In)18 b(an)o(y)f(case,)g(the)h(salt)f(used)h(is)g(also)f(returned)h
(as)f(the)g(\014rst)g(t)o(w)o(o)120 1301 y(c)o(haracters)d(of)h(the)g
(resulting)i(encrypted)f(string.)120 1377 y(Aside)i(from)f(the)g(p)q
(ossibly-random)i(selection)g(of)e(the)g(salt,)h(the)f(encryption)h
(algorithm)g(is)f(en-)120 1431 y(tirely)j(deterministic.)32
b(In)19 b(particular,)h(y)o(ou)e(can)h(test)f(whether)h(or)f(not)h(a)f
(giv)o(en)h(string)g(is)g(the)120 1485 y(same)f(as)f(the)h(one)g(used)h
(to)e(pro)q(duce)i(a)e(giv)o(en)i(piece)g(of)e(encrypted)i(text;)g
(simply)g(extract)e(the)120 1539 y(\014rst)e(t)o(w)o(o)e(c)o(haracters)
i(of)f(the)i(encrypted)f(text)g(and)g(pass)g(the)g(candidate)h(string)f
(and)g(those)g(t)o(w)o(o)120 1593 y(c)o(haracters)c(to)h
Fn(crypt\(\))p Fq(.)17 b(If)c(the)f(result)g(is)h(iden)o(tical)h(to)d
(the)h(giv)o(en)h(encrypted)g(text,)e(then)i(y)o(ou'v)o(e)120
1647 y(got)h(a)h(matc)o(h.)240 1720 y Fn(crypt\("foobar"\))814
1717 y Fo(\))932 1720 y Fn("J3fSFQfgkp26w")240 1772 y(crypt\("foobar",)
22 b("J3"\))814 1769 y Fo(\))932 1772 y Fn("J3fSFQfgkp26w")240
1824 y(crypt\("mumble",)g("J3"\))814 1821 y Fo(\))932
1824 y Fn("J3D0.dh.jjmWQ")240 1876 y(crypt\("foobar",)g("J4"\))814
1873 y Fo(\))932 1876 y Fn("J4AcPxOJ4ncq2")1725 1985
y Fq(F)l(unction)-1899 b Fg(str)20 b Ff(string)p 246
1985 18 3 v 20 w(hash)i Fh(\()p Fn(str)14 b Fl(text)q
Fh(\))1725 2039 y Fq(F)l(unction)-1899 b Fg(str)20 b
Ff(binary)p 262 2039 V 20 w(hash)i Fh(\()p Fn(str)15
b Fl(bin-string)t Fh(\))120 2093 y Fq(Returns)20 b(a)e(32-c)o(haracter)
g(hexadecimal)j(string)e(enco)q(ding)h(the)f(result)h(of)e(applying)j
(the)e(MD5)120 2147 y(cryptographically)d(secure)g(hash)f(function)h
(to)e(the)h(con)o(ten)o(ts)g(of)f(the)h(string)g Fl(text)h
Fq(or)e(the)h(binary)120 2201 y(string)g Fl(bin-string)p
Fq(.)21 b(MD5,)14 b(lik)o(e)j(other)d(suc)o(h)i(functions,)f(has)h(the)
f(prop)q(ert)o(y)g(that,)f(if)240 2275 y Fn(string_hash\()p
Fl(x)s Fn(\))22 b(==)i(string_hash\()p Fl(y)t Fn(\))120
2350 y Fq(then,)15 b(almost)g(certainly)l(,)240 2424
y Fn(equal\()p Fl(x)p Fn(,)23 b Fl(y)t Fn(\))120 2499
y Fq(This)d(can)f(b)q(e)h(useful,)h(for)e(example,)h(in)g(certain)g
(net)o(w)o(orking)f(applications:)29 b(after)19 b(sending)h(a)120
2553 y(large)14 b(piece)h(of)e(text)g(across)g(a)g(connection,)h(also)g
(send)g(the)g(result)g(of)f(applying)i Fn(string_hash\(\))120
2607 y Fq(to)f(the)g(text;)g(if)h(the)f(destination)i(site)e(also)h
(applies)h Fn(string_hash\(\))c Fq(to)i(the)h(text)e(and)i(gets)f(the)
120 2661 y(same)h(result,)g(y)o(ou)g(can)g(b)q(e)h(quite)g(con\014den)o
(t)g(that)e(the)i(large)f(text)g(has)g(arriv)o(ed)g(unc)o(hanged.)p
eop
%%Page: 47 49
47 48 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(47)0 183 y Fj(4.4.2.4)30 b(Op)r(erations)14
b(on)h(Lists)1725 304 y Fq(F)l(unction)-1899 b Fg(int)20
b Ff(length)j Fh(\()p Fn(list)14 b Fl(list)q Fh(\))120
358 y Fq(Returns)23 b(the)g(n)o(um)o(b)q(er)f(of)h(elemen)o(ts)g(in)g
Fl(list)p Fq(.)43 b(It)22 b(is)h(also)g(p)q(ermissible)i(to)d(pass)g(a)
g(string)h(to)120 412 y Fn(length\(\))p Fq(;)14 b(see)h(the)g
(description)i(in)f(the)f(previous)h(section.)240 477
y Fn(length\({1,)22 b(2,)i(3}\))718 474 y Fo(\))837 477
y Fn(3)240 529 y(length\({}\))718 526 y Fo(\))837 529
y Fn(0)1725 621 y Fq(F)l(unction)-1899 b Fg(int)20 b
Ff(is)p 139 621 18 3 v 21 w(mem)n(b)r(er)g Fh(\()p Fl(v)m(alue)p
Fn(,)c(list)e Fl(list)q Fh(\))120 675 y Fq(Returns)21
b(true)f(if)g(there)g(is)h(an)f(elemen)o(t)h(of)e Fl(list)j
Fq(that)e(is)g(completely)i(indistinguishable)i(from)120
729 y Fl(v)m(alue)p Fq(.)h(This)17 b(is)g(m)o(uc)o(h)g(the)g(same)f(op)
q(eration)h(as)f(\\)p Fl(v)m(alue)j Fn(in)14 b Fl(list)q
Fq(")k(except)f(that,)e(unlik)o(e)k Fn(in)p Fq(,)d(the)120
783 y Fn(is_member\(\))j Fq(function)h(do)q(es)h(not)f(treat)f(upp)q
(er-)i(and)f(lo)o(w)o(er-case)g(c)o(haracters)f(in)i(strings)f(as)120
837 y(equal.)240 902 y Fn("Foo")j(in)h({1,)f("foo",)g(#24})1100
899 y Fo(\))1218 902 y Fn(2)240 953 y(is_member\("Foo",)f({1,)h("foo",)
g(#24}\))1100 950 y Fo(\))1218 953 y Fn(0)240 1005 y(is_member\("Foo",)
f({1,)h("Foo",)g(#24}\))1100 1002 y Fo(\))1218 1005 y
Fn(2)1725 1097 y Fq(F)l(unction)-1899 b Fg(list)20 b
Ff(listinsert)25 b Fh(\()p Fn(list)14 b Fl(list)p Fn(,)i
Fl(v)m(alue)j Fk([)p Fn(,)14 b(int)h Fl(index)s Fk(])p
Fh(\))1725 1151 y Fq(F)l(unction)-1899 b Fg(list)20 b
Ff(listapp)r(end)j Fh(\()p Fn(list)14 b Fl(list)p Fn(,)i
Fl(v)m(alue)j Fk([)p Fn(,)c(int)g Fl(index)s Fk(])p Fh(\))120
1205 y Fq(These)d(functions)h(return)e(a)h(cop)o(y)f(of)h
Fl(list)h Fq(with)f Fl(v)m(alue)k Fq(added)c(as)g(a)f(new)h(elemen)o
(t.)20 b Fn(listinsert\(\))120 1259 y Fq(and)15 b Fn(listappend\(\))e
Fq(add)h Fl(v)m(alue)19 b Fq(b)q(efore)c(and)g(after)e(\(resp)q(ectiv)o
(ely\))j(the)f(existing)g(elemen)o(t)h(with)120 1313
y(the)f(giv)o(en)h Fl(index)p Fq(,)g(if)g(pro)o(vided.)120
1380 y(The)f(follo)o(wing)h(three)g(expressions)g(alw)o(a)o(ys)e(ha)o
(v)o(e)h(the)g(same)g(v)m(alue:)240 1445 y Fn(listinsert\()p
Fl(list)p Fn(,)23 b Fl(elemen)o(t)p Fn(,)i Fl(index)s
Fn(\))240 1497 y(listappend\()p Fl(list)p Fn(,)e Fl(elemen)o(t)p
Fn(,)i Fl(index)j Fn(-)c(1\))240 1549 y({@)p Fl(list)q
Fn([1..)p Fl(index)k Fn(-)c(1],)g Fl(elemen)o(t)p Fn(,)g(@)p
Fl(list)q Fn([)p Fl(index)p Fn(..length\()p Fl(list)q
Fn(\)]})120 1615 y Fq(If)16 b Fl(index)k Fq(is)c(not)f(pro)o(vided,)h
(then)f Fn(listappend\(\))f Fq(adds)i(the)f Fl(v)m(alue)k
Fq(at)c(the)h(end)g(of)f(the)h(list)g(and)120 1669 y
Fn(listinsert\(\))f Fq(adds)i(it)g(at)f(the)h(b)q(eginning;)j(this)d
(usage)g(is)g(discouraged,)h(ho)o(w)o(ev)o(er,)e(since)i(the)120
1723 y(same)h(in)o(ten)o(t)h(can)g(b)q(e)g(more)g(clearly)g(expressed)h
(using)f(the)g(list-construction)h(expression,)g(as)120
1777 y(sho)o(wn)15 b(in)h(the)f(examples)h(b)q(elo)o(w.)240
1842 y Fn(x)24 b(=)f({1,)h(2,)f(3};)240 1894 y(listappend\(x,)f(4,)i
(2\))766 1891 y Fo(\))884 1894 y Fn({1,)g(2,)f(4,)h(3})240
1946 y(listinsert\(x,)e(4,)i(2\))766 1943 y Fo(\))884
1946 y Fn({1,)g(4,)f(2,)h(3})240 1998 y(listappend\(x,)e(4\))766
1995 y Fo(\))884 1998 y Fn({1,)i(2,)f(3,)h(4})240 2050
y(listinsert\(x,)e(4\))766 2047 y Fo(\))884 2050 y Fn({4,)i(1,)f(2,)h
(3})240 2101 y({@x,)f(4})766 2098 y Fo(\))884 2101 y
Fn({1,)h(2,)f(3,)h(4})240 2153 y({4,)f(@x})766 2150 y
Fo(\))884 2153 y Fn({4,)h(1,)f(2,)h(3})1725 2245 y Fq(F)l(unction)-1899
b Fg(list)20 b Ff(listdelete)26 b Fh(\()p Fn(list)14
b Fl(list)p Fn(,)i(int)f Fl(index)s Fh(\))120 2299 y
Fq(Returns)h(a)g(cop)o(y)f(of)h Fl(list)h Fq(with)f(the)g
Fl(index)s Fq(th)h(elemen)o(t)g(remo)o(v)o(ed.)k(If)16
b Fl(index)k Fq(is)c(not)g(in)g(the)g(range)120 2353
y Fn([1..length\()p Fl(list)q Fn(\)])p Fq(,)e(then)h
Fn(E_RANGE)g Fq(is)g(raised.)240 2418 y Fn(x)24 b(=)f({"foo",)g("bar",)
g("baz"};)240 2470 y(listdelete\(x,)f(2\))695 2467 y
Fo(\))813 2470 y Fn({"foo",)h("baz"})1725 2562 y Fq(F)l(unction)-1899
b Fg(list)20 b Ff(listset)k Fh(\()p Fn(list)15 b Fl(list)p
Fn(,)g Fl(v)m(alue)p Fn(,)i(int)d Fl(index)s Fh(\))120
2616 y Fq(Returns)k(a)e(cop)o(y)h(of)g Fl(list)i Fq(with)e(the)g
Fl(index)s Fq(th)i(elemen)o(t)e(replaced)i(b)o(y)e Fl(v)m(alue)p
Fq(.)26 b(If)17 b Fl(index)22 b Fq(is)17 b(not)g(in)120
2670 y(the)e(range)g Fn([1..length\()p Fl(list)q Fn(\)])p
Fq(,)f(then)i Fn(E_RANGE)e Fq(is)h(raised.)p eop
%%Page: 48 50
48 49 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(48)240 183 y Fn(x)24 b(=)f({"foo",)g("bar",)g("baz"};)
240 235 y(listset\(x,)f("mumble",)h(2\))862 232 y Fo(\))980
235 y Fn({"foo",)g("mumble",)f("baz"})120 303 y Fq(This)11
b(function)h(exists)e(primarily)i(for)e(historical)i(reasons;)f(it)g(w)
o(as)f(used)h(hea)o(vily)h(b)q(efore)f(the)f(serv)o(er)120
357 y(supp)q(orted)21 b(indexed)g(assignmen)o(ts)f(lik)o(e)i
Fn(x[i])14 b(=)h(v)p Fq(.)35 b(New)20 b(co)q(de)g(should)h(alw)o(a)o
(ys)f(use)g(indexed)120 410 y(assignmen)o(t)15 b(instead)h(of)f(`)p
Fn(listset\(\))p Fq(')e(wherev)o(er)i(p)q(ossible.)1725
504 y(F)l(unction)-1899 b Fg(list)20 b Ff(setadd)i Fh(\()p
Fn(list)14 b Fl(list)p Fn(,)i Fl(v)m(alue)s Fh(\))1725
558 y Fq(F)l(unction)-1899 b Fg(list)20 b Ff(setremo)n(v)n(e)i
Fh(\()p Fn(list)14 b Fl(list)p Fn(,)i Fl(v)m(alue)s Fh(\))120
612 y Fq(Returns)c(a)f(cop)o(y)h(of)f Fl(list)i Fq(with)f(the)f(giv)o
(en)h Fl(v)m(alue)k Fq(added)c(or)f(remo)o(v)o(ed,)g(as)g(appropriate.)
19 b Fn(setadd\(\))120 666 y Fq(only)13 b(adds)f Fl(v)m(alue)k
Fq(if)d(it)f(is)h(not)f(already)g(an)g(elemen)o(t)h(of)f
Fl(list)q Fq(;)i Fl(list)g Fq(is)e(th)o(us)g(treated)g(as)g(a)g
(mathemat-)120 720 y(ical)i(set.)19 b Fl(v)m(alue)e Fq(is)d(added)f(at)
g(the)g(end)h(of)f(the)g(resulting)h(list,)g(if)f(at)g(all.)20
b(Similarly)l(,)c Fn(setremove\(\))120 774 y Fq(returns)i(a)f(list)i
(iden)o(tical)h(to)d Fl(list)j Fq(if)e Fl(v)m(alue)k
Fq(is)c(not)f(an)h(elemen)o(t.)29 b(If)18 b Fl(v)m(alue)k
Fq(app)q(ears)c(more)f(than)120 828 y(once)f(in)g Fl(list)p
Fq(,)f(only)h(the)f(\014rst)g(o)q(ccurrence)h(is)g(remo)o(v)o(ed)f(in)h
(the)f(returned)h(cop)o(y)l(.)240 893 y Fn(setadd\({1,)22
b(2,)i(3},)g(3\))933 890 y Fo(\))1051 893 y Fn({1,)g(2,)f(3})240
945 y(setadd\({1,)f(2,)i(3},)g(4\))933 942 y Fo(\))1051
945 y Fn({1,)g(2,)f(3,)h(4})240 997 y(setremove\({1,)e(2,)i(3},)f(3\))
933 994 y Fo(\))1051 997 y Fn({1,)h(2})240 1049 y(setremove\({1,)e(2,)i
(3},)f(4\))933 1046 y Fo(\))1051 1049 y Fn({1,)h(2,)f(3})240
1100 y(setremove\({1,)f(2,)i(3,)f(2},)h(2\))933 1097
y Fo(\))1051 1100 y Fn({1,)g(3,)f(2})0 1242 y Fj(4.4.3)30
b(Manipulating)15 b(Ob)s(jects)62 1339 y Fq(Ob)s(jects)k(are,)h(of)e
(course,)i(the)f(main)h(fo)q(cus)f(of)g(most)f(MOO)i(programming)e
(and,)i(largely)g(due)g(to)e(that,)0 1393 y(there)d(are)g(a)g(lot)g(of)
g(built-in)j(functions)e(for)e(manipulating)j(them.)0
1535 y Fj(4.4.3.1)30 b(F)-5 b(undamen)n(tal)15 b(Op)r(erations)f(on)h
(Ob)s(jects)1725 1657 y Fq(F)l(unction)-1899 b Fg(obj)20
b Ff(create)j Fh(\()p Fn(obj)14 b Fl(paren)o(t)i Fk([)p
Fn(,)f(obj)g Fl(o)o(wner)s Fk(])p Fh(\))120 1711 y Fq(Creates)j(and)g
(returns)g(a)g(new)h(ob)s(ject)f(whose)g(paren)o(t)g(is)h
Fl(paren)o(t)g Fq(and)f(whose)h(o)o(wner)f(is)g(as)g(de-)120
1765 y(scrib)q(ed)e(b)q(elo)o(w.)k(Either)c(the)e(giv)o(en)i
Fl(paren)o(t)f Fq(ob)s(ject)f(m)o(ust)g(b)q(e)h Fn(#-1)g
Fq(or)f(v)m(alid)i(and)f(fertile)h(\(i.e.,)e(its)120
1819 y(`)p Fn(f)p Fq(')f(bit)i(m)o(ust)e(b)q(e)i(set\))e(or)g(else)i
(the)f(programmer)f(m)o(ust)h(o)o(wn)f Fl(paren)o(t)i
Fq(or)e(b)q(e)i(a)e(wizard;)i(otherwise)120 1873 y Fn(E_PERM)i
Fq(is)g(raised.)27 b Fn(E_PERM)17 b Fq(is)h(also)f(raised)h(if)g
Fl(o)o(wner)i Fq(is)e(pro)o(vided)g(and)f(not)g(the)h(same)f(as)g(the)
120 1927 y(programmer,)f(unless)i(the)f(programmer)f(is)h(a)g(wizard.)
25 b(After)17 b(the)g(new)g(ob)s(ject)f(is)i(created,)f(its)120
1981 y Fn(initialize)d Fq(v)o(erb,)h(if)g(an)o(y)l(,)g(is)h(called)g
(with)g(no)f(argumen)o(ts.)120 2048 y(The)f(new)f(ob)s(ject)g(is)h
(assigned)h(the)e(least)h(non-negativ)o(e)g(ob)s(ject)f(n)o(um)o(b)q
(er)g(that)g(has)h(not)f(y)o(et)g(b)q(een)120 2102 y(used)h(for)e(a)h
(created)g(ob)s(ject.)18 b(Note)13 b(that)f(no)h(ob)s(ject)g(n)o(um)o
(b)q(er)g(is)h(ev)o(er)f(reused,)g(ev)o(en)h(if)f(the)h(ob)s(ject)120
2156 y(with)i(that)e(n)o(um)o(b)q(er)i(is)f(recycled.)120
2224 y(The)h(o)o(wner)f(of)h(the)g(new)g(ob)s(ject)f(is)h(either)h(the)
f(programmer)e(\(if)i Fl(o)o(wner)j Fq(is)d(not)g(pro)o(vided\),)g(the)
120 2278 y(new)f(ob)s(ject)g(itself)h(\(if)g Fl(o)o(wner)h
Fq(w)o(as)e(giv)o(en)h(as)e Fn(#-1)p Fq(\),)g(or)h Fl(o)o(wner)j
Fq(\(otherwise\).)120 2345 y(The)d(other)g(built-in)j(prop)q(erties)e
(of)f(the)g(new)g(ob)s(ject)g(are)g(initialized)j(as)d(follo)o(ws:)240
2411 y Fn(name)214 b("")240 2462 y(location)118 b(#-1)240
2514 y(contents)g({})240 2566 y(programmer)70 b(0)240
2618 y(wizard)166 b(0)240 2670 y(r)286 b(0)p eop
%%Page: 49 51
49 50 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(49)240 183 y Fn(w)286 b(0)240 235 y(f)g(0)120
304 y Fq(The)15 b(function)h(`)p Fn(is_player\(\))p Fq(')d(returns)i
(false)h(for)f(newly)h(created)f(ob)s(jects.)120 373
y(In)h(addition,)g(the)f(new)g(ob)s(ject)g(inherits)i(all)f(of)f(the)g
(other)g(prop)q(erties)h(on)f Fl(paren)o(t)p Fq(.)k(These)d(prop-)120
427 y(erties)e(ha)o(v)o(e)f(the)h(same)f(p)q(ermission)i(bits)f(as)f
(on)h Fl(paren)o(t)p Fq(.)19 b(If)14 b(the)f(`)p Fn(c)p
Fq(')g(p)q(ermissions)i(bit)f(is)g(set,)g(then)120 481
y(the)f(o)o(wner)g(of)f(the)h(prop)q(ert)o(y)g(on)g(the)g(new)g(ob)s
(ject)f(is)i(the)f(same)g(as)f(the)h(o)o(wner)g(of)f(the)h(new)h(ob)s
(ject)120 534 y(itself;)19 b(otherwise,)e(the)g(o)o(wner)g(of)g(the)g
(prop)q(ert)o(y)g(on)g(the)g(new)g(ob)s(ject)g(is)h(the)f(same)g(as)g
(that)f(on)120 588 y Fl(paren)o(t)p Fq(.)j(The)c(initial)h(v)m(alue)g
(of)d(ev)o(ery)i(inherited)h(prop)q(ert)o(y)e(is)g Fl(clear)s
Fq(;)h(see)g(the)f(description)i(of)e(the)120 642 y(built-in)k
(function)e Fn(clear_property\(\))d Fq(for)h(details.)120
711 y(If)g(the)g(in)o(tended)i(o)o(wner)d(of)h(the)g(new)g(ob)s(ject)f
(has)h(a)g(prop)q(ert)o(y)f(named)i(`)p Fn(ownership_quota)p
Fq(')c(and)120 765 y(the)17 b(v)m(alue)i(of)e(that)g(prop)q(ert)o(y)g
(is)h(an)f(in)o(teger,)h(then)f Fn(create\(\))f Fq(treats)h(that)f(v)m
(alue)j(as)e(a)g Fl(quota)p Fq(.)120 819 y(If)e(the)g(quota)e(is)j
(less)f(than)f(or)g(equal)i(to)e(zero,)g(then)h(the)f(quota)g(is)h
(considered)h(to)e(b)q(e)i(exhausted)120 873 y(and)i
Fn(create\(\))g Fq(raises)g Fn(E_QUOTA)f Fq(instead)i(of)f(creating)g
(an)h(ob)s(ject.)28 b(Otherwise,)20 b(the)e(quota)f(is)120
927 y(decremen)o(ted)j(and)g(stored)f(bac)o(k)h(in)o(to)f(the)h(`)p
Fn(ownership_quota)p Fq(')d(prop)q(ert)o(y)i(as)g(a)h(part)f(of)g(the)
120 981 y(creation)c(of)g(the)g(new)h(ob)s(ject.)1725
1077 y(F)l(unction)-1899 b Fg(none)20 b Ff(c)n(hparen)n(t)j
Fh(\()p Fn(obj)15 b Fl(ob)s(ject)p Fn(,)f(obj)h Fl(new-paren)o(t)q
Fh(\))120 1131 y Fq(Changes)g(the)f(paren)o(t)h(of)f
Fl(ob)s(ject)h Fq(to)f(b)q(e)i Fl(new-paren)o(t)p Fq(.)k(If)15
b Fl(ob)s(ject)g Fq(is)g(not)f(v)m(alid,)i(or)f(if)g
Fl(new-paren)o(t)120 1185 y Fq(is)f(neither)g(v)m(alid)h(nor)e(equal)h
(to)f Fn(#-1)p Fq(,)g(then)g Fn(E_INVARG)g Fq(is)g(raised.)20
b(If)14 b(the)f(programmer)f(is)i(neither)120 1239 y(a)f(wizard)h(or)e
(the)i(o)o(wner)e(of)h Fl(ob)s(ject)p Fq(,)g(or)g(if)g
Fl(new-paren)o(t)i Fq(is)e(not)g(fertile)h(\(i.e.,)f(its)h(`)p
Fn(f)p Fq(')e(bit)i(is)g(not)f(set\))120 1293 y(and)j(the)h(programmer)
e(is)i(neither)g(the)f(o)o(wner)g(of)g Fl(new-paren)o(t)h
Fq(nor)f(a)g(wizard,)g(then)h Fn(E_PERM)e Fq(is)120 1347
y(raised.)23 b(If)17 b Fl(new-paren)o(t)g Fq(is)f(equal)h(to)f
Fn(object)f Fq(or)h(one)g(of)g(its)g(curren)o(t)g(ancestors,)g
Fn(E_RECMOVE)e Fq(is)120 1401 y(raised.)27 b(If)18 b
Fl(ob)s(ject)g Fq(or)f(one)h(of)f(its)h(descendan)o(ts)g(de\014nes)h(a)
e(prop)q(ert)o(y)g(with)h(the)g(same)f(name)g(as)120
1455 y(one)e(de\014ned)i(either)f(on)f Fl(new-paren)o(t)h
Fq(or)f(on)g(one)g(of)g(its)g(ancestors,)g(then)g Fn(E_INVARG)f
Fq(is)i(raised.)120 1523 y(Changing)f(an)f(ob)s(ject's)f(paren)o(t)h
(can)g(ha)o(v)o(e)g(the)g(e\013ect)g(of)g(remo)o(ving)g(some)g(prop)q
(erties)h(from)f(and)120 1577 y(adding)g(some)g(other)f(prop)q(erties)i
(to)e(that)g(ob)s(ject)g(and)h(all)g(of)g(its)g(descendan)o(ts)g
(\(i.e.,)f(its)h(c)o(hildren)120 1631 y(and)h(its)g(c)o(hildren's)i(c)o
(hildren,)f(etc.\).)j(Let)d Fl(common)e Fq(b)q(e)i(the)f(nearest)g
(ancestor)f(that)g Fl(ob)s(ject)i Fq(and)120 1685 y Fl(new-paren)o(t)d
Fq(ha)o(v)o(e)f(in)i(common)e(b)q(efore)g(the)h(paren)o(t)f(of)g
Fl(ob)s(ject)h Fq(is)g(c)o(hanged.)19 b(Then)13 b(all)g(prop)q(erties)
120 1739 y(de\014ned)g(b)o(y)f(ancestors)f(of)g Fl(ob)s(ject)h
Fq(under)g Fl(common)g Fq(\(that)e(is,)j(those)e(ancestors)g(of)g
Fl(ob)s(ject)h Fq(that)f(are)120 1793 y(in)i(turn)e(descendan)o(ts)i
(of)e Fl(common)p Fq(\))g(are)h(remo)o(v)o(ed)f(from)g
Fl(ob)s(ject)h Fq(and)g(all)h(of)e(its)h(descendan)o(ts.)20
b(All)120 1847 y(prop)q(erties)e(de\014ned)g(b)o(y)g
Fl(new-paren)o(t)g Fq(or)f(its)g(ancestors)g(under)g
Fl(common)g Fq(are)g(added)h(to)f Fl(ob)s(ject)120 1901
y Fq(and)c(all)h(of)e(its)h(descendan)o(ts.)20 b(As)12
b(with)i Fn(create\(\))p Fq(,)d(the)i(newly-added)i(prop)q(erties)e
(are)g(giv)o(en)g(the)120 1955 y(same)h(p)q(ermission)i(bits)f(as)f
(they)h(ha)o(v)o(e)f(on)g Fl(new-paren)o(t)p Fq(,)h(the)f(o)o(wner)g
(of)h(eac)o(h)f(added)h(prop)q(ert)o(y)f(is)120 2009
y(either)e(the)g(o)o(wner)f(of)g(the)h(ob)s(ject)f(it's)g(added)h(to)f
(\(if)h(the)f(`)p Fn(c)p Fq(')g(p)q(ermissions)i(bit)f(is)g(set\))f(or)
g(the)g(o)o(wner)120 2063 y(of)k(that)f(prop)q(ert)o(y)h(on)f
Fl(new-paren)o(t)p Fq(,)h(and)g(the)g(v)m(alue)i(of)d(eac)o(h)h(added)h
(prop)q(ert)o(y)f(is)g Fl(clear)s Fq(;)h(see)f(the)120
2117 y(description)i(of)f(the)g(built-in)i(function)f
Fn(clear_property\(\))c Fq(for)i(details.)23 b(All)17
b(prop)q(erties)g(that)120 2171 y(are)e(not)g(remo)o(v)o(ed)f(or)h
(added)h(in)g(the)f(reparen)o(ting)h(pro)q(cess)f(are)g(completely)h
(unc)o(hanged.)120 2240 y(If)h Fl(new-paren)o(t)g Fq(is)g(equal)g(to)f
Fn(#-1)p Fq(,)f(then)i Fl(ob)s(ject)g Fq(is)g(giv)o(en)g(no)f(paren)o
(t)g(at)g(all;)h(it)g(b)q(ecomes)g(a)f(new)120 2294 y(ro)q(ot)i(of)h
(the)g(paren)o(t/c)o(hild)i(hierarc)o(h)o(y)l(.)32 b(In)20
b(this)f(case,)h(all)g(formerly)f(inherited)i(prop)q(erties)f(on)120
2348 y Fl(ob)s(ject)c Fq(are)e(simply)j(remo)o(v)o(ed.)1725
2444 y(F)l(unction)-1899 b Fg(int)20 b Ff(v)m(alid)k
Fh(\()p Fn(obj)14 b Fl(ob)s(ject)q Fh(\))120 2497 y Fq(Returns)j(a)e
(non-zero)i(in)o(teger)f(\(i.e.,)g(a)g(true)g(v)m(alue\))h(if)f
Fl(ob)s(ject)h Fq(is)g(a)e(v)m(alid)j(ob)s(ject)e(\(one)g(that)f(has)
120 2551 y(b)q(een)h(created)g(and)f(not)g(y)o(et)f(recycled\))j(and)e
(zero)g(\(i.e.,)g(a)g(false)g(v)m(alue\))h(otherwise.)240
2618 y Fn(valid\(#0\))551 2615 y Fo(\))670 2618 y Fn(1)240
2670 y(valid\(#-1\))551 2667 y Fo(\))670 2670 y Fn(0)p
eop
%%Page: 50 52
50 51 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(50)1725 183 y(F)l(unction)-1899 b Fg(obj)20
b Ff(paren)n(t)i Fh(\()p Fn(obj)15 b Fl(ob)s(ject)q Fh(\))1725
237 y Fq(F)l(unction)-1899 b Fg(list)20 b Ff(c)n(hildren)k
Fh(\()p Fn(obj)15 b Fl(ob)s(ject)q Fh(\))120 291 y Fq(These)i
(functions)g(return)g(the)g(paren)o(t)f(and)h(a)f(list)h(of)f(the)h(c)o
(hildren)i(of)d Fl(ob)s(ject)p Fq(,)g(resp)q(ectiv)o(ely)l(.)26
b(If)120 345 y Fl(ob)s(ject)16 b Fq(is)f(not)g(v)m(alid,)i(then)e
Fn(E_INVARG)f Fq(is)i(raised.)1725 442 y(F)l(unction)-1899
b Fg(none)20 b Ff(recycle)25 b Fh(\()p Fn(obj)14 b Fl(ob)s(ject)q
Fh(\))120 495 y Fq(The)g(giv)o(en)g Fl(ob)s(ject)g Fq(is)g(destro)o(y)o
(ed,)f(irrev)o(o)q(cably)l(.)20 b(The)14 b(programmer)e(m)o(ust)h
(either)h(o)o(wn)g Fl(ob)s(ject)f Fq(or)120 549 y(b)q(e)g(a)g(wizard;)g
(otherwise,)g Fn(E_PERM)f Fq(is)h(raised.)20 b(If)12
b Fl(ob)s(ject)h Fq(is)h(not)e(v)m(alid,)i(then)f Fn(E_INVARG)f
Fq(is)h(raised.)120 603 y(The)g(c)o(hildren)i(of)d Fl(ob)s(ject)h
Fq(are)g(reparen)o(ted)f(to)h(the)f(paren)o(t)h(of)f
Fl(ob)s(ject)p Fq(.)19 b(Before)12 b Fl(ob)s(ject)i Fq(is)f(recycled,)
120 657 y(eac)o(h)h(ob)s(ject)g(in)h(its)g(con)o(ten)o(ts)f(is)g(mo)o
(v)o(ed)g(to)g Fn(#-1)g Fq(\(implying)i(a)e(call)h(to)f
Fl(ob)s(ject)q Fq('s)f Fn(exitfunc)g Fq(v)o(erb,)120
711 y(if)j(an)o(y\))e(and)i(then)f Fl(ob)s(ject)q Fq('s)f(`)p
Fn(recycle)p Fq(')g(v)o(erb,)h(if)g(an)o(y)l(,)g(is)h(called)g(with)g
(no)f(argumen)o(ts.)120 780 y(After)23 b Fl(ob)s(ject)h
Fq(is)g(recycled,)i(if)e(the)g(o)o(wner)e(of)h(the)h(former)f(ob)s
(ject)f(has)i(a)f(prop)q(ert)o(y)g(named)120 834 y(`)p
Fn(ownership_quota)p Fq(')12 b(and)j(the)g(v)m(alue)i(of)d(that)g(prop)
q(ert)o(y)h(is)g(a)g(in)o(teger,)g(then)g Fn(recycle\(\))f
Fq(treats)120 888 y(that)23 b(v)m(alue)i(as)f(a)f Fl(quota)h
Fq(and)g(incremen)o(ts)g(it)h(b)o(y)e(one,)j(storing)e(the)g(result)g
(bac)o(k)g(in)o(to)g(the)120 942 y(`)p Fn(ownership_quota)p
Fq(')12 b(prop)q(ert)o(y)l(.)1725 1039 y(F)l(unction)-1899
b Fg(int)20 b Ff(ob)s(ject)p 256 1039 18 3 v 20 w(b)n(ytes)k
Fh(\()p Fn(obj)14 b Fl(ob)s(ject)q Fh(\))120 1093 y Fq(Returns)g(the)g
(n)o(um)o(b)q(er)g(of)f(b)o(ytes)g(of)g(the)h(serv)o(er's)f(memory)g
(required)h(to)f(store)g(the)h(giv)o(en)g Fl(ob)s(ject)p
Fq(,)120 1146 y(including)h(the)e(space)g(used)g(b)o(y)g(the)f(v)m
(alues)i(of)e(all)i(of)e(its)g(non-clear)i(prop)q(erties)f(and)g(b)o(y)
f(the)h(v)o(erbs)120 1200 y(and)i(prop)q(erties)h(de\014ned)g(directly)
g(on)f(the)g(ob)s(ject.)k(Raised)d Fn(E_INVARG)e Fq(if)h
Fl(ob)s(ject)h Fq(is)f(not)g(a)f(v)m(alid)120 1254 y(ob)s(ject)h(and)g
Fn(E_PERM)f Fq(if)i(the)f(programmer)f(is)i(not)f(a)g(wizard.)1725
1351 y(F)l(unction)-1899 b Fg(obj)20 b Ff(max)p 208 1351
V 19 w(ob)s(ject)j Fh(\(\))120 1405 y Fq(Returns)e(the)f(largest)g(ob)s
(ject)f(n)o(um)o(b)q(er)i(y)o(et)e(assigned)i(to)f(a)f(created)i(ob)s
(ject.)34 b(Note)19 b(that)h(the)120 1459 y(ob)s(ject)f(with)g(this)h
(n)o(um)o(b)q(er)f(ma)o(y)g(no)g(longer)h(exist;)h(it)e(ma)o(y)g(ha)o
(v)o(e)g(b)q(een)h(recycled.)33 b(The)20 b(next)120 1513
y(ob)s(ject)e(created)g(will)i(b)q(e)f(assigned)g(the)f(ob)s(ject)g(n)o
(um)o(b)q(er)g(one)h(larger)f(than)g(the)g(v)m(alue)i(of)e
Fn(max_)120 1567 y(object\(\))p Fq(.)0 1716 y Fj(4.4.3.2)30
b(Ob)s(ject)15 b(Mo)n(v)n(emen)n(t)1725 1842 y Fq(F)l(unction)-1899
b Fg(none)20 b Ff(mo)n(v)n(e)i Fh(\()p Fn(obj)15 b Fl(what)p
Fn(,)f(obj)h Fl(where)s Fh(\))120 1896 y Fq(Changes)h
Fl(what)q Fq('s)f(lo)q(cation)h(to)g(b)q(e)g Fl(where)p
Fq(.)22 b(This)17 b(is)f(a)g(complex)h(pro)q(cess)f(b)q(ecause)h(a)e(n)
o(um)o(b)q(er)h(of)120 1950 y(p)q(ermissions)i(c)o(hec)o(ks)f(and)h
(noti\014cations)f(m)o(ust)g(b)q(e)g(p)q(erformed.)26
b(The)17 b(actual)g(mo)o(v)o(emen)o(t)f(tak)o(es)120
2004 y(place)g(as)f(describ)q(ed)i(in)f(the)f(follo)o(wing)h
(paragraphs.)120 2073 y Fl(what)11 b Fq(should)h(b)q(e)f(a)g(v)m(alid)h
(ob)s(ject)f(and)g Fl(where)i Fq(should)f(b)q(e)f(either)h(a)e(v)m
(alid)j(ob)s(ject)d(or)g Fn(#-1)h Fq(\(denoting)120 2126
y(a)h(lo)q(cation)h(of)g(`no)o(where'\);)e(otherwise)i
Fn(E_INVARG)f Fq(is)h(raised.)19 b(The)13 b(programmer)e(m)o(ust)h(b)q
(e)h(either)120 2180 y(the)i(o)o(wner)g(of)g Fl(what)g
Fq(or)g(a)g(wizard;)g(otherwise,)g Fn(E_PERM)g Fq(is)g(raised.)120
2249 y(If)g Fl(where)j Fq(is)e(a)f(v)m(alid)i(ob)s(ject,)d(then)i(the)f
(v)o(erb-call)240 2316 y Fl(where)s Fn(:accept\()p Fl(what)q
Fn(\))120 2385 y Fq(is)j(p)q(erformed)h(b)q(efore)f(an)o(y)g(mo)o(v)o
(emen)o(t)e(tak)o(es)i(place.)29 b(If)18 b(the)g(v)o(erb)g(returns)g(a)
f(false)i(v)m(alue)g(and)120 2439 y(the)d(programmer)e(is)i(not)f(a)g
(wizard,)h(then)g Fl(where)i Fq(is)e(considered)h(to)e(ha)o(v)o(e)g
(refused)h(en)o(trance)g(to)120 2493 y Fl(what)q Fq(;)c
Fn(move\(\))g Fq(raises)g Fn(E_NACC)p Fq(.)18 b(If)12
b Fl(where)j Fq(do)q(es)e(not)f(de\014ne)h(an)f Fn(accept)f
Fq(v)o(erb,)i(then)f(it)h(is)f(treated)120 2547 y(as)j(if)g(it)h
(de\014ned)g(one)g(that)e(alw)o(a)o(ys)h(returned)g(false.)120
2616 y(If)e(mo)o(ving)g Fl(what)g Fq(in)o(to)g Fl(where)j
Fq(w)o(ould)d(create)g(a)g(lo)q(op)g(in)h(the)f(con)o(tainmen)o(t)g
(hierarc)o(h)o(y)g(\(i.e.,)g Fl(what)120 2670 y Fq(w)o(ould)j(con)o
(tain)f(itself,)h(ev)o(en)f(indirectly\),)i(then)e Fn(E_RECMOVE)f
Fq(is)i(raised)g(instead.)p eop
%%Page: 51 53
51 52 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(51)120 183 y(The)12 b(`)p Fn(location)p
Fq(')d(prop)q(ert)o(y)j(of)f Fl(what)h Fq(is)g(c)o(hanged)g(to)f(b)q(e)
h Fl(where)p Fq(,)g(and)g(the)g(`)p Fn(contents)p Fq(')d(prop)q(erties)
120 237 y(of)14 b(the)g(old)g(and)g(new)h(lo)q(cations)f(are)g(mo)q
(di\014ed)h(appropriately)l(.)21 b(Let)14 b Fl(old-where)j
Fq(b)q(e)e(the)f(lo)q(cation)120 291 y(of)h Fl(what)g
Fq(b)q(efore)h(it)f(w)o(as)g(mo)o(v)o(ed.)k(If)d Fl(old-where)i
Fq(is)e(a)f(v)m(alid)i(ob)s(ject,)d(then)h(the)h(v)o(erb-call)240
358 y Fl(old-where)s Fn(:exitfunc\()p Fl(what)q Fn(\))120
426 y Fq(is)g(p)q(erformed)h(and)f(its)g(result)g(is)h(ignored;)f(it)g
(is)h(not)e(an)h(error)f(if)i Fl(old-where)i Fq(do)q(es)e(not)e
(de\014ne)i(a)120 480 y(v)o(erb)g(named)g(`)p Fn(exitfunc)p
Fq('.)22 b(Finally)l(,)d(if)e Fl(where)j Fq(and)c Fl(what)i
Fq(are)e(still)i(v)m(alid)h(ob)s(jects,)d(and)h Fl(where)120
534 y Fq(is)f(still)g(the)g(lo)q(cation)g(of)e Fl(what)p
Fq(,)h(then)g(the)g(v)o(erb-call)240 600 y Fl(where)s
Fn(:enterfunc\()p Fl(what)q Fn(\))120 669 y Fq(is)g(p)q(erformed)g(and)
g(its)g(result)g(is)h(ignored;)f(again,)f(it)h(is)g(not)g(an)g(error)f
(if)h Fl(where)i Fq(do)q(es)e(not)g(de\014ne)120 723
y(a)g(v)o(erb)g(named)g(`)p Fn(enterfunc)p Fq('.)0 870
y Fj(4.4.3.3)30 b(Op)r(erations)14 b(on)h(Prop)r(erties)1725
995 y Fq(F)l(unction)-1899 b Fg(list)20 b Ff(prop)r(erties)i
Fh(\()p Fn(obj)14 b Fl(ob)s(ject)q Fh(\))120 1049 y Fq(Returns)22
b(a)g(list)h(of)e(the)h(names)g(of)f(the)h(prop)q(erties)h(de\014ned)g
(directly)g(on)f(the)g(giv)o(en)g Fl(ob)s(ject)p Fq(,)120
1103 y(not)c(inherited)i(from)e(its)g(paren)o(t.)29 b(If)18
b Fl(ob)s(ject)h Fq(is)g(not)f(v)m(alid,)i(then)f Fn(E_INVARG)e
Fq(is)i(raised.)29 b(If)19 b(the)120 1157 y(programmer)14
b(do)q(es)h(not)g(ha)o(v)o(e)g(read)g(p)q(ermission)i(on)e
Fl(ob)s(ject)p Fq(,)f(then)i Fn(E_PERM)e Fq(is)i(raised.)1725
1252 y(F)l(unction)-1899 b Fg(list)20 b Ff(prop)r(ert)n(y)p
346 1252 18 3 v 20 w(info)i Fh(\()p Fn(obj)15 b Fl(ob)s(ject)p
Fn(,)f(str)h Fl(prop-name)s Fh(\))1725 1306 y Fq(F)l(unction)-1899
b Fg(none)20 b Ff(set)p 198 1306 V 20 w(prop)r(ert)n(y)p
437 1306 V 20 w(info)j Fh(\()p Fn(obj)14 b Fl(ob)s(ject)p
Fn(,)h(str)g Fl(prop-name)p Fn(,)g(list)f Fl(info)r Fh(\))120
1360 y Fq(These)k(t)o(w)o(o)e(functions)j(get)e(and)g(set)h(\(resp)q
(ectiv)o(ely\))g(the)g(o)o(wner)f(and)h(p)q(ermission)h(bits)f(for)f
(the)120 1414 y(prop)q(ert)o(y)e(named)h Fl(prop-name)i
Fq(on)e(the)f(giv)o(en)h Fl(ob)s(ject)p Fq(.)21 b(If)15
b Fl(ob)s(ject)h Fq(is)g(not)f(v)m(alid,)i(then)f Fn(E_INVARG)120
1468 y Fq(is)21 b(raised.)36 b(If)21 b Fl(ob)s(ject)g
Fq(has)f(no)h(non-built-in)i(prop)q(ert)o(y)d(named)h
Fl(prop-name)p Fq(,)g(then)g Fn(E_PROPNF)120 1522 y Fq(is)e(raised.)31
b(If)19 b(the)g(programmer)f(do)q(es)h(not)f(ha)o(v)o(e)h(read)f
(\(write\))h(p)q(ermission)h(on)e(the)h(prop)q(ert)o(y)120
1576 y(in)e(question,)f(then)g Fn(property_info\(\))e
Fq(\()p Fn(set_property_info\(\))p Fq(\))f(raises)j Fn(E_PERM)p
Fq(.)21 b(Prop)q(ert)o(y)120 1630 y(info)16 b(has)f(the)g(follo)o(wing)
h(form:)240 1697 y Fn({)p Fl(o)o(wner)p Fn(,)23 b Fl(p)q(erms)j
Fn([,)e Fl(new-name)s Fn(]})120 1765 y Fq(where)14 b
Fl(o)o(wner)i Fq(is)f(an)e(ob)s(ject,)g Fl(p)q(erms)j
Fq(is)e(a)g(string)f(con)o(taining)i(only)f(c)o(haracters)f(from)g(the)
h(set)f(`)p Fn(r)p Fq(',)120 1819 y(`)p Fn(w)p Fq(',)k(and)g(`)p
Fn(c)p Fq(',)g(and)h Fl(new-name)j Fq(is)d(a)f(string;)h
Fl(new-name)j Fq(is)d(nev)o(er)f(part)g(of)g(the)h(v)m(alue)h(returned)
120 1873 y(b)o(y)d Fn(property_info\(\))p Fq(,)e(but)i(it)g(ma)o(y)f
(optionally)i(b)q(e)g(giv)o(en)f(as)g(part)f(of)h(the)g(v)m(alue)h(pro)
o(vided)g(to)120 1927 y Fn(set_property_info\(\))p Fq(.)28
b(This)19 b(list)h(is)f(the)g(kind)h(of)e(v)m(alue)i(returned)f(b)o(y)g
Fn(property_info\(\))120 1981 y Fq(and)11 b(exp)q(ected)h(as)f(the)g
(third)g(argumen)o(t)g(to)f Fn(set_property_info\(\))p
Fq(;)f(the)i(latter)g(function)h(raises)120 2035 y Fn(E_INVARG)i
Fq(if)h Fl(o)o(wner)i Fq(is)e(not)g(v)m(alid,)h(if)f
Fl(p)q(erms)i Fq(con)o(tains)e(an)o(y)f(illegal)j(c)o(haracters,)c(or,)
h(when)i Fl(new-)120 2089 y(name)k Fq(is)d(giv)o(en,)h(if)g
Fl(prop-name)h Fq(is)f(not)f(de\014ned)h(directly)h(on)e
Fl(ob)s(ject)g Fq(or)g Fl(new-name)j Fq(names)d(an)120
2143 y(existing)f(prop)q(ert)o(y)f(de\014ned)i(on)e Fl(ob)s(ject)g
Fq(or)g(an)o(y)g(of)g(its)g(ancestors)g(or)f(descendan)o(ts.)1725
2238 y(F)l(unction)-1899 b Fg(none)20 b Ff(add)p 219
2238 V 20 w(prop)r(ert)n(y)i Fh(\()p Fn(obj)14 b Fl(ob)s(ject)p
Fn(,)h(str)f Fl(prop-name)p Fn(,)i Fl(v)m(alue)p Fn(,)g(list)f
Fl(info)r Fh(\))120 2292 y Fq(De\014nes)20 b(a)f(new)h(prop)q(ert)o(y)f
(on)g(the)h(giv)o(en)g Fl(ob)s(ject)p Fq(,)f(inherited)j(b)o(y)d(all)h
(of)f(its)h(descendan)o(ts;)i(the)120 2346 y(prop)q(ert)o(y)16
b(is)h(named)g Fl(prop-name)p Fq(,)g(its)g(initial)h(v)m(alue)g(is)f
Fl(v)m(alue)p Fq(,)h(and)f(its)g(o)o(wner)f(and)h(initial)h(p)q(er-)120
2400 y(mission)e(bits)f(are)g(giv)o(en)g(b)o(y)g Fl(info)j
Fq(in)e(the)f(same)f(format)g(as)h(is)g(returned)h(b)o(y)e
Fn(property_info\(\))p Fq(,)120 2454 y(describ)q(ed)23
b(ab)q(o)o(v)o(e.)39 b(If)21 b Fl(ob)s(ject)h Fq(is)g(not)f(v)m(alid)j
(or)d Fl(info)j Fq(do)q(es)e(not)f(sp)q(ecify)h(a)g(v)m(alid)h(o)o
(wner)e(and)120 2508 y(w)o(ell-formed)16 b(p)q(ermission)h(bits)e(or)g
Fl(ob)s(ject)g Fq(or)g(its)g(ancestors)g(or)f(descendan)o(ts)i(already)
f(de\014nes)h(a)120 2562 y(prop)q(ert)o(y)d(named)g Fl(prop-name)p
Fq(,)h(then)f Fn(E_INVARG)g Fq(is)g(raised.)20 b(If)14
b(the)f(programmer)f(do)q(es)h(not)g(ha)o(v)o(e)120 2616
y(write)h(p)q(ermission)i(on)e Fl(ob)s(ject)g Fq(or)g(if)g(the)g(o)o
(wner)g(sp)q(eci\014ed)i(b)o(y)e Fl(info)j Fq(is)d(not)g(the)g
(programmer)f(and)120 2670 y(the)i(programmer)f(is)i(not)f(a)g(wizard,)
g(then)g Fn(E_PERM)g Fq(is)g(raised.)p eop
%%Page: 52 54
52 53 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(52)1725 183 y(F)l(unction)-1899 b Fg(none)20
b Ff(delete)p 274 183 18 3 v 22 w(prop)r(ert)n(y)i Fh(\()p
Fn(obj)14 b Fl(ob)s(ject)p Fn(,)h(str)g Fl(prop-name)s
Fh(\))120 237 y Fq(Remo)o(v)o(es)i(the)g(prop)q(ert)o(y)g(named)h
Fl(prop-name)i Fq(from)c(the)i(giv)o(en)f Fl(ob)s(ject)h
Fq(and)f(all)i(of)d(its)i(descen-)120 291 y(dan)o(ts.)33
b(If)20 b Fl(ob)s(ject)g Fq(is)g(not)f(v)m(alid,)k(then)d
Fn(E_INVARG)e Fq(is)i(raised.)34 b(If)20 b(the)g(programmer)e(do)q(es)i
(not)120 345 y(ha)o(v)o(e)g(write)g(p)q(ermission)h(on)f
Fl(ob)s(ject)p Fq(,)h(then)f Fn(E_PERM)f Fq(is)i(raised.)35
b(If)20 b Fl(ob)s(ject)h Fq(do)q(es)f(not)g(directly)120
399 y(de\014ne)h(a)e(prop)q(ert)o(y)h(named)g Fl(prop-name)i
Fq(\(as)d(opp)q(osed)h(to)g(inheriting)h(one)f(from)f(its)h(paren)o
(t\),)120 453 y(then)c Fn(E_PROPNF)e Fq(is)h(raised.)1725
551 y(F)l(unction)-1899 b Fg(int)20 b Ff(is)p 139 551
V 21 w(clear)p 278 551 V 21 w(prop)r(ert)n(y)i Fh(\()p
Fn(obj)15 b Fl(ob)s(ject)p Fn(,)f(str)h Fl(prop-name)s
Fh(\))1725 605 y Fq(F)l(unction)-1899 b Fg(none)20 b
Ff(clear)p 245 605 V 21 w(prop)r(ert)n(y)i Fh(\()p Fn(obj)15
b Fl(ob)s(ject)p Fn(,)f(str)h Fl(prop-name)s Fh(\))120
659 y Fq(These)k(t)o(w)o(o)e(functions)i(test)e(for)h(clear)h(and)f
(set)g(to)g(clear,)h(resp)q(ectiv)o(ely)l(,)h(the)f(prop)q(ert)o(y)f
(named)120 713 y Fl(prop-name)23 b Fq(on)e(the)f(giv)o(en)h
Fl(ob)s(ject)p Fq(.)35 b(If)21 b Fl(ob)s(ject)g Fq(is)g(not)f(v)m
(alid,)j(then)e Fn(E_INVARG)e Fq(is)i(raised.)37 b(If)120
767 y Fl(ob)s(ject)15 b Fq(has)f(no)h(non-built-in)i(prop)q(ert)o(y)d
(named)h Fl(prop-name)p Fq(,)f(then)h Fn(E_PROPNF)e Fq(is)i(raised.)20
b(If)15 b(the)120 821 y(programmer)h(do)q(es)h(not)g(ha)o(v)o(e)f(read)
h(\(write\))g(p)q(ermission)h(on)f(the)g(prop)q(ert)o(y)g(in)h
(question,)g(then)120 875 y Fn(is_clear_property\(\))11
b Fq(\()p Fn(clear_property\(\))p Fq(\))f(raises)j Fn(E_PERM)p
Fq(.)19 b(If)13 b(a)g(prop)q(ert)o(y)g(is)h(clear,)g(then)120
929 y(when)19 b(the)g(v)m(alue)h(of)e(that)g(prop)q(ert)o(y)h(is)g
(queried)h(the)f(v)m(alue)h(of)e(the)h(paren)o(t's)f(prop)q(ert)o(y)h
(of)f(the)120 983 y(same)h(name)g(is)h(returned.)33 b(If)20
b(the)f(paren)o(t's)g(prop)q(ert)o(y)g(is)h(clear,)g(then)g(the)f
(paren)o(t's)g(paren)o(t's)120 1037 y(v)m(alue)g(is)g(examined,)h(and)e
(so)g(on.)29 b(If)18 b Fl(ob)s(ject)h Fq(is)f(the)h(de\014ner)g(of)e
(the)i(prop)q(ert)o(y)f Fl(prop-name)p Fq(,)g(as)120
1091 y(opp)q(osed)e(to)e(an)h(inheritor)i(of)d(the)i(prop)q(ert)o(y)l
(,)e(then)i Fn(clear_property\(\))d Fq(raises)i Fn(E_INVARG)p
Fq(.)0 1246 y Fj(4.4.3.4)30 b(Op)r(erations)14 b(on)h(V)-5
b(erbs)1725 1373 y Fq(F)l(unction)-1899 b Fg(list)20
b Ff(v)n(erbs)i Fh(\()p Fn(obj)15 b Fl(ob)s(ject)q Fh(\))120
1427 y Fq(Returns)f(a)g(list)g(of)f(the)h(names)g(of)f(the)g(v)o(erbs)h
(de\014ned)h(directly)g(on)f(the)f(giv)o(en)h Fl(ob)s(ject)p
Fq(,)f(not)h(inher-)120 1481 y(ited)h(from)e(its)h(paren)o(t.)19
b(If)14 b Fl(ob)s(ject)h Fq(is)f(not)g(v)m(alid,)h(then)g
Fn(E_INVARG)d Fq(is)j(raised.)20 b(If)14 b(the)g(programmer)120
1535 y(do)q(es)i(not)e(ha)o(v)o(e)h(read)g(p)q(ermission)i(on)e
Fl(ob)s(ject)p Fq(,)f(then)i Fn(E_PERM)e Fq(is)i(raised.)62
1633 y(Most)c(of)g(the)h(remaining)g(op)q(erations)g(on)f(v)o(erbs)h
(accept)g(a)f(string)g(con)o(taining)i(the)e(v)o(erb's)g(name)h(to)f
(iden)o(tify)0 1687 y(the)21 b(v)o(erb)f(in)h(question.)37
b(Because)21 b(v)o(erbs)f(can)h(ha)o(v)o(e)f(m)o(ultiple)j(names)d(and)
h(b)q(ecause)g(an)g(ob)s(ject)f(can)g(ha)o(v)o(e)0 1741
y(m)o(ultiple)e(v)o(erbs)e(with)h(the)f(same)g(name,)g(this)h(practice)
f(can)h(lead)g(to)e(di\016culties.)25 b(T)l(o)16 b(most)g(unam)o
(biguously)0 1795 y(refer)h(to)f(a)h(particular)g(v)o(erb,)g(one)g(can)
g(instead)g(use)h(a)e(p)q(ositiv)o(e)i(in)o(teger,)f(the)g(index)h(of)f
(the)g(v)o(erb)f(in)i(the)f(list)0 1849 y(returned)f(b)o(y)f
Fn(verbs\(\))p Fq(,)f(describ)q(ed)j(ab)q(o)o(v)o(e.)62
1919 y(F)l(or)e(example,)g(supp)q(ose)h(that)f Fn(verbs\(#34\))f
Fq(returns)h(this)g(list:)120 1987 y Fn({"foo",)23 b("bar",)g("baz",)g
("foo"})0 2057 y Fq(Ob)s(ject)18 b Fn(#34)g Fq(has)g(t)o(w)o(o)f(v)o
(erbs)h(named)h(`)p Fn(foo)p Fq(')e(de\014ned)j(on)e(it)g(\(this)h(ma)o
(y)e(not)h(b)q(e)h(an)f(error,)g(if)h(the)f(t)o(w)o(o)f(v)o(erbs)0
2111 y(ha)o(v)o(e)d(di\013eren)o(t)g(command)f(syn)o(taxes\).)19
b(T)l(o)14 b(refer)f(unam)o(biguously)i(to)f(the)g(\014rst)f(one)h(in)h
(the)f(list,)h(one)f(uses)g(the)0 2165 y(in)o(teger)h(1;)g(to)f(refer)h
(to)g(the)g(other)g(one,)g(one)g(uses)h(4.)62 2235 y(In)i(the)e
(function)i(descriptions)g(b)q(elo)o(w,)f(an)g(argumen)o(t)f(named)h
Fl(v)o(erb-desc)j Fq(is)d(either)g(a)g(string)f(con)o(taining)0
2289 y(the)h(name)g(of)f(a)h(v)o(erb)g(or)f(else)i(a)f(p)q(ositiv)o(e)h
(in)o(teger)f(giving)h(the)f(index)h(of)f(that)f(v)o(erb)h(in)g(its)h
(de\014ning)g(ob)s(ject's)0 2343 y Fn(verbs\(\))c Fq(list.)120
2411 y(F)l(or)24 b(historical)j(reasons,)f(there)f(is)h(also)f(a)g
(second,)i(inferior)f(mec)o(hanism)g(for)e(referring)i(to)120
2462 y(v)o(erbs)21 b(with)g(n)o(um)o(b)q(ers,)h(but)e(its)h(use)g(is)h
(strongly)e(discouraged.)37 b(If)21 b(the)g(prop)q(ert)o(y)f
Fn($server_)120 2514 y(options.support_numeric_ve)o(rbname_)o(strings)e
Fq(exists)j(with)h(a)f(true)g(v)m(alue,)j(then)d(func-)120
2566 y(tions)c(on)h(v)o(erbs)f(will)i(also)e(accept)h(a)f(n)o(umeric)h
(string)f(\(e.g.,)f Fn("4")p Fq(\))h(as)g(a)g(v)o(erb)g(descriptor.)27
b(The)120 2618 y(decimal)c(in)o(teger)e(in)h(the)f(string)g(w)o(orks)g
(more-or-less)g(lik)o(e)h(the)g(p)q(ositiv)o(e)g(in)o(tegers)f(describ)
q(ed)120 2670 y(ab)q(o)o(v)o(e,)14 b(but)i(with)f(t)o(w)o(o)f
(signi\014can)o(t)i(di\013erences:)p eop
%%Page: 53 55
53 54 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(53)145 183 y(1.)29 b(The)15 b(n)o(umeric)h(string)f(is)
g(a)g Fl(zero-based)i Fq(index)f(in)o(to)f Fn(verbs\(\))p
Fq(;)e(that)i(is,)g(in)g(the)g(string)g(case,)210 235
y(y)o(ou)d(w)o(ould)h(use)g(the)g(n)o(um)o(b)q(er)g(one)f(less)i(than)e
(what)g(y)o(ou)g(w)o(ould)h(use)g(in)h(the)e(p)q(ositiv)o(e)i(in)o
(teger)210 287 y(case.)145 352 y(2.)29 b(When)21 b(there)g(exists)g(a)g
(v)o(erb)f(whose)h(actual)g(name)g(lo)q(oks)g(lik)o(e)h(a)e(decimal)j
(in)o(teger,)f(this)210 404 y(n)o(umeric-string)17 b(notation)e(is)h
(am)o(biguous;)g(the)g(serv)o(er)f(will)i(in)g(all)g(cases)e(assume)h
(that)f(the)210 456 y(reference)g(is)f(to)g(the)g(\014rst)g(v)o(erb)g
(in)h(the)f(list)h(for)f(whic)o(h)h(the)f(giv)o(en)g(string)h(could)g
(b)q(e)g(a)e(name,)210 508 y(either)j(in)g(the)f(normal)g(sense)h(or)f
(as)g(a)f(n)o(umeric)j(index.)120 588 y(Clearly)l(,)f(this)h(older)f
(mec)o(hanism)g(is)g(more)g(di\016cult)h(and)f(risky)g(to)f(use;)h(new)
f(co)q(de)i(should)f(only)120 640 y(b)q(e)i(written)g(to)g(use)g(the)g
(curren)o(t)f(mec)o(hanism,)i(and)f(old)g(co)q(de)h(using)f(n)o(umeric)
h(strings)f(should)120 691 y(b)q(e)e(mo)q(di\014ed)g(not)f(to)g(do)g
(so.)1725 787 y(F)l(unction)-1899 b Fg(list)20 b Ff(v)n(erb)p
237 787 18 3 v 21 w(info)i Fh(\()p Fn(obj)15 b Fl(ob)s(ject)p
Fn(,)f(str)h Fl(v)o(erb-desc)s Fh(\))1725 841 y Fq(F)l(unction)-1899
b Fg(none)20 b Ff(set)p 198 841 V 20 w(v)n(erb)p 328
841 V 21 w(info)j Fh(\()p Fn(obj)14 b Fl(ob)s(ject)p
Fn(,)h(str)g Fl(v)o(erb-desc)p Fn(,)g(list)g Fl(info)r
Fh(\))120 894 y Fq(These)f(t)o(w)o(o)e(functions)i(get)f(and)h(set)f
(\(resp)q(ectiv)o(ely\))h(the)g(o)o(wner,)e(p)q(ermission)j(bits,)f
(and)g(name\(s\))120 948 y(for)i(the)g(v)o(erb)g(as)g(sp)q(eci\014ed)i
(b)o(y)f Fl(v)o(erb-desc)i Fq(on)d(the)h(giv)o(en)g Fl(ob)s(ject)p
Fq(.)22 b(If)17 b Fl(ob)s(ject)f Fq(is)h(not)f(v)m(alid,)i(then)120
1002 y Fn(E_INVARG)g Fq(is)i(raised.)33 b(If)20 b Fl(ob)s(ject)f
Fq(do)q(es)h(not)f(de\014ne)i(a)e(v)o(erb)g(as)g(sp)q(eci\014ed)j(b)o
(y)d Fl(v)o(erb-desc)p Fq(,)i(then)120 1056 y Fn(E_VERBNF)16
b Fq(is)i(raised.)27 b(If)18 b(the)f(programmer)g(do)q(es)g(not)g(ha)o
(v)o(e)g(read)h(\(write\))f(p)q(ermission)i(on)e(the)120
1110 y(v)o(erb)f(in)g(question,)h(then)f Fn(verb_info\(\))e
Fq(\()p Fn(set_verb_info\(\))p Fq(\))f(raises)j Fn(E_PERM)p
Fq(.)21 b(V)l(erb)c(info)f(has)120 1164 y(the)f(follo)o(wing)h(form:)
240 1231 y Fn({)p Fl(o)o(wner)p Fn(,)23 b Fl(p)q(erms)p
Fn(,)h Fl(names)r Fn(})120 1299 y Fq(where)14 b Fl(o)o(wner)i
Fq(is)f(an)e(ob)s(ject,)g Fl(p)q(erms)j Fq(is)e(a)g(string)f(con)o
(taining)i(only)f(c)o(haracters)f(from)g(the)h(set)f(`)p
Fn(r)p Fq(',)120 1353 y(`)p Fn(w)p Fq(',)18 b(`)p Fn(x)p
Fq(',)g(and)h(`)p Fn(d)p Fq(',)f(and)g Fl(names)j Fq(is)e(a)f(string.)
29 b(This)20 b(is)f(the)f(kind)i(of)e(v)m(alue)h(returned)g(b)o(y)g
Fn(verb_)120 1407 y(info\(\))d Fq(and)h(exp)q(ected)h(as)f(the)g(third)
g(argumen)o(t)f(to)g Fn(set_verb_info\(\))p Fq(.)23 b
Fn(set_verb_info\(\))120 1461 y Fq(raises)d Fn(E_INVARG)f
Fq(if)h Fl(o)o(wner)j Fq(is)d(not)f(v)m(alid,)k(if)d
Fl(p)q(erms)i Fq(con)o(tains)e(an)o(y)f(illegal)j(c)o(haracters,)e(or)f
(if)120 1515 y Fl(names)c Fq(is)f(the)f(empt)o(y)g(string)g(or)g
(consists)g(en)o(tirely)h(of)f(spaces;)h(it)f(raises)h
Fn(E_PERM)e Fq(if)i Fl(o)o(wner)i Fq(is)d(not)120 1569
y(the)i(programmer)f(and)i(the)f(programmer)f(is)i(not)e(a)h(wizard.)
1725 1664 y(F)l(unction)-1899 b Fg(list)20 b Ff(v)n(erb)p
237 1664 V 21 w(args)h Fh(\()p Fn(obj)14 b Fl(ob)s(ject)p
Fn(,)h(str)g Fl(v)o(erb-desc)s Fh(\))1725 1718 y Fq(F)l(unction)-1899
b Fg(none)20 b Ff(set)p 198 1718 V 20 w(v)n(erb)p 328
1718 V 21 w(args)i Fh(\()p Fn(obj)14 b Fl(ob)s(ject)p
Fn(,)h(str)f Fl(v)o(erb-desc)p Fn(,)i(list)f Fl(args)r
Fh(\))120 1772 y Fq(These)25 b(t)o(w)o(o)e(functions)j(get)e(and)g(set)
h(\(resp)q(ectiv)o(ely\))g(the)g(direct-ob)s(ject,)i(prep)q(osition,)h
(and)120 1826 y(indirect-ob)s(ject)21 b(sp)q(eci\014cations)g(for)e
(the)g(v)o(erb)h(as)f(sp)q(eci\014ed)j(b)o(y)d Fl(v)o(erb-desc)k
Fq(on)c(the)h(giv)o(en)g Fl(ob-)120 1880 y(ject)p Fq(.)26
b(If)18 b Fl(ob)s(ject)g Fq(is)g(not)f(v)m(alid,)i(then)f
Fn(E_INVARG)e Fq(is)i(raised.)27 b(If)18 b Fl(ob)s(ject)g
Fq(do)q(es)f(not)g(de\014ne)i(a)e(v)o(erb)120 1934 y(as)g(sp)q
(eci\014ed)j(b)o(y)d Fl(v)o(erb-desc)p Fq(,)i(then)f
Fn(E_VERBNF)e Fq(is)i(raised.)28 b(If)17 b(the)h(programmer)e(do)q(es)i
(not)f(ha)o(v)o(e)120 1988 y(read)12 b(\(write\))f(p)q(ermission)i(on)f
(the)g(v)o(erb)g(in)g(question,)h(then)f Fn(verb_args\(\))f
Fq(\()p Fn(set_verb_args\(\))p Fq(\))120 2042 y(raises)k
Fn(E_PERM)p Fq(.)k(V)l(erb)d(args)e(sp)q(eci\014cations)j(ha)o(v)o(e)e
(the)h(follo)o(wing)f(form:)240 2108 y Fn({)p Fl(dob)s(j)p
Fn(,)23 b Fl(prep)p Fn(,)h Fl(iob)s(j)r Fn(})120 2176
y Fq(where)17 b Fl(dob)s(j)h Fq(and)f Fl(iob)s(j)h Fq(are)e(strings)h
(dra)o(wn)f(from)g(the)h(set)f Fn("this")p Fq(,)g Fn("none")p
Fq(,)g(and)h Fn("any")p Fq(,)f(and)120 2230 y Fl(prep)g
Fq(is)g(a)e(string)g(that)g(is)i(either)f Fn("none")p
Fq(,)e Fn("any")p Fq(,)h(or)g(one)h(of)f(the)h(prep)q(ositional)h
(phrases)f(listed)120 2284 y(m)o(uc)o(h)i(earlier)g(in)h(the)e
(description)i(of)e(v)o(erbs)h(in)g(the)g(\014rst)f(c)o(hapter.)24
b(This)17 b(is)g(the)g(kind)h(of)e(v)m(alue)120 2338
y(returned)j(b)o(y)f Fn(verb_args\(\))e Fq(and)j(exp)q(ected)g(as)f
(the)g(third)h(argumen)o(t)e(to)g Fn(set_verb_args\(\))p
Fq(.)120 2392 y(Note)g(that)f(for)g Fn(set_verb_args\(\))p
Fq(,)f Fl(prep)k Fq(m)o(ust)e(b)q(e)g(only)h(one)f(of)g(the)g(prep)q
(ositional)h(phrases,)120 2446 y(not)d(\(as)g(is)g(sho)o(wn)g(in)h
(that)f(table\))h(a)e(set)i(of)e(suc)o(h)i(phrases)f(separated)g(b)o(y)
h(`)p Fn(/)p Fq(')e(c)o(haracters.)20 b Fn(set_)120 2500
y(verb_args)14 b Fq(raises)h Fn(E_INVARG)f Fq(if)i(an)o(y)f(of)g(the)g
Fl(dob)s(j)p Fq(,)f Fl(prep)p Fq(,)i(or)e Fl(iob)s(j)j
Fq(strings)e(is)h(illegal.)240 2566 y Fn(verb_args\($container,)21
b("take"\))718 2615 y Fo(\))837 2618 y Fn({"any",)h("out)i(of/from)f
(inside/from",)f("this"})240 2670 y(set_verb_args\($container,)e
("take",)j({"any",)g("from",)g("this"}\))p eop
%%Page: 54 56
54 55 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(54)1725 183 y(F)l(unction)-1899 b Fg(none)20
b Ff(add)p 219 183 18 3 v 20 w(v)n(erb)j Fh(\()p Fn(obj)14
b Fl(ob)s(ject)p Fn(,)h(list)f Fl(info)p Fn(,)i(list)e
Fl(args)r Fh(\))120 237 y Fq(De\014nes)19 b(a)f(new)g(v)o(erb)h(on)f
(the)g(giv)o(en)h Fl(ob)s(ject)p Fq(.)29 b(The)19 b(new)f(v)o(erb's)g
(o)o(wner,)g(p)q(ermission)i(bits)f(and)120 291 y(name\(s\))12
b(are)h(giv)o(en)g(b)o(y)g Fl(info)i Fq(in)f(the)f(same)f(format)g(as)g
(is)i(returned)f(b)o(y)g Fn(verb_info\(\))p Fq(,)e(describ)q(ed)120
345 y(ab)q(o)o(v)o(e.)19 b(The)14 b(new)f(v)o(erb's)g(direct-ob)s
(ject,)h(prep)q(osition,)h(and)e(indirect-ob)s(ject)i(sp)q
(eci\014cations)g(are)120 399 y(giv)o(en)i(b)o(y)f Fl(args)i
Fq(in)f(the)f(same)g(format)f(as)h(is)h(returned)g(b)o(y)f
Fn(verb_args)p Fq(,)f(describ)q(ed)k(ab)q(o)o(v)o(e.)k(The)120
453 y(new)13 b(v)o(erb)f(initially)j(has)d(the)h(empt)o(y)f(program)f
(asso)q(ciated)i(with)f(it;)i(this)f(program)e(do)q(es)h(nothing)120
507 y(but)j(return)g(an)h(unsp)q(eci\014ed)h(v)m(alue.)120
573 y(If)c Fl(ob)s(ject)h Fq(is)g(not)f(v)m(alid,)h(or)f
Fl(info)j Fq(do)q(es)d(not)g(sp)q(ecify)i(a)e(v)m(alid)h(o)o(wner)f
(and)g(w)o(ell-formed)i(p)q(ermission)120 627 y(bits)j(and)h(v)o(erb)f
(names,)g(or)f Fl(args)i Fq(is)g(not)f(a)f(legitimate)i(syn)o(tax)e(sp)
q(eci\014cation,)k(then)d Fn(E_INVARG)120 681 y Fq(is)e(raised.)22
b(If)16 b(the)f(programmer)g(do)q(es)h(not)f(ha)o(v)o(e)g(write)h(p)q
(ermission)h(on)e Fl(ob)s(ject)i Fq(or)e(if)h(the)f(o)o(wner)120
735 y(sp)q(eci\014ed)22 b(b)o(y)f Fl(info)i Fq(is)d(not)g(the)h
(programmer)e(and)h(the)g(programmer)f(is)i(not)f(a)g(wizard,)i(then)
120 789 y Fn(E_PERM)14 b Fq(is)i(raised.)1725 879 y(F)l(unction)-1899
b Fg(none)20 b Ff(delete)p 274 879 V 22 w(v)n(erb)j Fh(\()p
Fn(obj)15 b Fl(ob)s(ject)p Fn(,)f(str)h Fl(v)o(erb-desc)s
Fh(\))120 933 y Fq(Remo)o(v)o(es)d(the)h(v)o(erb)f(as)g(sp)q(eci\014ed)
i(b)o(y)f Fl(v)o(erb-desc)i Fq(from)d(the)g(giv)o(en)h
Fl(ob)s(ject)p Fq(.)19 b(If)12 b Fl(ob)s(ject)h Fq(is)g(not)f(v)m
(alid,)120 987 y(then)j Fn(E_INVARG)f Fq(is)h(raised.)20
b(If)15 b(the)g(programmer)e(do)q(es)j(not)e(ha)o(v)o(e)g(write)h(p)q
(ermission)h(on)f Fl(ob)s(ject)p Fq(,)120 1041 y(then)h
Fn(E_PERM)f Fq(is)i(raised.)22 b(If)16 b Fl(ob)s(ject)h
Fq(do)q(es)f(not)f(de\014ne)i(a)f(v)o(erb)g(as)f(sp)q(eci\014ed)j(b)o
(y)e Fl(v)o(erb-desc)p Fq(,)h(then)120 1095 y Fn(E_VERBNF)d
Fq(is)i(raised.)1725 1186 y(F)l(unction)-1899 b Fg(list)20
b Ff(v)n(erb)p 237 1186 V 21 w(co)r(de)i Fh(\()p Fn(obj)15
b Fl(ob)s(ject)p Fn(,)f(str)h Fl(v)o(erb-desc)j Fk([)p
Fn(,)d Fl(fully-paren)i Fk([)p Fn(,)e Fl(inden)o(t)q
Fk(]])p Fh(\))1725 1240 y Fq(F)l(unction)-1899 b Fg(list)20
b Ff(set)p 198 1240 V 20 w(v)n(erb)p 328 1240 V 21 w(co)r(de)j
Fh(\()p Fn(obj)14 b Fl(ob)s(ject)p Fn(,)h(str)g Fl(v)o(erb-desc)p
Fn(,)g(list)g Fl(co)q(de)s Fh(\))120 1294 y Fq(These)22
b(functions)h(get)e(and)h(set)g(\(resp)q(ectiv)o(ely\))h(the)f(MOO-co)q
(de)h(program)e(asso)q(ciated)h(with)120 1347 y(the)c(v)o(erb)f(as)g
(sp)q(eci\014ed)j(b)o(y)d Fl(v)o(erb-desc)k Fq(on)c Fl(ob)s(ject)p
Fq(.)26 b(The)18 b(program)e(is)i(represen)o(ted)g(as)f(a)g(list)h(of)
120 1401 y(strings,)f(one)h(for)e(eac)o(h)h(line)i(of)e(the)g(program;)
g(this)h(is)f(the)h(kind)g(of)f(v)m(alue)h(returned)g(b)o(y)f
Fn(verb_)120 1455 y(code\(\))f Fq(and)h(exp)q(ected)h(as)e(the)h(third)
h(argumen)o(t)e(to)g Fn(set_verb_code\(\))p Fq(.)23 b(F)l(or)16
b Fn(verb_code\(\))p Fq(,)120 1509 y(the)g(expressions)h(in)h(the)e
(returned)h(co)q(de)g(are)f(usually)h(written)f(with)h(the)f(minim)o
(um-necessary)120 1563 y(paren)o(thesization;)e(if)g
Fl(full-paren)i Fq(is)d(true,)h(then)g(all)g(expressions)g(are)f(fully)
i(paren)o(thesized.)21 b(Also)120 1617 y(for)11 b Fn(verb_code\(\))p
Fq(,)g(the)h(lines)h(in)g(the)f(returned)g(co)q(de)g(are)g(usually)h
(not)f(inden)o(ted)h(at)e(all;)j(if)e Fl(inden)o(t)120
1671 y Fq(is)k(true,)e(eac)o(h)i(line)h(is)e(inden)o(ted)i(to)d(b)q
(etter)i(sho)o(w)e(the)i(nesting)f(of)g(statemen)o(ts.)120
1737 y(If)21 b Fl(ob)s(ject)f Fq(is)h(not)f(v)m(alid,)j(then)e
Fn(E_INVARG)e Fq(is)i(raised.)36 b(If)20 b Fl(ob)s(ject)h
Fq(do)q(es)g(not)f(de\014ne)h(a)f(v)o(erb)g(as)120 1791
y(sp)q(eci\014ed)d(b)o(y)d Fl(v)o(erb-desc)p Fq(,)h(then)g
Fn(E_VERBNF)e Fq(is)i(raised.)20 b(If)15 b(the)f(programmer)f(do)q(es)i
(not)f(ha)o(v)o(e)g(read)120 1845 y(\(write\))22 b(p)q(ermission)i(on)f
(the)f(v)o(erb)h(in)g(question,)i(then)e Fn(verb_code\(\))e
Fq(\()p Fn(set_verb_code\(\))p Fq(\))120 1899 y(raises)14
b Fn(E_PERM)p Fq(.)19 b(If)14 b(the)g(programmer)e(is)i(not,)g(in)g
(fact.)19 b(a)14 b(programmer,)e(then)j Fn(E_PERM)d Fq(is)j(raised.)120
1965 y(F)l(or)i Fn(set_verb_code\(\))p Fq(,)e(the)j(result)f(is)h(a)f
(list)h(of)f(strings,)h(the)f(error)g(messages)g(generated)g(b)o(y)120
2019 y(the)e(MOO-co)q(de)h(compiler)g(during)g(pro)q(cessing)g(of)e
Fl(co)q(de)p Fq(.)21 b(If)15 b(the)g(list)h(is)f(non-empt)o(y)l(,)g
(then)h Fn(set_)120 2073 y(verb_code\(\))d Fq(did)j(not)e(install)i
Fl(co)q(de)s Fq(;)f(the)f(program)g(asso)q(ciated)h(with)g(the)f(v)o
(erb)h(in)g(question)g(is)120 2127 y(unc)o(hanged.)1725
2217 y(F)l(unction)-1899 b Fg(list)20 b Ff(disassem)n(ble)i
Fh(\()p Fn(obj)15 b Fl(ob)s(ject)p Fn(,)f(str)h Fl(v)o(erb-desc)s
Fh(\))120 2271 y Fq(Returns)c(a)f(\(longish\))h(list)h(of)e(strings)g
(giving)i(a)e(listing)i(of)e(the)h(serv)o(er's)f(in)o(ternal)h
(\\compiled")h(form)120 2325 y(of)f(the)h(v)o(erb)g(as)f(sp)q
(eci\014ed)j(b)o(y)e Fl(v)o(erb-desc)j Fq(on)d Fl(ob)s(ject)p
Fq(.)18 b(This)12 b(format)f(is)h(not)f(do)q(cumen)o(ted)i(and)f(ma)o
(y)120 2379 y(indeed)j(c)o(hange)f(from)f(release)h(to)f(release,)h
(but)g(some)f(programmers)f(ma)o(y)h(nonetheless)i(\014nd)f(the)120
2433 y(output)g(of)h Fn(disassemble\(\))e Fq(in)o(teresting)i(to)f(p)q
(eruse)h(as)g(a)f(w)o(a)o(y)g(to)g(gain)h(a)f(deep)q(er)i(appreciation)
120 2487 y(of)f(ho)o(w)f(the)i(serv)o(er)f(w)o(orks.)120
2553 y(If)21 b Fl(ob)s(ject)f Fq(is)h(not)f(v)m(alid,)j(then)e
Fn(E_INVARG)e Fq(is)i(raised.)36 b(If)20 b Fl(ob)s(ject)h
Fq(do)q(es)g(not)f(de\014ne)h(a)f(v)o(erb)g(as)120 2607
y(sp)q(eci\014ed)d(b)o(y)d Fl(v)o(erb-desc)p Fq(,)h(then)g
Fn(E_VERBNF)e Fq(is)i(raised.)20 b(If)15 b(the)f(programmer)f(do)q(es)i
(not)f(ha)o(v)o(e)g(read)120 2661 y(p)q(ermission)j(on)e(the)g(v)o(erb)
g(in)h(question,)g(then)f Fn(disassemble\(\))f Fq(raises)h
Fn(E_PERM)p Fq(.)p eop
%%Page: 55 57
55 56 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(55)0 183 y Fj(4.4.3.5)30 b(Op)r(erations)14
b(on)h(Pla)n(y)n(er)h(Ob)s(jects)1725 301 y Fq(F)l(unction)-1899
b Fg(list)20 b Ff(pla)n(y)n(ers)k Fh(\(\))120 355 y Fq(Returns)16
b(a)f(list)h(of)e(the)i(ob)s(ject)e(n)o(um)o(b)q(ers)i(of)f(all)h(pla)o
(y)o(er)f(ob)s(jects)f(in)i(the)g(database.)1725 444
y(F)l(unction)-1899 b Fg(int)20 b Ff(is)p 139 444 18
3 v 21 w(pla)n(y)n(er)k Fh(\()p Fn(obj)14 b Fl(ob)s(ject)q
Fh(\))120 498 y Fq(Returns)i(a)f(true)h(v)m(alue)h(if)f(the)f(giv)o(en)
h Fl(ob)s(ject)g Fq(is)h(a)e(pla)o(y)o(er)g(ob)s(ject)g(and)h(a)f
(false)h(v)m(alue)h(otherwise.)120 552 y(If)e Fl(ob)s(ject)h
Fq(is)g(not)f(v)m(alid,)h Fn(E_INVARG)e Fq(is)i(raised.)1725
641 y(F)l(unction)-1899 b Fg(none)20 b Ff(set)p 198 641
V 20 w(pla)n(y)n(er)p 369 641 V 23 w(\015ag)i Fh(\()p
Fn(obj)14 b Fl(ob)s(ject)p Fn(,)h Fl(v)m(alue)s Fh(\))120
695 y Fq(Confers)f(or)g(remo)o(v)o(es)f(the)i(\\pla)o(y)o(er)f(ob)s
(ject")f(status)h(of)g(the)g(giv)o(en)h Fl(ob)s(ject)p
Fq(,)e(dep)q(ending)k(up)q(on)e(the)120 749 y(truth)i(v)m(alue)h(of)f
Fl(v)m(alue)p Fq(.)28 b(If)17 b Fl(ob)s(ject)h Fq(is)g(not)f(v)m(alid,)
i Fn(E_INVARG)d Fq(is)i(raised.)26 b(If)18 b(the)f(programmer)f(is)120
803 y(not)f(a)g(wizard,)g(then)g Fn(E_PERM)g Fq(is)g(raised.)120
869 y(If)d Fl(v)m(alue)j Fq(is)c(true,)h(then)f Fl(ob)s(ject)h
Fq(gains)g(\(or)e(k)o(eeps\))h(\\pla)o(y)o(er)g(ob)s(ject")g(status:)17
b(it)11 b(will)i(b)q(e)f(an)f(elemen)o(t)120 922 y(of)j(the)h(list)h
(returned)f(b)o(y)g Fn(players\(\))p Fq(,)f(the)h(expression)g
Fn(is_player\()p Fl(ob)s(ject)q Fn(\))e Fq(will)k(return)d(true,)120
976 y(and)g(the)f(serv)o(er)g(will)i(treat)e(a)g(call)i(to)e
Fn($do_login_command\(\))d Fq(that)j(returns)h Fl(ob)s(ject)f
Fq(as)h(logging)120 1030 y(in)i(the)f(curren)o(t)g(connection.)120
1096 y(If)d Fl(v)m(alue)k Fq(is)d(false,)g(the)f Fl(ob)s(ject)g
Fq(loses)h(\(or)e(con)o(tin)o(ues)i(to)e(lac)o(k\))h(\\pla)o(y)o(er)g
(ob)s(ject")g(status:)17 b(it)c(will)g(not)120 1150 y(b)q(e)f(an)f
(elemen)o(t)h(of)e(the)h(list)h(returned)g(b)o(y)f Fn(players\(\))p
Fq(,)f(the)h(expression)h Fn(is_player\()p Fl(ob)s(ject)q
Fn(\))d Fq(will)120 1204 y(return)k(false,)g(and)g(users)g(cannot)g
(connect)g(to)f Fl(ob)s(ject)h Fq(b)o(y)g(name)g(when)g(they)g(log)g
(in)o(to)g(the)g(serv)o(er.)120 1258 y(In)18 b(addition,)i(if)e(a)f
(user)h(is)h(connected)f(to)g Fl(ob)s(ject)g Fq(at)f(the)h(time)g(that)
f(it)h(loses)g(\\pla)o(y)o(er)g(ob)s(ject")120 1312 y(status,)h(then)h
(that)f(connection)i(is)f(immediately)h(brok)o(en,)g(just)e(as)g(if)h
Fn(boot_player\()p Fl(ob)s(ject)q Fn(\))120 1365 y Fq(had)15
b(b)q(een)i(called)f(\(see)g(the)f(description)i(of)d
Fn(boot_player\(\))g Fq(b)q(elo)o(w\).)0 1499 y Fj(4.4.4)30
b(Op)r(erations)15 b(on)g(Net)n(w)n(ork)h(Connections)1725
1617 y Fq(F)l(unction)-1899 b Fg(list)20 b Ff(connected)p
376 1617 V 21 w(pla)n(y)n(ers)k Fh(\()p Fk([)p Fl(include-all)r
Fk(])p Fh(\))120 1671 y Fq(Returns)16 b(a)e(list)i(of)f(the)g(ob)s
(ject)f(n)o(um)o(b)q(ers)i(of)e(those)h(pla)o(y)o(er)g(ob)s(jects)f
(with)i(curren)o(tly-activ)o(e)g(con-)120 1725 y(nections.)21
b(If)16 b Fl(include-all)k Fq(is)c(pro)o(vided)g(and)g(true,)f(then)g
(the)h(list)g(includes)i(the)d(ob)s(ject)g(n)o(um)o(b)q(ers)120
1779 y(asso)q(ciated)i(with)f Fl(all)j Fq(curren)o(t)e(connections,)g
(including)i(ones)e(that)e(are)h(outb)q(ound)i(and/or)d(not)120
1833 y(y)o(et)g(logged-in.)1725 1922 y(F)l(unction)-1899
b Fg(int)20 b Ff(connected)p 350 1922 V 21 w(seconds)i
Fh(\()p Fn(obj)14 b Fl(pla)o(y)o(er)s Fh(\))1725 1976
y Fq(F)l(unction)-1899 b Fg(int)20 b Ff(idle)p 189 1976
V 22 w(seconds)i Fh(\()p Fn(obj)14 b Fl(pla)o(y)o(er)s
Fh(\))120 2030 y Fq(These)j(functions)g(return)f(the)h(n)o(um)o(b)q(er)
f(of)g(seconds)h(that)f(the)g(curren)o(tly-activ)o(e)h(connection)h(to)
120 2084 y Fl(pla)o(y)o(er)h Fq(has)d(existed)h(and)f(b)q(een)i(idle,)f
(resp)q(ectiv)o(ely)l(.)25 b(If)16 b Fl(pla)o(y)o(er)j
Fq(is)e(not)f(the)g(ob)s(ject)f(n)o(um)o(b)q(er)i(of)e(a)120
2138 y(pla)o(y)o(er)g(ob)s(ject)g(with)g(a)g(curren)o(tly-activ)o(e)h
(connection,)g(then)g Fn(E_INVARG)e Fq(is)h(raised.)1725
2227 y(F)l(unction)-1899 b Fg(none)20 b Ff(notify)j Fh(\()p
Fn(obj)14 b Fl(conn)p Fn(,)i(str)e Fl(string)19 b Fk([)p
Fn(,)c Fl(no-\015ush)p Fk(])p Fh(\))120 2281 y Fq(Enqueues)e
Fl(string)j Fq(for)11 b(output)h(\(on)g(a)f(line)j(b)o(y)e(itself)t(\))
g(on)g(the)g(connection)h Fl(conn)p Fq(.)20 b(If)12 b(the)g(program-)
120 2335 y(mer)17 b(is)i(not)e Fl(conn)h Fq(or)f(a)g(wizard,)i(then)f
Fn(E_PERM)f Fq(is)h(raised.)27 b(If)18 b Fl(conn)g Fq(is)h(not)e(a)g
(curren)o(tly-activ)o(e)120 2389 y(connection,)d(then)e(this)h
(function)g(do)q(es)f(nothing.)20 b(Output)12 b(is)h(normally)g
(written)f(to)g(connections)120 2443 y(only)k(b)q(et)o(w)o(een)f
(tasks,)f(not)h(during)h(execution.)120 2508 y(The)i(serv)o(er)g(will)i
(not)e(queue)h(an)f(arbitrary)g(amoun)o(t)f(of)h(output)g(for)g(a)g
(connection;)i(the)f Fn(MAX_)120 2562 y(QUEUED_OUTPUT)d
Fq(compilation)i(option)g(\(in)f(`)p Fn(options.h)p Fq('\))e(con)o
(trols)i(the)h(limit.)27 b(When)18 b(an)f(at-)120 2616
y(tempt)d(is)g(made)g(to)g(enqueue)h(output)f(that)f(w)o(ould)i(tak)o
(e)e(the)h(serv)o(er)g(o)o(v)o(er)f(its)h(limit,)i(it)e(\014rst)g
(tries)120 2670 y(to)i(write)h(as)f(m)o(uc)o(h)g(output)h(as)f(p)q
(ossible)i(to)e(the)h(connection)g(without)g(ha)o(ving)g(to)f(w)o(ait)g
(for)g(the)p eop
%%Page: 56 58
56 57 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(56)120 183 y(other)16 b(end.)23 b(If)16
b(that)f(do)q(esn't)h(result)h(in)g(the)f(new)g(output)g(b)q(eing)h
(able)g(to)e(\014t)h(in)h(the)f(queue,)h(the)120 237
y(serv)o(er)f(starts)f(thro)o(wing)i(a)o(w)o(a)o(y)d(the)j(oldest)g
(lines)h(in)g(the)e(queue)i(un)o(til)f(the)g(new)g(ouput)f(will)i
(\014t.)120 291 y(The)d(serv)o(er)e(remem)o(b)q(ers)i(ho)o(w)f(man)o(y)
g(lines)i(of)d(output)i(it)f(has)g(`\015ushed')h(in)g(this)g(w)o(a)o(y)
e(and,)h(when)120 345 y(next)20 b(it)h(can)f(succeed)h(in)g(writing)g
(an)o(ything)g(to)e(the)h(connection,)j(it)d(\014rst)g(writes)g(a)g
(line)i(lik)o(e)120 399 y Fn(>>)15 b(Network)f(buffer)g(overflow:)g
Fl(X)20 b Fn(lines)15 b(of)f(output)h(to)g(you)f(have)h(been)g(lost)f
(<<)22 b Fq(where)120 453 y Fl(X)e Fq(is)15 b(the)h(n)o(um)o(b)q(er)f
(of)g(\015ushed)h(lines.)120 521 y(If)21 b Fl(no-\015ush)h
Fq(is)g(pro)o(vided)g(and)f(true,)i(then)e Fn(notify\(\))f
Fq(nev)o(er)i(\015ushes)g(an)o(y)e(output)h(from)g(the)120
575 y(queue;)16 b(instead)f(it)h(immediately)h(returns)e(false.)20
b Fn(Notify\(\))14 b Fq(otherwise)i(alw)o(a)o(ys)e(returns)h(true.)1725
671 y(F)l(unction)-1899 b Fg(int)20 b Ff(bu\013ered)p
306 671 18 3 v 20 w(output)p 495 671 V 20 w(length)k
Fh(\()p Fk([)p Fn(obj)14 b Fl(conn)p Fk(])p Fh(\))120
725 y Fq(Returns)j(the)f(n)o(um)o(b)q(er)h(of)f(b)o(ytes)g(curren)o
(tly)g(bu\013ered)h(for)f(output)g(to)f(the)i(connection)g
Fl(conn)p Fq(.)24 b(If)120 779 y Fl(conn)17 b Fq(is)g(not)f(pro)o
(vided,)h(returns)g(the)g(maxim)o(um)f(n)o(um)o(b)q(er)h(of)f(b)o(ytes)
g(that)g(will)i(b)q(e)g(bu\013ered)e(up)120 832 y(for)f(output)g(on)g
(an)o(y)g(connection.)1725 928 y(F)l(unction)-1899 b
Fg(str)20 b Ff(read)i Fh(\()p Fk([)p Fn(obj)14 b Fl(conn)i
Fk([)p Fn(,)e Fl(non-blo)q(c)o(king)t Fk(]])p Fh(\))120
982 y Fq(Reads)i(and)h(returns)e(a)h(line)i(of)d(input)i(from)e(the)h
(connection)h Fl(conn)f Fq(\(or,)f(if)i(not)e(pro)o(vided,)i(from)120
1036 y(the)d(pla)o(y)o(er)g(that)g(t)o(yp)q(ed)g(the)g(command)g(that)g
(initiated)i(the)e(curren)o(t)g(task\).)k(If)d Fl(non-blo)q(c)o(king)k
Fq(is)120 1090 y(false)d(or)f(not)h(pro)o(vided,)g(this)g(function)g
(susp)q(ends)h(the)f(curren)o(t)g(task,)e(resuming)j(it)f(when)g(there)
120 1144 y(is)g(input)g(a)o(v)m(ailable)h(to)d(b)q(e)i(read.)k(If)15
b Fl(non-blo)q(c)o(king)21 b Fq(is)15 b(pro)o(vided)h(and)g(true,)e
(this)i(function)g(nev)o(er)120 1197 y(susp)q(ends)22
b(the)e(calling)i(task;)g(if)e(there)h(is)g(no)f(input)h(curren)o(tly)g
(a)o(v)m(ailable)h(for)e(input,)i Fn(read\(\))120 1251
y Fq(simply)16 b(returns)g(0)e(immediately)l(.)120 1320
y(If)19 b Fl(pla)o(y)o(er)i Fq(is)e(pro)o(vided,)h(then)f(the)f
(programmer)g(m)o(ust)g(either)h(b)q(e)g(a)f(wizard)h(or)f(the)g(o)o
(wner)g(of)120 1374 y Fn(player)p Fq(;)g(if)g Fn(player)f
Fq(is)h(not)g(pro)o(vided,)h(then)f Fn(read\(\))f Fq(ma)o(y)g(only)h(b)
q(e)h(called)g(b)o(y)f(a)g(wizard)g(and)120 1428 y(only)c(in)g(the)g
(task)f(that)f(w)o(as)h(last)g(spa)o(wned)h(b)o(y)f(a)g(command)h(from)
e(the)i(connection)g(in)h(question.)120 1482 y(Otherwise,)f
Fn(E_PERM)f Fq(is)h(raised.)20 b(If)13 b(the)h(giv)o(en)g
Fn(player)f Fq(is)h(not)f(curren)o(tly)h(connected)g(and)g(has)f(no)120
1536 y(p)q(ending)19 b(lines)f(of)f(input,)h(or)e(if)i(the)f
(connection)h(is)g(closed)f(while)i(a)e(task)f(is)h(w)o(aiting)h(for)e
(input)120 1590 y(but)f(b)q(efore)h(an)o(y)f(lines)h(of)f(input)h(are)f
(receiv)o(ed,)h(then)g Fn(read\(\))e Fq(raises)i Fn(E_INVARG)p
Fq(.)120 1658 y(The)j(restriction)g(on)g(the)g(use)g(of)f
Fn(read\(\))g Fq(without)g(an)o(y)h(argumen)o(ts)f(preserv)o(es)g(the)h
(follo)o(wing)120 1712 y(simple)f(in)o(v)m(arian)o(t:)k(if)17
b(input)g(is)f(b)q(eing)i(read)e(from)f(a)h(pla)o(y)o(er,)g(it)h(is)f
(for)g(the)g(task)f(started)h(b)o(y)g(the)120 1766 y(last)c(command)g
(that)f(pla)o(y)o(er)i(t)o(yp)q(ed.)19 b(This)12 b(in)o(v)m(arian)o(t)h
(adds)f(resp)q(onsibilit)o(y)j(to)c(the)i(programmer,)120
1820 y(ho)o(w)o(ev)o(er.)25 b(If)18 b(y)o(our)f(program)f(calls)j
(another)d(v)o(erb)i(b)q(efore)f(doing)h(a)f Fn(read\(\))p
Fq(,)g(then)h(either)g(that)120 1874 y(v)o(erb)e(m)o(ust)f(not)g(susp)q
(end)j(or)d(else)i(y)o(ou)e(m)o(ust)g(arrange)g(that)h(no)f(commands)h
(will)h(b)q(e)g(read)f(from)120 1928 y(the)f(connection)i(in)f(the)f
(mean)o(time.)20 b(The)15 b(most)g(straigh)o(tforw)o(ard)e(w)o(a)o(y)h
(to)g(do)i(this)f(is)h(to)f(call)240 1994 y Fn
(set_connection_option\(play)o(er,)21 b("hold-input",)h(1\))120
2062 y Fq(b)q(efore)c(an)o(y)g(task)f(susp)q(ension)j(could)f(happ)q
(en,)g(then)g(mak)o(e)e(all)i(of)f(y)o(our)f(calls)i(to)f
Fn(read\(\))f Fq(and)120 2116 y(other)e(co)q(de)h(that)e(migh)o(t)h
(susp)q(end,)h(and)g(\014nally)g(call)240 2183 y Fn
(set_connection_option\(play)o(er,)21 b("hold-input",)h(0\))120
2251 y Fq(to)15 b(allo)o(w)g(commands)g(once)h(again)f(to)f(b)q(e)i
(read)f(and)h(in)o(terpreted)g(normally)l(.)1725 2346
y(F)l(unction)-1899 b Fg(none)20 b Ff(force)p 249 2346
V 20 w(input)j Fh(\()p Fn(obj)15 b Fl(conn)p Fn(,)g(str)g
Fl(line)k Fk([)p Fn(,)c Fl(at-fron)o(t)q Fk(])p Fh(\))120
2400 y Fq(Inserts)j(the)g(string)f Fl(line)22 b Fq(as)17
b(an)h(input)h(task)d(in)j(the)f(queue)g(for)f(the)h(connection)h
Fl(conn)p Fq(,)f(just)f(as)120 2454 y(if)g(it)g(had)g(arriv)o(ed)f(as)h
(input)g(o)o(v)o(er)f(the)h(net)o(w)o(ork.)23 b(If)17
b Fl(at)p 1100 2454 14 2 v 15 w(fron)o(t)g Fq(is)g(pro)o(vided)h(and)e
(true,)h(then)g(the)120 2508 y(new)g(line)i(of)e(input)h(is)g(put)f(at)
f(the)i(fron)o(t)e(of)h Fl(conn)p Fq('s)g(queue,)h(so)e(that)h(it)g
(will)i(b)q(e)f(the)f(v)o(ery)g(next)120 2562 y(line)g(of)e(input)h
(pro)q(cessed)g(ev)o(en)g(if)f(there)h(is)g(already)f(some)g(other)g
(input)h(in)h(that)d(queue.)21 b(Raises)120 2616 y Fn(E_INVARG)13
b Fq(if)i Fl(conn)f Fq(do)q(es)h(not)f(sp)q(ecify)h(a)f(curren)o(t)g
(connection)h(and)g Fn(E_PERM)e Fq(if)i(the)f(programmer)120
2670 y(is)i(neither)g Fl(conn)f Fq(nor)g(a)g(wizard.)p
eop
%%Page: 57 59
57 58 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(57)1725 183 y(F)l(unction)-1899 b Fg(none)20
b Ff(\015ush)p 246 183 18 3 v 19 w(input)k Fh(\()p Fn(obj)14
b Fl(conn)i Fk([)p Fl(sho)o(w-messages)r Fk(])p Fh(\))120
237 y Fq(P)o(erforms)21 b(the)h(same)g(actions)g(as)g(if)g(the)g
(connection)i Fl(conn)p Fq('s)e(de\014ned)h(\015ush)g(command)f(had)120
291 y(b)q(een)c(receiv)o(ed)g(on)f(that)f(connection,)i(i.e.,)f(remo)o
(v)o(es)f(all)i(p)q(ending)h(lines)f(of)f(input)h(from)e
Fl(conn)p Fq('s)120 345 y(queue)g(and,)e(if)h Fl(sho)o(w-messages)h
Fq(is)f(pro)o(vided)h(and)f(true,)f(prin)o(ts)h(a)f(message)h(to)f
Fl(conn)h Fq(listing)h(the)120 399 y(\015ushed)21 b(lines,)h(if)e(an)o
(y)l(.)34 b(See)20 b(the)g(c)o(hapter)g(on)f(serv)o(er)h(assumptions)g
(ab)q(out)f(the)h(database)g(for)120 453 y(more)15 b(information)g(ab)q
(out)g(a)g(connection's)h(de\014ned)g(\015ush)g(command.)1725
534 y(F)l(unction)-1899 b Fg(list)20 b Ff(output)p 296
534 V 20 w(delimiters)k Fh(\()p Fn(obj)14 b Fl(pla)o(y)o(er)s
Fh(\))120 588 y Fq(Returns)h(a)g(list)h(of)e(t)o(w)o(o)g(strings,)g
(the)i(curren)o(t)e Fl(output)h(pre\014x)k Fq(and)c Fl(output)f
(su\016x)19 b Fq(for)14 b Fl(pla)o(y)o(er)p Fq(.)20 b(If)120
642 y Fl(pla)o(y)o(er)f Fq(do)q(es)e(not)e(ha)o(v)o(e)h(an)g(activ)o(e)
g(net)o(w)o(ork)f(connection,)i(then)f Fn(E_INVARG)f
Fq(is)h(raised.)23 b(If)16 b(either)120 696 y(string)i(is)h(curren)o
(tly)g(unde\014ned,)i(the)d(v)m(alue)i Fn("")e Fq(is)h(used)g(instead.)
30 b(See)18 b(the)h(discussion)h(of)e(the)120 750 y Fn(PREFIX)h
Fq(and)i Fn(SUFFIX)e Fq(commands)h(in)h(the)g(next)f(c)o(hapter)g(for)g
(more)f(information)i(ab)q(out)f(the)120 804 y(output)15
b(pre\014x)h(and)f(su\016x.)1725 885 y(F)l(unction)-1899
b Fg(none)20 b Ff(b)r(o)r(ot)p 243 885 V 19 w(pla)n(y)n(er)k
Fh(\()p Fn(obj)15 b Fl(pla)o(y)o(er)s Fh(\))120 939 y
Fq(Marks)f(for)g(disconnection)j(an)o(y)e(curren)o(tly-activ)o(e)g
(connection)h(to)e(the)h(giv)o(en)h Fl(pla)o(y)o(er)p
Fq(.)k(The)15 b(con-)120 993 y(nection)e(will)h(not)e(actually)i(b)q(e)
f(closed)g(un)o(til)h(the)e(curren)o(tly-running)i(task)e(returns)g(or)
g(susp)q(ends,)120 1047 y(but)18 b(all)h(MOO)f(functions)h(\(suc)o(h)f
(as)f Fn(notify\(\))p Fq(,)g Fn(connected_players\(\))p
Fq(,)f(and)i(the)g(lik)o(e\))g(im-)120 1100 y(mediately)d(b)q(eha)o(v)o
(e)f(as)g(if)g(the)g(connection)h(no)f(longer)g(exists.)20
b(If)14 b(the)g(programmer)e(is)j(not)e(either)120 1154
y(a)k(wizard)h(or)e(the)i(same)f(as)g Fl(pla)o(y)o(er)p
Fq(,)g(then)h Fn(E_PERM)e Fq(is)i(raised.)26 b(If)18
b(there)f(is)h(no)f(curren)o(tly-activ)o(e)120 1208 y(connection)f(to)f
Fl(pla)o(y)o(er)p Fq(,)g(then)g(this)h(function)g(do)q(es)f(nothing.)
120 1270 y(If)j(there)f(w)o(as)g(a)g(curren)o(tly-activ)o(e)h
(connection,)g(then)g(the)f(follo)o(wing)h(v)o(erb)g(call)g(is)g(made)f
(when)120 1324 y(the)e(connection)i(is)e(actually)h(closed:)240
1383 y Fn($user_disconnected\()p Fl(pla)o(y)o(er)s Fn(\))120
1444 y Fq(It)f(is)h(not)f(an)g(error)f(if)i(this)g(v)o(erb)f(do)q(es)g
(not)g(exist;)g(the)h(call)g(is)g(simply)g(skipp)q(ed.)1725
1525 y(F)l(unction)-1899 b Fg(str)20 b Ff(connection)p
368 1525 V 21 w(name)i Fh(\()p Fn(obj)14 b Fl(pla)o(y)o(er)s
Fh(\))120 1579 y Fq(Returns)19 b(a)f(net)o(w)o(ork-sp)q(eci\014c)i
(string)e(iden)o(tifying)i(the)f(connection)h(b)q(eing)f(used)g(b)o(y)g
(the)f(giv)o(en)120 1633 y(pla)o(y)o(er.)29 b(If)19 b(the)f(programmer)
f(is)i(not)f(a)g(wizard)h(and)f(not)g Fl(pla)o(y)o(er)p
Fq(,)h(then)g Fn(E_PERM)e Fq(is)i(raised.)30 b(If)120
1687 y Fl(pla)o(y)o(er)18 b Fq(is)e(not)f(curren)o(tly)h(connected,)f
(then)h Fn(E_INVARG)e Fq(is)i(raised.)120 1748 y(F)l(or)i(the)g(TCP/IP)
h(net)o(w)o(orking)f(con\014gurations,)h(for)f(in-b)q(ound)i
(connections,)g(the)f(string)f(has)120 1802 y(the)d(form)240
1861 y Fn("port)23 b Fl(lp)q(ort)i Fn(from)f Fl(host)p
Fn(,)f(port)g Fl(p)q(ort)q Fn(")120 1922 y Fq(where)14
b Fl(lp)q(ort)i Fq(is)e(the)h(decimal)g(TCP)f(listening)i(p)q(ort)d(on)
h(whic)o(h)h(the)g(connection)g(arriv)o(ed,)f Fl(host)g
Fq(is)120 1976 y(either)f(the)f(name)f(or)h(decimal)h(TCP)f(address)f
(of)h(the)g(host)f(from)g(whic)o(h)i(the)f(pla)o(y)o(er)g(is)g
(connected,)120 2030 y(and)j Fl(p)q(ort)h Fq(is)g(the)f(decimal)i(TCP)e
(p)q(ort)g(of)f(the)i(connection)g(on)f(that)f(host.)120
2091 y(F)l(or)h(outb)q(ound)g(TCP/IP)g(connections,)h(the)f(string)g
(has)h(the)f(form)240 2150 y Fn("port)23 b Fl(lp)q(ort)i
Fn(to)f Fl(host)p Fn(,)f(port)h Fl(p)q(ort)q Fn(")120
2211 y Fq(where)10 b Fl(lp)q(ort)i Fq(is)f(the)f(decimal)h(lo)q(cal)h
(TCP)d(p)q(ort)h(n)o(um)o(b)q(er)h(from)e(whic)o(h)i(the)g(connection)g
(originated,)120 2265 y Fl(host)18 b Fq(is)g(either)g(the)g(name)g(or)f
(decimal)i(TCP)e(address)g(of)g(the)h(host)f(to)g(whic)o(h)h(the)g
(connection)120 2319 y(w)o(as)c(op)q(ened,)i(and)g Fl(p)q(ort)g
Fq(is)f(the)h(decimal)g(TCP)f(p)q(ort)g(of)g(the)g(connection)h(on)f
(that)g(host.)120 2381 y(F)l(or)g(the)h(System)f(V)h(`lo)q(cal')g(net)o
(w)o(orking)f(con\014guration,)h(the)g(string)f(is)h(the)g(UNIX)g
(login)h(name)120 2435 y(of)e(the)g(connecting)h(user)g(or,)e(if)i(no)f
(suc)o(h)g(name)h(can)f(b)q(e)h(found,)f(something)g(of)g(the)g(form)
240 2494 y Fn("User)23 b(#)p Fl(n)o(um)o(b)q(er)s Fn(")120
2555 y Fq(where)15 b Fl(n)o(um)o(b)q(er)k Fq(is)d(a)f(UNIX)h(n)o
(umeric)g(user)f(ID.)120 2616 y(F)l(or)e(the)h(other)g(net)o(w)o
(orking)f(con\014gurations,)h(the)g(string)g(is)g(the)g(same)f(for)h
(all)g(connections)h(and,)120 2670 y(th)o(us,)g(useless.)p
eop
%%Page: 58 60
58 59 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(58)1725 183 y(F)l(unction)-1899 b Fg(none)20
b Ff(set)p 198 183 18 3 v 20 w(connection)p 485 183 V
22 w(option)j Fh(\()p Fn(obj)14 b Fl(conn)p Fn(,)i(str)f
Fl(option)p Fn(,)g Fl(v)m(alue)s Fh(\))120 237 y Fq(Con)o(trols)k(a)g
(n)o(um)o(b)q(er)h(of)f(optional)h(b)q(eha)o(viors)f(asso)q(ciated)h
(the)g(connection)g Fl(conn)p Fq(.)33 b(Raises)20 b Fn(E_)120
291 y(INVARG)14 b Fq(if)g Fl(conn)h Fq(do)q(es)g(not)f(sp)q(ecify)i(a)e
(curren)o(t)g(connection)i(and)e Fn(E_PERM)g Fq(if)h(the)f(programmer)f
(is)120 345 y(neither)j Fl(conn)g Fq(nor)f(a)g(wizard.)20
b(The)15 b(follo)o(wing)h(v)m(alues)h(for)d Fl(option)i
Fq(are)e(curren)o(tly)i(supp)q(orted:)120 418 y Fn("hold-input")360
471 y Fq(If)21 b Fl(v)m(alue)j Fq(is)d(true,)g(then)g(input)g(receiv)o
(ed)h(on)f Fl(conn)f Fq(will)j(nev)o(er)d(b)q(e)h(treated)f(as)g(a)360
525 y(command;)c(instead,)h(it)g(will)h(remain)e(in)h(the)g(queue)g(un)
o(til)g(retriev)o(ed)g(b)o(y)f(a)g(call)i(to)360 579
y Fn(read\(\))p Fq(.)120 654 y Fn("client-echo")360 708
y Fq(Send)c(the)g(T)l(elnet)g(Proto)q(col)f(`)p Fn(WONT)h(ECHO)p
Fq(')e(or)h(`)p Fn(WILL)h(ECHO)p Fq(')f(command,)g(dep)q(ending)360
762 y(on)h(whether)g Fl(v)m(alue)k Fq(is)c(true)g(or)g(false,)g(resp)q
(ectiv)o(ely)l(.)21 b(F)l(or)13 b(clien)o(ts)j(that)d(supp)q(ort)h(the)
360 816 y(T)l(elnet)h(Proto)q(col,)e(this)h(should)h(toggle)e(whether)h
(or)g(not)f(the)h(clien)o(t)h(ec)o(ho)q(es)f(lo)q(cally)360
870 y(the)i(c)o(haracters)g(t)o(yp)q(ed)h(b)o(y)f(the)g(user.)24
b(Note)16 b(that)f(the)i(serv)o(er)f(itself)h(nev)o(er)f(ec)o(ho)q(es)
360 924 y(input)j(c)o(haracters)e(under)h(an)o(y)g(circumstances.)28
b(\(This)19 b(option)f(is)g(only)g(a)o(v)m(ailable)360
978 y(under)e(the)f(TCP/IP)g(net)o(w)o(orking)g(con\014gurations.\))120
1052 y Fn("binary")48 b Fq(If)22 b Fl(v)m(alue)j Fq(is)c(true,)i(then)e
(b)q(oth)h(input)g(from)f(and)g(output)g(to)g Fl(conn)g
Fq(can)h(con)o(tain)360 1106 y(arbitrary)d(b)o(ytes.)35
b(Input)21 b(from)e(a)h(connection)h(in)g(binary)f(mo)q(de)h(is)f(not)g
(brok)o(en)360 1160 y(in)o(to)e(lines)h(at)f(all;)i(it)e(is)g(deliv)o
(ered)i(to)d(either)i(the)f(read\(\))f(function)i(or)e(the)h(built-)360
1214 y(in)g(command)f(parser)g(as)g Fl(binary)h(strings)p
Fq(,)f(in)h(whatev)o(er)f(size)h(c)o(h)o(unks)g(come)f(bac)o(k)360
1268 y(from)10 b(the)i(op)q(erating)f(system.)18 b(\(See)12
b(the)f(early)h(section)f(on)h(MOO)f(v)m(alue)h(t)o(yp)q(es)g(for)e(a)
360 1322 y(description)j(of)e(the)h(binary)g(string)g(represen)o
(tation.\))18 b(F)l(or)11 b(output)h(to)f(a)g(connection)360
1376 y(in)j(binary)h(mo)q(de,)f(the)f(second)h(argumen)o(t)f(to)g
(`notify\(\)')g(m)o(ust)g(b)q(e)h(a)f(binary)h(string;)360
1430 y(if)i(it)f(is)h(malformed,)f(E)p 766 1430 14 2
v 16 w(INV)-5 b(AR)o(G)16 b(is)f(raised.)120 1505 y Fn("flush-command")
360 1559 y Fq(If)f Fl(v)m(alue)j Fq(is)d(a)g(non-empt)o(y)g(string,)f
(then)h(it)g(b)q(ecomes)g(the)g(new)g Fl(\015ush)g Fq(command)g(for)360
1613 y(this)e(connection,)i(b)o(y)d(whic)o(h)i(the)f(pla)o(y)o(er)g
(can)g(\015ush)h(all)f(queued)h(input)g(that)f(has)f(not)360
1666 y(y)o(et)k(b)q(een)i(pro)q(cessed)f(b)o(y)f(the)h(serv)o(er.)k(If)
c Fl(v)m(alue)j Fq(is)e(not)e(a)g(non-empt)o(y)g(string,)h(then)360
1720 y Fl(conn)11 b Fq(is)h(set)e(to)h(ha)o(v)o(e)f(no)h(\015ush)h
(command)e(at)h(all.)19 b(The)11 b(default)h(v)m(alue)g(of)e(this)i
(option)360 1774 y(can)19 b(b)q(e)g(set)f(via)h(the)f(prop)q(ert)o(y)g
Fn($server_options.default_flush)o(_command)o Fq(;)360
1828 y(see)d(the)h(c)o(hapter)f(on)g(serv)o(er)g(assumptions)g(ab)q
(out)g(the)g(database)g(for)g(details.)1725 1911 y(F)l(unction)-1899
b Fg(list)20 b Ff(connection)p 394 1911 18 3 v 21 w(options)j
Fh(\()p Fn(obj)14 b Fl(conn)p Fh(\))120 1965 y Fq(Returns)d(a)g(list)g
(of)f Fn({)p Fl(name)p Fn(,)15 b Fl(v)m(alue)s Fn(})d
Fq(pairs)f(describing)h(the)f(curren)o(t)g(settings)f(of)h(all)g(of)g
(the)g(allo)o(w)o(ed)120 2019 y(options)18 b(for)f(the)h(connection)h
Fl(conn)p Fq(.)28 b(Raises)18 b Fn(E_INVARG)f Fq(if)h
Fl(conn)g Fq(do)q(es)g(not)g(sp)q(ecify)h(a)e(curren)o(t)120
2073 y(connection)f(and)g Fn(E_PERM)e Fq(if)i(the)f(programmer)f(is)i
(neither)g Fl(conn)f Fq(nor)g(a)g(wizard.)1725 2156 y(F)l(unction)-1899
b Fg(value)20 b Ff(connection)p 420 2156 V 22 w(option)i
Fh(\()p Fn(obj)15 b Fl(conn)p Fn(,)g(str)g Fl(name)s
Fh(\))120 2210 y Fq(Returns)20 b(the)g(curren)o(t)g(setting)f(of)h(the)
f(option)h Fl(name)i Fq(for)e(the)f(connection)i Fl(conn)p
Fq(.)34 b(Raises)20 b Fn(E_)120 2264 y(INVARG)14 b Fq(if)g
Fl(conn)h Fq(do)q(es)g(not)f(sp)q(ecify)i(a)e(curren)o(t)g(connection)i
(and)e Fn(E_PERM)g Fq(if)h(the)f(programmer)f(is)120
2318 y(neither)j Fl(conn)g Fq(nor)f(a)g(wizard.)1725
2400 y(F)l(unction)-1899 b Fg(obj)20 b Ff(op)r(en)p 222
2400 V 19 w(net)n(w)n(ork)p 441 2400 V 22 w(connection)k
Fh(\()p Fl(v)m(alue)p Fn(,)16 b Fi(:)8 b(:)g(:)n Fh(\))120
2454 y Fq(Establishes)19 b(a)f(net)o(w)o(ork)g(connection)h(to)f(the)g
(place)h(sp)q(eci\014ed)i(b)o(y)d(the)g(argumen)o(ts)g(and)g(more-)120
2508 y(or-less)c(pretends)h(that)e(a)g(new,)h(normal)g(pla)o(y)o(er)g
(connection)h(has)f(b)q(een)h(established)g(from)e(there.)120
2562 y(The)k(new)g(connection,)h(as)e(usual,)i(will)g(not)e(b)q(e)i
(logged)f(in)g(initially)j(and)d(will)h(ha)o(v)o(e)e(a)h(negativ)o(e)
120 2616 y(ob)s(ject)d(n)o(um)o(b)q(er)g(asso)q(ciated)g(with)h(it)f
(for)g(use)g(with)h Fn(read\(\))p Fq(,)e Fn(notify\(\))p
Fq(,)g(and)h Fn(boot_player\(\))p Fq(.)120 2670 y(This)i(ob)s(ject)e(n)
o(um)o(b)q(er)i(is)g(the)f(v)m(alue)h(returned)g(b)o(y)f(this)h
(function.)p eop
%%Page: 59 61
59 60 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(59)120 183 y(If)21 b(the)h(programmer)d(is)j(not)f(a)g
(wizard)g(or)g(if)g(the)g Fn(OUTBOUND_NETWORK)e Fq(compilation)k
(option)120 237 y(w)o(as)16 b(not)g(used)h(in)g(building)i(the)d(serv)o
(er,)g(then)h Fn(E_PERM)f Fq(is)g(raised.)24 b(If)17
b(the)g(net)o(w)o(ork)e(connection)120 291 y(cannot)i(b)q(e)h(made)f
(for)f(some)h(reason,)g(then)g(other)g(errors)f(will)j(b)q(e)e
(returned,)h(dep)q(ending)h(up)q(on)120 345 y(the)c(particular)h(net)o
(w)o(ork)e(implemen)o(tation)j(in)f(use.)120 407 y(F)l(or)11
b(the)g(TCP/IP)g(net)o(w)o(ork)g(implemen)o(tations)h(\(the)g(only)g
(ones)f(as)g(of)g(this)h(writing)g(that)f(supp)q(ort)120
461 y(outb)q(ound)j(connections\),)g(there)f(m)o(ust)f(b)q(e)i(t)o(w)o
(o)e(argumen)o(ts,)g(a)h(string)g(naming)g(a)g(host)g(\(p)q(ossibly)120
515 y(using)i(the)g(n)o(umeric)g(In)o(ternet)g(syn)o(tax\))e(and)i(an)f
(in)o(teger)h(sp)q(ecifying)h(a)e(TCP)g(p)q(ort.)19 b(If)c(a)f(connec-)
120 569 y(tion)h(cannot)f(b)q(e)i(made)f(b)q(ecause)g(the)g(host)f(do)q
(es)h(not)g(exist,)f(the)h(p)q(ort)f(do)q(es)i(not)e(exist,)h(the)f
(host)120 623 y(is)f(not)f(reac)o(hable)h(or)f(refused)h(the)g
(connection,)g Fn(E_INVARG)f Fq(is)h(raised.)19 b(If)13
b(the)g(connection)g(cannot)120 677 y(b)q(e)j(made)f(for)g(other)f
(reasons,)h(including)j(resource)d(limitations,)h(then)g
Fn(E_QUOTA)e Fq(is)i(raised.)120 739 y(The)21 b(outb)q(ound)h
(connection)h(pro)q(cess)e(in)o(v)o(olv)o(es)h(certain)f(steps)h(that)e
(can)h(tak)o(e)g(quite)h(a)f(long)120 793 y(time,)16
b(during)g(whic)o(h)h(the)e(serv)o(er)h(is)g(not)f(doing)h(an)o(ything)
g(else,)g(includin)q(g)i(resp)q(onding)f(to)e(user)120
847 y(commands)j(and)h(executing)g(MOO)g(tasks.)29 b(See)19
b(the)g(c)o(hapter)f(on)g(serv)o(er)h(assumptions)f(ab)q(out)120
901 y(the)c(database)g(for)f(details)i(ab)q(out)f(ho)o(w)g(the)g(serv)o
(er)g(limits)h(the)f(amoun)o(t)g(of)f(time)i(it)f(will)i(w)o(ait)e(for)
120 955 y(these)h(steps)h(to)e(successfully)j(complete.)120
1017 y(It)f(is)h(w)o(orth)e(men)o(tioning)i(one)f(tric)o(ky)g(p)q(oin)o
(t)h(concerning)g(the)f(use)h(of)e(this)i(function.)23
b(Since)18 b(the)120 1071 y(serv)o(er)i(treats)f(the)i(new)f
(connection)i(prett)o(y)e(m)o(uc)o(h)g(lik)o(e)i(an)o(y)e(normal)g(pla)
o(y)o(er)g(connection,)j(it)120 1124 y(will)18 b(naturally)g(try)e(to)g
(parse)h(an)o(y)g(input)g(from)g(that)f(connection)i(as)e(commands)h
(in)g(the)g(usual)120 1178 y(w)o(a)o(y)l(.)i(T)l(o)c(prev)o(en)o(t)g
(this)g(treatmen)o(t,)f(y)o(ou)h(should)h(use)f Fn
(set_connection_option\(\))d Fq(to)j(set)g(the)120 1232
y Fn("hold-input")f Fq(option)h(true)g(on)g(the)g(connection.)1725
1315 y(F)l(unction)-1899 b Fg(value)20 b Ff(listen)k
Fh(\()p Fn(obj)15 b Fl(ob)s(ject)p Fn(,)f Fl(p)q(oin)o(t)j
Fk([)p Fn(,)e Fl(prin)o(t-messages)r Fk(])p Fh(\))120
1369 y Fq(Create)i(a)g(new)h(p)q(oin)o(t)f(at)g(whic)o(h)i(the)e(serv)o
(er)g(will)i(listen)g(for)e(net)o(w)o(ork)f(connections,)j(just)e(as)g
(it)120 1423 y(do)q(es)d(normally)l(.)21 b Fl(Ob)s(ject)15
b Fq(is)f(the)g(ob)s(ject)g(whose)f(v)o(erbs)h Fn(do_login_command)p
Fq(,)e Fn(do_command)p Fq(,)g Fn(do_)120 1477 y(out_of_band_command)p
Fq(,)18 b Fn(user_connected)p Fq(,)h Fn(user_created)p
Fq(,)g Fn(user_reconnected)p Fq(,)g Fn(user_)120 1531
y(disconnected)p Fq(,)14 b(and)j Fn(user_client_disconnected)c
Fq(will)k(b)q(e)g(called)h(at)e(appropriate)g(p)q(oin)o(ts,)120
1585 y(just)e(as)h(these)f(v)o(erbs)h(are)f(called)i(on)f
Fn(#0)f Fq(for)g(normal)h(connections.)21 b(\(See)15
b(the)f(c)o(hapter)h(on)f(serv)o(er)120 1639 y(assumptions)19
b(ab)q(out)g(the)g(database)f(for)g(the)h(complete)h(story)e(on)g(when)
i(these)f(functions)g(are)120 1692 y(called.\))38 b Fl(P)o(oin)o(t)21
b Fq(is)g(a)g(net)o(w)o(ork-con\014guration-sp)q(eci\014c)h(parameter)e
(describing)i(the)f(listening)120 1746 y(p)q(oin)o(t.)26
b(If)18 b Fl(prin)o(t-messages)h Fq(is)e(pro)o(vided)h(and)g(true,)f
(then)g(the)h(v)m(arious)f(database-con\014gurable)120
1800 y(messages)f(\(also)g(detailed)j(in)e(the)g(c)o(hapter)f(on)h
(serv)o(er)f(assumptions\))h(will)h(b)q(e)g(prin)o(ted)f(on)g(con-)120
1854 y(nections)d(receiv)o(ed)g(at)f(the)g(new)h(listening)h(p)q(oin)o
(t.)20 b Fn(Listen\(\))12 b Fq(returns)h Fl(canon)p Fq(,)g(a)g
(`canonicalized')120 1908 y(v)o(ersion)i(of)g Fl(p)q(oin)o(t)p
Fq(,)g(with)h(an)o(y)f(con\014guration-sp)q(eci\014c)i(defaulting)g(or)
d(aliasing)j(accoun)o(ted)e(for.)120 1970 y(This)h(raises)g
Fn(E_PERM)e Fq(if)i(the)f(programmer)g(is)g(not)g(a)h(wizard,)f
Fn(E_INVARG)f Fq(if)i Fl(ob)s(ject)g Fq(is)g(in)o(v)m(alid)h(or)120
2024 y(there)i(is)h(already)g(a)f(listening)i(p)q(oin)o(t)f(describ)q
(ed)h(b)o(y)e Fl(p)q(oin)o(t)p Fq(,)h(and)g Fn(E_QUOTA)e
Fq(if)i(some)f(net)o(w)o(ork-)120 2078 y(con\014guration-sp)q(eci\014c)
e(error)e(o)q(ccurred.)120 2140 y(F)l(or)i(the)h(TCP/IP)g
(con\014gurations,)g Fl(p)q(oin)o(t)h Fq(is)g(a)e(TCP)h(p)q(ort)g(n)o
(um)o(b)q(er)g(on)g(whic)o(h)g(to)g(listen)h(and)120
2194 y Fl(canon)i Fq(is)f(equal)i(to)d Fl(p)q(oin)o(t)j
Fq(unless)g Fl(p)q(oin)o(t)g Fq(is)f(zero,)g(in)g(whic)o(h)h(case)e
Fl(canon)g Fq(is)h(a)g(p)q(ort)f(n)o(um)o(b)q(er)120
2248 y(assigned)c(b)o(y)f(the)g(op)q(erating)h(system.)120
2310 y(F)l(or)f(the)h(lo)q(cal)h(m)o(ulti-user)g(con\014gurations,)e
Fl(p)q(oin)o(t)j Fq(is)e(the)g(UNIX)g(\014le)h(name)f(to)f(b)q(e)h
(used)h(as)e(the)120 2364 y(connection)h(p)q(oin)o(t)g(and)f
Fl(canon)h Fq(is)f(alw)o(a)o(ys)g(equal)h(to)e Fl(p)q(oin)o(t)p
Fq(.)120 2426 y(In)19 b(the)f(single-user)i(con\014guration,)f(the)f
(can)g(b)q(e)h(only)g(one)f(listening)i(p)q(oin)o(t)f(at)e(a)h(time;)h
Fl(p)q(oin)o(t)120 2480 y Fq(can)c(b)q(e)h(an)o(y)f(v)m(alue)h(at)f
(all)h(and)g Fl(canon)f Fq(is)h(alw)o(a)o(ys)e(zero.)1725
2562 y(F)l(unction)-1899 b Fg(none)20 b Ff(unlisten)k
Fh(\()p Fl(canon)p Fh(\))120 2616 y Fq(Stop)18 b(listening)i(for)e
(connections)h(on)f(the)g(p)q(oin)o(t)h(describ)q(ed)h(b)o(y)e
Fl(canon)p Fq(,)h(whic)o(h)g(should)g(b)q(e)g(the)120
2670 y(second)f(elemen)o(t)g(of)f(some)g(elemen)o(t)h(of)f(the)g(list)h
(returned)g(b)o(y)f Fn(listeners\(\))p Fq(.)25 b(Raises)18
b Fn(E_PERM)p eop
%%Page: 60 62
60 61 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(60)120 183 y(if)15 b(the)g(programmer)e(is)j(not)e(a)g
(wizard)h(and)g Fn(E_INVARG)f Fq(if)h(there)g(do)q(es)g(not)f(exist)h
(a)g(listener)h(with)120 237 y(that)e(description.)1725
319 y(F)l(unction)-1899 b Fg(list)20 b Ff(listeners)k
Fh(\(\))120 372 y Fq(Returns)e(a)f(list)i(describing)g(all)g(existing)f
(listening)i(p)q(oin)o(ts,)f(including)i(the)c(default)h(one)g(set)120
426 y(up)e(automatically)g(b)o(y)f(the)h(serv)o(er)f(when)h(it)g(w)o
(as)e(started)h(\(unless)h(that)f(one)h(has)f(since)i(b)q(een)120
480 y(destro)o(y)o(ed)15 b(b)o(y)g(a)g(call)h(to)f Fn(unlisten\(\))p
Fq(\).)j(Eac)o(h)d(elemen)o(t)h(of)e(the)i(list)g(has)f(the)g(follo)o
(wing)h(form:)240 540 y Fn({)p Fl(ob)s(ject)p Fn(,)23
b Fl(canon)p Fn(,)h Fl(prin)o(t-messages)r Fn(})120 601
y Fq(where)14 b Fl(ob)s(ject)g Fq(is)h(the)e(\014rst)h(argumen)o(t)f
(giv)o(en)h(in)h(the)e(call)i(to)f Fn(listen\(\))e Fq(to)h(create)h
(this)g(listening)120 655 y(p)q(oin)o(t,)h Fl(prin)o(t-messages)j
Fq(is)d(true)h(if)f(the)h(third)g(argumen)o(t)e(in)i(that)f(call)h(w)o
(as)f(pro)o(vided)h(and)f(true,)120 709 y(and)h Fl(canon)h
Fq(w)o(as)e(the)h(v)m(alue)h(returned)g(b)o(y)f(that)g(call.)23
b(\(F)l(or)16 b(the)g(initial)i(listening)g(p)q(oin)o(t,)f
Fl(ob)s(ject)120 763 y Fq(is)d Fn(#0)p Fq(,)e Fl(canon)h
Fq(is)h(determined)g(b)o(y)f(the)g(command-line)i(argumen)o(ts)d(or)h
(a)g(net)o(w)o(ork-con\014guration-)120 817 y(sp)q(eci\014c)k(default,)
e(and)h Fl(prin)o(t-messages)h Fq(is)f(true.\))62 898
y(Please)h(note)f(that)f(there)i(is)f(nothing)h(sp)q(ecial)h(ab)q(out)e
(the)g(initial)i(listening)g(p)q(oin)o(t)f(created)f(b)o(y)g(the)g
(serv)o(er)0 952 y(when)f(it)g(starts;)e(y)o(ou)h(can)h(use)g
Fn(unlisten\(\))e Fq(on)i(it)g(just)f(as)g(if)h(it)g(had)g(b)q(een)h
(created)f(b)o(y)f Fn(listen\(\))p Fq(.)19 b(This)c(can)0
1006 y(b)q(e)g(useful;)g(for)e(example,)i(under)f(one)g(of)g(the)g
(TCP/IP)g(con\014gurations,)g(y)o(ou)f(migh)o(t)h(start)f(up)h(y)o(our)
f(serv)o(er)h(on)0 1060 y(some)h(obscure)g(p)q(ort,)f(sa)o(y)g(12345,)f
(connect)j(to)e(it)h(b)o(y)g(y)o(ourself)g(for)f(a)h(while,)h(and)f
(then)g(op)q(en)g(it)g(up)h(to)e(normal)0 1114 y(users)h(b)o(y)g(ev)m
(aluating)i(the)e(statmen)o(ts)120 1174 y Fn(unlisten\(12345\);)22
b(listen\(#0,)g(7777,)h(1\))0 1295 y Fj(4.4.5)30 b(Op)r(erations)15
b(In)n(v)n(olving)h(Times)f(and)g(Dates)1725 1406 y Fq(F)l(unction)
-1899 b Fg(int)20 b Ff(time)i Fh(\(\))120 1460 y Fq(Returns)13
b(the)g(curren)o(t)g(time,)g(represen)o(ted)g(as)f(the)h(n)o(um)o(b)q
(er)g(of)f(seconds)i(that)e(ha)o(v)o(e)g(elapsed)i(since)120
1514 y(midnigh)o(t)i(on)f(1)g(Jan)o(uary)g(1970,)f(Green)o(wic)o(h)i
(Mean)f(Time.)1725 1595 y(F)l(unction)-1899 b Fg(str)20
b Ff(ctime)j Fh(\()p Fk([)p Fn(int)14 b Fl(time)s Fk(])p
Fh(\))120 1649 y Fq(In)o(terprets)19 b Fl(time)j Fq(as)d(a)g(time,)h
(using)g(the)f(same)g(represen)o(tation)g(as)g(giv)o(en)g(in)h(the)f
(description)120 1703 y(of)g Fn(time\(\))p Fq(,)g(ab)q(o)o(v)o(e,)h
(and)g(con)o(v)o(erts)e(it)i(in)o(to)g(a)f(28-c)o(haracter,)g(h)o
(uman-readable)h(string)g(in)g(the)120 1757 y(follo)o(wing)c(format:)
240 1816 y Fn(Mon)23 b(Aug)h(13)f(19:13:20)g(1990)h(PDT)120
1878 y Fq(If)17 b(the)g(curren)o(t)f(da)o(y)g(of)g(the)h(mon)o(th)f(is)
h(less)h(than)e(10,)g(then)h(an)g(extra)f(blank)h(app)q(ears)g(b)q(et)o
(w)o(een)120 1932 y(the)e(mon)o(th)g(and)g(the)h(da)o(y:)240
1991 y Fn(Mon)23 b(Apr)48 b(1)23 b(14:10:43)g(1991)h(PST)120
2052 y Fq(If)15 b Fl(time)k Fq(is)c(not)g(pro)o(vided,)h(then)f(the)g
(curren)o(t)h(time)f(is)h(used.)120 2114 y(Note)h(that)g
Fn(ctime\(\))g Fq(in)o(terprets)h Fl(time)i Fq(for)d(the)h(lo)q(cal)h
(time)f(zone)g(of)f(the)h(computer)f(on)h(whic)o(h)120
2168 y(the)d(MOO)h(serv)o(er)f(is)g(running.)0 2290 y
Fj(4.4.6)30 b(MOO-Co)r(de)16 b(Ev)m(aluation)e(and)i(T)-5
b(ask)15 b(Manipulation)1725 2400 y Fq(F)l(unction)-1899
b Fg(none)20 b Ff(raise)j Fh(\()p Fl(co)q(de)18 b Fk([)p
Fn(,)c(str)h Fl(message)i Fk([)p Fn(,)e Fl(v)m(alue)s
Fk(]])p Fh(\))120 2454 y Fq(Raises)j Fl(co)q(de)i Fq(as)d(an)g(error)g
(in)g(the)h(same)f(w)o(a)o(y)f(as)g(other)h(MOO)h(expressions,)g
(statemen)o(ts,)e(and)120 2508 y(functions)h(do.)24 b
Fl(Message)p Fq(,)15 b(whic)o(h)j(defaults)f(to)e(the)i(v)m(alue)g(of)f
Fn(tostr\()p Fl(co)q(de)s Fn(\))p Fq(,)g(and)h Fl(v)m(alue)p
Fq(,)g(whic)o(h)120 2562 y(defaults)c(to)g(zero,)f(are)h(made)g(a)o(v)m
(ailable)h(to)e(an)o(y)h Fn(try)p Fq(-)p Fn(except)f
Fq(statemen)o(ts)f(that)i(catc)o(h)f(the)h(error.)120
2616 y(If)k(the)g(error)g(is)g(not)g(caugh)o(t,)g(then)g
Fl(message)i Fq(will)g(app)q(ear)e(on)g(the)g(\014rst)g(line)i(of)d
(the)h(tracebac)o(k)120 2670 y(prin)o(ted)f(to)f(the)g(user.)p
eop
%%Page: 61 63
61 62 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(61)1725 183 y(F)l(unction)-1899 b Fg(value)20
b Ff(call)p 236 183 18 3 v 23 w(function)j Fh(\()p Fn(str)14
b Fl(func-name)p Fn(,)i Fl(arg)p Fn(,)e Fi(:)8 b(:)g(:)n
Fh(\))120 237 y Fq(Calls)14 b(the)f(built-in)i(function)f(named)g
Fl(func-name)p Fq(,)f(passing)h(the)f(giv)o(en)h(argumen)o(ts,)e(and)h
(returns)120 291 y(whatev)o(er)19 b(that)h(function)h(returns.)34
b(Raises)21 b Fn(E_INVARG)e Fq(if)h Fl(func-name)k Fq(is)c(not)g
(recognized)h(as)120 345 y(the)d(name)f(of)g(a)h(kno)o(wn)f(built-in)j
(function.)28 b(This)18 b(allo)o(ws)g(y)o(ou)f(to)g(compute)g(the)h
(name)g(of)f(the)120 399 y(function)e(to)f(call)h(and,)f(in)i
(particular,)e(allo)o(ws)h(y)o(ou)f(to)f(write)i(a)f(call)h(to)f(a)g
(built-in)j(function)e(that)120 453 y(ma)o(y)f(or)h(ma)o(y)g(not)f
(exist)i(in)g(the)f(particular)h(v)o(ersion)g(of)e(the)i(serv)o(er)e(y)
o(ou're)h(using.)1725 554 y(F)l(unction)-1899 b Fg(list)20
b Ff(function)p 332 554 V 21 w(info)i Fh(\()p Fk([)p
Fn(str)14 b Fl(name)s Fk(])p Fh(\))120 608 y Fq(Returns)j(descriptions)
i(of)d(the)h(built-in)i(functions)f(a)o(v)m(ailable)h(on)e(the)f(serv)o
(er.)25 b(If)17 b Fl(name)j Fq(is)d(pro-)120 662 y(vided,)23
b(only)e(the)f(description)i(of)e(the)h(function)g(with)g(that)e(name)i
(is)g(returned.)36 b(If)20 b Fl(name)j Fq(is)120 716
y(omitted,)14 b(a)f(list)h(of)f(descriptions)i(is)g(returned,)e(one)h
(for)f(eac)o(h)h(function)g(a)o(v)m(ailable)i(on)d(the)h(serv)o(er.)120
770 y(Raised)19 b Fn(E_INVARG)d Fq(if)i Fl(name)h Fq(is)f(pro)o(vided)g
(but)g(no)f(function)h(with)g(that)f(name)g(is)h(a)o(v)m(ailable)h(on)
120 823 y(the)c(serv)o(er.)120 895 y(Eac)o(h)g(function)h(description)h
(is)e(a)g(list)h(of)f(the)g(follo)o(wing)h(form:)240
964 y Fn({)p Fl(name)p Fn(,)24 b Fl(min-args)p Fn(,)f
Fl(max-args)p Fn(,)g Fl(t)o(yp)q(es)120 1035 y Fq(where)16
b Fl(name)i Fq(is)f(the)f(name)f(of)h(the)g(built-in)i(function,)e
Fl(min-args)i Fq(is)e(the)g(minim)o(um)h(n)o(um)o(b)q(er)f(of)120
1089 y(argumen)o(ts)c(that)g(m)o(ust)g(b)q(e)h(pro)o(vided)h(to)e(the)h
(function,)g Fl(max-args)h Fq(is)f(the)g(maxim)o(um)f(n)o(um)o(b)q(er)h
(of)120 1143 y(argumen)o(ts)e(that)g(can)g(b)q(e)h(pro)o(vided)h(to)e
(the)g(function)i(or)e Fn(-1)g Fq(if)h(there)g(is)g(no)f(maxim)o(um,)h
(and)g Fl(t)o(yp)q(es)120 1196 y Fq(is)k(a)g(list)g(of)g
Fl(max-args)g Fq(in)o(tegers)g(\(or)f Fl(min-args)i Fq(if)g
Fl(max-args)f Fq(is)g Fn(-1)p Fq(\),)f(eac)o(h)h(of)f(whic)o(h)i
(represen)o(ts)120 1250 y(the)f(t)o(yp)q(e)g(of)g(argumen)o(t)g
(required)h(in)g(the)f(corresp)q(onding)h(p)q(osition.)24
b(Eac)o(h)16 b(t)o(yp)q(e)g(n)o(um)o(b)q(er)h(is)f(as)120
1304 y(w)o(ould)h(b)q(e)h(returned)g(from)e(the)h Fn(typeof\(\))f
Fq(built-in)k(function)d(except)h(that)e Fn(-1)h Fq(indicates)i(that)
120 1358 y(an)o(y)e(t)o(yp)q(e)g(of)g(v)m(alue)h(is)g(acceptable)g(and)
f Fn(-2)g Fq(indicates)h(that)f(either)h(in)o(tegers)f(or)f
(\015oating-p)q(oin)o(t)120 1412 y(n)o(um)o(b)q(ers)f(ma)o(y)g(b)q(e)h
(giv)o(en.)k(F)l(or)15 b(example,)g(here)h(are)f(sev)o(eral)g(en)o
(tries)h(from)e(the)i(list:)240 1481 y Fn({"listdelete",)22
b(2,)i(2,)f({4,)h(0}})240 1533 y({"suspend",)e(0,)i(1,)g({0}})240
1585 y({"server_log",)e(1,)i(2,)f({2,)h(-1}})240 1637
y({"max",)f(1,)g(-1,)h({-2}})240 1689 y({"tostr",)f(0,)g(-1,)h({}})120
1760 y(Listdelete\(\))13 b Fq(tak)o(es)g(exactly)i(2)f(argumen)o(ts,)f
(of)h(whic)o(h)h(the)g(\014rst)e(m)o(ust)h(b)q(e)h(a)f(list)h(\()p
Fn(LIST)g(==)f(4)p Fq(\))120 1814 y(and)i(the)g(second)g(m)o(ust)f(b)q
(e)i(an)e(in)o(teger)h(\()p Fn(INT)f(==)f(0)p Fq(\).)21
b Fn(Suspend\(\))15 b Fq(has)h(one)f(optional)i(argumen)o(t)120
1868 y(that,)f(if)h(pro)o(vided,)g(m)o(ust)g(b)q(e)g(an)f(in)o(teger.)
25 b Fn(Server_log\(\))15 b Fq(has)h(one)h(required)h(argumen)o(t)e
(that)120 1922 y(m)o(ust)c(b)q(e)h(a)f(string)g(\()p
Fn(STR)i(==)h(2)p Fq(\))d(and)g(one)h(optional)g(argumen)o(t)e(that,)h
(if)h(pro)o(vided,)g(ma)o(y)f(b)q(e)g(of)g(an)o(y)120
1976 y(t)o(yp)q(e.)21 b Fn(Max\(\))15 b Fq(requires)h(at)f(least)h(one)
g(argumen)o(t)e(but)i(can)g(tak)o(e)f(an)o(y)g(n)o(um)o(b)q(er)h(ab)q
(o)o(v)o(e)f(that,)g(and)120 2030 y(the)k(\014rst)f(argumen)o(t)f(m)o
(ust)h(b)q(e)h(either)h(an)e(in)o(teger)h(or)f(a)g(\015oating-p)q(oin)o
(t)h(n)o(um)o(b)q(er;)h(the)f(t)o(yp)q(e\(s\))120 2084
y(required)f(for)f(an)o(y)g(other)g(argumen)o(ts)g(can't)g(b)q(e)h
(determined)g(from)f(this)h(description.)28 b(Finally)l(,)120
2138 y Fn(tostr\(\))16 b Fq(tak)o(es)h(an)o(y)g(n)o(um)o(b)q(er)h(of)f
(argumen)o(ts)g(at)g(all,)h(but)g(it)g(can't)f(b)q(e)h(determined)h
(from)e(this)120 2192 y(description)g(whic)o(h)f(argumen)o(t)e(t)o(yp)q
(es)h(w)o(ould)h(b)q(e)g(acceptable)g(in)g(whic)o(h)g(p)q(ositions.)
1725 2292 y(F)l(unction)-1899 b Fg(list)20 b Ff(ev)m(al)j
Fh(\()p Fn(str)15 b Fl(string)t Fh(\))120 2346 y Fq(The)c(MOO-co)q(de)h
(compiler)g(pro)q(cesses)g Fl(string)i Fq(as)d(if)g(it)g(w)o(ere)g(to)f
(b)q(e)i(the)f(program)f(asso)q(ciated)h(with)120 2400
y(some)i(v)o(erb)g(and,)h(if)g(no)f(errors)g(are)g(found,)g(that)g
(\014ctional)h(v)o(erb)g(is)g(in)o(v)o(ok)o(ed.)19 b(If)14
b(the)f(programmer)120 2454 y(is)21 b(not,)h(in)g(fact,)f(a)g
(programmer,)f(then)i Fn(E_PERM)e Fq(is)h(raised.)37
b(The)22 b(normal)e(result)i(of)e(calling)120 2508 y
Fn(eval\(\))e Fq(is)i(a)e(t)o(w)o(o)g(elemen)o(t)i(list.)32
b(The)19 b(\014rst)g(elemen)o(t)h(is)f(true)g(if)h(there)f(w)o(ere)g
(no)g(compilation)120 2562 y(errors)d(and)h(false)h(otherwise.)25
b(The)17 b(second)h(elemen)o(t)g(is)f(either)h(the)f(result)g(returned)
h(from)e(the)120 2616 y(\014ctional)22 b(v)o(erb)g(\(if)f(there)g(w)o
(ere)g(no)h(compilation)g(errors\))e(or)h(a)g(list)h(of)f(the)h
(compiler's)g(error)120 2670 y(messages)15 b(\(otherwise\).)p
eop
%%Page: 62 64
62 63 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(62)120 183 y(When)15 b(the)g(\014ctional)h(v)o(erb)f
(is)h(in)o(v)o(ok)o(ed,)f(the)g(v)m(arious)g(built-in)j(v)m(ariables)e
(ha)o(v)o(e)f(v)m(alues)h(as)e(sho)o(wn)120 237 y(b)q(elo)o(w:)240
303 y Fn(player)95 b Fq(the)15 b(same)g(as)g(in)h(the)f(calling)i(v)o
(erb)240 355 y Fn(this)143 b(#-1)240 407 y(caller)95
b Fq(the)15 b(same)g(as)g(the)g(initial)i(v)m(alue)g(of)d
Fn(this)h Fq(in)h(the)f(calling)i(v)o(erb)240 511 y Fn(args)143
b({})240 562 y(argstr)95 b("")240 666 y(verb)143 b("")240
718 y(dobjstr)71 b("")240 770 y(dobj)143 b(#-1)240 822
y(prepstr)71 b("")240 874 y(iobjstr)g("")240 926 y(iobj)143
b(#-1)120 994 y Fq(The)18 b(\014ctional)g(v)o(erb)f(runs)h(with)f(the)h
(p)q(ermissions)h(of)e(the)g(programmer)f(and)i(as)f(if)g(its)h(`)p
Fn(d)p Fq(')e(p)q(er-)120 1048 y(missions)g(bit)g(w)o(ere)f(on.)240
1113 y Fn(eval\("return)22 b(3)i(+)g(4;"\))814 1110 y
Fo(\))932 1113 y Fn({1,)f(7})1725 1208 y Fq(F)l(unction)-1899
b Fg(none)20 b Ff(set)p 198 1208 18 3 v 20 w(task)p 321
1208 V 21 w(p)r(erms)g Fh(\()p Fn(obj)15 b Fl(who)r Fh(\))120
1262 y Fq(Changes)d(the)f(p)q(ermissions)i(with)f(whic)o(h)h(the)f
(curren)o(tly-executing)h(v)o(erb)f(is)g(running)h(to)e(b)q(e)h(those)
120 1316 y(of)j Fl(who)p Fq(.)k(If)d(the)f(programmer)f(is)i(neither)g
Fl(who)h Fq(nor)e(a)g(wizard,)g(then)h Fn(E_PERM)e Fq(is)i(raised.)240
1382 y Fk(Note)p Fq(:)j(This)d(do)q(es)f(not)g(c)o(hange)g(the)g(o)o
(wner)g(of)g(the)g(curren)o(tly-running)i(v)o(erb,)d(only)240
1433 y(the)h(p)q(ermissions)i(of)e(this)g(particular)h(in)o(v)o(o)q
(cation.)21 b(It)15 b(is)h(used)g(in)g(v)o(erbs)f(o)o(wned)g(b)o(y)240
1485 y(wizards)j(to)f(mak)o(e)g(themselv)o(es)h(run)f(with)h(lesser)g
(\(usually)h(non-wizard\))f(p)q(ermis-)240 1537 y(sions.)1725
1632 y(F)l(unction)-1899 b Fg(obj)20 b Ff(caller)p 234
1632 V 22 w(p)r(erms)g Fh(\(\))120 1685 y Fq(Returns)f(the)f(p)q
(ermissions)i(in)f(use)g(b)o(y)f(the)h(v)o(erb)f(that)g(called)i(the)e
(curren)o(tly-executing)i(v)o(erb.)120 1739 y(If)c(the)g(curren)o
(tly-executing)h(v)o(erb)f(w)o(as)e(not)i(called)h(b)o(y)e(another)g(v)
o(erb)h(\(i.e.,)f(it)h(is)g(the)g(\014rst)f(v)o(erb)120
1793 y(called)i(in)f(a)f(command)g(or)f(serv)o(er)h(task\),)f(then)i
Fn(caller_perms\(\))d Fq(returns)i Fn(#-1)p Fq(.)1725
1888 y(F)l(unction)-1899 b Fg(int)20 b Ff(tic)n(ks)p
214 1888 V 22 w(left)k Fh(\(\))1725 1942 y Fq(F)l(unction)-1899
b Fg(int)20 b Ff(seconds)p 291 1942 V 19 w(left)k Fh(\(\))120
1996 y Fq(These)c(t)o(w)o(o)e(functions)i(return)f(the)h(n)o(um)o(b)q
(er)f(of)g(tic)o(ks)h(or)e(seconds)i(\(resp)q(ectiv)o(ely\))g(left)g
(to)f(the)120 2050 y(curren)o(t)g(task)g(b)q(efore)g(it)g(will)i(b)q(e)
f(forcibly)g(terminated.)33 b(These)19 b(are)g(useful,)i(for)d
(example,)j(in)120 2104 y(deciding)c(when)f(to)f(call)h(`)p
Fn(suspend\(\))p Fq(')d(to)i(con)o(tin)o(ue)g(a)g(long-liv)o(ed)i
(computation.)1725 2198 y(F)l(unction)-1899 b Fg(int)20
b Ff(task)p 204 2198 V 20 w(id)k Fh(\(\))120 2252 y Fq(Returns)17
b(the)g(non-zero,)f(non-negativ)o(e)h(in)o(teger)g(iden)o(ti\014er)h
(for)e(the)h(curren)o(tly-executing)h(task.)120 2306
y(Suc)o(h)f(in)o(tegers)g(are)g(randomly)f(selected)i(for)f(eac)o(h)f
(task)g(and)h(can)g(therefore)f(safely)h(b)q(e)h(used)f(in)120
2360 y(circumstances)f(where)f(unpredictabili)q(t)o(y)i(is)f(required.)
1725 2454 y(F)l(unction)-1899 b Fg(value)20 b Ff(susp)r(end)h
Fh(\()p Fk([)p Fn(int)14 b Fl(seconds)r Fk(])p Fh(\))120
2508 y Fq(Susp)q(ends)19 b(the)e(curren)o(t)g(task,)f(and)h(resumes)g
(it)h(after)e(at)g(least)h Fl(seconds)j Fq(seconds.)26
b(\(If)17 b Fl(seconds)120 2562 y Fq(is)i(not)f(pro)o(vided,)i(the)e
(task)g(is)h(susp)q(ended)h(inde\014nitely;)i(suc)o(h)d(a)f(task)g(can)
g(only)h(b)q(e)g(resumed)120 2616 y(b)o(y)c(use)h(of)g(the)f
Fn(resume\(\))g Fq(function.\))21 b(When)16 b(the)g(task)e(is)j
(resumed,)e(it)h(will)h(ha)o(v)o(e)e(a)h(full)h(quota)120
2670 y(of)i(tic)o(ks)h(and)g(seconds.)34 b(This)21 b(function)f(is)g
(useful)h(for)e(programs)g(that)g(run)h(for)f(a)h(long)g(time)p
eop
%%Page: 63 65
63 64 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(63)120 183 y(or)17 b(require)i(a)f(lot)g(of)f(tic)o
(ks.)29 b(If)18 b Fl(seconds)i Fq(is)f(negativ)o(e,)f(then)g
Fn(E_INVARG)f Fq(is)i(raised.)28 b Fn(Suspend\(\))120
237 y Fq(returns)17 b(zero)g(unless)h(it)f(w)o(as)f(resumed)i(via)f
Fn(resume\(\))p Fq(,)f(in)i(whic)o(h)f(case)g(it)h(returns)e(the)h
(second)120 291 y(argumen)o(t)d(giv)o(en)i(to)f(that)f(function.)120
353 y(In)22 b(some)f(sense,)i(this)e(function)i(forks)d(the)h(`rest')g
(of)f(the)i(executing)g(task.)37 b(Ho)o(w)o(ev)o(er,)22
b(there)120 407 y(is)17 b(a)f(ma)s(jor)f(di\013erence)i(b)q(et)o(w)o
(een)g(the)f(use)h(of)f(`)p Fn(suspend\()p Fl(seconds)r
Fn(\))p Fq(')f(and)h(the)h(use)g(of)e(the)i(`)p Fn(fork)120
461 y(\()p Fl(seconds)r Fn(\))p Fq('.)h(The)11 b(`)p
Fn(fork)p Fq(')e(statemen)o(t)g(creates)h(a)g(new)h(task)f(\(a)g
Fl(fork)o(ed)g(task)s Fq(\))f(while)j(the)e(curren)o(tly-)120
515 y(running)22 b(task)f(still)i(go)q(es)e(on)g(to)g(completion,)j
(but)d(a)g Fn(suspend\(\))f Fq(susp)q(ends)j(the)e(curren)o(tly-)120
569 y(running)h(task)e(\(th)o(us)h(making)g(it)g(in)o(to)g(a)f
Fl(susp)q(ended)j(task)s Fq(\).)35 b(This)22 b(di\013erence)g(ma)o(y)e
(b)q(e)i(b)q(est)120 623 y(explained)17 b(b)o(y)e(the)h(follo)o(wing)g
(examples,)f(in)h(whic)o(h)g(one)g(v)o(erb)f(calls)h(another:)240
684 y Fn(.program)70 b(#0:caller_A)240 735 y(#0.prop)23
b(=)h(1;)240 787 y(#0:callee_A\(\);)240 839 y(#0.prop)f(=)h(2;)240
891 y(.)240 995 y(.program)70 b(#0:callee_A)240 1047
y(fork\(5\))288 1099 y(#0.prop)23 b(=)g(3;)240 1151 y(endfork)240
1202 y(.)240 1306 y(.program)70 b(#0:caller_B)240 1358
y(#0.prop)23 b(=)h(1;)240 1410 y(#0:callee_B\(\);)240
1462 y(#0.prop)f(=)h(2;)240 1514 y(.)240 1618 y(.program)70
b(#0:callee_B)240 1669 y(suspend\(5\);)240 1721 y(#0.prop)23
b(=)h(3;)240 1773 y(.)120 1836 y Fq(Consider)g Fn(#0:caller_A)p
Fq(,)g(whic)o(h)h(calls)g Fn(#0:callee_A)p Fq(.)43 b(Suc)o(h)25
b(a)e(task)g(w)o(ould)h(assign)g(1)g(to)120 1889 y Fn(#0.prop)p
Fq(,)d(call)h Fn(#0:callee_A)p Fq(,)f(fork)f(a)h(new)g(task,)h(return)f
(to)f Fn(#0:caller_A)p Fq(,)h(and)g(assign)g(2)120 1943
y(to)13 b Fn(#0.prop)p Fq(,)f(ending)j(this)e(task.)19
b(Fiv)o(e)13 b(seconds)h(later,)f(if)h(the)g(fork)o(ed)f(task)f(had)i
(not)f(b)q(een)h(killed,)120 1997 y(then)i(it)h(w)o(ould)f(b)q(egin)i
(to)d(run;)i(it)f(w)o(ould)g(assign)h(3)f(to)f Fn(#0.prop)g
Fq(and)h(then)h(stop.)22 b(So,)16 b(the)g(\014nal)120
2051 y(v)m(alue)g(of)f Fn(#0.prop)f Fq(\(i.e.,)h(the)g(v)m(alue)i
(after)d(more)h(than)g(5)g(seconds\))g(w)o(ould)h(b)q(e)g(3.)120
2114 y(No)o(w)i(consider)h Fn(#0:caller_B)p Fq(,)f(whic)o(h)h(calls)h
Fn(#0:callee_B)d Fq(instead)i(of)f Fn(#0:callee_A)p Fq(.)28
b(This)120 2168 y(task)17 b(w)o(ould)h(assign)g(1)f(to)g
Fn(#0.prop)p Fq(,)g(call)i Fn(#0:callee_B)p Fq(,)d(and)i(susp)q(end.)28
b(Fiv)o(e)18 b(seconds)g(later,)120 2222 y(if)f(the)g(susp)q(ended)h
(task)e(had)h(not)f(b)q(een)h(killed,)i(then)e(it)g(w)o(ould)g(resume;)
g(it)g(w)o(ould)g(assign)f(3)h(to)120 2276 y Fn(#0.prop)p
Fq(,)g(return)h(to)f Fn(#0:caller_B)p Fq(,)f(and)i(assign)g(2)f(to)g
Fn(#0.prop)p Fq(,)g(ending)i(the)f(task.)27 b(So,)18
b(the)120 2330 y(\014nal)e(v)m(alue)g(of)f Fn(#0.prop)f
Fq(\(i.e.,)h(the)g(v)m(alue)i(after)d(more)h(than)g(5)g(seconds\))g(w)o
(ould)h(b)q(e)g(2.)120 2392 y(A)c(susp)q(ended)i(task,)e(lik)o(e)h(a)f
(fork)o(ed)g(task,)g(can)g(b)q(e)h(describ)q(ed)h(b)o(y)f(the)f
Fn(queued_tasks\(\))e Fq(function)120 2446 y(and)17 b(killed)j(b)o(y)d
(the)g Fn(kill_task\(\))e Fq(function.)27 b(Susp)q(ending)19
b(a)e(task)f(do)q(es)i(not)e(c)o(hange)h(its)h(task)120
2500 y(id.)j(A)15 b(task)f(can)i(b)q(e)g(susp)q(ended)h(again)e(and)g
(again)g(b)o(y)h(successiv)o(e)g(calls)g(to)f Fn(suspend\(\))p
Fq(.)120 2562 y(By)e(default,)g(there)g(is)g(no)g(limit)h(to)e(the)h(n)
o(um)o(b)q(er)g(of)f(tasks)g(an)o(y)h(pla)o(y)o(er)f(ma)o(y)g(susp)q
(end,)i(but)f(suc)o(h)g(a)120 2616 y(limit)i(can)f(b)q(e)h(imp)q(osed)g
(from)e(within)i(the)f(database.)19 b(See)14 b(the)g(c)o(hapter)g(on)f
(serv)o(er)h(assumptions)120 2670 y(ab)q(out)h(the)g(database)g(for)g
(details.)p eop
%%Page: 64 66
64 65 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(64)1725 183 y(F)l(unction)-1899 b Fg(none)20
b Ff(resume)h Fh(\()p Fn(int)14 b Fl(task-id)j Fk([)p
Fn(,)e Fl(v)m(alue)s Fk(])p Fh(\))120 237 y Fq(Immediately)20
b(ends)f(the)g(susp)q(ension)h(of)f(the)f(susp)q(ended)j(task)d(with)h
(the)f(giv)o(en)i Fl(task-id)r Fq(;)g(that)120 291 y(task's)c(call)j
(to)e Fn(suspend\(\))f Fq(will)j(return)e Fl(v)m(alue)p
Fq(,)i(whic)o(h)f(defaults)g(to)f(zero.)26 b(If)18 b
Fl(v)m(alue)j Fq(is)d(of)f(t)o(yp)q(e)120 345 y Fn(ERR)p
Fq(,)i(it)f(will)j(b)q(e)e(raised,)g(rather)f(than)h(returned,)g(in)g
(the)g(susp)q(ended)h(task.)29 b Fn(Resume\(\))18 b Fq(raises)120
399 y Fn(E_INVARG)i Fq(if)i Fl(task-id)h Fq(do)q(es)e(not)g(sp)q(ecify)
h(an)f(existing)h(susp)q(ended)h(task)e(and)g Fn(E_PERM)f
Fq(if)i(the)120 453 y(programmer)14 b(is)i(neither)g(a)f(wizard)g(nor)g
(the)h(o)o(wner)e(of)h(the)g(sp)q(eci\014ed)j(task.)1725
547 y(F)l(unction)-1899 b Fg(list)20 b Ff(queue)p 273
547 18 3 v 21 w(info)i Fh(\()p Fk([)p Fn(obj)14 b Fl(pla)o(y)o(er)s
Fk(])p Fh(\))120 601 y Fq(If)h Fl(pla)o(y)o(er)k Fq(is)c(omitted,)g
(returns)g(a)g(list)h(of)f(ob)s(ject)f(n)o(um)o(b)q(ers)h(naming)h(all)
g(pla)o(y)o(ers)f(that)f(curren)o(tly)120 655 y(ha)o(v)o(e)h(activ)o(e)
h(task)e(queues)j(inside)g(the)f(serv)o(er.)k(If)c Fl(pla)o(y)o(er)j
Fq(is)d(pro)o(vided,)g(returns)f(the)h(n)o(um)o(b)q(er)f(of)120
709 y(bac)o(kground)d(tasks)f(curren)o(tly)h(queued)h(for)e(that)g
(user.)19 b(It)12 b(is)h(guaran)o(teed)e(that)g Fn(queue_info\()p
Fl(X)5 b Fn(\))120 763 y Fq(will)17 b(return)e(zero)g(for)g(an)o(y)g
Fl(X)k Fq(not)c(in)h(the)f(result)h(of)f Fn(queue_info\(\))p
Fq(.)1725 856 y(F)l(unction)-1899 b Fg(list)20 b Ff(queued)p
305 856 V 21 w(tasks)i Fh(\(\))120 910 y Fq(Returns)11
b(information)f(on)g(eac)o(h)h(of)e(the)i(bac)o(kground)f(tasks)f
(\(i.e.,)i(fork)o(ed,)f(susp)q(ended)i(or)e(reading\))120
964 y(o)o(wned)16 b(b)o(y)g(the)h(programmer)d(\(or,)i(if)g(the)h
(programmer)e(is)h(a)g(wizard,)h(all)g(queued)g(tasks\).)22
b(The)120 1018 y(returned)g(v)m(alue)g(is)g(a)f(list)h(of)f(lists,)i
(eac)o(h)f(of)e(whic)o(h)j(enco)q(des)f(certain)g(information)f(ab)q
(out)g(a)120 1072 y(particular)16 b(queued)g(task)f(in)h(the)f(follo)o
(wing)h(format:)240 1137 y Fn({)p Fl(task-id)p Fn(,)24
b Fl(start-time)p Fn(,)f Fl(x)p Fn(,)h Fl(y)p Fn(,)264
1189 y Fl(programmer)p Fn(,)e Fl(v)o(erb-lo)q(c)p Fn(,)j
Fl(v)o(erb-name)p Fn(,)f Fl(line)p Fn(,)h Fl(this)r Fn(})120
1257 y Fq(where)17 b Fl(task-id)h Fq(is)f(an)g(in)o(teger)f(iden)o
(ti\014er)i(for)e(this)h(queued)g(task,)f Fl(start-time)i
Fq(is)f(the)g(time)g(after)120 1311 y(whic)o(h)h(this)g(task)f(will)i
(b)q(egin)f(execution)h(\(in)f Fn(time\(\))e Fq(format\),)g
Fl(x)k Fq(and)e Fl(y)j Fq(are)c(obsolete)h(v)m(alues)120
1365 y(that)13 b(are)g(no)h(longer)g(in)o(teresting,)g
Fl(programmer)h Fq(is)f(the)g(p)q(ermissions)h(with)f(whic)o(h)g(this)g
(task)f(will)120 1419 y(b)q(egin)21 b(execution)f(\(and)g(also)f(the)h
(pla)o(y)o(er)f(who)h Fl(o)o(wns)g Fq(this)g(task\),)f
Fl(v)o(erb-lo)q(c)24 b Fq(is)c(the)f(ob)s(ject)g(on)120
1473 y(whic)o(h)e(the)f(v)o(erb)f(that)g(fork)o(ed)h(this)g(task)f(w)o
(as)g(de\014ned)i(at)e(the)h(time,)g Fl(v)o(erb-name)j
Fq(is)d(that)f(name)120 1527 y(of)g(that)f(v)o(erb,)h
Fl(line)20 b Fq(is)c(the)f(n)o(um)o(b)q(er)g(of)g(the)h(\014rst)f(line)
h(of)f(the)h(co)q(de)g(in)g(that)e(v)o(erb)h(that)g(this)h(task)120
1581 y(will)f(execute,)e(and)g Fl(this)j Fq(is)d(the)g(v)m(alue)h(of)f
(the)g(v)m(ariable)h(`)p Fn(this)p Fq(')d(in)j(that)e(v)o(erb.)19
b(F)l(or)13 b(reading)g(tasks,)120 1635 y Fl(start-time)k
Fq(is)f Fn(-1)p Fq(.)120 1702 y(The)g Fl(x)i Fq(and)e
Fl(y)k Fq(\014elds)c(are)g(no)o(w)f(obsolete)h(and)f(are)h(retained)g
(only)g(for)f(bac)o(kw)o(ard-compatibilit)o(y)120 1756
y(reasons.)k(They)d(ma)o(y)e(b)q(e)i(reused)g(for)f(new)g(purp)q(oses)h
(in)g(some)f(future)g(v)o(ersion)g(of)g(the)g(serv)o(er.)1725
1850 y(F)l(unction)-1899 b Fg(none)20 b Ff(kill)p 202
1850 V 23 w(task)j Fh(\()p Fn(int)14 b Fl(task-id)r Fh(\))120
1904 y Fq(Remo)o(v)o(es)j(the)f(task)g(with)i(the)e(giv)o(en)i
Fl(task-id)h Fq(from)d(the)g(queue)i(of)e(w)o(aiting)h(tasks.)24
b(If)17 b(the)g(pro-)120 1958 y(grammer)12 b(is)h(not)g(the)g(o)o(wner)
f(of)h(that)f(task)g(and)h(not)g(a)f(wizard,)h(then)h
Fn(E_PERM)e Fq(is)h(raised.)20 b(If)13 b(there)120 2012
y(is)j(no)f(task)f(on)h(the)h(queue)g(with)f(the)h(giv)o(en)f
Fl(task-id)p Fq(,)g(then)h Fn(E_INVARG)e Fq(is)i(raised.)1725
2105 y(F)l(unction)-1899 b Fg(list)20 b Ff(callers)k
Fh(\()p Fk([)p Fl(include-line)q(-n)o(um)o(b)q(ers)r
Fk(])p Fh(\))120 2159 y Fq(Returns)19 b(information)f(on)g(eac)o(h)g
(of)g(the)g(v)o(erbs)g(and)g(built-in)j(functions)e(curren)o(tly)f(w)o
(aiting)h(to)120 2213 y(resume)14 b(execution)i(in)f(the)f(curren)o(t)g
(task.)19 b(When)c(one)f(v)o(erb)g(or)g(function)h(calls)g(another)f(v)
o(erb)g(or)120 2267 y(function,)j(execution)h(of)e(the)h(caller)h(is)f
(temp)q(orarily)g(susp)q(ended,)i(p)q(ending)f(the)f(called)h(v)o(erb)e
(or)120 2321 y(function)c(returning)f(a)g(v)m(alue.)20
b(A)o(t)10 b(an)o(y)h(giv)o(en)g(time,)h(there)f(could)h(b)q(e)g(sev)o
(eral)f(suc)o(h)g(p)q(ending)i(v)o(erbs)120 2375 y(and)18
b(functions:)25 b(the)17 b(one)h(that)e(called)j(the)f(curren)o(tly)g
(executing)g(v)o(erb,)f(the)h(v)o(erb)f(or)g(function)120
2429 y(that)11 b(called)j(that)e(one,)g(and)h(so)f(on.)18
b(The)13 b(result)g(of)e Fn(callers\(\))g Fq(is)i(a)f(list,)h(eac)o(h)f
(elemen)o(t)h(of)f(whic)o(h)120 2483 y(giv)o(es)j(information)h(ab)q
(out)f(one)g(p)q(ending)i(v)o(erb)e(or)g(function)h(in)g(the)f(follo)o
(wing)h(format:)240 2548 y Fn({)p Fl(this)p Fn(,)24 b
Fl(v)o(erb-name)p Fn(,)g Fl(programmer)p Fn(,)f Fl(v)o(erb-lo)q(c)p
Fn(,)h Fl(pla)o(y)o(er)p Fn(,)g Fl(line-n)o(um)o(b)q(er)s
Fn(})120 2616 y Fq(F)l(or)19 b(v)o(erbs,)i Fl(this)i
Fq(is)d(the)h(initial)h(v)m(alue)f(of)f(the)g(v)m(ariable)i(`)p
Fn(this)p Fq(')c(in)j(that)f(v)o(erb,)h Fl(v)o(erb-name)h
Fq(is)120 2670 y(the)16 b(name)g(used)h(to)e(in)o(v)o(ok)o(e)h(that)g
(v)o(erb,)f Fl(programmer)j Fq(is)f(the)f(pla)o(y)o(er)g(with)h(whose)f
(p)q(ermissions)p eop
%%Page: 65 67
65 66 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(65)120 183 y(that)19 b(v)o(erb)g(is)i(running,)g
Fl(v)o(erb-lo)q(c)i Fq(is)d(the)g(ob)s(ject)f(on)h(whic)o(h)g(that)f(v)
o(erb)h(is)g(de\014ned,)i Fl(pla)o(y)o(er)g Fq(is)120
237 y(the)14 b(initial)i(v)m(alue)g(of)d(the)i(v)m(ariable)g(`)p
Fn(player)p Fq(')e(in)h(that)g(v)o(erb,)g(and)g Fl(line-n)o(um)o(b)q
(er)20 b Fq(indicates)15 b(whic)o(h)120 291 y(line)20
b(of)d(the)h(v)o(erb's)f(co)q(de)i(is)f(executing.)29
b(The)18 b Fl(line-n)o(um)o(b)q(er)24 b Fq(elemen)o(t)18
b(is)h(included)h(only)f(if)f(the)120 345 y Fl(include-li)q(ne-num)o(b)
q(ers)i Fq(argumen)o(t)14 b(w)o(as)h(pro)o(vided)h(and)f(true.)120
412 y(F)l(or)d(functions,)h Fl(this)p Fq(,)g Fl(programmer)p
Fq(,)e(and)h Fl(v)o(erb-lo)q(c)k Fq(are)c(all)h Fn(#-1)p
Fq(,)f Fl(v)o(erb-name)j Fq(is)e(the)f(name)g(of)g(the)120
466 y(function,)j(and)f Fl(line-n)o(um)o(b)q(er)19 b
Fq(is)c(an)f(index)h(used)f(in)o(ternally)i(to)d(determine)i(the)f
(curren)o(t)g(state)f(of)120 520 y(the)i(built-in)j(function.)j(The)15
b(simplest)h(correct)f(test)g(for)f(a)h(built-in)j(function)e(en)o(try)
f(is)240 585 y Fn(\(VERB-LOC)23 b(==)g(#-1)48 b(&&)f(PROGRAMMER)22
b(==)i(#-1)47 b(&&)h(VERB-NAME)22 b(!=)i(""\))120 651
y Fq(The)15 b(\014rst)e(elemen)o(t)j(of)d(the)i(list)g(returned)g(b)o
(y)f Fn(callers\(\))f Fq(giv)o(es)h(information)h(on)f(the)g(v)o(erb)h
(that)120 705 y(called)j(the)e(curren)o(tly-executing)i(v)o(erb,)f(the)
f(second)h(elemen)o(t)g(describ)q(es)h(the)e(v)o(erb)h(that)e(called)
120 759 y(that)g(one,)h(and)g(so)g(on.)22 b(The)16 b(last)g(elemen)o(t)
h(of)e(the)h(list)h(describ)q(es)h(the)e(\014rst)f(v)o(erb)h(called)i
(in)f(this)120 813 y(task.)1725 905 y(F)l(unction)-1899
b Fg(list)20 b Ff(task)p 230 905 18 3 v 20 w(stac)n(k)k
Fh(\()p Fn(int)14 b Fl(task-id)k Fk([)p Fn(,)c Fl(include-li)q(ne)q(-n)
o(um)o(b)q(ers)r Fk(])p Fh(\))120 959 y Fq(Returns)20
b(information)g(lik)o(e)h(that)e(returned)h(b)o(y)g(the)f
Fn(callers\(\))g Fq(function,)i(but)f(for)f(the)h(sus-)120
1013 y(p)q(ended)f(task)d(with)i(the)f(giv)o(en)g Fl(task-id)r
Fq(;)h(the)f Fl(include-li)q(ne-)q(n)o(um)o(b)q(ers)22
b Fq(argumen)o(t)16 b(has)h(the)g(same)120 1067 y(meaning)e(as)f(in)h
Fn(callers\(\))p Fq(.)k(Raises)c Fn(E_INVARG)e Fq(if)i
Fl(task-id)i Fq(do)q(es)d(not)g(sp)q(ecify)i(an)e(existing)i(sus-)120
1121 y(p)q(ended)j(task)e(and)h Fn(E_PERM)f Fq(if)i(the)f(programmer)e
(is)i(neither)h(a)f(wizard)g(nor)f(the)h(o)o(wner)g(of)f(the)120
1175 y(sp)q(eci\014ed)g(task.)0 1314 y Fj(4.4.7)30 b(Administrativ)n(e)
16 b(Op)r(erations)1725 1435 y Fq(F)l(unction)-1899 b
Fg(str)20 b Ff(serv)n(er)p 252 1435 V 20 w(v)n(ersion)j
Fh(\(\))120 1489 y Fq(Returns)16 b(a)f(string)g(giving)h(the)f(v)o
(ersion)h(n)o(um)o(b)q(er)f(of)g(the)g(running)h(MOO)g(serv)o(er.)1725
1581 y(F)l(unction)-1899 b Fg(none)20 b Ff(serv)n(er)p
278 1581 V 20 w(log)j Fh(\()p Fn(str)15 b Fl(message)i
Fk([)p Fn(,)e Fl(is-error)s Fk(])p Fh(\))120 1635 y Fq(The)j(text)f(in)
h Fl(message)h Fq(is)f(sen)o(t)f(to)g(the)h(serv)o(er)f(log)g(with)h(a)
f(distinctiv)o(e)i(pre\014x)f(\(so)e(that)h(it)h(can)120
1689 y(b)q(e)e(distinguished)j(from)c(serv)o(er-generated)g
(messages\).)21 b(If)16 b(the)g(programmer)f(is)h(not)f(a)h(wizard,)120
1743 y(then)g Fn(E_PERM)f Fq(is)i(raised.)22 b(If)17
b Fl(is-error)i Fq(is)d(pro)o(vided)h(and)f(true,)g(then)g
Fl(message)i Fq(is)f(mark)o(ed)e(in)i(the)120 1797 y(serv)o(er)e(log)g
(as)g(an)g(error.)1725 1889 y(F)l(unction)-1899 b Fg(obj)20
b Ff(ren)n(um)n(b)r(er)h Fh(\()p Fn(obj)14 b Fl(ob)s(ject)q
Fh(\))120 1943 y Fq(The)h(ob)s(ject)f(n)o(um)o(b)q(er)h(of)f(the)h(ob)s
(ject)f(curren)o(tly)i(n)o(um)o(b)q(ered)f Fl(ob)s(ject)g
Fq(is)h(c)o(hanged)f(to)f(b)q(e)h(the)g(least)120 1997
y(nonnegativ)o(e)d(ob)s(ject)f(n)o(um)o(b)q(er)i(not)e(curren)o(tly)h
(in)h(use)f(and)g(the)g(new)g(ob)s(ject)f(n)o(um)o(b)q(er)i(is)f
(returned.)120 2051 y(If)i Fl(ob)s(ject)g Fq(is)g(not)g(v)m(alid,)h
(then)f Fn(E_INVARG)f Fq(is)h(raised.)20 b(If)14 b(the)g(programmer)e
(is)j(not)e(a)h(wizard,)g(then)120 2105 y Fn(E_PERM)h
Fq(is)h(raised.)21 b(If)16 b(there)f(are)g(no)h(un)o(used)g(nonnegativ)
o(e)g(ob)s(ject)f(n)o(um)o(b)q(ers)g(less)i(than)e Fl(ob)s(ject)p
Fq(,)120 2159 y(then)h Fl(ob)s(ject)f Fq(is)h(returned)f(and)h(no)f(c)o
(hanges)g(tak)o(e)g(place.)120 2225 y(The)j(references)g(to)f
Fl(ob)s(ject)h Fq(in)g(the)g(paren)o(t/c)o(hildren)g(and)g(lo)q
(cation/con)o(ten)o(ts)f(hierarc)o(hies)i(are)120 2279
y(up)q(dated)13 b(to)e(use)h(the)g(new)g(ob)s(ject)g(n)o(um)o(b)q(er,)g
(and)g(an)o(y)g(v)o(erbs,)g(prop)q(erties)g(and/or)g(ob)s(jects)f(o)o
(wned)120 2333 y(b)o(y)g Fl(ob)s(ject)h Fq(are)g(also)f(c)o(hanged)h
(to)f(b)q(e)h(o)o(wned)f(b)o(y)h(the)f(new)h(ob)s(ject)f(n)o(um)o(b)q
(er.)19 b(The)12 b(latter)f(op)q(eration)120 2387 y(can)i(b)q(e)h
(quite)g(time)f(consuming)h(if)g(the)f(database)f(is)i(large.)19
b(No)13 b(other)g(c)o(hanges)g(to)f(the)i(database)120
2441 y(are)j(p)q(erformed;)g(in)h(particular,)f(no)g(ob)s(ject)f
(references)i(in)f(prop)q(ert)o(y)g(v)m(alues)h(or)e(v)o(erb)h(co)q(de)
g(are)120 2495 y(up)q(dated.)120 2562 y(This)c(op)q(eration)g(is)h(in)o
(tended)g(for)e(use)h(in)h(making)f(new)g(v)o(ersions)g(of)f(the)h(Lam)
o(b)q(daCore)g(database)120 2616 y(from)19 b(the)h(then-curren)o(t)h
(Lam)o(b)q(daMOO)f(database,)g(and)g(other)g(similar)h(situations.)35
b(Its)20 b(use)120 2670 y(requires)c(great)e(care.)p
eop
%%Page: 66 68
66 67 bop 0 -58 a Fq(Chapter)15 b(4:)k(The)d(MOO)f(Programming)g
(Language)975 b(66)1725 183 y(F)l(unction)-1899 b Fg(none)20
b Ff(reset)p 248 183 18 3 v 20 w(max)p 375 183 V 20 w(ob)s(ject)j
Fh(\(\))120 237 y Fq(The)16 b(serv)o(er's)f(idea)i(of)e(the)h(highest)h
(ob)s(ject)e(n)o(um)o(b)q(er)h(ev)o(er)g(used)g(is)h(c)o(hanged)f(to)f
(b)q(e)h(the)g(highest)120 291 y(ob)s(ject)c(n)o(um)o(b)q(er)g(of)g(a)g
(curren)o(tly-existing)i(ob)s(ject,)e(th)o(us)g(allo)o(wing)h(reuse)f
(of)g(an)o(y)g(higher)h(n)o(um)o(b)q(ers)120 345 y(that)i(refer)h(to)f
(no)o(w-recycled)i(ob)s(jects.)k(If)16 b(the)g(programmer)e(is)j(not)e
(a)g(wizard,)h(then)h Fn(E_PERM)d Fq(is)120 399 y(raised.)120
466 y(This)f(op)q(eration)g(is)h(in)o(tended)g(for)e(use)h(in)h(making)
f(new)g(v)o(ersions)g(of)f(the)h(Lam)o(b)q(daCore)g(database)120
519 y(from)19 b(the)h(then-curren)o(t)h(Lam)o(b)q(daMOO)f(database,)g
(and)g(other)g(similar)h(situations.)35 b(Its)20 b(use)120
573 y(requires)c(great)e(care.)1725 665 y(F)l(unction)-1899
b Fg(list)20 b Ff(memory)p 334 665 V 18 w(usage)h Fh(\(\))120
719 y Fq(On)11 b(some)g(v)o(ersions)g(of)f(the)h(serv)o(er,)g(this)g
(returns)f(statistics)h(concerning)h(the)f(serv)o(er)f(consumption)120
773 y(of)15 b(system)g(memory)l(.)k(The)c(result)h(is)g(a)f(list)h(of)e
(lists,)i(eac)o(h)f(in)h(the)g(follo)o(wing)g(format:)240
837 y Fn({)p Fl(blo)q(c)o(k-size)p Fn(,)25 b Fl(n)o(used)p
Fn(,)g Fl(nfree)s Fn(})120 903 y Fq(where)17 b Fl(blo)q(c)o(k-size)k
Fq(is)c(the)f(size)i(in)f(b)o(ytes)g(of)f(a)g(particular)h(class)g(of)f
(memory)g(fragmen)o(ts,)f Fl(n)o(used)120 957 y Fq(is)f(the)g(n)o(um)o
(b)q(er)g(of)f(suc)o(h)h(fragmen)o(ts)f(curren)o(tly)h(in)h(use)f(in)g
(the)g(serv)o(er,)f(and)h Fl(nfree)j Fq(is)d(the)g(n)o(um)o(b)q(er)120
1011 y(of)h(suc)o(h)g(fragmen)o(ts)f(that)h(ha)o(v)o(e)g(b)q(een)h
(reserv)o(ed)f(for)g(use)g(but)h(are)e(curren)o(tly)i(free.)120
1078 y(On)d(serv)o(ers)f(for)g(whic)o(h)i(suc)o(h)f(statistics)f(are)g
(not)h(a)o(v)m(ailable,)h Fn(memory_usage\(\))d Fq(returns)h
Fn({})p Fq(.)19 b(The)120 1132 y(compilation)d(option)g
Fn(USE_GNU_MALLOC)d Fq(con)o(trols)h(whether)h(or)g(not)f(statistics)h
(are)g(a)o(v)m(ailable;)h(if)120 1186 y(the)f(option)h(is)f(not)g(pro)o
(vided,)h(statistics)f(are)g(not)g(a)o(v)m(ailable.)1725
1277 y(F)l(unction)-1899 b Fg(none)20 b Ff(dump)p 272
1277 V 19 w(database)i Fh(\(\))120 1331 y Fq(Requests)14
b(that)e(the)h(serv)o(er)g(c)o(hec)o(kp)q(oin)o(t)h(the)f(database)g
(at)f(its)i(next)f(opp)q(ortunit)o(y)l(.)19 b(It)14 b(is)f(not)g(nor-)
120 1385 y(mally)g(necessary)g(to)f(call)i(this)f(function;)h(the)e
(serv)o(er)h(automatically)g(c)o(hec)o(kp)q(oin)o(ts)g(the)g(database)
120 1439 y(at)i(regular)h(in)o(terv)m(als;)h(see)f(the)g(c)o(hapter)g
(on)g(serv)o(er)f(assumptions)h(ab)q(out)g(the)g(database)f(for)g(de-)
120 1493 y(tails.)20 b(If)c(the)f(programmer)f(is)i(not)f(a)f(wizard,)i
(then)f Fn(E_PERM)g Fq(is)g(raised.)1725 1584 y(F)l(unction)-1899
b Fg(int)20 b Ff(db)p 165 1584 V 20 w(disk)p 285 1584
V 21 w(size)k Fh(\(\))120 1638 y Fq(Returns)16 b(the)g(total)f(size,)i
(in)g(b)o(ytes,)e(of)g(the)h(most)f(recen)o(t)h(full)h(represen)o
(tation)f(of)g(the)g(database)120 1692 y(as)d(one)h(or)f(more)h(disk)g
(\014les.)21 b(Raises)14 b Fn(E_QUOTA)f Fq(if,)h(for)f(some)h(reason,)f
(no)h(suc)o(h)g(on-disk)g(represen-)120 1746 y(tation)h(is)h(curren)o
(tly)f(a)o(v)m(ailable.)1725 1837 y(F)l(unction)-1899
b Fg(none)20 b Ff(sh)n(utdo)n(wn)i Fh(\()p Fk([)p Fn(str)15
b Fl(message)s Fk(])p Fh(\))120 1891 y Fq(Requests)j(that)f(the)g(serv)
o(er)g(sh)o(ut)g(itself)i(do)o(wn)e(at)g(its)g(next)h(opp)q(ortunit)o
(y)l(.)27 b(Before)17 b(doing)h(so,)f(a)120 1945 y(notice)h(\(incorp)q
(orating)f Fl(message)p Fq(,)g(if)h(pro)o(vided\))g(is)g(prin)o(ted)f
(to)g(all)h(connected)g(pla)o(y)o(ers.)26 b(If)18 b(the)120
1999 y(programmer)c(is)i(not)e(a)h(wizard,)h(then)f Fn(E_PERM)f
Fq(is)i(raised.)p eop
%%Page: 67 69
67 68 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(67)0 183 y Fm(5)41 b(Serv)n(er)14
b(Commands)i(and)f(Database)g(Assumptions)62 277 y Fq(This)k(c)o
(hapter)f(describ)q(es)i(all)f(of)f(the)g(commands)g(that)f(are)h
(built)i(in)o(to)e(the)g(serv)o(er)g(and)g(ev)o(ery)g(prop)q(ert)o(y)0
331 y(and)h(v)o(erb)g(in)g(the)g(database)g(sp)q(eci\014cally)i
(accessed)f(b)o(y)e(the)h(serv)o(er.)31 b(Aside)20 b(from)e(what)g(is)h
(listed)h(here,)g(no)0 385 y(assumptions)15 b(are)g(made)g(b)o(y)h(the)
f(serv)o(er)g(concerning)h(the)f(con)o(ten)o(ts)g(of)g(the)g(database.)
0 516 y Fp(5.1)33 b(Built-in)18 b(Commands)62 604 y Fq(As)g(w)o(as)f
(men)o(tioned)h(in)g(the)g(c)o(hapter)f(on)h(command)f(parsing,)h
(there)g(are)f(\014v)o(e)h(commands)f(whose)h(in)o(ter-)0
657 y(pretation)h(is)g(\014xed)g(b)o(y)f(the)h(serv)o(er:)26
b Fn(PREFIX)p Fq(,)19 b Fn(OUTPUTPREFIX)p Fq(,)e Fn(SUFFIX)p
Fq(,)h Fn(OUTPUTSUFFIX)p Fq(,)g(and)g Fn(.program)p Fq(.)0
711 y(The)c(\014rst)f(four)g(of)g(these)h(are)f(in)o(tended)i(for)e
(use)g(b)o(y)h(programs)e(that)h(connect)h(to)f(the)g(MOO,)h(so-called)
g(`clien)o(t')0 765 y(programs.)30 b(The)19 b Fn(.program)e
Fq(command)i(is)g(used)h(b)o(y)f(programmers)e(to)h(asso)q(ciate)h(a)g
(MOO)g(program)f(with)0 819 y(a)g(particular)h(v)o(erb.)30
b(The)19 b(serv)o(er)f(can,)h(in)h(addition,)g(recognize)f(a)g(sixth)g
(sp)q(ecial)h(command)e(on)h(an)o(y)f(or)g(all)0 873
y(connections,)e(the)f Fl(\015ush)h Fq(command.)62 932
y(The)g(serv)o(er)g(also)g(p)q(erforms)g(sp)q(ecial)h(pro)q(cessing)g
(on)f(command)g(lines)i(that)d(b)q(egin)i(with)g(certain)f(punctu-)0
986 y(ation)f(c)o(haracters.)62 1045 y(This)h(section)g(discusses)g
(these)g(built-in)h(pieces)g(of)e(the)g(command-in)o(terpretation)g
(pro)q(cess.)0 1159 y Fj(5.1.1)30 b(Command-Output)16
b(Delimiters)62 1247 y Fq(Ev)o(ery)h(MOO)g(net)o(w)o(ork)f(connection)j
(has)e(asso)q(ciated)g(with)g(it)h(t)o(w)o(o)e(strings,)h(the)g
Fl(output)g(pre\014x)k Fq(and)c(the)0 1301 y Fl(output)h(su\016x)p
Fq(.)28 b(Just)18 b(b)q(efore)h(executing)g(a)f(command)g(t)o(yp)q(ed)g
(on)g(that)f(connection,)j(the)e(serv)o(er)g(prin)o(ts)g(the)0
1355 y(output)e(pre\014x,)g(if)g(an)o(y)l(,)g(to)f(the)h(pla)o(y)o(er.)
22 b(Similarly)l(,)c(just)e(after)f(\014nishing)j(the)e(command,)g(the)
g(output)f(su\016x,)0 1409 y(if)j(an)o(y)l(,)f(is)h(prin)o(ted)g(to)f
(the)g(pla)o(y)o(er.)27 b(Initially)l(,)20 b(these)d(strings)h(are)f
(not)g(de\014ned,)i(so)e(no)g(extra)f(prin)o(ting)j(tak)o(es)0
1463 y(place.)62 1522 y(The)i Fn(PREFIX)f Fq(and)h Fn(SUFFIX)f
Fq(commands)h(are)f(used)h(to)f(set)h(and)g(clear)g(these)g(strings.)37
b(They)21 b(ha)o(v)o(e)f(the)0 1576 y(follo)o(wing)c(simple)h(syn)o
(tax:)120 1633 y Fn(PREFIX)47 b Fl(output-pre\014x)120
1685 y Fn(SUFFIX)g Fl(output-su\016x)0 1743 y Fq(That)14
b(is,)h(all)h(text)e(after)g(the)h(command)f(name)h(and)g(an)o(y)g
(follo)o(wing)g(spaces)g(is)g(used)g(as)g(the)g(new)g(v)m(alue)h(of)e
(the)0 1797 y(appropriate)j(string.)26 b(If)17 b(there)g(is)h(no)f
(non-blank)h(text)f(after)f(the)i(command)f(string,)g(then)g(the)g
(corresp)q(ond-)0 1851 y(ing)i(string)f(is)g(cleared.)30
b(F)l(or)17 b(compatibilit)o(y)j(with)f(some)e(general)i(MUD)e(clien)o
(t)j(programs,)d(the)h(serv)o(er)g(also)0 1905 y(recognizes)e
Fn(OUTPUTPREFIX)e Fq(as)g(a)h(synon)o(ym)g(for)g Fn(PREFIX)f
Fq(and)h Fn(OUTPUTSUFFIX)f Fq(as)h(a)g(synon)o(ym)g(for)f
Fn(SUFFIX)p Fq(.)62 1964 y(These)19 b(commands)f(are)g(in)o(tended)i
(for)e(use)g(b)o(y)h(programs)e(connected)i(to)f(the)g(MOO,)h(so)f
(that)f(they)i(can)0 2018 y(issue)e(MOO)f(commands)g(and)g(reliably)i
(determine)f(the)f(b)q(eginning)j(and)d(end)h(of)e(the)h(resulting)h
(output.)23 b(F)l(or)0 2072 y(example,)16 b(one)f(editor-based)h(clien)
o(t)g(program)e(sends)i(this)g(sequence)g(of)f(commands)g(on)g(o)q
(ccasion:)120 2129 y Fn(PREFIX)23 b(>>MOO-Prefix<<)120
2181 y(SUFFIX)g(>>MOO-Suffix<<)120 2233 y(@list)g Fl(ob)s(ject)q
Fn(:)p Fl(v)o(erb)h Fn(without)f(numbers)120 2285 y(PREFIX)120
2336 y(SUFFIX)0 2395 y Fq(The)c(e\013ect)g(of)f(whic)o(h,)j(in)f(a)e
(Lam)o(b)q(daCore-deriv)o(ed)i(database,)f(is)h(to)e(prin)o(t)h(out)g
(the)g(co)q(de)g(for)g(the)g(named)0 2449 y(v)o(erb)e(preceded)h(b)o(y)
e(a)h(line)h(con)o(taining)f(only)h(`)p Fn(>>MOO-Prefix<<)p
Fq(')c(and)j(follo)o(w)o(ed)g(b)o(y)f(a)h(line)h(con)o(taining)f(only)0
2503 y(`)p Fn(>>MOO-Suffix<<)p Fq('.)29 b(This)19 b(enables)i(the)e
(editor)g(to)f(reliably)j(extract)e(the)g(program)f(text)g(from)g(the)i
(MOO)0 2557 y(output)15 b(and)g(sho)o(w)g(it)g(to)g(the)g(user)h(in)g
(a)f(separate)f(editor)i(windo)o(w.)k(There)15 b(are)g(man)o(y)g(other)
g(p)q(ossible)i(uses.)62 2616 y(The)f(built-in)i(function)e
Fn(output_delimiters\(\))d Fq(can)i(b)q(e)h(used)g(b)o(y)f(MOO)h(co)q
(de)g(to)f(\014nd)h(out)f(the)g(output)0 2670 y(pre\014x)h(and)f
(su\016x)g(curren)o(tly)h(in)g(e\013ect)f(on)g(a)g(particular)h(net)o
(w)o(ork)e(connection.)p eop
%%Page: 68 70
68 69 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(68)0 183 y Fj(5.1.2)30
b(Programming)62 282 y Fq(The)13 b Fn(.program)f Fq(command)g(is)h(a)g
(common)f(w)o(a)o(y)f(for)h(programmers)g(to)g(asso)q(ciate)g(a)h
(particular)g(MOO-co)q(de)0 336 y(program)h(with)i(a)e(particular)i(v)o
(erb.)k(It)15 b(has)g(the)h(follo)o(wing)g(syn)o(tax:)120
404 y Fn(.program)23 b Fl(ob)s(ject)q Fn(:)p Fl(v)o(erb)120
456 y Fi(:)8 b(:)g(:)n Fl(sev)o(eral)15 b(lines)i(of)e(MOO)g(co)q(de)s
Fi(:)8 b(:)g(:)120 508 y Fn(.)0 577 y Fq(That)13 b(is,)h(after)f(t)o
(yping)h(the)g Fn(.program)f Fq(command,)g(then)h(all)h(lines)g(of)f
(input)h(from)e(the)g(pla)o(y)o(er)h(are)g(considered)0
631 y(to)19 b(b)q(e)h(a)g(part)f(of)g(the)h(MOO)g(program)e(b)q(eing)j
(de\014ned.)35 b(This)20 b(ends)g(as)f(so)q(on)h(as)f(the)h(pla)o(y)o
(er)f(t)o(yp)q(es)h(a)f(line)0 685 y(con)o(taining)d(only)f(a)f(dot)h
(\(`)p Fn(.)p Fq('\).)j(When)d(that)f(line)j(is)e(receiv)o(ed,)h(the)f
(accum)o(ulated)g(MOO)g(program)f(is)h(c)o(hec)o(k)o(ed)0
739 y(for)g(prop)q(er)g(MOO)h(syn)o(tax)e(and,)h(if)h(correct,)e(asso)q
(ciated)h(with)h(the)f(named)h(v)o(erb.)62 809 y(If,)h(at)e(the)i(time)
f(the)h(line)h(con)o(taining)f(only)f(a)g(dot)g(is)h(pro)q(cessed,)g
(\(a\))e(the)i(pla)o(y)o(er)f(is)h(not)f(a)g(programmer,)0
863 y(\(b\))i(the)g(pla)o(y)o(er)g(do)q(es)g(not)g(ha)o(v)o(e)g(write)g
(p)q(ermission)h(on)f(the)g(named)h(v)o(erb,)f(or)g(\(c\))f(the)h(prop)
q(ert)o(y)g Fn($server_)0 917 y(options.protect_set_verb_c)o(ode)11
b Fq(exists)j(and)g(has)g(a)g(true)g(v)m(alue)h(and)f(the)g(pla)o(y)o
(er)g(is)g(not)g(a)f(wizard,)i(then)0 971 y(an)g(error)g(message)f(is)i
(prin)o(ted)g(and)f(the)h(named)f(v)o(erb's)g(program)f(is)i(not)e(c)o
(hanged.)62 1041 y(In)i(the)f Fn(.program)f Fq(command,)h
Fl(ob)s(ject)h Fq(ma)o(y)e(ha)o(v)o(e)h(one)g(of)g(three)g(forms:)37
1111 y Fo(\017)30 b Fq(The)16 b(name)f(of)g(some)g(ob)s(ject)f(visible)
k(to)c(the)i(pla)o(y)o(er.)k(This)c(is)g(exactly)f(lik)o(e)i(the)e
(kind)h(of)f(matc)o(hing)h(done)90 1165 y(b)o(y)i(the)g(serv)o(er)g
(for)g(the)g(direct)h(and)g(indirect)g(ob)s(jects)f(of)g(ordinary)g
(commands.)29 b(See)19 b(the)f(c)o(hapter)g(on)90 1219
y(command)d(parsing)h(for)e(details.)21 b(Note)15 b(that)f(the)i(sp)q
(ecial)h(names)e(`)p Fn(me)p Fq(')f(and)h(`)p Fn(here)p
Fq(')f(ma)o(y)h(b)q(e)g(used.)37 1287 y Fo(\017)30 b
Fq(An)15 b(ob)s(ject)g(n)o(um)o(b)q(er,)g(in)h(the)g(form)e
Fn(#)p Fl(n)o(um)o(b)q(er)s Fq(.)37 1355 y Fo(\017)30
b Fq(A)17 b Fl(system)g(prop)q(ert)o(y)j Fq(\(that)c(is,)i(a)f(prop)q
(ert)o(y)f(on)h Fn(#0)p Fq(\),)g(in)h(the)f(form)f Fn($)p
Fl(name)s Fq(.)25 b(In)17 b(this)h(case,)f(the)g(curren)o(t)90
1409 y(v)m(alue)f(of)f Fn(#0.)p Fl(name)j Fq(m)o(ust)c(b)q(e)i(a)f(v)m
(alid)i(ob)s(ject.)0 1563 y Fj(5.1.3)30 b(Flushing)15
b(Unpro)r(cessed)h(Input)62 1661 y Fq(It)h(sometimes)f(happ)q(ens)h
(that)f(a)g(user)g(c)o(hanges)g(their)h(mind)g(ab)q(out)f(ha)o(ving)h
(t)o(yp)q(ed)g(one)f(or)g(more)g(lines)h(of)0 1715 y(input)h(and)e(w)o
(ould)h(lik)o(e)h(to)e(`un)o(t)o(yp)q(e')g(them)g(b)q(efore)h(the)g
(serv)o(er)f(actually)h(gets)g(around)f(to)g(pro)q(cessing)h(them.)0
1769 y(If)h(they)g(react)g(quic)o(kly)h(enough,)g(they)f(can)g(t)o(yp)q
(e)g(their)h(connection's)f(de\014ned)i Fl(\015ush)e
Fq(command;)h(when)g(the)0 1823 y(serv)o(er)12 b(\014rst)g(reads)g
(that)f(command)h(from)f(the)i(net)o(w)o(ork,)e(it)h(immediately)i(and)
e(completely)i(\015ushes)f(an)o(y)f(as-y)o(et)0 1877
y(unpro)q(cessed)h(input)g(from)e(that)g(user,)h(prin)o(ting)h(a)f
(message)f(to)g(the)h(user)g(describing)i(just)d(whic)o(h)i(lines)h(of)
d(input)0 1931 y(w)o(ere)k(discarded,)h(if)g(an)o(y)l(.)120
1999 y Fl(Fine)j(p)q(oin)o(t:)27 b Fq(The)18 b(\015ush)h(command)f(is)g
(handled)i(v)o(ery)e(early)g(in)h(the)f(serv)o(er's)g(pro)q(cessing)h
(of)e(a)120 2051 y(line)f(of)f(input,)g(b)q(efore)g(the)g(line)i(is)e
(en)o(tered)g(in)o(to)g(the)g(task)f(queue)h(for)f(the)h(connection)h
(and)f(w)o(ell)120 2103 y(b)q(efore)h(it)h(is)f(parsed)g(in)o(to)g(w)o
(ords)f(lik)o(e)i(other)f(commands.)22 b(F)l(or)15 b(this)i(reason,)e
(it)i(m)o(ust)e(b)q(e)i(t)o(yp)q(ed)120 2155 y(exactly)d(as)g(it)h(w)o
(as)e(de\014ned,)i(alone)g(on)f(the)g(line,)i(without)e(quotation)g
(marks,)f(and)h(without)g(an)o(y)120 2207 y(spaces)h(b)q(efore)h(or)f
(after)f(it.)62 2276 y(When)j(a)g(connection)g(is)g(\014rst)g(accepted)
g(b)o(y)g(the)f(serv)o(er,)h(it)f(is)i(giv)o(en)f(an)f(initial)j
(\015ush)e(command)g(setting)0 2330 y(tak)o(en)11 b(from)f(the)h
(curren)o(t)g(default.)19 b(This)12 b(initial)h(setting)e(can)h(b)q(e)f
(c)o(hanged)h(later)f(using)h(the)f Fn(set_connection_)0
2384 y(option\(\))j Fq(command.)62 2454 y(By)23 b(default,)i(eac)o(h)e
(connection)h(is)f(initially)i(giv)o(en)f(`)p Fn(.flush)p
Fq(')d(as)h(its)h(\015ush)h(command.)42 b(If)23 b(the)g(prop-)0
2508 y(ert)o(y)c Fn($server_options.default_flush_)o(command)d
Fq(exists,)22 b(then)e(its)h(v)m(alue)g(o)o(v)o(errides)f(this)g
(default.)36 b(If)0 2562 y Fn($server_options.default_fl)o(ush_com)o
(mand)17 b Fq(is)k(a)e(non-empt)o(y)i(string,)g(then)f(that)f(string)h
(is)h(the)f(\015ush)0 2616 y(command)13 b(for)g(all)i(new)e
(connections;)i(otherwise,)f(new)g(connections)g(are)f(initially)j(giv)
o(en)e(no)g(\015ush)g(command)0 2670 y(at)h(all.)p eop
%%Page: 69 71
69 70 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(69)0 183 y Fj(5.1.4)30
b(Initial)15 b(Punctuation)g(in)g(Commands)62 277 y Fq(The)h(serv)o(er)
f(in)o(terprets)g(command)g(lines)i(that)d(b)q(egin)j(with)e(an)o(y)g
(of)g(the)g(follo)o(wing)h(c)o(haracters)e(sp)q(ecially:)120
340 y Fn(")191 b(:)g(;)0 405 y Fq(Before)14 b(pro)q(cessing)h(the)e
(command,)h(the)g(initial)i(punctuation)f(c)o(haracter)e(is)h(replaced)
h(b)o(y)f(the)g(corresp)q(onding)0 459 y(w)o(ord)h(b)q(elo)o(w,)g
(follo)o(w)o(ed)g(b)o(y)h(a)e(space:)120 521 y Fn(say)143
b(emote)95 b(eval)0 586 y Fq(F)l(or)15 b(example,)g(the)h(command)f
(line)120 649 y Fn("Hello,)23 b(there.)0 714 y Fq(is)16
b(transformed)e(in)o(to)120 776 y Fn(say)23 b(Hello,)g(there.)0
841 y Fq(b)q(efore)15 b(parsing.)0 990 y Fp(5.2)33 b(Serv)n(er)16
b(Assumptions)f(Ab)r(out)g(the)h(Database)62 1084 y Fq(There)22
b(are)e(a)h(small)h(n)o(um)o(b)q(er)g(of)e(circumstances)i(under)g
(whic)o(h)g(the)g(serv)o(er)e(directly)j(and)e(sp)q(eci\014cally)0
1138 y(accesses)d(a)e(particular)i(v)o(erb)f(or)g(prop)q(ert)o(y)g(in)h
(the)f(database.)26 b(This)18 b(section)g(giv)o(es)f(a)g(complete)h
(list)g(of)f(suc)o(h)0 1192 y(circumstances.)0 1324 y
Fj(5.2.1)30 b(Serv)n(er)16 b(Options)f(Set)g(in)g(the)h(Database)62
1418 y Fq(Man)o(y)g(optional)i(b)q(eha)o(viors)f(of)f(the)h(serv)o(er)g
(can)g(b)q(e)g(con)o(trolled)h(from)e(within)i(the)f(database)f(b)o(y)h
(creating)0 1472 y(the)d(prop)q(ert)o(y)g Fn(#0.server_options)e
Fq(\(also)i(kno)o(wn)g(as)g Fn($server_options)p Fq(\),)e(assigning)j
(as)e(its)i(v)m(alue)g(a)f(v)m(alid)0 1526 y(ob)s(ject)k(n)o(um)o(b)q
(er,)i(and)f(then)h(de\014ning)g(v)m(arious)g(prop)q(erties)f(on)g
(that)g(ob)s(ject.)30 b(A)o(t)19 b(a)f(n)o(um)o(b)q(er)i(of)e(times,)i
(the)0 1580 y(serv)o(er)d(c)o(hec)o(ks)h(for)f(whether)g(the)h(prop)q
(ert)o(y)f Fn($server_options)e Fq(exists)j(and)f(has)h(an)f(ob)s(ject)
g(n)o(um)o(b)q(er)h(as)f(its)0 1634 y(v)m(alue.)j(If)14
b(so,)f(then)h(the)f(serv)o(er)g(lo)q(oks)g(for)g(a)g(v)m(ariet)o(y)h
(of)f(other)f(prop)q(erties)i(on)g(that)e Fn($server_options)g
Fq(ob)s(ject)0 1687 y(and,)j(if)h(they)f(exist,)g(uses)h(their)f(v)m
(alues)i(to)d(con)o(trol)h(ho)o(w)g(the)g(serv)o(er)g(op)q(erates.)62
1752 y(The)20 b(sp)q(eci\014c)h(prop)q(erties)e(searc)o(hed)h(for)e
(are)h(eac)o(h)g(describ)q(ed)i(in)f(the)g(appropriate)f(section)g(b)q
(elo)o(w,)i(but)0 1806 y(here)16 b(is)f(a)g(brief)h(list)g(of)f(all)h
(of)f(the)g(relev)m(an)o(t)h(prop)q(erties)g(for)e(ease)i(of)e
(reference:)0 1883 y Fn(bg_seconds)240 1937 y Fq(The)h(n)o(um)o(b)q(er)
h(of)f(seconds)g(allotted)h(to)f(bac)o(kground)g(tasks.)0
2014 y Fn(bg_ticks)48 b Fq(The)15 b(n)o(um)o(b)q(er)h(of)f(tic)o(ks)g
(allotted)h(to)e(bac)o(kground)h(tasks.)0 2091 y Fn(connect_timeout)240
2145 y Fq(The)21 b(maxim)o(um)g(n)o(um)o(b)q(er)h(of)f(seconds)g(to)g
(allo)o(w)g(an)g(un-logged-in)i(in-b)q(ound)g(connection)g(to)240
2199 y(remain)16 b(op)q(en.)0 2276 y Fn(default_flush_command)240
2330 y Fq(The)f(initial)j(setting)d(of)g(eac)o(h)g(new)g(connection's)h
(\015ush)g(command.)0 2408 y Fn(fg_seconds)240 2462 y
Fq(The)f(n)o(um)o(b)q(er)h(of)f(seconds)g(allotted)h(to)f(foreground)f
(tasks.)0 2539 y Fn(fg_ticks)48 b Fq(The)15 b(n)o(um)o(b)q(er)h(of)f
(tic)o(ks)g(allotted)h(to)e(foreground)h(tasks.)0 2616
y Fn(max_stack_depth)240 2670 y Fq(The)g(maxim)o(um)h(n)o(um)o(b)q(er)f
(of)g(lev)o(els)h(of)f(nested)h(v)o(erb)f(calls.)p eop
%%Page: 70 72
70 71 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(70)0 183 y Fn(name_lookup_timeout)240
237 y Fq(The)15 b(maxim)o(um)h(n)o(um)o(b)q(er)f(of)g(seconds)h(to)e(w)
o(ait)h(for)f(a)h(net)o(w)o(ork)f(hostname/address)h(lo)q(okup.)0
314 y Fn(outbound_connect_timeout)240 368 y Fq(The)23
b(maxim)o(um)f(n)o(um)o(b)q(er)h(of)f(seconds)h(to)f(w)o(ait)g(for)g
(an)g(outb)q(ound)i(net)o(w)o(ork)d(connection)j(to)240
422 y(successfully)17 b(op)q(en.)0 499 y Fn(protect_)p
Fl(prop)q(ert)o(y)240 553 y Fq(Restrict)f(reading)f(of)g(built-in)j
Fl(prop)q(ert)o(y)h Fq(to)14 b(wizards.)0 630 y Fn(protect_)p
Fl(function)240 684 y Fq(Restrict)i(use)f(of)g(built-in)j
Fl(function)e Fq(to)e(wizards.)0 762 y Fn(support_numeric_verbname_s)o
(trings)240 816 y Fq(Enables)i(use)g(of)e(an)i(obsolete)f(v)o
(erb-naming)h(mec)o(hanism.)0 947 y Fj(5.2.2)30 b(Serv)n(er)16
b(Messages)f(Set)g(in)h(the)f(Database)62 1041 y Fq(There)d(are)e(a)h
(n)o(um)o(b)q(er)g(of)g(circumstances)h(under)f(whic)o(h)h(the)f(serv)o
(er)g(itself)h(generates)f(messages)f(on)h(net)o(w)o(ork)0
1095 y(connections.)20 b(Most)11 b(of)i(these)f(can)h(b)q(e)g
(customized)h(or)e(ev)o(en)h(eliminated)h(from)e(within)i(the)e
(database.)19 b(In)13 b(eac)o(h)0 1149 y(suc)o(h)h(case,)f(a)h(prop)q
(ert)o(y)f(on)g Fn($server_options)f Fq(is)i(c)o(hec)o(k)o(ed)g(at)f
(the)h(time)g(the)f(message)g(w)o(ould)h(b)q(e)h(prin)o(ted.)20
b(If)0 1203 y(the)14 b(prop)q(ert)o(y)g(do)q(es)g(not)g(exist,)g(a)g
(default)g(message)g(is)g(prin)o(ted.)21 b(If)14 b(the)g(prop)q(ert)o
(y)g(exists)g(and)g(its)h(v)m(alue)g(is)f(not)0 1257
y(a)h(string)g(or)g(a)g(list)h(con)o(taining)g(strings,)f(then)h(no)f
(message)g(is)h(prin)o(ted)g(at)e(all.)22 b(Otherwise,)15
b(the)h(string\(s\))e(are)0 1311 y(prin)o(ted)g(in)g(place)f(of)g(the)g
(default)h(message,)e(one)h(string)g(p)q(er)h(line.)20
b(None)14 b(of)e(these)h(messages)g(are)f(ev)o(er)h(prin)o(ted)0
1365 y(on)i(an)g(outb)q(ound)h(net)o(w)o(ork)e(connection)i(created)g
(b)o(y)f(the)g(function)h Fn(open_network_connection\(\))p
Fq(.)62 1429 y(The)k(follo)o(wing)g(list)g(co)o(v)o(ers)e(all)j(of)e
(the)g(customizable)i(messages,)e(sho)o(wing)g(for)g(eac)o(h)g(the)h
(name)f(of)g(the)0 1483 y(relev)m(an)o(t)f(prop)q(ert)o(y)f(on)g
Fn($server_options)p Fq(,)e(the)j(default)f(message,)g(and)h(the)f
(circumstances)h(under)g(whic)o(h)0 1537 y(the)d(message)g(is)h(prin)o
(ted:)0 1614 y Fn(boot_msg)e(=)h("***)g(Disconnected)e(***")240
1668 y Fq(The)i(function)h Fn(boot_player\(\))e Fq(w)o(as)g(called)j
(on)e(this)h(connection.)0 1745 y Fn(connect_msg)e(=)h("***)f
(Connected)g(***")240 1799 y Fq(The)23 b(user)g(ob)s(ject)g(that)f
(just)g(logged)h(in)h(on)f(this)g(connection)h(existed)g(b)q(efore)f
Fn($do_login_)240 1853 y(command\(\))14 b Fq(w)o(as)g(called.)0
1930 y Fn(create_msg)g(=)h("***)f(Created)h(***")240
1984 y Fq(The)f(user)g(ob)s(ject)f(that)g(just)g(logged)h(in)h(on)e
(this)h(connection)h(did)g(not)e(exist)h(b)q(efore)g
Fn($do_login_)240 2038 y(command\(\))g Fq(w)o(as)g(called.)0
2115 y Fn(recycle_msg)g(=)h("***)f(Recycled)g(***")240
2169 y Fq(The)g(logged-in)h(user)e(of)g(this)h(connection)h(has)e(b)q
(een)i(recycled)g(or)e(ren)o(um)o(b)q(ered)i(\(via)e(the)h(ren)o(um-)
240 2223 y(b)q(er\(\))h(function\).)0 2300 y Fn(redirect_from_msg)e(=)i
("***)f(Redirecting)g(connection)g(to)h(new)g(port)f(***")240
2354 y Fq(The)h(logged-in)i(user)e(of)g(this)h(connection)g(has)f(just)
g(logged)g(in)h(on)f(some)g(other)g(connection.)0 2431
y Fn(redirect_to_msg)e(=)i("***)g(Redirecting)e(old)i(connection)f(to)h
(this)f(port)h(***")240 2485 y Fq(The)j(user)g(who)f(just)h(logged)g
(in)g(on)g(this)g(connection)h(w)o(as)e(already)h(logged)g(in)g(on)g
(some)f(other)240 2539 y(connection.)0 2616 y Fn(server_full_msg)240
2670 y Fq(Default:)p eop
%%Page: 71 73
71 72 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(71)360 183 y Fn(***)23
b(Sorry,)g(but)h(the)f(server)g(cannot)g(accept)h(any)f(more)g
(connections)g(right)g(now.)p 2055 193 21 38 v 360 235
a(***)g(Please)g(try)h(again)f(later.)240 301 y Fq(This)17
b(connection)g(arriv)o(ed)f(when)h(the)f(serv)o(er)g(really)h(couldn't)
f(accept)h(an)o(y)f(more)f(connections,)240 355 y(due)h(to)e(running)j
(out)e(of)f(a)h(critical)i(op)q(erating)e(system)g(resource.)0
434 y Fn(timeout_msg)f(=)h("***)f(Timed-out)g(waiting)g(for)h(login.)f
(***")240 488 y Fq(This)22 b(in-b)q(ound)h(net)o(w)o(ork)e(connection)h
(w)o(as)f(idle)i(and)f(un-logged-in)h(for)e(at)g(least)g
Fn(CONNECT_)240 542 y(TIMEOUT)14 b Fq(seconds)i(\(as)e(de\014ned)j(in)f
(the)f(\014le)h(`)p Fn(options.h)p Fq(')e(when)h(the)h(serv)o(er)e(w)o
(as)h(compiled\).)120 619 y Fl(Fine)21 b(p)q(oin)o(t:)31
b Fq(If)21 b(the)f(net)o(w)o(ork)f(connection)j(in)f(question)g(w)o(as)
e(receiv)o(ed)j(at)d(a)h(listening)i(p)q(oin)o(t)120
671 y(\(established)15 b(b)o(y)f(the)h(`)p Fn(listen\(\))p
Fq(')d(function\))i(handled)i(b)o(y)e(an)g(ob)s(ject)f
Fl(ob)s(j)i Fq(other)f(than)g Fn(#0)p Fq(,)g(then)120
723 y(system)19 b(messages)f(for)h(that)f(connection)i(are)f(lo)q(ok)o
(ed)h(for)e(on)h Fl(ob)s(j)p Fn(.server_options)p Fq(;)f(if)i(that)120
774 y(prop)q(ert)o(y)15 b(do)q(es)g(not)g(exist,)g(then)h
Fn($server_options)d Fq(is)j(used)g(instead.)0 911 y
Fj(5.2.3)30 b(Chec)n(kp)r(oin)n(ting)16 b(the)f(Database)62
1007 y Fq(The)k(serv)o(er)f(main)o(tains)g(the)h(en)o(tire)f(MOO)h
(database)e(in)j(main)e(memory)l(,)g(not)g(on)g(disk.)30
b(It)18 b(is)h(therefore)0 1060 y(necessary)14 b(for)e(it)i(to)f(dump)h
(the)f(database)g(to)g(disk)h(if)g(it)f(is)h(to)f(p)q(ersist)h(b)q(ey)o
(ond)g(the)f(lifetime)i(of)e(an)o(y)g(particular)0 1114
y(serv)o(er)i(execution.)21 b(The)15 b(serv)o(er)g(is)h(careful)g(to)e
(dump)i(the)f(database)g(just)g(b)q(efore)h(sh)o(utting)f(do)o(wn,)f
(of)h(course,)0 1168 y(but)g(it)f(is)h(also)g(pruden)o(t)f(for)g(it)h
(to)f(do)g(so)g(at)g(regular)g(in)o(terv)m(als,)i(just)e(in)h(case)f
(something)h(un)o(to)o(w)o(ard)e(happ)q(ens.)62 1235
y(T)l(o)g(determine)h(ho)o(w)e(often)h(to)f(mak)o(e)g(these)h
Fl(c)o(hec)o(kp)q(oin)o(ts)i Fq(of)e(the)g(database,)f(the)h(serv)o(er)
f(consults)i(the)f(v)m(alue)0 1289 y(of)k Fn(#0.dump_interval)p
Fq(.)23 b(If)18 b(it)f(exists)h(and)f(its)g(v)m(alue)i(is)f(an)f(in)o
(teger)g(greater)f(than)h(or)g(equal)h(to)e(60,)h(then)h(it)0
1343 y(is)e(tak)o(en)e(as)h(the)g(n)o(um)o(b)q(er)h(of)f(seconds)g(to)g
(w)o(ait)f(b)q(et)o(w)o(een)i(c)o(hec)o(kp)q(oin)o(ts;)f(otherwise,)g
(the)h(serv)o(er)e(mak)o(es)h(a)g(new)0 1397 y(c)o(hec)o(kp)q(oin)o(t)g
(ev)o(ery)e(3600)g(seconds)i(\(one)e(hour\).)19 b(If)c(the)e(v)m(alue)j
(of)d Fn(#0.dump_interval)f Fq(implies)k(that)d(the)h(next)0
1451 y(c)o(hec)o(kp)q(oin)o(t)k(should)h(b)q(e)f(sc)o(heduled)i(at)c(a)
i(time)g(after)e(3:14:07)g(a.m.)26 b(on)17 b(T)l(uesda)o(y)l(,)h(Jan)o
(uary)g(19,)f(2038,)g(then)0 1505 y(the)e(serv)o(er)g(instead)h(uses)f
(the)h(default)f(v)m(alue)i(of)e(3600)f(seconds)h(in)h(the)g(future.)62
1571 y(The)e(decision)i(ab)q(out)e(ho)o(w)g(long)g(to)f(w)o(ait)h(b)q
(et)o(w)o(een)g(c)o(hec)o(kp)q(oin)o(ts)h(is)f(made)g(again)g
(immediately)i(after)d(eac)o(h)0 1625 y(one)g(b)q(egins.)20
b(Th)o(us,)12 b(c)o(hanges)h(to)e Fn(#0.dump_interval)g
Fq(will)j(tak)o(e)d(e\013ect)h(after)g(the)h(next)f(c)o(hec)o(kp)q(oin)
o(t)h(happ)q(ens.)62 1691 y(Whenev)o(er)j(the)f(serv)o(er)g(b)q(egins)h
(to)f(mak)o(e)g(a)f(c)o(hec)o(kp)q(oin)o(t,)i(it)f(mak)o(es)g(the)g
(follo)o(wing)h(v)o(erb)f(call:)120 1755 y Fn($checkpoint_started\(\))0
1822 y Fq(When)h(the)f(c)o(hec)o(kp)q(oin)o(ting)h(pro)q(cess)g(is)g
(complete,)f(the)g(serv)o(er)g(mak)o(es)g(the)g(follo)o(wing)h(v)o(erb)
f(call:)120 1886 y Fn($checkpoint_finished\()p Fl(success)r
Fn(\))0 1952 y Fq(where)k Fl(success)i Fq(is)f(true)e(if)h(and)g(only)h
(if)f(the)g(c)o(hec)o(kp)q(oin)o(t)g(w)o(as)f(successfully)j(written)e
(on)f(the)h(disk.)32 b(Chec)o(k-)0 2006 y(p)q(oin)o(ting)19
b(can)f(fail)h(for)e(a)h(n)o(um)o(b)q(er)g(of)f(reasons,)h(usually)h
(due)g(to)e(exhaustion)h(of)g(v)m(arious)g(op)q(erating)g(system)0
2060 y(resources)e(suc)o(h)f(as)h(virtual)g(memory)f(or)g(disk)h
(space.)21 b(It)16 b(is)g(not)f(an)g(error)g(if)h(either)g(of)f(these)h
(v)o(erbs)f(do)q(es)h(not)0 2114 y(exist;)f(the)g(corresp)q(onding)i
(call)f(is)g(simply)g(skipp)q(ed.)0 2251 y Fj(5.2.4)30
b(Accepting)16 b(and)f(Initiating)f(Net)n(w)n(ork)i(Connections)62
2346 y Fq(When)21 b(the)g(serv)o(er)g(\014rst)f(accepts)h(a)g(new,)h
(incoming)g(net)o(w)o(ork)e(connection,)j(it)e(is)g(giv)o(en)h(the)f
(lo)o(w-lev)o(el)0 2400 y(net)o(w)o(ork)c(address)h(of)g(computer)g(on)
f(the)i(other)e(end.)29 b(It)18 b(immediately)i(attempts)d(to)g(con)o
(v)o(ert)g(this)i(address)0 2454 y(in)o(to)h(the)h(h)o(uman-readable)h
(host)e(name)g(that)g(will)i(b)q(e)f(en)o(tered)g(in)h(the)e(serv)o(er)
g(log)h(and)g(returned)f(b)o(y)h(the)0 2508 y Fn(connection_name\(\))d
Fq(function.)36 b(This)21 b(con)o(v)o(ersion)g(can,)g(for)f(the)g
(TCP/IP)g(net)o(w)o(orking)g(con\014gurations,)0 2562
y(in)o(v)o(olv)o(e)15 b(a)f(certain)h(amoun)o(t)e(of)h(comm)o
(unication)h(with)g(remote)e(name)i(serv)o(ers,)e(whic)o(h)j(can)e(tak)
o(e)g(quite)h(a)f(long)0 2616 y(time)h(and/or)f(fail)i(en)o(tirely)l(.)
21 b(While)16 b(the)f(serv)o(er)f(is)i(doing)f(this)g(con)o(v)o
(ersion,)g(it)g(is)g(not)g(doing)g(an)o(ything)g(else)h(at)0
2670 y(all;)g(in)g(particular,)f(it)h(it)f(not)g(resp)q(onding)h(to)f
(user)g(commands)g(or)g(executing)h(MOO)g(tasks.)p eop
%%Page: 72 74
72 73 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(72)62 183 y(By)20 b(default,)g(the)g
(serv)o(er)f(will)i(w)o(ait)e(no)g(more)g(than)g(5)g(seconds)h(for)f
(suc)o(h)h(a)f(name)g(lo)q(okup)h(to)f(succeed;)0 237
y(after)13 b(that,)g(it)h(b)q(eha)o(v)o(es)g(as)f(if)h(the)g(con)o(v)o
(ersion)g(had)g(failed,)h(using)f(instead)h(a)e(prin)o(table)i
(represen)o(tation)f(of)f(the)0 291 y(lo)o(w-lev)o(el)19
b(address.)26 b(If)17 b(the)h(prop)q(ert)o(y)f Fn(name_lookup_timeout)d
Fq(exists)k(on)f Fn($server_options)e Fq(and)j(has)f(an)0
345 y(in)o(teger)e(as)g(its)h(v)m(alue,)g(that)e(in)o(teger)h(is)h
(used)g(instead)g(as)f(the)g(timeout)g(in)o(terv)m(al.)62
410 y(When)e(the)f Fn(open_network_connection)o(\(\))d
Fq(function)k(is)f(used,)h(the)f(serv)o(er)f(m)o(ust)h(again)g(do)g(a)f
(con)o(v)o(ersion,)0 464 y(this)i(time)h(from)e(the)h(host)f(name)h
(giv)o(en)h(as)e(an)h(argumen)o(t)f(in)o(to)h(the)g(lo)o(w-lev)o(el)i
(address)e(necessary)g(for)f(actually)0 518 y(op)q(ening)k(the)f
(connection.)21 b(This)15 b(con)o(v)o(ersion)g(is)h(sub)s(ject)e(to)h
(the)g(same)f(timeout)h(as)f(in)i(the)f(in-b)q(ound)i(case;)d(if)0
572 y(the)g(con)o(v)o(ersion)h(do)q(es)f(not)g(succeed)h(b)q(efore)g
(the)f(timeout)g(expires,)h(the)g(connection)g(attempt)e(is)i(ab)q
(orted)f(and)0 626 y Fn(open_network_connection\(\))e
Fq(raises)j Fn(E_QUOTA)p Fq(.)62 690 y(After)g(a)g(successful)h(con)o
(v)o(ersion,)f(though,)g(the)g(serv)o(er)g(m)o(ust)f(still)j(w)o(ait)e
(for)f(the)h(actual)h(connection)g(to)e(b)q(e)0 744 y(accepted)i(b)o(y)
g(the)g(remote)f(computer.)21 b(As)16 b(b)q(efore,)f(this)h(can)g(tak)o
(e)f(a)g(long)h(time)g(during)h(whic)o(h)f(the)g(serv)o(er)f(is)0
798 y(again)j(doing)g(nothing)g(else.)27 b(Also)18 b(as)g(b)q(efore,)g
(the)f(serv)o(er)g(will)j(b)o(y)d(default)h(w)o(ait)f(no)h(more)f(than)
g(5)h(seconds)0 852 y(for)c(the)h(connection)h(attempt)e(to)g(succeed;)
h(if)h(the)e(timeout)h(expires,)h Fn(open_network_connection\()o(\))c
Fq(again)0 906 y(raises)19 b Fn(E_QUOTA)p Fq(.)32 b(This)19
b(default)h(timeout)g(in)o(terv)m(al)g(can)f(also)h(b)q(e)g(o)o(v)o
(erridden)f(from)g(within)i(the)e(database,)0 960 y(b)o(y)d(de\014ning)
h(the)f(prop)q(ert)o(y)f Fn(outbound_connect_timeout)e
Fq(on)i Fn($server_options)f Fq(with)i(an)g(in)o(teger)f(as)h(its)0
1014 y(v)m(alue.)0 1146 y Fj(5.2.5)30 b(Asso)r(ciating)15
b(Net)n(w)n(ork)h(Connections)f(with)h(Pla)n(y)n(ers)62
1239 y Fq(When)k(a)f(net)o(w)o(ork)f(connection)j(is)f(\014rst)e(made)i
(to)f(the)g(MOO,)g(it)h(is)g(iden)o(ti\014ed)h(b)o(y)e(a)g(unique,)j
(negativ)o(e)0 1293 y(ob)s(ject)c(n)o(um)o(b)q(er.)29
b(Suc)o(h)19 b(a)f(connection)i(is)e(said)h(to)f(b)q(e)h
Fl(un-logged-in)h Fq(and)f(is)f(not)g(y)o(et)g(asso)q(ciated)h(with)f
(an)o(y)0 1347 y(MOO)e(pla)o(y)o(er)f(ob)s(ject.)62 1412
y(Eac)o(h)f(line)h(of)f(input)h(on)f(an)f(un-logged-in)j(connection)f
(is)f(\014rst)g(parsed)g(in)o(to)g(w)o(ords)f(in)i(the)f(usual)g(w)o(a)
o(y)f(\(see)0 1466 y(the)i(c)o(hapter)g(on)g(command)f(parsing)h(for)g
(details\))g(and)g(then)h(these)f(w)o(ords)f(are)g(passed)i(as)e(the)h
(argumen)o(ts)f(in)0 1520 y(a)h(call)h(to)f(the)g(v)o(erb)g
Fn($do_login_command\(\))p Fq(.)i(F)l(or)e(example,)h(the)f(input)h
(line)120 1582 y Fn(connect)23 b(Munchkin)g(frebblebit)0
1647 y Fq(w)o(ould)16 b(result)f(in)h(the)g(follo)o(wing)f(call)i(b)q
(eing)f(made:)120 1710 y Fn($do_login_command\("connect)o(",)21
b("Munchkin",)h("frebblebit"\))0 1774 y Fq(In)16 b(that)e(call,)i(the)f
(v)m(ariable)i Fn(player)d Fq(will)j(ha)o(v)o(e)d(as)h(its)h(v)m(alue)g
(the)f(negativ)o(e)g(ob)s(ject)g(n)o(um)o(b)q(er)g(asso)q(ciated)h
(with)0 1828 y(the)c(appropriate)g(net)o(w)o(ork)e(connection.)20
b(The)12 b(functions)h Fn(notify\(\))e Fq(and)h Fn(boot_player\(\))e
Fq(can)i(b)q(e)g(used)h(with)0 1882 y(suc)o(h)h(ob)s(ject)f(n)o(um)o(b)
q(ers)h(to)f(send)h(output)f(to)g(and)h(disconnect)g(un-logged-in)i
(connections.)k(Also,)14 b(the)g(v)m(ariable)0 1936 y
Fn(argstr)g Fq(will)j(ha)o(v)o(e)e(as)g(its)g(v)m(alue)i(the)e
(unparsed)h(command)f(line)i(as)d(receiv)o(ed)j(on)e(the)g(net)o(w)o
(ork)f(connection.)62 2001 y(If)20 b Fn($do_login_command\(\))d
Fq(returns)i(a)g(v)m(alid)j(pla)o(y)o(er)d(ob)s(ject)g(and)h(the)f
(connection)i(is)f(still)h(op)q(en,)g(then)0 2055 y(the)e(connection)h
(is)f(considered)h(to)e(ha)o(v)o(e)h Fl(logged)g(in)o(to)i
Fq(that)d(pla)o(y)o(er.)31 b(The)19 b(serv)o(er)f(then)h(mak)o(es)g
(one)f(of)h(the)0 2109 y(follo)o(wing)d(v)o(erbs)f(calls,)h(dep)q
(ending)h(on)e(the)h(pla)o(y)o(er)f(ob)s(ject)g(that)f(w)o(as)g
(returned:)120 2171 y Fn($user_created\()p Fl(pla)o(y)o(er)s
Fn(\))120 2223 y($user_connected\()p Fl(pla)o(y)o(er)s
Fn(\))120 2275 y($user_reconnected\()p Fl(pla)o(y)o(er)s
Fn(\))0 2340 y Fq(The)d(\014rst)f(of)g(these)h(is)h(used)f(if)g(the)g
(returned)g(ob)s(ject)f(n)o(um)o(b)q(er)h(is)g(greater)f(than)g(the)h
(v)m(alue)h(returned)f(b)o(y)g(the)g Fn(max_)0 2394 y(object\(\))16
b Fq(function)i(b)q(efore)g Fn($do_login_command\(\))d
Fq(w)o(as)h(in)o(v)o(ok)o(ed,)i(that)f(is,)h(it)f(is)h(called)h(if)f
(the)g(returned)0 2448 y(ob)s(ject)c(app)q(ears)i(to)e(ha)o(v)o(e)h(b)q
(een)h(freshly)g(created.)j(If)d(this)f(is)h(not)e(the)i(case,)e(then)i
(one)f(of)f(the)i(other)e(t)o(w)o(o)g(v)o(erb)0 2502
y(calls)19 b(is)f(used.)29 b(The)18 b Fn($user_connected\(\))d
Fq(call)k(is)f(used)h(if)f(there)g(w)o(as)f(no)h(existing)h(activ)o(e)f
(connection)h(for)0 2556 y(the)c(returned)h(pla)o(y)o(er)f(ob)s(ject.)k
(Otherwise,)d(the)f Fn($user_reconnected\(\))e Fq(call)j(is)g(used)g
(instead.)120 2618 y Fl(Fine)k(p)q(oin)o(t:)28 b Fq(If)20
b(a)f(user)g(reconnects)g(and)g(the)h(user's)e(old)i(and)f(new)g
(connections)i(are)d(on)h(t)o(w)o(o)120 2670 y(di\013eren)o(t)d
(listening)h(p)q(oin)o(ts)f(b)q(eing)g(handled)h(b)o(y)f(di\013eren)o
(t)f(ob)s(jects)g(\(see)g(the)h(description)h(of)e(the)p
eop
%%Page: 73 75
73 74 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(73)120 183 y Fn(listen\(\))11
b Fq(function)i(for)e(more)h(details\),)h(then)f Fn
(user_client_disconnected)d Fq(is)k(called)g(for)f(the)120
235 y(old)k(connection)g(and)f Fn(user_connected)f Fq(for)g(the)i(new)f
(one.)62 305 y(If)h(an)g(in-b)q(ound)i(net)o(w)o(ork)c(connection)j(do)
q(es)f(not)f(successfully)j(log)e(in)g(within)h(a)f(certain)g(p)q(erio)
q(d)h(of)e(time,)0 359 y(the)e(serv)o(er)g(will)j(automatically)d(sh)o
(ut)h(do)o(wn)f(the)g(connection,)i(thereb)o(y)e(freeing)h(up)g(the)f
(resources)h(asso)q(ciated)0 413 y(with)h(main)o(taining)h(it.)k(Let)15
b Fl(L)g Fq(b)q(e)g(the)g(ob)s(ject)f(handling)i(the)f(listening)i(p)q
(oin)o(t)e(on)g(whic)o(h)g(the)g(connection)h(w)o(as)0
467 y(receiv)o(ed)j(\(or)d Fn(#0)i Fq(if)g(the)f(connection)i(came)e
(in)h(on)g(the)g(initial)h(listening)h(p)q(oin)o(t\).)26
b(T)l(o)18 b(disco)o(v)o(er)f(the)h(timeout)0 521 y(p)q(erio)q(d,)j
(the)f(serv)o(er)f(c)o(hec)o(ks)g(on)g Fl(L)p Fn(.server_options)f
Fq(or,)h(if)h(it)g(do)q(esn't)f(exist,)h(on)f Fn($server_options)f
Fq(for)0 574 y(a)g Fn(connect_timeout)e Fq(prop)q(ert)o(y)l(.)30
b(If)18 b(one)h(is)f(found)h(and)g(its)f(v)m(alue)i(is)f(a)f(p)q
(ositiv)o(e)h(in)o(teger,)g(then)g(that's)e(the)0 628
y(n)o(um)o(b)q(er)i(of)f(seconds)g(the)h(serv)o(er)f(will)i(use)e(for)g
(the)g(timeout)h(p)q(erio)q(d.)30 b(If)19 b(the)f Fn(connect_timeout)e
Fq(prop)q(ert)o(y)0 682 y(exists)g(but)f(its)h(v)m(alue)g(isn't)g(a)f
(p)q(ositiv)o(e)h(in)o(teger,)f(then)h(there)f(is)h(no)g(timeout)f(at)g
(all.)21 b(If)16 b(the)f(prop)q(ert)o(y)g(do)q(esn't)0
736 y(exist,)g(then)h(the)f(default)h(timeout)f(is)h(300)e(seconds.)62
806 y(When)h(an)o(y)g(net)o(w)o(ork)e(connection)j(\(ev)o(en)f(an)g
(un-logged-in)h(or)f(outb)q(ound)g(one\))g(is)g(terminated,)g(b)o(y)f
(either)0 860 y(the)h(serv)o(er)g(or)g(the)g(clien)o(t,)h(then)g(one)f
(of)g(the)g(follo)o(wing)h(t)o(w)o(o)e(v)o(erb)h(calls)h(is)g(made:)120
927 y Fn($user_disconnected\()p Fl(pla)o(y)o(er)s Fn(\))120
979 y($user_client_disconnected\()o Fl(pla)o(y)o(er)s
Fn(\))0 1049 y Fq(The)f(\014rst)f(is)i(used)f(if)g(the)g(disconnection)
i(is)e(due)h(to)e(actions)h(tak)o(en)f(b)o(y)h(the)g(serv)o(er)f
(\(e.g.,)g(a)g(use)h(of)g(the)g Fn(boot_)0 1103 y(player\(\))c
Fq(function)h(or)f(the)h(un-logged-in)h(timeout)f(describ)q(ed)i(ab)q
(o)o(v)o(e\))d(and)g(the)h(second)g(if)g(the)g(disconnection)0
1157 y(w)o(as)i(initiated)j(b)o(y)e(the)h(clien)o(t)g(side.)62
1226 y(It)e(is)g(not)f(an)g(error)f(if)i(an)o(y)f(of)g(these)h(\014v)o
(e)f(v)o(erbs)h(do)f(not)g(exist;)h(the)f(corresp)q(onding)i(call)f(is)
g(simply)h(skipp)q(ed.)120 1294 y Fk(Note)p Fq(:)k(Only)c(one)f(net)o
(w)o(ork)f(connection)j(can)e(b)q(e)h(con)o(trolling)g(a)f(giv)o(en)g
(pla)o(y)o(er)g(ob)s(ject)g(at)g(a)f(giv)o(en)120 1346
y(time;)g(should)g(a)e(second)h(connection)h(attempt)e(to)g(log)h(in)g
(as)f(that)g(pla)o(y)o(er,)i(the)e(\014rst)h(connection)g(is)120
1398 y(unceremoniously)18 b(closed)e(\(and)g Fn($user_reconnected\(\))d
Fq(called,)k(as)e(describ)q(ed)j(ab)q(o)o(v)o(e\).)i(This)120
1449 y(mak)o(es)13 b(it)g(easy)g(to)f(reco)o(v)o(er)h(from)f(v)m
(arious)i(kinds)g(of)f(net)o(w)o(ork)f(problems)h(that)g(lea)o(v)o(e)g
(connections)120 1501 y(op)q(en)j(but)f(inaccessible.)62
1571 y(When)k(the)f(net)o(w)o(ork)g(connection)h(is)g(\014rst)f
(established,)i(the)f(n)o(ull)h(command)e(is)h(automatically)g(en)o
(tered)0 1625 y(b)o(y)c(the)g(serv)o(er,)g(resulting)h(in)g(an)f
(initial)i(call)f(to)f Fn($do_login_command\(\))d Fq(with)j(no)g
(argumen)o(ts.)k(This)d(signal)0 1679 y(can)f(b)q(e)h(used)g(b)o(y)f
(the)g(v)o(erb)h(to)e(prin)o(t)i(out)e(a)h(w)o(elcome)h(message,)e(for)
h(example.)120 1746 y Fk(W)l(arning)p Fq(:)25 b(If)17
b(there)h(is)f(no)g Fn($do_login_command\(\))e Fq(v)o(erb)h(de\014ned,)
j(then)e(lines)i(of)e(input)h(from)120 1798 y(un-logged-in)g
(connections)f(are)e(simply)i(discarded.)24 b(Th)o(us,)15
b(it)h(is)h Fl(necessary)j Fq(for)15 b(an)o(y)h(database)120
1850 y(to)f(include)i(a)e(suitable)h(de\014nition)h(for)e(this)h(v)o
(erb.)0 2003 y Fj(5.2.6)30 b(Out-of-Band)15 b(Commands)62
2101 y Fq(It)f(is)g(p)q(ossible)i(to)d(compile)i(the)f(serv)o(er)f
(with)h(an)g(option)g(de\014ning)h(an)e Fl(out-of-band)h(pre\014x)j
Fq(for)d(commands.)0 2155 y(This)j(is)f(a)g(string)g(that)f(the)h(serv)
o(er)g(will)i(c)o(hec)o(k)e(for)f(at)h(the)g(b)q(eginning)i(of)e(ev)o
(ery)g(line)h(of)f(input)h(from)e(pla)o(y)o(ers,)0 2209
y(regardless)i(of)f(whether)h(or)g(not)f(those)h(pla)o(y)o(ers)g(are)f
(logged)h(in)h(and)f(regardless)g(of)g(whether)g(or)f(not)g(reading)0
2263 y(tasks)j(are)g(w)o(aiting)h(for)f(input)i(from)e(those)g(pla)o(y)
o(ers.)34 b(If)20 b(a)f(giv)o(en)h(line)i(of)d(input)i(b)q(egins)g
(with)f(the)g(de\014ned)0 2317 y(out-of-band)e(pre\014x)g(\(leading)i
(spaces,)e(if)h(an)o(y)l(,)f(are)f Fl(not)i Fq(stripp)q(ed)g(b)q(efore)
g(testing\),)f(then)g(it)g(is)h(not)e(treated)0 2371
y(as)h(a)h(normal)f(command)h(or)f(as)g(input)i(to)e(an)o(y)g(reading)i
(task.)29 b(Instead,)20 b(the)f(line)h(is)f(parsed)g(in)o(to)g(a)f
(list)h(of)0 2425 y(w)o(ords)h(in)i(the)f(usual)h(w)o(a)o(y)d(and)j
(those)e(w)o(ords)g(are)h(giv)o(en)g(as)g(the)g(argumen)o(ts)f(in)i(a)e
(call)i(to)f Fn($do_out_of_)0 2479 y(band_command\(\))p
Fq(.)e(F)l(or)d(example,)g(if)g(the)g(out-of-band)g(pre\014x)g(w)o(ere)
f(de\014ned)i(to)e(b)q(e)i(`)p Fn(#$#)p Fq(',)d(then)i(the)g(line)h(of)
0 2533 y(input)120 2600 y Fn(#$#)23 b(client-type)g(fancy)0
2670 y Fq(w)o(ould)16 b(result)f(in)h(the)g(follo)o(wing)f(call)i(b)q
(eing)f(made)f(in)i(a)d(new)i(serv)o(er)f(task:)p eop
%%Page: 74 76
74 75 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(74)120 183 y Fn
($do_out_of_band_command\("#)o($#",)21 b("client-type",)h("fancy"\))62
250 y Fq(During)12 b(the)f(call)h(to)e Fn($do_out_of_band_command\(\))p
Fq(,)e(the)k(v)m(ariable)g Fn(player)e Fq(is)i(set)f(to)f(the)h(ob)s
(ject)g(n)o(um)o(b)q(er)0 304 y(represen)o(ting)16 b(the)f(pla)o(y)o
(er)g(asso)q(ciated)g(with)g(the)g(connection)h(from)e(whic)o(h)i(the)f
(input)h(line)g(came.)k(Of)15 b(course,)0 358 y(if)k(that)f(connection)
i(has)e(not)g(y)o(et)g(logged)h(in,)h(the)f(ob)s(ject)f(n)o(um)o(b)q
(er)h(will)h(b)q(e)f(negativ)o(e.)30 b(Also,)20 b(the)f(v)m(ariable)0
412 y Fn(argstr)14 b Fq(will)j(ha)o(v)o(e)e(as)g(its)g(v)m(alue)i(the)e
(unparsed)h(input)g(line)h(as)e(receiv)o(ed)h(on)f(the)g(net)o(w)o(ork)
f(connection.)62 478 y(Out-of-band)i(commands)g(are)f(in)o(tended)i
(for)e(use)g(b)o(y)h(fancy)f(clien)o(t)i(programs)d(that)h(ma)o(y)g
(generate)g(asyn-)0 532 y(c)o(hronous)k Fl(ev)o(en)o(ts)h
Fq(of)f(whic)o(h)g(the)g(serv)o(er)g(m)o(ust)f(b)q(e)h(noti\014ed.)32
b(Since)21 b(the)e(clien)o(t)h(cannot,)f(in)h(general,)f(kno)o(w)0
586 y(the)c(state)f(of)g(the)h(pla)o(y)o(er's)f(connection)i
(\(logged-in)g(or)e(not,)g(reading)h(task)f(or)h(not\),)e(out-of-band)i
(commands)0 640 y(pro)o(vide)h(the)f(only)h(reliable)h(clien)o
(t-to-serv)o(er)f(comm)o(unications)g(c)o(hannel.)0 777
y Fj(5.2.7)30 b(The)15 b(First)g(T)-5 b(asks)15 b(Run)g(By)g(the)g
(Serv)n(er)62 872 y Fq(Whenev)o(er)21 b(the)g(serv)o(er)g(is)g(b)q(o)q
(oted,)i(there)e(are)f(a)h(few)f(tasks)h(it)g(runs)g(righ)o(t)f(at)h
(the)g(b)q(eginning,)j(b)q(efore)0 926 y(accepting)18
b(connections)h(or)e(getting)h(the)f(v)m(alue)i(of)f
Fn(#0.dump_interval)d Fq(to)i(sc)o(hedule)i(the)f(\014rst)f(c)o(hec)o
(kp)q(oin)o(t)0 980 y(\(see)e(b)q(elo)o(w)h(for)f(more)f(information)i
(on)f(c)o(hec)o(kp)q(oin)o(t)h(sc)o(heduling\).)62 1047
y(First,)22 b(the)f(serv)o(er)f(calls)i Fn($user_disconnected\(\))c
Fq(once)j(for)f(eac)o(h)h(user)g(who)g(w)o(as)f(connected)i(at)e(the)0
1101 y(time)c(the)g(database)g(\014le)h(w)o(as)e(written;)h(this)h
(allo)o(ws)f(for)f(an)o(y)h(cleaning)h(up)g(that's)e(usually)i(done)f
(when)h(users)0 1155 y(disconnect)f(\(e.g.,)e(mo)o(ving)h(their)h(pla)o
(y)o(er)f(ob)s(jects)g(bac)o(k)g(to)f(some)h(`home')g(lo)q(cation,)g
(etc.\).)62 1221 y(Next,)h(it)h(c)o(hec)o(ks)f(for)f(the)i(existence)g
(of)f(the)g(v)o(erb)g Fn($server_started\(\))p Fq(.)k(If)d(there)f(is)g
(suc)o(h)h(a)f(v)o(erb,)g(then)0 1275 y(the)g(serv)o(er)g(runs)g(a)g
(task)f(in)o(v)o(oking)h(that)g(v)o(erb)g(with)g(no)g(argumen)o(ts)f
(and)h(with)g Fn(player)g Fq(equal)g(to)g Fn(#-1)p Fq(.)21
b(This)0 1329 y(is)d(useful)g(for)f(carefully)i(sc)o(heduling)g(c)o
(hec)o(kp)q(oin)o(ts)f(and)f(for)g(re-initializi)q(ng)j(an)o(y)d(state)
g(that)f(is)i(not)f(prop)q(erly)0 1383 y(represen)o(ted)i(in)g(the)f
(database)g(\014le)h(\(e.g.,)e(re-op)q(ening)j(certain)e(outb)q(ound)h
(net)o(w)o(ork)e(connections,)j(clearing)0 1437 y(out)15
b(certain)g(tables,)h(etc.\).)0 1574 y Fj(5.2.8)30 b(Con)n(trolling)15
b(the)g(Execution)h(of)e(T)-5 b(asks)62 1670 y Fq(As)12
b(describ)q(ed)i(earlier,)f(in)g(the)f(section)g(describing)i(MOO)e
(tasks,)f(the)h(serv)o(er)g(places)h(limits)g(on)f(the)g(n)o(um)o(b)q
(er)0 1723 y(of)i(seconds)h(for)f(whic)o(h)h(an)o(y)g(task)e(ma)o(y)h
(run)h(con)o(tin)o(uously)h(and)e(the)h(n)o(um)o(b)q(er)g(of)f(\\tic)o
(ks,")g(or)g(lo)o(w-lev)o(el)i(op)q(era-)0 1777 y(tions,)f(an)o(y)g
(task)g(ma)o(y)g(execute)h(in)g(one)f(un)o(brok)o(en)h(p)q(erio)q(d.)22
b(By)15 b(default,)h(foreground)f(tasks)f(ma)o(y)h(use)h(30,000)0
1831 y(tic)o(ks)c(and)f(\014v)o(e)h(seconds,)g(and)g(bac)o(kground)f
(tasks)g(ma)o(y)f(use)i(15,000)e(tic)o(ks)h(and)h(three)g(seconds.)19
b(These)11 b(defaults)0 1885 y(can)18 b(b)q(e)g(o)o(v)o(erridden)h
(from)e(within)i(the)e(database)h(b)o(y)f(de\014ning)j(an)o(y)d(or)g
(all)i(of)e(the)h(follo)o(wing)h(prop)q(erties)f(on)0
1939 y Fn($server_options)13 b Fq(and)i(giving)i(them)e(in)o(teger)g(v)
m(alues:)0 2018 y Fn(bg_seconds)240 2072 y Fq(The)g(n)o(um)o(b)q(er)h
(of)f(seconds)g(allotted)h(to)f(bac)o(kground)g(tasks.)0
2151 y Fn(bg_ticks)48 b Fq(The)15 b(n)o(um)o(b)q(er)h(of)f(tic)o(ks)g
(allotted)h(to)e(bac)o(kground)h(tasks.)0 2230 y Fn(fg_seconds)240
2284 y Fq(The)g(n)o(um)o(b)q(er)h(of)f(seconds)g(allotted)h(to)f
(foreground)f(tasks.)0 2363 y Fn(fg_ticks)48 b Fq(The)15
b(n)o(um)o(b)q(er)h(of)f(tic)o(ks)g(allotted)h(to)e(foreground)h
(tasks.)62 2442 y(The)g(serv)o(er)f(ignores)h(the)g(v)m(alues)g(of)g
Fn(fg_ticks)e Fq(and)i Fn(bg_ticks)e Fq(if)i(they)g(are)f(less)h(than)g
(100)e(and)i(similarly)0 2496 y(ignores)i Fn(fg_seconds)f
Fq(and)h Fn(bg_seconds)e Fq(if)j(their)f(v)m(alues)i(are)d(less)i(than)
f(1.)25 b(This)17 b(ma)o(y)f(help)j(prev)o(en)o(t)d(utter)0
2550 y(disaster)f(should)h(y)o(ou)f(acciden)o(tally)i(giv)o(e)f(them)f
(uselessly-small)j(v)m(alues.)62 2616 y(Recall)j(that)d(command)h
(tasks)f(and)h(serv)o(er)g(tasks)f(are)g(deemed)i Fl(foreground)h
Fq(tasks,)d(while)j(fork)o(ed,)e(sus-)0 2670 y(p)q(ended,)h(and)e
(reading)h(tasks)e(are)g(de\014ned)j(as)d Fl(bac)o(kground)j
Fq(tasks.)27 b(The)19 b(settings)f(of)f(these)h(v)m(ariables)i(tak)o(e)
p eop
%%Page: 75 77
75 76 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(75)0 183 y(e\013ect)21
b(only)h(at)f(the)h(b)q(eginning)h(of)e(execution)i(or)e(up)q(on)h
(resumption)g(of)f(execution)h(after)f(susp)q(ending)i(or)0
237 y(reading.)62 304 y(The)d(serv)o(er)e(also)i(places)g(a)e(limit)j
(on)e(the)g(n)o(um)o(b)q(er)h(of)f(lev)o(els)h(of)f(nested)g(v)o(erb)g
(calls,)i(raising)f Fn(E_MAXREC)0 358 y Fq(from)15 b(a)h(v)o(erb-call)i
(expression)f(if)f(the)h(limit)g(is)g(exceeded.)24 b(The)17
b(limit)g(is)g(50)f(lev)o(els)h(b)o(y)f(default,)h(but)f(this)h(can)0
412 y(b)q(e)j(increased)g(from)f(within)h(the)f(database)g(b)o(y)g
(de\014ning)i(the)e Fn(max_stack_depth)e Fq(prop)q(ert)o(y)i(on)g
Fn($server_)0 466 y(options)14 b Fq(and)h(giving)h(it)f(an)g(in)o
(teger)g(v)m(alue)h(greater)e(than)h(50.)k(The)c(maxim)o(um)g(stac)o(k)
f(depth)h(for)g(an)o(y)f(task)g(is)0 520 y(set)g(at)f(the)h(time)g
(that)f(task)g(is)i(created)e(and)i(cannot)e(b)q(e)i(c)o(hanged)f
(thereafter.)19 b(This)14 b(implies)i(that)d(susp)q(ended)0
574 y(tasks,)19 b(ev)o(en)g(after)g(b)q(eing)h(sa)o(v)o(ed)f(in)g(and)h
(restored)e(from)h(the)g(DB,)f(are)h(not)g(a\013ected)g(b)o(y)f(later)i
(c)o(hanges)f(to)0 628 y($serv)o(er)p 143 628 14 2 v
16 w(options.max)p 401 628 V 16 w(stac)o(k)p 519 628
V 15 w(depth.)62 694 y(Finally)l(,)d(the)f(serv)o(er)g(can)f(place)i(a)
f(limit)h(on)e(the)h(n)o(um)o(b)q(er)g(of)g(fork)o(ed)f(or)g(susp)q
(ended)j(tasks)d(an)o(y)g(pla)o(y)o(er)h(can)0 748 y(ha)o(v)o(e)i
(queued)i(at)e(a)g(giv)o(en)h(time.)27 b(Eac)o(h)17 b(time)h(a)f
Fn(fork)g Fq(statemen)o(t)g(or)g(a)g(call)i(to)d Fn(suspend\(\))h
Fq(is)h(executed)g(in)0 802 y(some)12 b(v)o(erb,)h(the)g(serv)o(er)f(c)
o(hec)o(ks)h(for)e(a)i(prop)q(ert)o(y)f(named)h Fn(queued_task_limit)d
Fq(on)i(the)h(programmer.)18 b(If)13 b(that)0 856 y(prop)q(ert)o(y)i
(exists)g(and)g(its)h(v)m(alue)g(is)g(a)e(non-negativ)o(e)i(in)o
(teger,)f(then)g(that)g(in)o(teger)g(is)h(the)f(limit.)21
b(Otherwise,)15 b(if)0 910 y Fn($server_options.queued_tas)o(k_limit)f
Fq(exists)j(and)h(its)f(v)m(alue)i(is)e(a)g(non-negativ)o(e)h(in)o
(teger,)g(then)f(that's)0 964 y(the)g(limit.)26 b(Otherwise,)18
b(there)f(is)g(no)g(limit.)26 b(If)17 b(the)g(programmer)e(already)i
(has)g(a)f(n)o(um)o(b)q(er)h(of)g(queued)h(tasks)0 1018
y(that)13 b(is)h(greater)f(than)h(or)f(equal)i(to)e(the)h(limit,)h
Fn(E_QUOTA)e Fq(is)h(raised)g(instead)h(of)e(either)h(forking)g(or)f
(susp)q(ending.)0 1072 y(Reading)j(tasks)f(are)g(a\013ected)g(b)o(y)g
(the)g(queued-task)h(limit.)0 1210 y Fj(5.2.9)30 b(Con)n(trolling)15
b(the)g(Handling)g(of)g(Ab)r(orted)g(T)-5 b(asks)62 1305
y Fq(The)16 b(serv)o(er)f(will)h(ab)q(ort)f(the)g(execution)i(of)d
(tasks)h(for)f(either)i(of)f(t)o(w)o(o)f(reasons:)25
1372 y(1.)29 b(an)15 b(error)g(w)o(as)f(raised)i(within)g(the)f(task)g
(but)g(not)g(caugh)o(t,)f(or)25 1438 y(2.)29 b(the)15
b(task)g(exceeded)h(the)g(limits)g(on)f(tic)o(ks)h(and/or)e(seconds.)0
1517 y(In)j(eac)o(h)g(case,)f(after)g(ab)q(orting)g(the)h(task,)f(the)g
(serv)o(er)g(attempts)g(to)g(call)h(a)g(particular)g
Fl(handler)g(v)o(erb)h Fq(within)0 1571 y(the)e(database)g(to)f(allo)o
(w)i(co)q(de)g(there)f(to)g(handle)h(this)g(mishap)f(in)h(some)f
(appropriate)h(w)o(a)o(y)l(.)22 b(If)16 b(this)h(v)o(erb)f(call)0
1625 y(susp)q(ends)e(or)e(returns)h(a)g(true)f(v)m(alue,)j(then)e(it)g
(is)g(considered)h(to)f(ha)o(v)o(e)f(handled)i(the)f(situation)h
(completely)g(and)0 1679 y(no)i(further)g(pro)q(cessing)g(will)i(b)q(e)
f(done)f(b)o(y)g(the)g(serv)o(er.)22 b(On)16 b(the)g(other)g(hand,)g
(if)g(the)g(handler)h(v)o(erb)f(do)q(es)g(not)0 1733
y(exist,)i(or)f(if)g(the)h(call)g(either)g(returns)f(a)g(false)h(v)m
(alue)g(without)g(susp)q(ending)h(or)e(itself)h(is)g(ab)q(orted,)f(the)
g(serv)o(er)0 1787 y(tak)o(es)d(matters)g(in)o(to)i(its)f(o)o(wn)g
(hands.)62 1854 y(First,)20 b(an)g(error)f(message)g(and)h(a)g(MOO)g(v)
o(erb-call)h(stac)o(k)e Fl(tracebac)o(k)j Fq(are)d(prin)o(ted)i(to)e
(the)g(pla)o(y)o(er)h(who)0 1908 y(t)o(yp)q(ed)e(the)f(command)g(that)f
(created)i(the)f(original)h(ab)q(orted)f(task,)g(explaining)i(wh)o(y)e
(the)g(task)g(w)o(as)f(ab)q(orted)0 1962 y(and)c(where)h(in)f(the)g
(task)g(the)g(problem)h(o)q(ccurred.)19 b(Then,)13 b(if)f(the)h(call)g
(to)e(the)h(handler)h(v)o(erb)f(w)o(as)g(itself)g(ab)q(orted,)0
2016 y(a)h(second)h(error)e(message)h(and)g(tracebac)o(k)g(are)g(prin)o
(ted,)h(describing)h(that)e(problem)h(as)f(w)o(ell.)20
b(Note)13 b(that)f(if)i(the)0 2069 y(handler-v)o(erb)k(call)f(itself)h
(is)e(ab)q(orted,)h(no)f(further)g(`nested')g(handler)i(calls)f(are)g
(made;)f(this)h(p)q(olicy)h(prev)o(en)o(ts)0 2123 y(what)d(migh)o(t)g
(otherwise)g(b)q(e)h(quite)g(a)f(vicious)h(little)h(cycle.)62
2190 y(The)i(sp)q(eci\014c)h(handler)f(v)o(erb,)g(and)f(the)h(set)f(of)
g(argumen)o(ts)f(it)i(is)f(passed,)h(di\013ers)g(for)f(the)g(t)o(w)o(o)
f(causes)h(of)0 2244 y(ab)q(orted)d(tasks.)62 2311 y(If)h(an)f(error)f
(is)i(raised)g(and)f(not)g(caugh)o(t,)f(then)i(the)f(v)o(erb-call)120
2375 y Fn($handle_uncaught_error\()p Fl(co)q(de)p Fn(,)21
b Fl(msg)p Fn(,)i Fl(v)m(alue)p Fn(,)i Fl(tracebac)o(k)p
Fn(,)f Fl(formatted)r Fn(\))0 2442 y Fq(is)c(made,)g(where)g
Fl(co)q(de)p Fq(,)g Fl(msg)p Fq(,)g Fl(v)m(alue)p Fq(,)h(and)f
Fl(tracebac)o(k)i Fq(are)d(the)g(v)m(alues)i(that)e(w)o(ould)g(ha)o(v)o
(e)g(b)q(een)i(passed)f(to)0 2496 y(a)g(handler)i(in)f(a)f
Fn(try)p Fq(-)p Fn(except)f Fq(statemen)o(t)g(and)i Fl(formatted)g
Fq(is)g(a)f(list)h(of)f(strings)h(b)q(eing)g(the)g(lines)h(of)e(error)0
2549 y(and)c(tracebac)o(k)f(output)h(that)f(will)j(b)q(e)e(prin)o(ted)h
(to)e(the)h(pla)o(y)o(er)g(if)g Fn($handle_uncaught_error)d
Fq(returns)j(false)0 2603 y(without)f(susp)q(ending.)62
2670 y(If)h(a)f(task)f(runs)h(out)g(of)g(tic)o(ks)g(or)g(seconds,)g
(then)h(the)f(v)o(erb-call)p eop
%%Page: 76 78
76 77 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(76)120 183 y Fn($handle_task_timeout\()p
Fl(resource)p Fn(,)21 b Fl(tracebac)o(k)p Fn(,)i Fl(formatted)r
Fn(\))0 258 y Fq(is)14 b(made,)f(where)g Fl(resource)j
Fq(is)e(the)f(appropriate)h(one)f(of)g(the)g(strings)g
Fn("ticks")f Fq(or)h Fn("seconds")p Fq(,)f(and)h Fl(tracebac)o(k)0
312 y Fq(and)i Fl(formatted)h Fq(are)f(as)g(ab)q(o)o(v)o(e.)0
492 y Fj(5.2.10)29 b(Matc)n(hing)16 b(in)f(Command)h(P)n(arsing)62
595 y Fq(In)d(the)g(pro)q(cess)f(of)g(matc)o(hing)g(the)h(direct)g(and)
f(indirect)i(ob)s(ject)e(strings)g(in)i(a)e(command)g(to)f(actual)i(ob)
s(jects,)0 649 y(the)f(serv)o(er)g(uses)g(the)g(v)m(alue)h(of)f(the)g
Fn(aliases)f Fq(prop)q(ert)o(y)l(,)h(if)g(an)o(y)l(,)h(on)f(eac)o(h)g
(ob)s(ject)f(in)i(the)f(con)o(ten)o(ts)f(of)h(the)g(pla)o(y)o(er)0
703 y(and)j(the)h(pla)o(y)o(er's)e(lo)q(cation.)21 b(F)l(or)15
b(complete)h(details,)f(see)h(the)f(c)o(hapter)g(on)g(command)g
(parsing.)0 883 y Fj(5.2.11)29 b(Restricting)16 b(Access)g(to)f
(Built-in)g(Prop)r(erties)g(and)g(F)-5 b(unctions)62
987 y Fq(Whenev)o(er)17 b(v)o(erb)f(co)q(de)h(attempts)e(to)h(read)g
(the)g(v)m(alue)h(of)f(a)g(built-in)j(prop)q(ert)o(y)d
Fl(prop)h Fq(on)f(an)o(y)g(ob)s(ject,)g(the)0 1041 y(serv)o(er)g(c)o
(hec)o(ks)h(to)f(see)h(if)g(the)g(prop)q(ert)o(y)f Fn
($server_options.protect_)p Fl(prop)f Fq(exists)i(and)g(has)f(a)h(true)
f(v)m(alue.)0 1095 y(If)f(so,)g(then)g Fn(E_PERM)g Fq(is)g(raised)h(if)
g(the)f(programmer)f(is)i(not)f(a)f(wizard.)62 1170 y(Whenev)o(er)20
b(v)o(erb)g(co)q(de)g(calls)g(a)f(built-in)j(function)f
Fl(func)s Fn(\(\))e Fq(and)h(the)g(caller)g(is)g(not)f(the)h(ob)s(ject)
f Fn(#0)p Fq(,)h(the)0 1224 y(serv)o(er)d(c)o(hec)o(ks)g(to)f(see)i(if)
f(the)g(prop)q(ert)o(y)g Fn($server_options.protect_)p
Fl(func)g Fq(exists)g(and)h(has)e(a)h(true)g(v)m(alue.)0
1278 y(If)j(so,)f(then)h(the)f(serv)o(er)g(next)g(c)o(hec)o(ks)h(to)f
(see)g(if)h(the)f(v)o(erb)h Fn($bf_)p Fl(func)s Fn(\(\))e
Fq(exists;)k(if)e(that)e(v)o(erb)h(exists,)i(then)0 1332
y(the)16 b(serv)o(er)g(calls)h(it)f Fl(instead)j Fq(of)d(the)g
(built-in)i(function,)f(returning)g(or)e(raising)i(whatev)o(er)f(that)f
(v)o(erb)h(returns)0 1385 y(or)h(raises.)27 b(If)18 b(the)g
Fn($bf_)p Fl(func)s Fn(\(\))f Fq(do)q(es)g(not)h(exist)g(and)f(the)h
(programmer)e(is)i(not)f(a)h(wizard,)g(then)g(the)f(serv)o(er)0
1439 y(immediately)h(raises)e Fn(E_PERM)p Fq(,)f Fl(without)i
Fq(actually)f(calling)i(the)e(function.)23 b(Otherwise)17
b(\(if)f(the)g(caller)h(is)g Fn(#0)p Fq(,)e(if)0 1493
y Fn($server_options.protect_)p Fl(func)i Fq(either)g(do)q(esn't)g
(exist)g(or)f(has)h(a)g(false)g(v)m(alue,)h(or)e(if)h
Fn($bf_)p Fl(func)s Fn(\(\))g Fq(exists)0 1547 y(but)e(the)h
(programmer)e(is)h(a)g(wizard\),)g(then)h(the)f(built-in)i(function)g
(is)e(called)i(normally)l(.)0 1727 y Fj(5.2.12)29 b(Creating)16
b(and)f(Recycling)g(Ob)s(jects)62 1831 y Fq(Whenev)o(er)f(the)f
Fn(create\(\))f Fq(function)i(is)g(used)g(to)e(create)h(a)g(new)g(ob)s
(ject,)g(that)f(ob)s(ject's)h Fn(initialize)e Fq(v)o(erb,)0
1885 y(if)19 b(an)o(y)l(,)f(is)g(called)i(with)f(no)f(argumen)o(ts.)27
b(The)19 b(call)g(is)g(simply)g(skipp)q(ed)h(if)e(no)g(suc)o(h)h(v)o
(erb)f(is)g(de\014ned)i(on)e(the)0 1939 y(ob)s(ject.)62
2014 y(Symmetrically)l(,)24 b(just)d(b)q(efore)h(the)f
Fn(recycle\(\))g Fq(function)h(actually)g(destro)o(ys)e(an)i(ob)s
(ject,)g(the)f(ob)s(ject's)0 2068 y Fn(recycle)13 b Fq(v)o(erb,)h(if)g
(an)o(y)l(,)g(is)g(called)i(with)e(no)g(argumen)o(ts.)19
b(Again,)14 b(the)g(call)h(is)g(simply)g(skipp)q(ed)g(if)g(no)f(suc)o
(h)g(v)o(erb)0 2122 y(is)i(de\014ned)g(on)f(the)h(ob)s(ject.)62
2196 y(Both)e Fn(create\(\))f Fq(and)i Fn(recycle\(\))d
Fq(c)o(hec)o(k)j(for)e(the)i(existence)g(of)f(an)g Fn(ownership_quota)e
Fq(prop)q(ert)o(y)i(on)g(the)0 2250 y(o)o(wner)d(of)h(the)g
(newly-created)h(or)e(-destro)o(y)o(ed)g(ob)s(ject.)19
b(If)12 b(suc)o(h)g(a)f(prop)q(ert)o(y)h(exists)g(and)g(its)g(v)m(alue)
h(is)f(an)g(in)o(teger,)0 2304 y(then)j(it)h(is)f(treated)g(as)f(a)h
Fl(quota)f Fq(on)h(ob)s(ject)g(o)o(wnership.)20 b(Otherwise,)c(the)f
(follo)o(wing)h(t)o(w)o(o)d(paragraphs)h(do)h(not)0 2358
y(apply)l(.)62 2433 y(The)i Fn(create\(\))f Fq(function)h(c)o(hec)o(ks)
g(whether)g(or)f(not)g(the)g(quota)g(is)i(p)q(ositiv)o(e;)f(if)g(so,)g
(it)f(is)i(reduced)f(b)o(y)g(one)0 2487 y(and)d(stored)e(bac)o(k)i(in)o
(to)f(the)h Fn(ownership_quota)d Fq(prop)q(ert)o(y)i(on)g(the)h(o)o
(wner.)k(If)c(the)g(quota)e(is)i(zero)f(or)g(negativ)o(e,)0
2541 y(the)i(quota)g(is)h(considered)g(to)f(b)q(e)h(exhausted)f(and)h
Fn(create\(\))e Fq(raises)h Fn(E_QUOTA)p Fq(.)62 2616
y(The)d Fn(recycle\(\))e Fq(function)i(increases)g(the)g(quota)e(b)o(y)
i(one)f(and)h(stores)e(it)i(bac)o(k)f(in)o(to)h(the)f
Fn(ownership_quota)0 2670 y Fq(prop)q(ert)o(y)k(on)g(the)g(o)o(wner.)p
eop
%%Page: 77 79
77 78 bop 0 -58 a Fq(Chapter)15 b(5:)k(Serv)o(er)d(Commands)e(and)i
(Database)e(Assumptions)754 b(77)0 183 y Fj(5.2.13)29
b(Ob)s(ject)16 b(Mo)n(v)n(emen)n(t)62 279 y Fq(During)k(ev)m(aluation)g
(of)e(a)h(call)h(to)f(the)g Fn(move\(\))f Fq(function,)i(the)f(serv)o
(er)g(can)g(mak)o(e)g(calls)h(on)f(the)g Fn(accept)0
333 y Fq(and)c Fn(enterfunc)e Fq(v)o(erbs)i(de\014ned)h(on)e(the)h
(destination)g(of)f(the)h(mo)o(v)o(e)f(and)h(on)f(the)h
Fn(exitfunc)f Fq(v)o(erb)g(de\014ned)i(on)0 387 y(the)g(source.)22
b(The)17 b(rules)f(and)h(circumstances)g(are)e(somewhat)g(complicated)j
(and)e(are)g(giv)o(en)g(in)h(detail)g(in)g(the)0 441
y(description)g(of)d(the)i Fn(move\(\))e Fq(function.)0
578 y Fj(5.2.14)29 b(T)-5 b(emp)r(orarily)15 b(Enabling)h(Obsolete)f
(Serv)n(er)h(F)-5 b(eatures)62 673 y Fq(If)16 b(the)g(prop)q(ert)o(y)f
Fn($server_options.support_nume)o(ric_ver)o(bname_st)o(rings)d
Fq(exists)k(and)g(has)g(a)f(true)0 727 y(v)m(alue,)f(then)e(the)g(serv)
o(er)g(supp)q(orts)g(a)g(obsolete)g(mec)o(hanism)h(for)e(less)i(am)o
(biguously)f(referring)h(to)e(sp)q(eci\014c)j(v)o(erbs)0
781 y(in)e(v)m(arious)h(built-in)h(functions.)19 b(F)l(or)11
b(more)g(details,)i(see)f(the)g(discussion)h(giv)o(en)f(just)f(follo)o
(wing)i(the)e(description)0 835 y(of)k(the)g Fn(verbs\(\))f
Fq(function.)p eop
%%Page: 78 80
78 79 bop 0 -58 a Fq(Chapter)15 b(6:)k(F)l(unction)d(Index)1373
b(78)0 183 y Fm(6)41 b(F)-7 b(unction)14 b(Index)0 416
y Fp(A)0 474 y Fe(abs)6 b Fd(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
h(.)f(.)18 b Fc(39)0 524 y Fe(acos)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f
(.)g(.)g(.)g(.)g(.)17 b Fc(40)0 573 y Fe(add)p 62 573
12 2 v 13 w(property)5 b Fd(.)s(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Fc(51)0 623
y Fe(add)p 62 623 V 13 w(verb)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)23
b Fc(54)0 673 y Fe(asin)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)17 b Fc(40)0 723 y Fe(atan)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)17 b Fc(40)0 830 y Fp(B)0 888 y Fe(binary)p
122 888 V 12 w(hash)7 b Fd(.)t(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)20 b Fc(46)0
938 y Fe(boot)p 82 938 V 13 w(player)7 b Fd(.)s(.)f(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)20
b Fc(57)0 988 y Fe(buffered)p 162 988 V 11 w(output)p
293 988 V 12 w(length)t Fd(.)t(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)17
b Fc(56)0 1095 y Fp(C)0 1153 y Fe(call)p 82 1153 V 13
w(function)s Fd(.)t(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)17 b Fc(61)0 1202 y Fe(caller)p
122 1202 V 12 w(perms)5 b Fd(.)t(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Fc(62)0 1252
y Fe(callers)9 b Fd(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)22 b
Fc(64)0 1302 y Fe(ceil)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)17 b Fc(40)0 1352 y Fe(children)8 b Fd(.)s(.)e(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)21 b Fc(50)0 1402 y Fe(chparent)8 b Fd(.)s(.)e(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)21
b Fc(49)0 1452 y Fe(clear)p 102 1452 V 12 w(property)9
b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)24 b Fc(52)0 1501 y Fe(connected)p 182 1501 V 11 w(players)8
b Fd(.)s(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)20
b Fc(55)0 1551 y Fe(connected)p 182 1551 V 11 w(seconds)8
b Fd(.)s(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)20
b Fc(55)0 1601 y Fe(connection)p 201 1601 V 10 w(name)9
b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)23
b Fc(57)0 1651 y Fe(connection)p 201 1651 V 10 w(option)8
b Fd(.)t(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)20
b Fc(58)0 1701 y Fe(connection)p 201 1701 V 10 w(options)6
b Fd(.)t(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19
b Fc(58)0 1750 y Fe(cos)6 b Fd(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)18 b Fc(40)0 1800 y Fe(cosh)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)17 b Fc(40)0 1850 y Fe(create)8
b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fc(48)0 1900
y Fe(crypt)s Fd(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)16
b Fc(46)0 1950 y Fe(ctime)s Fd(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)16 b Fc(60)0 2057 y Fp(D)0 2115 y Fe(db)p 42 2115
V 13 w(disk)p 135 2115 V 13 w(size)8 b Fd(.)d(.)h(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)21
b Fc(66)0 2165 y Fe(decode)p 122 2165 V 12 w(binary)t
Fd(.)t(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)17 b Fc(41)0 2214 y Fe(delete)p 122 2214 V
12 w(property)7 b Fd(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)23 b Fc(52)0 2264 y Fe(delete)p 122 2264
V 12 w(verb)7 b Fd(.)t(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)20 b Fc(54)0 2314 y Fe(disassembl)o(e)t
Fd(.)s(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)17 b Fc(54)0 2364 y Fe(dump)p 82 2364
V 13 w(database)s Fd(.)t(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)17 b Fc(66)0 2471 y Fp(E)0
2529 y Fe(encode)p 122 2529 V 12 w(binary)t Fd(.)t(.)6
b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
17 b Fc(42)0 2579 y Fe(equal)s Fd(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)16 b Fc(39)0 2628 y Fe(eval)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f
(.)g(.)g(.)g(.)g(.)17 b Fc(61)0 2678 y Fe(exp)6 b Fd(.)f(.)h(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fc(40)1015 416 y
Fp(F)1015 474 y Fe(floatstr\(fl)o(oa)o(t)9 b Fd(.)s(.)d(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)22 b Fc(40)1015
524 y Fe(floor)s Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)16
b Fc(40)1015 573 y Fe(flush)p 1117 573 V 13 w(input)7
b Fd(.)t(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
(.)g(.)g(.)g(.)g(.)20 b Fc(57)1015 623 y Fe(force)p 1117
623 V 13 w(input)7 b Fd(.)t(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)20 b Fc(56)1015 673
y Fe(function)p 1177 673 V 12 w(info)t Fd(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)17 b
Fc(61)1015 791 y Fp(I)1015 850 y Fe(idle)p 1097 850 V
13 w(seconds)5 b Fd(.)t(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)19 b Fc(55)1015 899 y Fe(index)s
Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)16 b Fc(41)1015
949 y Fe(is)p 1057 949 V 14 w(clear)p 1171 949 V 12 w(property)7
b Fd(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)24
b Fc(52)1015 999 y Fe(is)p 1057 999 V 14 w(member)7 b
Fd(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)23 b Fc(47)1015 1049 y Fe(is)p
1057 1049 V 14 w(player)7 b Fd(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)23
b Fc(55)1015 1167 y Fp(K)1015 1225 y Fe(kill)p 1097 1225
V 13 w(task)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)23 b Fc(64)1015
1344 y Fp(L)1015 1402 y Fe(length)5 b Fd(.)t(.)h(.)g(.)g(.)h(.)f(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18
b Fc(41,)13 b(47)1015 1452 y Fe(listappend)5 b Fd(.)s(.)h(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)19
b Fc(47)1015 1501 y Fe(listdelete)5 b Fd(.)s(.)h(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)19
b Fc(47)1015 1551 y Fe(listen)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
24 b Fc(59)1015 1601 y Fe(listeners)7 b Fd(.)s(.)f(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)20
b Fc(60)1015 1651 y Fe(listinsert)5 b Fd(.)s(.)h(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)19
b Fc(47)1015 1701 y Fe(listset)9 b Fd(.)t(.)d(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22
b Fc(47)1015 1750 y Fe(log)6 b Fd(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)h(.)f
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)19 b Fc(40)1015 1800 y Fe(log10)s Fd(.)5
b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)16 b Fc(40)1015
1919 y Fp(M)1015 1977 y Fe(match)s Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)16 b Fc(42)1015 2026 y Fe(max)6 b Fd(.)f(.)h(.)g(.)g(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)19 b Fc(39)1015 2076 y Fe(max)p
1077 2076 V 13 w(object)8 b Fd(.)t(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)21 b
Fc(50)1015 2126 y Fe(memory)p 1137 2126 V 12 w(usage)5
b Fd(.)g(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)19 b Fc(66)1015 2176 y Fe(min)6 b Fd(.)f(.)h(.)g(.)g(.)g
(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)19 b Fc(39)1015 2226 y
Fe(move)t Fd(.)5 b(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)18
b Fc(50)1015 2344 y Fp(N)1015 2402 y Fe(notify)9 b Fd(.)d(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)24 b Fc(55)1015 2521 y Fp(O)1015 2579
y Fe(object)p 1137 2579 V 12 w(bytes)5 b Fd(.)g(.)h(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)19
b Fc(50)1015 2628 y Fe(open)p 1097 2628 V 13 w(network)p
1250 2628 V 11 w(connection)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)25
b Fc(58)1015 2678 y Fe(output)p 1137 2678 V 12 w(delimiters)7
b Fd(.)s(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)21
b Fc(57)p eop
%%Page: 79 81
79 80 bop 0 -58 a Fq(Chapter)15 b(6:)k(F)l(unction)d(Index)1373
b(79)0 183 y Fp(P)0 241 y Fe(parent)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)23 b Fc(50)0 291 y Fe(pass)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)17 b Fc(37)0 341 y Fe(players)9 b Fd(.)s(.)e(.)f(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)22 b Fc(55)0 391 y Fe(properties)t Fd(.)s(.)7
b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)18 b Fc(51)0 441 y Fe(property)p 162 441
12 2 v 11 w(info)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)17 b Fc(51)0 540 y Fp(Q)0
598 y Fe(queue)p 102 598 V 12 w(info)8 b Fd(.)d(.)h(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)21
b Fc(64)0 648 y Fe(queued)p 122 648 V 12 w(tasks)5 b
Fd(.)t(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)18 b Fc(64)0 748 y Fp(R)0 806 y Fe(raise)s
Fd(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)16 b Fc(60)0
856 y Fe(random)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23
b Fc(39)0 906 y Fe(read)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)17 b Fc(56)0 955 y Fe(recycle)9 b Fd(.)s(.)e(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)22 b Fc(50)0 1005 y Fe(renumber)8 b Fd(.)s(.)e(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)21
b Fc(65)0 1055 y Fe(reset)p 102 1055 V 12 w(max)p 174
1055 V 13 w(object)s Fd(.)t(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)16 b Fc(66)0 1105 y Fe(resume)8 b
Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fc(64)0 1155
y Fe(rindex)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23
b Fc(41)0 1204 y Fe(rmatch)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23
b Fc(42)0 1304 y Fp(S)0 1362 y Fe(seconds)p 142 1362
V 11 w(left)5 b Fd(.)g(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Fc(62)0 1412 y Fe(server)p
122 1412 V 12 w(log)8 b Fd(.)d(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)21 b Fc(65)0
1462 y Fe(server)p 122 1462 V 12 w(version)9 b Fd(.)d(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 b
Fc(65)0 1512 y Fe(set)p 62 1512 V 13 w(connectio)o(n)p
274 1512 V 11 w(option)5 b Fd(.)t(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
18 b Fc(58)0 1561 y Fe(set)p 62 1561 V 13 w(player)p
195 1561 V 12 w(flag)t Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
h(.)f(.)g(.)g(.)g(.)g(.)17 b Fc(55)0 1611 y Fe(set)p
62 1611 V 13 w(property)p 235 1611 V 11 w(info)9 b Fd(.)d(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fc(51)0
1661 y Fe(set)p 62 1661 V 13 w(task)p 155 1661 V 13 w(perms)6
b Fd(.)s(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)18 b Fc(62)0 1711 y Fe(set)p 62 1711 V 13 w(verb)p
155 1711 V 13 w(args)7 b Fd(.)t(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)20 b Fc(53)0 1761 y Fe(set)p
62 1761 V 13 w(verb)p 155 1761 V 13 w(code)7 b Fd(.)t(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)20
b Fc(54)0 1810 y Fe(set)p 62 1810 V 13 w(verb)p 155 1810
V 13 w(info)7 b Fd(.)t(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)20 b Fc(53)0 1860 y Fe(setadd)8
b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fc(48)0 1910
y Fe(setremove)6 b Fd(.)s(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Fc(48)0
1960 y Fe(shutdown)8 b Fd(.)s(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)21
b Fc(66)1015 183 y Fe(sin)6 b Fd(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)19 b Fc(40)1015 233 y Fe(sinh)t Fd(.)5 b(.)h(.)h(.)f(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)18 b Fc(40)1015 283 y Fe(sqrt)t
Fd(.)5 b(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)18
b Fc(40)1015 333 y Fe(strcmp)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)24
b Fc(41)1015 382 y Fe(string)p 1137 382 V 12 w(hash)7
b Fd(.)e(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
(.)g(.)g(.)g(.)g(.)20 b Fc(46)1015 432 y Fe(strsub)9
b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)24 b Fc(41)1015
482 y Fe(substitute)5 b Fd(.)s(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)19 b Fc(46)1015
532 y Fe(suspend)9 b Fd(.)t(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22
b Fc(62)1015 634 y Fp(T)1015 692 y Fe(tan)6 b Fd(.)f(.)h(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)19 b Fc(40)1015 742 y Fe(tanh)t
Fd(.)5 b(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)18
b Fc(40)1015 792 y Fe(task)p 1097 792 V 13 w(id)s Fd(.)6
b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)17 b Fc(62)1015 842 y
Fe(task)p 1097 842 V 13 w(stack)8 b Fd(.)t(.)e(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)21
b Fc(65)1015 892 y Fe(ticks)p 1117 892 V 13 w(left)8
b Fd(.)t(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)21 b Fc(62)1015 942 y Fe(time)t
Fd(.)5 b(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)18
b Fc(60)1015 991 y Fe(tofloat)9 b Fd(.)t(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22
b Fc(39)1015 1041 y Fe(toint)s Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)16 b Fc(38)1015 1091 y Fe(toliteral)7 b Fd(.)s(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)20 b Fc(38)1015 1141 y Fe(tonum)s Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)h(.)f(.)16 b Fc(38)1015 1191 y Fe(toobj)s Fd(.)5
b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)16 b Fc(38)1015
1240 y Fe(tostr)s Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)16
b Fc(38)1015 1290 y Fe(trunc)s Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)16 b Fc(40)1015 1340 y Fe(typeof)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)24 b Fc(37)1015 1442 y Fp(U)1015 1501 y Fe(unlisten)8
b Fd(.)s(.)e(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)21 b Fc(59)1015 1603 y
Fp(V)1015 1661 y Fe(valid)s Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)
f(.)16 b Fc(49)1015 1711 y Fe(value)p 1117 1711 V 13
w(bytes)7 b Fd(.)t(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)
f(.)g(.)g(.)g(.)g(.)g(.)g(.)20 b Fc(39)1015 1761 y Fe(value)p
1117 1761 V 13 w(hash)8 b Fd(.)t(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)21 b Fc(39)1015
1810 y Fe(verb)p 1097 1810 V 13 w(args)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)23
b Fc(53)1015 1860 y Fe(verb)p 1097 1860 V 13 w(code)8
b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)23 b Fc(54)1015 1910 y Fe(verb)p
1097 1910 V 13 w(info)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)23
b Fc(53)1015 1960 y Fe(verbs)s Fd(.)5 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h
(.)f(.)16 b Fc(52)p eop
%%Page: -1 82
-1 81 bop 1937 -58 a Fq(i)0 183 y Fm(T)-7 b(able)15 b(of)g(Con)n(ten)n
(ts)0 341 y Fp(1)67 b(In)n(tro)r(duction)9 b Fb(.)i(.)f(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)31
b Fp(1)0 462 y(2)67 b(The)22 b(Lam)n(b)r(daMOO)g(Database)13
b Fb(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)f(.)h(.)g(.)g(.)g(.)37 b Fp(2)149 530 y Fq(2.1)45
b(MOO)16 b(V)l(alue)g(T)o(yp)q(es)c Fa(.)c(.)f(.)h(.)g(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)27 b Fq(2)149 584 y(2.2)45 b(Ob)s(jects)15 b(in)h(the)f(MOO)h
(Database)11 b Fa(.)d(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)27 b Fq(4)299 638 y(2.2.1)44 b(F)l(undamen)o(tal)15
b(Ob)s(ject)h(A)o(ttributes)7 b Fa(.)g(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)22
b Fq(4)299 692 y(2.2.2)44 b(Prop)q(erties)15 b(on)g(Ob)s(jects)8
b Fa(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)22
b Fq(5)299 746 y(2.2.3)44 b(V)l(erbs)15 b(on)h(Ob)s(jects)11
b Fa(.)c(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f
(.)h(.)f(.)h(.)25 b Fq(7)0 854 y Fp(3)67 b(The)22 b(Built-in)k(Command)
c(P)n(arser)9 b Fb(.)g(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)31 b Fp(9)0 975 y(4)67
b(The)22 b(MOO)f(Programming)i(Language)12 b Fb(.)d(.)h(.)g(.)g(.)g(.)g
(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)34 b Fp(13)149 1043
y Fq(4.1)45 b(MOO)16 b(Language)f(Expressions)e Fa(.)8
b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)28
b Fq(13)299 1096 y(4.1.1)44 b(Errors)14 b(While)i(Ev)m(aluating)h
(Expressions)8 b Fa(.)g(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)23 b Fq(13)299 1150 y(4.1.2)44
b(W)l(riting)16 b(V)l(alues)g(Directly)g(in)g(V)l(erbs)7
b Fa(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)22 b Fq(14)299 1204 y(4.1.3)44
b(Naming)15 b(V)l(alues)h(Within)h(a)e(V)l(erb)10 b Fa(.)e(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)25 b Fq(14)299 1258 y(4.1.4)44 b(Arithmetic)16
b(Op)q(erators)10 b Fa(.)d(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)g(.)f(.)25 b Fq(16)299 1312 y(4.1.5)44 b(Comparing)15
b(V)l(alues)c Fa(.)d(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)26 b Fq(17)299 1366 y(4.1.6)44 b(V)l(alues)16
b(as)f(T)l(rue)g(and)h(F)l(alse)9 b Fa(.)f(.)f(.)h(.)g(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)25 b Fq(18)299 1420 y(4.1.7)44 b(Indexing)17
b(in)o(to)e(Lists)h(and)f(Strings)f Fa(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)29
b Fq(19)448 1474 y(4.1.7.1)44 b(Extracting)14 b(an)h(Elemen)o(t)h(from)
f(a)f(List)i(or)f(String)f Fa(.)8 b(.)f(.)29 b Fq(19)448
1528 y(4.1.7.2)44 b(Replacing)17 b(an)e(Elemen)o(t)h(of)e(a)h(List)h
(or)f(String)7 b Fa(.)g(.)h(.)f(.)h(.)f(.)h(.)22 b Fq(20)448
1582 y(4.1.7.3)44 b(Extracting)14 b(a)h(Subsequence)i(of)e(a)g(List)h
(or)e(String)e Fa(.)c(.)f(.)27 b Fq(21)448 1636 y(4.1.7.4)44
b(Replacing)17 b(a)e(Subsequence)i(of)e(a)f(List)i(or)f(String)9
b Fa(.)f(.)f(.)h(.)24 b Fq(21)299 1690 y(4.1.8)44 b(Other)15
b(Op)q(erations)h(on)f(Lists)6 b Fa(.)j(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
f(.)h(.)21 b Fq(22)299 1744 y(4.1.9)44 b(Spreading)16
b(List)g(Elemen)o(ts)f(Among)g(V)l(ariables)9 b Fa(.)g(.)e(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)24 b Fq(23)299 1798
y(4.1.10)43 b(Getting)15 b(and)h(Setting)f(the)h(V)l(alues)g(of)f(Prop)
q(erties)5 b Fa(.)i(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)20
b Fq(24)299 1852 y(4.1.11)43 b(Calling)17 b(Built-in)h(F)l(unctions)e
(and)f(Other)g(V)l(erbs)7 b Fa(.)i(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)22 b Fq(25)299 1906 y(4.1.12)43 b(Catc)o(hing)16
b(Errors)e(in)i(Expressions)c Fa(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)27
b Fq(27)299 1960 y(4.1.13)43 b(P)o(aren)o(theses)15 b(and)h(Op)q
(erator)f(Precedence)9 b Fa(.)f(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g
(.)f(.)h(.)f(.)h(.)f(.)24 b Fq(27)149 2014 y(4.2)45 b(MOO)16
b(Language)f(Statemen)o(ts)8 b Fa(.)e(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)g
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)23 b Fq(28)299 2068
y(4.2.1)44 b(Errors)14 b(While)i(Executing)h(Statemen)o(ts)11
b Fa(.)6 b(.)h(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)26 b Fq(28)299 2122 y(4.2.2)44 b(Simple)17
b(Statemen)o(ts)7 b Fa(.)g(.)g(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)23 b Fq(28)299 2176 y(4.2.3)44
b(Statemen)o(ts)14 b(for)h(T)l(esting)g(Conditions)f
Fa(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)28 b Fq(29)299 2230 y(4.2.4)44 b(Statemen)o(ts)14
b(for)h(Lo)q(oping)f Fa(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)28 b Fq(30)299 2284 y(4.2.5)44 b(T)l(erminating)16
b(One)g(or)e(All)j(Iterations)e(of)g(a)g(Lo)q(op)10 b
Fa(.)e(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)25 b
Fq(32)299 2338 y(4.2.6)44 b(Returning)16 b(a)f(V)l(alue)h(from)f(a)g(V)
l(erb)e Fa(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)28 b Fq(32)299 2392
y(4.2.7)44 b(Handling)16 b(Errors)f(in)h(Statemen)o(ts)6
b Fa(.)g(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)21 b Fq(33)299 2446 y(4.2.8)44
b(Cleaning)16 b(Up)g(After)e(Errors)f Fa(.)8 b(.)f(.)h(.)g(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)29 b Fq(34)299 2500 y(4.2.9)44 b(Executing)16
b(Statemen)o(ts)e(at)h(a)g(Later)g(Time)d Fa(.)c(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)27 b Fq(34)149
2554 y(4.3)45 b(MOO)16 b(T)l(asks)t Fa(.)7 b(.)g(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)19 b Fq(35)149 2607 y(4.4)45
b(Built-in)18 b(F)l(unctions)7 b Fa(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)23 b Fq(36)299 2661 y(4.4.1)44 b(Ob)s(ject-Orien)o(ted)16
b(Programming)6 b Fa(.)h(.)g(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)21 b
Fq(36)p eop
%%Page: -2 83
-2 82 bop 1925 -58 a Fq(ii)299 42 y(4.4.2)44 b(Manipulating)16
b(MOO)g(V)l(alues)10 b Fa(.)e(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)25
b Fq(37)448 95 y(4.4.2.1)44 b(General)15 b(Op)q(erations)h(Applicable)i
(to)d(all)h(V)l(alues)6 b Fa(.)i(.)g(.)f(.)21 b Fq(37)448
149 y(4.4.2.2)44 b(Op)q(erations)16 b(on)f(Num)o(b)q(ers)e
Fa(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)28 b Fq(39)448 203 y(4.4.2.3)44 b(Op)q(erations)16
b(on)f(Strings)c Fa(.)c(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)26 b Fq(41)448
257 y(4.4.2.4)44 b(Op)q(erations)16 b(on)f(Lists)d Fa(.)c(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)27 b Fq(47)299 311 y(4.4.3)44 b(Manipulating)16
b(Ob)s(jects)8 b Fa(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)23 b Fq(48)448 365 y(4.4.3.1)44 b(F)l(undamen)o(tal)15
b(Op)q(erations)h(on)f(Ob)s(jects)7 b Fa(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)22 b Fq(48)448 419 y(4.4.3.2)44 b(Ob)s(ject)15
b(Mo)o(v)o(emen)o(t)8 b Fa(.)e(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)23
b Fq(50)448 473 y(4.4.3.3)44 b(Op)q(erations)16 b(on)f(Prop)q(erties)c
Fa(.)c(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)26 b Fq(51)448 527 y(4.4.3.4)44 b(Op)q(erations)16
b(on)f(V)l(erbs)f Fa(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)29
b Fq(52)448 581 y(4.4.3.5)44 b(Op)q(erations)16 b(on)f(Pla)o(y)o(er)g
(Ob)s(jects)9 b Fa(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)24 b Fq(55)299 635 y(4.4.4)44 b(Op)q(erations)16
b(on)f(Net)o(w)o(ork)f(Connections)h Fa(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)30 b Fq(55)299
689 y(4.4.5)44 b(Op)q(erations)16 b(In)o(v)o(olving)g(Times)g(and)f
(Dates)c Fa(.)c(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)27 b Fq(60)299 743 y(4.4.6)44 b(MOO-Co)q(de)16
b(Ev)m(aluation)g(and)f(T)l(ask)g(Manipulation)h Fa(.)7
b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)29 b Fq(60)299 797 y(4.4.7)44
b(Administrativ)o(e)16 b(Op)q(erations)e Fa(.)7 b(.)h(.)f(.)h(.)f(.)h
(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)28 b Fq(65)0 905 y Fp(5)67 b(Serv)n(er)24
b(Commands)d(and)i(Database)e(Assumptions)13 b Fb(.)d(.)f(.)36
b Fp(67)149 972 y Fq(5.1)45 b(Built-in)18 b(Commands)13
b Fa(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)29 b Fq(67)299 1026
y(5.1.1)44 b(Command-Output)15 b(Delimiters)7 b Fa(.)i(.)f(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
h(.)f(.)h(.)22 b Fq(67)299 1080 y(5.1.2)44 b(Programming)13
b Fa(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)29 b Fq(68)299 1134 y(5.1.3)44
b(Flushing)16 b(Unpro)q(cessed)h(Input)10 b Fa(.)d(.)h(.)f(.)h(.)g(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)25 b Fq(68)299 1188 y(5.1.4)44 b(Initial)17
b(Punctuation)f(in)g(Commands)7 b Fa(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)23
b Fq(69)149 1242 y(5.2)45 b(Serv)o(er)15 b(Assumptions)h(Ab)q(out)f
(the)h(Database)8 b Fa(.)e(.)h(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)23 b Fq(69)299
1296 y(5.2.1)44 b(Serv)o(er)15 b(Options)h(Set)f(in)h(the)f(Database)d
Fa(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
g(.)f(.)h(.)27 b Fq(69)299 1350 y(5.2.2)44 b(Serv)o(er)15
b(Messages)f(Set)i(in)g(the)f(Database)c Fa(.)6 b(.)i(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)26
b Fq(70)299 1404 y(5.2.3)44 b(Chec)o(kp)q(oin)o(ting)16
b(the)g(Database)8 b Fa(.)e(.)i(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)23
b Fq(71)299 1458 y(5.2.4)44 b(Accepting)16 b(and)g(Initiating)g(Net)o
(w)o(ork)e(Connections)9 b Fa(.)f(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)24
b Fq(71)299 1512 y(5.2.5)44 b(Asso)q(ciating)16 b(Net)o(w)o(ork)e
(Connections)h(with)h(Pla)o(y)o(ers)7 b Fa(.)g(.)h(.)g(.)f(.)h(.)f(.)h
(.)f(.)h(.)22 b Fq(72)299 1566 y(5.2.6)44 b(Out-of-Band)16
b(Commands)c Fa(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)28
b Fq(73)299 1620 y(5.2.7)44 b(The)15 b(First)g(T)l(asks)g(Run)h(By)f
(the)h(Serv)o(er)c Fa(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)28 b Fq(74)299 1674 y(5.2.8)44
b(Con)o(trolling)16 b(the)f(Execution)h(of)f(T)l(asks)7
b Fa(.)f(.)i(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)22 b Fq(74)299 1728 y(5.2.9)44 b(Con)o(trolling)16
b(the)f(Handling)i(of)d(Ab)q(orted)i(T)l(asks)c Fa(.)7
b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)27 b
Fq(75)299 1782 y(5.2.10)43 b(Matc)o(hing)16 b(in)g(Command)e(P)o
(arsing)9 b Fa(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)24 b Fq(76)299 1836
y(5.2.11)43 b(Restricting)17 b(Access)f(to)e(Built-in)k(Prop)q(erties)d
(and)h(F)l(unctions)402 1890 y Fa(.)7 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h
(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)27 b Fq(76)299
1944 y(5.2.12)43 b(Creating)15 b(and)h(Recycling)h(Ob)s(jects)e
Fa(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
f(.)h(.)f(.)h(.)g(.)29 b Fq(76)299 1998 y(5.2.13)43 b(Ob)s(ject)16
b(Mo)o(v)o(emen)o(t)c Fa(.)c(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f
(.)h(.)f(.)h(.)f(.)h(.)29 b Fq(77)299 2052 y(5.2.14)43
b(T)l(emp)q(orarily)17 b(Enabling)f(Obsolete)g(Serv)o(er)f(F)l(eatures)
10 b Fa(.)d(.)h(.)f(.)h(.)f(.)h(.)f(.)25 b Fq(77)0 2160
y Fp(6)67 b(F)-6 b(unction)24 b(Index)10 b Fb(.)h(.)f(.)g(.)g(.)g(.)g
(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)32 b
Fp(78)p eop
%%Trailer
end
userdict /end-hook known{end-hook}if
%%EOF