%!PS-Adobe-2.0 %%Creator: dvips, version 5.4 (C) 1986-90 Radical Eye Software %%Title: manual.dvi %%Pages: 24 1 %%BoundingBox: 0 0 596 843 %%EndComments %%BeginProcSet: tex.pro /TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{ isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale Resolution VResolution vsize neg mul TR}B /@letter{/vsize 10 N}B /@landscape{ /isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@a3{/vsize 15.5531 N }B /@ledger{/vsize 16 N}B /@legal{/vsize 13 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 /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 /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 /E{pop nn dup definefont setfont}B /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}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 /ctr 0 N /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]{ch-image}imagemask restore}B /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}B /eop{clear SI restore showpage userdict /eop-hook known{eop-hook}if}B /@start{userdict /start-hook known{start-hook}if /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}B /p /show load N /RMat[1 0 0 -1 0 0]N /BDot 8 string N /v{/ruley X /rulex X V}B /V{gsave TR -.1 -.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask 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 /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 /w{0 rmoveto}B /x{0 S rmoveto}B /y{3 2 roll p a}B /bos{/SS save N}B /eos{clear SS restore}B end %%EndProcSet TeXDict begin 1000 300 300 @start /Fa 7 121 df<1FF0003FFC007FFE00780F00300700 000380000380007F8007FF801FFF803F8380780380700380E00380E00380E00380700780780F80 3FFFFC1FFDFC07F0FC16157D941A>97 D<01F80007FF000FFF801E07C03C01C07800E07000E0E0 0070E00070FFFFF0FFFFF0FFFFF0E000007000007000007800703C00701F01F00FFFE003FFC000 FE0014157D941A>101 D110 D<7F83F0FF8FF87FBFFC03FC3C03F01803E00003C00003C00003800003800003800003 80000380000380000380000380000380000380007FFF00FFFF007FFF0016157E941A>114 D<00C00001C00001C00001C00001C00001C00001C0007FFFE0FFFFE0FFFFE001C00001C00001C0 0001C00001C00001C00001C00001C00001C00001C00001C07001C07001C07001C07000E0E000FF E0007FC0001F00141C7F9B1A>116 D<7F83FCFFC7FE7F83FC0E00E00E00E00E00E00701C00701 C00701C003838003838003838001C70001C70001C70000EE0000EE0000EE00007C00007C000038 0017157F941A>118 D<7FC7F87FCFFC7FC7F80703C003838003C70001EF0000FE00007C000078 00003800007C0000EE0001EE0001C7000383800783C00F01C07FC7FCFFC7FE7FC7FC17157F941A >120 D E /Fb 1 122 df<1C02260646064606860C0C0C0C0C0C0C18181818181818380C7007B0 00300060706070C021801E000F147F8D11>121 D E /Fc 2 121 df<70F8F8F87005057C840D> 58 D<03C1C00C62201034701038F02038F020386040700000700000700000700000E00000E000 00E00000E02061C040F1C040F1C080E2C080446300383C0014147E931A>120 D E /Fd 47 121 df<000FF000007FFC0001F80E0003E01F0007C03F000F803F000F803F000F80 1E000F800C000F8000000F8000000F8000000F800000FFFFFF00FFFFFF000F801F000F801F000F 801F000F801F000F801F000F801F000F801F000F801F000F801F000F801F000F801F000F801F00 0F801F000F801F000F801F000F801F000F801F000F801F007FF0FFE07FF0FFE01B237FA21F>12 D<387CFEFEFE7C3807077C8610>46 D<0000180000380000380000700000700000E00000E00000 E00001C00001C0000380000380000380000700000700000700000E00000E00001C00001C00001C 0000380000380000700000700000700000E00000E00001C00001C00001C0000380000380000700 000700000700000E00000E00000E00001C00001C0000380000380000380000700000700000E000 00E00000C0000015317DA41C>I<00180000780001F800FFF800FFF80001F80001F80001F80001 F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001F80001 F80001F80001F80001F80001F80001F80001F80001F80001F8007FFFE07FFFE013207C9F1C>49 D<03FC000FFF003C1FC07007E07C07F0FE03F0FE03F8FE03F8FE01F87C01F83803F80003F80003 F00003F00007E00007C0000F80001F00003E0000380000700000E01801C0180380180700180E00 380FFFF01FFFF03FFFF07FFFF0FFFFF0FFFFF015207D9F1C>I<00FE0007FFC00F07E01E03F03F 03F03F81F83F81F83F81F81F03F81F03F00003F00003E00007C0001F8001FE0001FF000007C000 01F00001F80000FC0000FC3C00FE7E00FEFF00FEFF00FEFF00FEFF00FC7E01FC7801F81E07F00F FFC001FE0017207E9F1C>I<0000E00001E00003E00003E00007E0000FE0001FE0001FE00037E0 0077E000E7E001C7E00187E00307E00707E00E07E00C07E01807E03807E07007E0E007E0FFFFFE FFFFFE0007E00007E00007E00007E00007E00007E00007E000FFFE00FFFE17207E9F1C>I<1000 201E01E01FFFC01FFF801FFF001FFE001FF8001BC00018000018000018000018000019FC001FFF 001E0FC01807E01803E00003F00003F00003F80003F83803F87C03F8FE03F8FE03F8FC03F0FC03 F07007E03007C01C1F800FFF0003F80015207D9F1C>I<001F8000FFE003F07007C0F00F01F81F 01F83E01F83E01F87E00F07C00007C0000FC0800FC7FC0FCFFE0FD80F0FF00F8FE007CFE007CFC 007EFC007EFC007EFC007E7C007E7C007E7C007E3C007C3E007C1E00F80F00F00783E003FFC000 FF0017207E9F1C>I<6000007800007FFFFE7FFFFE7FFFFC7FFFF87FFFF87FFFF0E00060E000C0 C00180C00300C00300000600000C00001C0000180000380000780000780000F00000F00000F000 01F00001F00001F00003F00003F00003F00003F00003F00003F00003F00001E00017227DA11C> I<00FE0003FFC00601E00C00701800701800383800383C00383F00383F80783FE0701FF8E01FFF C00FFF8007FFC003FFE007FFF01E7FF83C1FFC7807FC7801FEF000FEF0003EF0001EF0001EF000 1CF8001C7800383C00381F01F00FFFC001FF0017207E9F1C>I<000070000000007000000000F8 00000000F800000000F800000001FC00000001FC00000003FE00000003FE00000003FE00000006 FF000000067F0000000E7F8000000C3F8000000C3F800000183FC00000181FC00000381FE00000 300FE00000300FE00000600FF000006007F00000E007F80000FFFFF80000FFFFF800018001FC00 018001FC00038001FE00030000FE00030000FE000600007F000600007F00FFE00FFFF8FFE00FFF F825227EA12A>65 D<0003FE0080001FFF818000FF01E38001F8003F8003E0001F8007C0000F80 0F800007801F800007803F000003803F000003807F000001807E000001807E00000180FE000000 00FE00000000FE00000000FE00000000FE00000000FE00000000FE00000000FE000000007E0000 00007E000001807F000001803F000001803F000003801F800003000F8000030007C000060003F0 000C0001F800380000FF00F000001FFFC0000003FE000021227DA128>67 DIII72 DI76 DI<0007FC0000003FFF800000FC07E00003F001F80007E0 00FC000FC0007E001F80003F001F80003F003F00001F803F00001F807F00001FC07E00000FC07E 00000FC0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0FE00000FE0 FE00000FE0FE00000FE07E00000FC07F00001FC07F00001FC03F00001F803F80003F801F80003F 000FC0007E0007E000FC0003F001F80000FC07E000003FFF80000007FC000023227DA12A>79 DI<01FC0407FF8C1F03FC3C007C 7C003C78001C78001CF8000CF8000CFC000CFC0000FF0000FFE0007FFF007FFFC03FFFF01FFFF8 0FFFFC03FFFE003FFE0003FF00007F00003F00003FC0001FC0001FC0001FE0001EE0001EF0003C FC003CFF00F8C7FFE080FF8018227DA11F>83 D<7FFFFFFF807FFFFFFF807E03F80F807803F807 807003F803806003F80180E003F801C0E003F801C0C003F800C0C003F800C0C003F800C0C003F8 00C00003F800000003F800000003F800000003F800000003F800000003F800000003F800000003 F800000003F800000003F800000003F800000003F800000003F800000003F800000003F8000000 03F800000003F800000003F800000003F800000003F8000003FFFFF80003FFFFF80022227EA127 >I86 D<07FC001FFF803F07C03F03E03F01E0 3F01F01E01F00001F00001F0003FF003FDF01FC1F03F01F07E01F0FC01F0FC01F0FC01F0FC01F0 7E02F07E0CF81FF87F07E03F18167E951B>97 DI<00FF8007FFE00F83F01F03F03E03F07E03F07C01E07C0000FC0000FC 0000FC0000FC0000FC0000FC00007C00007E00007E00003E00301F00600FC0E007FF8000FE0014 167E9519>I<0001FE000001FE0000003E0000003E0000003E0000003E0000003E0000003E0000 003E0000003E0000003E0000003E0000003E0001FC3E0007FFBE000F81FE001F007E003E003E00 7E003E007C003E00FC003E00FC003E00FC003E00FC003E00FC003E00FC003E00FC003E00FC003E 007C003E007C003E003E007E001E00FE000F83BE0007FF3FC001FC3FC01A237EA21F>I<00FE00 07FF800F87C01E01E03E01F07C00F07C00F8FC00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC0000 7C00007C00007E00003E00181F00300FC07003FFC000FF0015167E951A>I<03FC1E0FFF7F1F0F 8F3E07CF3C03C07C03E07C03E07C03E07C03E07C03E03C03C03E07C01F0F801FFF0013FC003000 003000003800003FFF801FFFF00FFFF81FFFFC3800FC70003EF0001EF0001EF0001EF0001E7800 3C7C007C3F01F80FFFE001FF0018217E951C>103 DI<1C003F007F007F007F003F001C00000000000000000000000000 0000FF00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F001F 001F00FFE0FFE00B247EA310>I<0038007C00FE00FE00FE007C00380000000000000000000000 00000003FE03FE003E003E003E003E003E003E003E003E003E003E003E003E003E003E003E003E 003E003E003E003E003E003E003E783EFC3EFC3CFC7C78F87FE01F800F2E83A311>IIIII<00FE0007FFC00F83E01E00F03E00 F87C007C7C007C7C007CFC007EFC007EFC007EFC007EFC007EFC007EFC007E7C007C7C007C3E00 F81F01F00F83E007FFC000FE0017167E951C>II114 D<0FF3003FFF00781F00600700E00300E00300F00300FC00007FE0007FF8003FFE000FFF0001FF 00000F80C00780C00380E00380E00380F00700FC0E00EFFC00C7F00011167E9516>I<01800001 80000180000180000380000380000780000780000F80003F8000FFFF00FFFF000F80000F80000F 80000F80000F80000F80000F80000F80000F80000F80000F80000F81800F81800F81800F81800F 81800F830007C30003FE0000F80011207F9F16>IIIII E /Fe 4 112 df<03CC0E2E181C381C301C701CE038E038E038E038C072C072C07260F261341E 180F107C8F14>97 D<307C1E00598663009E0783809E0703809C0703809C070380380E0700380E 0700380E0700380E0E00701C0E40701C0E40701C1C40701C1C80E0380C80601807001A107C8F1F >109 D<307C005986009E07009E07009C07009C0700380E00380E00380E00381C00701C80701C 80703880703900E01900600E0011107C8F16>I<01F006180C0C180E300E700E600EE00EE00EE0 0CE01CE018E030606030C01F000F107C8F14>I E /Ff 2 104 df<007001C00380070007000700 07000700070007000700070007000700070007000E001C00F0001C000E00070007000700070007 0007000700070007000700070007000700038001C000700C257D9B13>102 DI E /Fg 35 122 df<00FC000182000703000607000E02000E00000E00000E00000E0000 0E0000FFFF000E07000E07000E07000E07000E07000E07000E07000E07000E07000E07000E0700 0E07000E07000E07007F0FE0131A809915>12 D<60F0F868080808101020C0050B7D990B>39 D<60F0F07010101020204080040B7D830B>44 D<60F0F06004047D830B>46 D<078018603030303060186018E01CE01CE01CE01CE01CE01CE01CE01CE01CE01CE01CE01C6018 601870383030186007800E187E9713>48 D<0F8010E02070607870382038007800700070006000 C00F8000E000700038003C003CE03CE03CC03C4038407030E00F800E187E9713>51 D<60F0F060000000000000000060F0F0701010102020408004177D8F0B>59 D<000C0000000C0000000C0000001E0000001E0000003F00000027000000270000004380000043 8000004380000081C0000081C0000081C0000100E0000100E00001FFE000020070000200700006 007800040038000400380008001C0008001C001C001E00FF00FFC01A1A7F991D>65 DI76 D80 D<0FC21836200E6006C006C002C002C0 02E00070007E003FE01FF807FC003E000E00070003800380038003C002C006E004D81887E0101A 7E9915>83 D<7FFFFF00701C0700401C0100401C0100C01C0180801C0080801C0080801C008000 1C0000001C0000001C0000001C0000001C0000001C0000001C0000001C0000001C0000001C0000 001C0000001C0000001C0000001C0000001C0000001C0000001C000003FFE000191A7F991C>I< FF83FF0FF03C007801C01C007800801C007800800E007801000E007801000E009C010007009C02 0007009C020007010E020007010E020003810E04000382070400038207040001C207080001C403 880001C403880000E403900000E403900000E801D000007801E000007801E000007000E0000070 00E000003000C0000020004000241A7F9927>87 D91 D93 D<3F8070C070E020700070007007F01C7030707070E070E071E071E0F171FB1E3C10107E8F13> 97 DI<07F80C1C381C30087000E000E000E000E000E000E0007000300438080C 1807E00E107F8F11>I<007E00000E00000E00000E00000E00000E00000E00000E00000E00000E 0003CE000C3E00380E00300E00700E00E00E00E00E00E00E00E00E00E00E00E00E00600E00700E 00381E001C2E0007CFC0121A7F9915>I<07C01C3030187018600CE00CFFFCE000E000E000E000 6000300438080C1807E00E107F8F11>I<01F0031807380E100E000E000E000E000E000E00FFC0 0E000E000E000E000E000E000E000E000E000E000E000E000E000E007FE00D1A80990C>I<0FCE 187330307038703870387038303018602FC02000600070003FF03FFC1FFE600FC003C003C003C0 036006381C07E010187F8F13>I<18003C003C001800000000000000000000000000FC001C001C 001C001C001C001C001C001C001C001C001C001C001C001C00FF80091A80990A>105 D108 DII<07E01C38300C70 0E6006E007E007E007E007E007E0076006700E381C1C3807E010107F8F13>II114 D<1F2060E04020C020C020F0007F003FC01FE000F080708030C030C020F0408F800C107F8F0F> I<0400040004000C000C001C003C00FFC01C001C001C001C001C001C001C001C001C201C201C20 1C201C200E4003800B177F960F>III121 D E /Fh 4 52 df<00C00000C00000C00000C00000C00000C00000C00000C000 00C000FFFF80FFFF8000C00000C00000C00000C00000C00000C00000C00000C00000C00011147E 8F17>43 D<0C003C00CC000C000C000C000C000C000C000C000C000C000C000C000C00FF800910 7E8F0F>49 D<1F00618040C08060C0600060006000C00180030006000C00102020207FC0FFC00B 107F8F0F>I<1F00218060C060C000C0008001800F00008000400060C060C060804060801F000B 107F8F0F>I E /Fi 5 107 df<07E01FF83FFC7FFE7FFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 7FFE7FFE3FFC1FF807E010127D9317>15 D<000000040000000002000000000200000000010000 0000008000000000400000000020FFFFFFFFFCFFFFFFFFFC000000002000000000400000000080 000000010000000002000000000200000000040026107D922D>33 D<000F0038006000E001C001 C001C001C001C001C001C001C001C001C001C001C001C001C001C0038007001E00F8001E000700 038001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C000E00060003800 0F102D7DA117>102 DI106 D E /Fj 3 52 df<03000700FF00070007000700070007000700070007000700070007 000700070007000700070007007FF00C157E9412>49 D<0F8030E040708030C038E03840380038 00700070006000C00180030006000C08080810183FF07FF0FFF00D157E9412>I<0FE030306018 701C701C001C00180038006007E000300018000C000E000EE00EE00EC00C401830300FE00F157F 9412>I E /Fk 46 121 df<3807007C0F80FE1FC0FF1FE0FF1FE07F0FE03B0760030060030060 0600C00600C00E01C00C0180180300700E0020040013107E9F1B>34 D<387CFEFFFF7F3B030306 060E0C18702008107C9F0F>39 D<387CFEFEFE7C3807077C860F>46 D<00E00001E0000FE000FF E000F3E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003 E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E000FFFF80FFFF8011 1D7C9C1A>49 D<07F0001FFE00383F007C1F80FE0FC0FE0FC0FE0FE0FE07E07C07E03807E0000F E0000FC0000FC0001F80001F00003E0000780000F00000E00001C0000380600700600E00601C00 E01FFFC03FFFC07FFFC0FFFFC0FFFFC0131D7D9C1A>I<01FC0007FF000E0F801E0FC03F07E03F 07E03F07E03F07E01E0FC0000FC0000F80001F0001FC0001FC00000F800007C00003E00003F000 03F83803F87C03F8FE03F8FE03F8FE03F0FC03F07807E03C0FC01FFF8003FC00151D7E9C1A>I< 0001C00003C00007C00007C0000FC0001FC0003BC00073C00063C000C3C00183C00383C00703C0 0E03C00C03C01803C03803C07003C0E003C0FFFFFEFFFFFE0007C00007C00007C00007C00007C0 0007C000FFFE00FFFE171D7F9C1A>I<3803803FFF803FFF003FFE003FFC003FF0003F80003000 0030000030000030000033F8003FFE003C1F00380F803007C00007C00007E00007E07807E0FC07 E0FC07E0FC07E0FC07C0780FC0600F80381F001FFC0007F000131D7D9C1A>I<003F0001FFC007 E0E00F81E01F03F01E03F03E03F07C03F07C01E07C0000FC1000FCFF00FDFFC0FD03E0FE01F0FE 01F0FC01F8FC01F8FC01F8FC01F87C01F87C01F87C01F83C01F03E01F01E03E00F07C007FF8001 FE00151D7E9C1A>I<6000007FFFF87FFFF87FFFF07FFFE07FFFE0E001C0C00380C00700C00E00 000C00001C0000380000780000780000F00000F00000F00001F00001F00001F00003F00003F000 03F00003F00003F00003F00003F00003F00001E000151E7D9D1A>I<01FC0007FF000E07801C01 C01800E03800E03800E03C00E03F00E03FC1C01FE3801FFF000FFE0007FF8007FFC01FFFE03C3F F0780FF07803F8F001F8F000F8F00078F00078F000707800707C00E03E03C00FFF8003FC00151D 7E9C1A>I<0000E000000000E000000001F000000001F000000001F000000003F800000003F800 000006FC00000006FC0000000EFE0000000C7E0000000C7E000000183F000000183F000000303F 800000301F800000701FC00000600FC00000600FC00000C007E00000FFFFE00001FFFFF0000180 03F000018003F000030001F800030001F800060001FC00060000FC000E0000FE00FFE00FFFE0FF E00FFFE0231F7E9E28>65 DI<0007FC02003FFF0E00FE03DE03 F000FE07E0003E0FC0001E1F80001E3F00000E3F00000E7F0000067E0000067E000006FE000000 FE000000FE000000FE000000FE000000FE000000FE0000007E0000007E0000067F0000063F0000 063F00000C1F80000C0FC0001807E0003803F0007000FE01C0003FFF800007FC001F1F7D9E26> IIII73 D76 D<001FF80000FFFF0001F81F8007E007E00FC003F01F8001F81F0000F83F0000FC7F0000FE 7E00007E7E00007EFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE00007FFE0000 7FFE00007F7E00007E7F0000FE7F0000FE3F0000FC3F8001FC1F8001F80FC003F007E007E001F8 1F8000FFFF00001FF800201F7D9E27>79 DI82 D<03FC080FFF381E03F83800F8700078700038F00038F00018F00018F80000FC00007FC0007FFE 003FFF801FFFE00FFFF007FFF000FFF80007F80000FC00007C00003CC0003CC0003CC0003CE000 38E00078F80070FE01E0E7FFC081FF00161F7D9E1D>I<7FFFFFFC7FFFFFFC7C07E07C7007E01C 6007E00C6007E00CE007E00EC007E006C007E006C007E006C007E0060007E0000007E0000007E0 000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007E0000007 E0000007E0000007E0000007E0000007E00003FFFFC003FFFFC01F1E7E9D24>I<0400800E01C0 180300300600700E00600C00600C00C01800C01800DC1B80FE1FC0FF1FE0FF1FE07F0FE03E07C0 1C038013107B9F1B>92 D<07FC001FFF003F0F803F07C03F03E03F03E00C03E00003E0007FE007 FBE01F03E03C03E07C03E0F803E0F803E0F803E0FC05E07E0DE03FF9FE0FE07E17147F9319>97 DI<01FE0007FF801F0FC03E0FC03E 0FC07C0FC07C0300FC0000FC0000FC0000FC0000FC0000FC00007C00007E00003E00603F00C01F 81C007FF0001FC0013147E9317>I<0007F80007F80000F80000F80000F80000F80000F80000F8 0000F80000F80000F80000F801F8F80FFEF81F83F83E01F87E00F87C00F87C00F8FC00F8FC00F8 FC00F8FC00F8FC00F8FC00F87C00F87C00F87E00F83E01F81F07F80FFEFF03F8FF18207E9F1D> I<01FE0007FF801F83E03F01F07E00F07E00F8FC00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC00 007C00007E00003E00183F00380F807007FFE000FF8015147F9318>I<001F8000FFC001F3E003 E7E003C7E007C7E007C3C007C00007C00007C00007C00007C000FFFC00FFFC0007C00007C00007 C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007 C0003FFC003FFC0013207F9F10>I<01FC3C07FFFE0F079E1E03DE3E03E03E03E03E03E03E03E0 3E03E01E03C00F07800FFF0009FC001800001800001C00001FFF800FFFF007FFF81FFFFC3C007C 70003EF0001EF0001EF0001E78003C78003C3F01F80FFFE001FF00171E7F931A>II<1C003F007F007F007F003F001C000000000000 00000000000000FF00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F00 1F001F00FFE0FFE00B217EA00E>I 107 DIII<01FF0007FFC01F83F03E00F83E00F87C007C7C007CFC007EFC 007EFC007EFC007EFC007EFC007E7C007C7C007C3E00F83E00F81F83F007FFC001FF0017147F93 1A>II114 D<0FE63FFE701E600EE006E006F800FFC07FF83FFC1FFE03FE001FC007C0 07E007F006F81EFFFCC7F010147E9315>I<01800180018003800380038007800F803F80FFFCFF FC0F800F800F800F800F800F800F800F800F800F800F860F860F860F860F8607CC03F801F00F1D 7F9C14>II119 DI E /Fl 85 127 df<70F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F870000000000070F8F8F870051C77 9B18>33 D<4010E038F078E038E038E038E038E038E038E038E038E038E03860300D0E7B9C18> I<030600078F00078F00078F00078F00078F00078F007FFFC0FFFFE0FFFFE07FFFC00F1E000F1E 000F1E000F1E000F1E000F1E007FFFC0FFFFE0FFFFE07FFFC01E3C001E3C001E3C001E3C001E3C 001E3C000C1800131C7E9B18>I<00C00001C00001C00001C00003F0000FFC003FFE007DCF0071 C700E1C380E1C780E1C780E1C780F1C00079C0003DC0001FE0000FF80003FC0001DE0001CF0001 C70061C380F1C380F1C380E1C380E1C70071C70079DE003FFE001FF80007E00001C00001C00001 C00000C00011247D9F18>I<3803007C07807C0780EE0F80EE0F00EE0F00EE1F00EE1E00EE1E00 EE3E007C3C007C3C00387C0000780000780000F80000F00001F00001E00001E00003E00003C000 03C00007C0000783800787C00F87C00F0EE00F0EE01F0EE01E0EE01E0EE03E0EE03C07C03C07C0 18038013247E9F18>I<01C00007E0000FF0000E70001C38001C38001C38001C38001C73F01C73 F01CE3F00FE3800FC7000F87000F07001F0E003F0E007B8E0073DC00E1DC00E0F800E0F800E070 70E0787070FC707FFFE03FCFE00F03C0141C7F9B18>I<387C7C7E3E0E0E0E1C1C38F8F0C0070E 789B18>I<007000F001E003C007800F001E001C00380038007000700070007000E000E000E000 E000E000E000E000E0007000700070007000380038001C001E000F00078003C001F000F000700C 24799F18>I<6000F00078003C001E000F000780038001C001C000E000E000E000E00070007000 700070007000700070007000E000E000E000E001C001C0038007800F001E003C007800F0006000 0C247C9F18>I<01C00001C00001C00001C000C1C180F1C780F9CF807FFF001FFC0007F00007F0 001FFC007FFF00F9CF80F1C780C1C18001C00001C00001C00001C00011147D9718>I<00600000 F00000F00000F00000F00000F00000F00000F0007FFFC0FFFFE0FFFFE07FFFC000F00000F00000 F00000F00000F00000F00000F00000600013147E9718>I<1C3E7E7F3F1F070E1E7CF860080C78 8518>I<7FFF00FFFF80FFFF807FFF0011047D8F18>I<3078FCFC78300606778518>I<00030000 0780000780000F80000F00001F00001E00001E00003E00003C00007C0000780000780000F80000 F00001F00001E00003E00003C00003C00007C0000780000F80000F00000F00001F00001E00003E 00003C00003C00007C0000780000F80000F00000F0000060000011247D9F18>I<01F00007FC00 0FFE001F1F001C07003803807803C07001C07001C0E000E0E000E0E000E0E000E0E000E0E000E0 E000E0E000E0E000E0F001E07001C07001C07803C03803801C07001F1F000FFE0007FC0001F000 131C7E9B18>I<01800380038007800F803F80FF80FB8043800380038003800380038003800380 0380038003800380038003800380038003807FFCFFFE7FFC0F1C7B9B18>I<03F0000FFE003FFF 007C0F807003C0E001C0F000E0F000E06000E00000E00000E00001C00001C00003C0000780000F 00001E00003C0000780000F00001E00007C0000F80001E00E03C00E07FFFE0FFFFE07FFFE0131C 7E9B18>I<07F8001FFE003FFF007807807803C07801C03001C00001C00003C0000380000F0003 FF0003FE0003FF000007800003C00001C00000E00000E00000E0F000E0F000E0F001C0F003C07C 07803FFF001FFE0003F800131C7E9B18>I<001F00003F0000770000770000E70001E70001C700 0387000787000707000E07001E07003C0700380700780700F00700FFFFF8FFFFF8FFFFF8000700 000700000700000700000700000700007FF000FFF8007FF0151C7F9B18>I<1FFF803FFF803FFF 803800003800003800003800003800003800003800003800003BF8003FFE003FFF003C07801803 C00001C00000E00000E06000E0F000E0F000E0E001C07003C07C0F803FFF001FFC0003F000131C 7E9B18>I55 D<3078FCFC783000000000000000003078FC FC78300614779318>58 D<183C7E7E3C180000000000000000183C7E7E3E1E0E1C3C78F060071A 789318>I<000300000780001F80003F00007E0001FC0003F00007E0001FC0003F00007E0000FC 0000FC00007E00003F00001FC00007E00003F00001FC00007E00003F00001F8000078000030011 187D9918>I<7FFFC0FFFFE0FFFFE0FFFFE0000000000000000000000000FFFFE0FFFFE0FFFFE0 7FFFC0130C7E9318>I<600000F00000FC00007E00003F00001FC00007E00003F00001FC00007E 00003F00001F80001F80003F00007E0001FC0003F00007E0001FC0003F00007E0000FC0000F000 0060000011187D9918>I<0FF0003FFC007FFF00700F00F00380F00380600780000F00003E0000 7C0001F00001E00003C00003C00003C00003C00003C00003800000000000000000000000000000 000003800007C00007C00007C000038000111C7D9B18>I<007C0001FE0007FF000F87801E03C0 3C1DC0387FC070FFE071E3E071C1E0E1C1E0E380E0E380E0E380E0E380E0E380E0E380E0E1C1C0 71C1C071E3C070FF80387F003C1C001E00E00F83E007FFC001FF80007E00131C7E9B18>I<0070 0000F80000F80000D80000D80001DC0001DC0001DC00018C00038E00038E00038E00038E000306 000707000707000707000707000FFF800FFF800FFF800E03800E03801C01C01C01C07F07F0FF8F F87F07F0151C7F9B18>II<00F8E003FEE007FFE00F07E01E03E0 3C01E03800E07000E07000E0700000E00000E00000E00000E00000E00000E00000E00000E00000 7000007000E07000E03800E03C00E01E01C00F07C007FF8003FE0000F800131C7E9B18>I<7FF8 00FFFE007FFF001C0F801C03C01C03C01C01E01C00E01C00E01C00F01C00701C00701C00701C00 701C00701C00701C00701C00701C00F01C00E01C00E01C01E01C01C01C03C01C0F807FFF00FFFE 007FF800141C7F9B18>III<01F1 C003FDC00FFFC01F0FC01C03C03803C03801C07001C07001C0700000E00000E00000E00000E000 00E00000E00FF0E01FF0E00FF07001C07001C07003C03803C03803C01C07C01F0FC00FFFC003FD C001F1C0141C7E9B18>I<7FFF00FFFF807FFF0001C00001C00001C00001C00001C00001C00001 C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001 C00001C00001C0007FFF00FFFF807FFF00111C7D9B18>73 D<01FFC003FFC001FFC0000E00000E 00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E 00000E00000E00000E00000E00F00E00F00E00F03C007FFC003FF0000FC000121C7D9B18>I<7F E000FFE0007FE0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E 00000E00000E00000E00000E00000E00000E00000E00700E00700E00700E00700E00707FFFF0FF FFF07FFFF0141C7F9B18>76 DI<7E07F0FF0FF87F07F01D81C01D 81C01D81C01DC1C01CC1C01CC1C01CE1C01CE1C01CE1C01C61C01C71C01C71C01C31C01C39C01C 39C01C39C01C19C01C19C01C1DC01C0DC01C0DC01C0DC07F07C0FF87C07F03C0151C7F9B18>I< 0FF8003FFE007FFF00780F00700700F00780E00380E00380E00380E00380E00380E00380E00380 E00380E00380E00380E00380E00380E00380E00380E00380E00380F00780700700780F007FFF00 3FFE000FF800111C7D9B18>II<7FF800FFFE007FFF001C0F801C 03801C03C01C01C01C01C01C01C01C03C01C03801C0F801FFF001FFE001FFE001C0F001C07001C 03801C03801C03801C03801C03801C039C1C039C1C039C7F01F8FF81F87F00F0161C7F9B18>82 D<7FFFF8FFFFF8FFFFF8E07038E07038E07038E070380070000070000070000070000070000070 0000700000700000700000700000700000700000700000700000700000700000700000700007FF 0007FF0007FF00151C7F9B18>84 DIII<3FFFE07FFFE07FFFE07001C07003C0700780700700000F00 001E00001C00003C0000780000700000F00001E00001C00003C0000780000700000F00001E00E0 1C00E03C00E07800E07000E0FFFFE0FFFFE0FFFFE0131C7E9B18>90 DI<600000F00000F00000 F800007800007C00003C00003C00003E00001E00001F00000F00000F00000F800007800007C000 03C00003C00003E00001E00001F00000F00000F800007800007800007C00003C00003E00001E00 001E00001F00000F00000F8000078000078000030011247D9F18>II<018007C01FF07EFCF83E E00E0F067C9B18>I<7FFF00FFFF80FFFF807FFF0011047D7F18>I<061E3E387070E0E0E0F8FC7C 7C38070E789E18>I<1FE0003FF8007FFC00781E00300E0000070000070000FF0007FF001FFF00 7F0700780700E00700E00700E00700F00F00781F003FFFF01FFBF007E1F014147D9318>I<7E00 00FE00007E00000E00000E00000E00000E00000E00000E3E000EFF800FFFC00FC1E00F80E00F00 700E00700E00380E00380E00380E00380E00380E00380F00700F00700F80E00FC1E00FFFC00EFF 80063E00151C809B18>I<01FE0007FF001FFF803E0780380300700000700000E00000E00000E0 0000E00000E00000E000007000007001C03801C03E03C01FFF8007FF0001FC0012147D9318>I< 001F80003F80001F8000038000038000038000038000038003E3800FFB801FFF803C1F80380F80 700780700380E00380E00380E00380E00380E00380E00380700780700780380F803C1F801FFFF0 0FFBF803E3F0151C7E9B18>I<01F00007FC001FFE003E0F00380780700380700380E001C0E001 C0FFFFC0FFFFC0FFFFC0E000007000007001C03801C03E03C01FFF8007FF0001FC0012147D9318 >I<001F80007FC000FFE000E1E001C0C001C00001C00001C0007FFFC0FFFFC0FFFFC001C00001 C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0007F FF007FFF007FFF00131C7F9B18>I<01E1F007FFF80FFFF81E1E301C0E00380700380700380700 3807003807001C0E001E1E001FFC001FF80039E0003800001C00001FFE001FFFC03FFFE07801F0 700070E00038E00038E00038E000387800F07E03F01FFFC00FFF8001FC00151F7F9318>I<7E00 00FE00007E00000E00000E00000E00000E00000E00000E3E000EFF800FFFC00FC1C00F80E00F00 E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E07FC3FCFFE7 FE7FC3FC171C809B18>I<03800007C00007C00007C0000380000000000000000000000000007F C000FFC0007FC00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001 C00001C00001C00001C000FFFF00FFFF80FFFF00111D7C9C18>I<0038007C007C007C00380000 0000000000000FFC1FFC0FFC001C001C001C001C001C001C001C001C001C001C001C001C001C00 1C001C001C001C001C001C001C001C001C6038F078FFF07FE03F800E277E9C18>II<7FE000FFE0007FE00000E00000E00000E00000E00000E00000E00000E00000 E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000 E00000E0007FFFC0FFFFE07FFFC0131C7E9B18>I<7CE0E000FFFBF8007FFFF8001F1F1C001E1E 1C001E1E1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C 1C1C001C1C1C001C1C1C007F1F1F00FFBFBF807F1F1F001914819318>I<7E3E00FEFF807FFFC0 0FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E0 0E00E07FC3FCFFE7FE7FC3FC1714809318>I<01F0000FFE001FFF003E0F803803807001C07001 C0E000E0E000E0E000E0E000E0E000E0F001E07001C07803C03C07803E0F801FFF000FFE0001F0 0013147E9318>I<7E3E00FEFF807FFFC00FC1E00F80E00F00700E00700E00380E00380E00380E 00380E00380E00380F00700F00700F80E00FC1E00FFFC00EFF800E3E000E00000E00000E00000E 00000E00000E00000E00007FC000FFE0007FC000151E809318>I<01E38007FB801FFF803E1F80 380F80700780700780E00380E00380E00380E00380E00380E00380700780700780380F803C1F80 1FFF800FFB8003E380000380000380000380000380000380000380000380003FF8003FF8003FF8 151E7E9318>I<7F87E0FF9FF07FBFF803F87803F03003E00003C00003C0000380000380000380 000380000380000380000380000380000380007FFE00FFFF007FFE0015147F9318>I<07F7003F FF007FFF00780F00E00700E00700E007007C00007FE0001FFC0003FE00001F00600780E00380E0 0380F00380F80F00FFFF00FFFC00E7F00011147D9318>I<018000038000038000038000038000 7FFFC0FFFFC0FFFFC0038000038000038000038000038000038000038000038000038000038040 0380E00380E00380E001C1C001FFC000FF80003E0013197F9818>I<7E07E0FE0FE07E07E00E00 E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E01E00F03 E007FFFC03FFFE01FCFC1714809318>I<7F8FF0FF8FF87F8FF01E03C00E03800E03800E038007 0700070700070700038E00038E00038E00038E0001DC0001DC0001DC0000F80000F80000700015 147F9318>II<7F8FF07F9F F07F8FF0070700078E00039E0001DC0001F80000F80000700000F00000F80001DC00039E00038E 000707000F07807F8FF0FF8FF87F8FF015147F9318>I<7F8FF0FF8FF87F8FF00E01C00E03800E 0380070380070700070700038700038600038E0001CE0001CE0000CC0000CC0000DC0000780000 780000780000700000700000700000F00000E00079E0007BC0007F80003F00001E0000151E7F93 18>I<3FFFF07FFFF07FFFF07001E07003C0700780000F00001E00003C0000F80001F00003C000 0780000F00701E00703C0070780070FFFFF0FFFFF0FFFFF014147F9318>I<0007E0001FE0007F E000780000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00001E0 007FC000FF8000FF80007FC00001E00000E00000E00000E00000E00000E00000E00000E00000E0 0000E00000E00000E000007800007FE0001FE00007E013247E9F18>I<60F0F0F0F0F0F0F0F0F0 F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0600424769F18>I<7C0000FF0000 FFC00003C00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E000 00F000007FC0003FE0003FE0007FC000F00000E00000E00000E00000E00000E00000E00000E000 00E00000E00000E00000E00003C000FFC000FF00007C000013247E9F18>I<060C1F1E3FBEFBF8 F1F060C00F067C9B18>I E /Fm 33 122 df<00003FE00000E010000180380003807800030078 00070030000700000007000000070000000E0000000E0000000E000000FFFFE0000E00E0001C01 C0001C01C0001C01C0001C01C0001C038000380380003803800038038000380700003807000070 07000070071000700E2000700E2000700E2000E00E2000E0064000E0038000E0000000C0000001 C0000001C000003180000079800000F3000000620000003C0000001D29829F1A>12 D<00003FC0FF800000E0E38040000181E600E0000381EC01E0000300DC01E00007001C00C00007 00180000000700380000000E00380000000E00380000000E00380000000E0070000000FFFFFFFF 80001C00700380001C00700700001C00700700001C00700700001C00E00700001C00E00E000038 00E00E00003800E00E00003800E00E00003801C01C00003801C01C00007001C01C00007001C01C 40007001C0388000700380388000700380388000E00380388000E00380190000E003000E0000E0 0700000000C00700000001C00600000001C00600000031860E000000798F0C000000F31E180000 00620C300000003C07C00000002B29829F28>14 D<0E1F3F3F1D0102020404081020C0080E779F 0E>39 D<000200020006000E003C00DC031C001C0038003800380038007000700070007000E000 E000E000E001C001C001C001C003800380038003800780FFF80F1E7B9D17>49 D<070F1F1F0E0000000000000000000070F8F8F0E008147B930E>58 D<0000FE0200078186001C 004C0038003C0060003C00C0001C01C0001803800018070000180F0000181E0000101E0000103C 0000003C00000078000000780000007800000078000000F0000000F0000000F0000000F0000000 F00000807000008070000080700001003800010038000200180004000C001800060020000381C0 0000FE00001F217A9F21>67 D<01FFFFFC001E0038001E0018001E0008001E0008003C0008003C 0008003C0008003C00080078001000780800007808000078080000F0100000F0300000FFF00000 F0300001E0200001E0200001E0200001E0200003C0000003C0000003C0000003C0000007800000 0780000007800000078000000F800000FFF800001E1F7D9E1E>70 D<01FF007FE0001F000F0000 1F0004000017800400001780040000278008000023C008000023C008000023C008000041E01000 0041E010000041F010000040F010000080F0200000807820000080782000008078200001003C40 0001003C400001003C400001001E400002001E800002001E800002000F800002000F800004000F 0000040007000004000700000C000700001C00020000FF80020000231F7D9E22>78 D<01FFFF80001E00E0001E0070001E0038001E003C003C003C003C003C003C003C003C003C0078 007800780078007800F0007800E000F003C000F00F0000FFFC0000F0000001E0000001E0000001 E0000001E0000003C0000003C0000003C0000003C0000007800000078000000780000007800000 0F800000FFF000001E1F7D9E1F>80 D<00F1800389C00707800E03801C03803C03803807007807 00780700780700F00E00F00E00F00E00F00E20F01C40F01C40703C40705C40308C800F07001314 7C9317>97 D<07803F8007000700070007000E000E000E000E001C001C001CF01D0C3A0E3C0E38 0F380F700F700F700F700FE01EE01EE01EE01CE03CE038607060E031C01F0010207B9F15>I<00 7E0001C1000300800E07801E07801C07003C0200780000780000780000F00000F00000F00000F0 0000F0000070010070020030040018380007C00011147C9315>I<0000780003F8000070000070 0000700000700000E00000E00000E00000E00001C00001C000F1C00389C00707800E03801C0380 3C0380380700780700780700780700F00E00F00E00F00E00F00E20F01C40F01C40703C40705C40 308C800F070015207C9F17>I<007C01C207010E011C013C013802780C7BF07C00F000F000F000 F0007000700170023804183807C010147C9315>I<00007800019C00033C00033C000718000700 000700000E00000E00000E00000E00000E0001FFE0001C00001C00001C00001C00003800003800 00380000380000380000700000700000700000700000700000700000E00000E00000E00000E000 00C00001C00001C0000180003180007B0000F300006600003C00001629829F0E>I<003C6000E2 7001C1E00380E00700E00F00E00E01C01E01C01E01C01E01C03C03803C03803C03803C03803C07 003C07001C0F001C17000C2E0003CE00000E00000E00001C00001C00301C00783800F0700060E0 003F8000141D7E9315>I<01E0000FE00001C00001C00001C00001C00003800003800003800003 8000070000070000071E000763000E81800F01C00E01C00E01C01C03801C03801C03801C038038 0700380700380700380E10700E20700C20701C20700C40E00CC060070014207D9F17>I<00C001 E001E001C000000000000000000000000000000E003300230043804300470087000E000E000E00 1C001C001C003840388030807080310033001C000B1F7C9E0E>I<0001800003C00003C0000380 000000000000000000000000000000000000000000003C00004600008700008700010700010700 020E00000E00000E00000E00001C00001C00001C00001C00003800003800003800003800007000 00700000700000700000E00000E00030E00079C000F180006300003C00001228829E0E>I<01E0 000FE00001C00001C00001C00001C0000380000380000380000380000700000700000703C00704 200E08E00E11E00E21E00E40C01C80001D00001E00001FC00038E0003870003870003838407070 80707080707080703100E03100601E0013207D9F15>I<03C01FC0038003800380038007000700 070007000E000E000E000E001C001C001C001C0038003800380038007000700070007100E200E2 00E200E200640038000A207C9F0C>I<1C0F80F0002630C318004740640C004780680E00470070 0E004700700E008E00E01C000E00E01C000E00E01C000E00E01C001C01C038001C01C038001C01 C038001C01C0708038038071003803806100380380E10038038062007007006600300300380021 147C9325>I<1C0F802630C04740604780604700704700708E00E00E00E00E00E00E00E01C01C0 1C01C01C01C01C03843803883803083807083803107003303001C016147C931A>I<007C0001C3 000301800E01C01E01C01C01E03C01E07801E07801E07801E0F003C0F003C0F003C0F00780F007 00700F00700E0030180018700007C00013147C9317>I<01C1E002621804741C04781C04701E04 701E08E01E00E01E00E01E00E01E01C03C01C03C01C03C01C0380380780380700380E003C1C007 2380071E000700000700000E00000E00000E00000E00001C00001C0000FFC000171D809317>I< 1C1E002661004783804787804707804703008E00000E00000E00000E00001C00001C00001C0000 1C000038000038000038000038000070000030000011147C9313>114 D<00FC030206010C030C 070C060C000F800FF007F803FC003E000E700EF00CF00CE008401020601F8010147D9313>I<01 8001C0038003800380038007000700FFF007000E000E000E000E001C001C001C001C0038003800 38003820704070407080708031001E000C1C7C9B0F>I<0E00C03300E02301C04381C04301C047 01C08703800E03800E03800E03801C07001C07001C07001C07101C0E20180E20180E201C1E200C 264007C38014147C9318>I<0E03803307802307C04383C04301C04700C08700800E00800E0080 0E00801C01001C01001C01001C02001C02001C04001C04001C08000E300003C00012147C9315> I<0E00C1C03300E3C02301C3E04381C1E04301C0E04701C060870380400E0380400E0380400E03 80401C0700801C0700801C0700801C0701001C0701001C0602001C0F02000C0F04000E13080003 E1F0001B147C931E>I<0383800CC4401068E01071E02071E02070C040E00000E00000E00000E0 0001C00001C00001C00001C040638080F38080F38100E5810084C60078780013147D9315>I<0E 00C03300E02301C04381C04301C04701C08703800E03800E03800E03801C07001C07001C07001C 07001C0E00180E00180E001C1E000C3C0007DC00001C00001C00003800F03800F07000E06000C0 C0004380003E0000131D7C9316>I E /Fn 74 123 df<001F83E000F06E3001C078780380F878 0300F03007007000070070000700700007007000070070000700700007007000FFFFFF80070070 000700700007007000070070000700700007007000070070000700700007007000070070000700 7000070070000700700007007000070070000700700007007000070070007FE3FF001D20809F1B >11 D<003F0000E0C001C0C00381E00701E00701E0070000070000070000070000070000070000 FFFFE00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E0 0700E00700E00700E00700E00700E00700E07FC3FE1720809F19>I<003FE000E0E001C1E00381 E00700E00700E00700E00700E00700E00700E00700E00700E0FFFFE00700E00700E00700E00700 E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700 E00700E07FE7FE1720809F19>I<001F81F80000F04F040001C07C06000380F80F000300F00F00 0700F00F00070070000007007000000700700000070070000007007000000700700000FFFFFFFF 000700700700070070070007007007000700700700070070070007007007000700700700070070 070007007007000700700700070070070007007007000700700700070070070007007007000700 700700070070070007007007007FE3FE3FF02420809F26>I<07070F1C383060C00808779F17> 19 D<7038F87CFC7EFC7E743A0402040204020804080410081008201040200F0E7E9F17>34 D<70F8FCFC74040404080810102040060E7C9F0D>39 D<0020004000800100020006000C000C00 180018003000300030007000600060006000E000E000E000E000E000E000E000E000E000E000E0 00E0006000600060007000300030003000180018000C000C000600020001000080004000200B2E 7DA112>I<800040002000100008000C00060006000300030001800180018001C000C000C000C0 00E000E000E000E000E000E000E000E000E000E000E000E000C000C000C001C001800180018003 000300060006000C00080010002000400080000B2E7DA112>I<70F8FCFC740404040808101020 40060E7C840D>44 DI<70F8F8F87005057C840D>I<0003000300070006 0006000E000C000C001C0018001800380030003000700060006000E000C000C001C00180018001 800380030003000700060006000E000C000C001C0018001800380030003000700060006000E000 C000C000102D7DA117>I<03F0000E1C001C0E00180600380700700380700380700380700380F0 03C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C070 03807003807003807807803807001806001C0E000E1C0003F000121F7E9D17>I<018003800F80 F38003800380038003800380038003800380038003800380038003800380038003800380038003 800380038003800380038007C0FFFE0F1E7C9D17>I<03F0000C1C00100E002007004007808007 80F007C0F803C0F803C0F803C02007C00007C0000780000780000F00000E00001C000038000070 0000600000C0000180000300000600400C00401800401000803FFF807FFF80FFFF80121E7E9D17 >I<03F0000C1C00100E00200F00780F80780780780780380F80000F80000F00000F00000E0000 1C0000380003F000003C00000E00000F000007800007800007C02007C0F807C0F807C0F807C0F0 0780400780400F00200E001C3C0003F000121F7E9D17>I<000600000600000E00000E00001E00 002E00002E00004E00008E00008E00010E00020E00020E00040E00080E00080E00100E00200E00 200E00400E00C00E00FFFFF0000E00000E00000E00000E00000E00000E00000E0000FFE0141E7F 9D17>I<1803001FFE001FFC001FF8001FE00010000010000010000010000010000010000011F0 00161C00180E001007001007800003800003800003C00003C00003C07003C0F003C0F003C0E003 80400380400700200600100E000C380003E000121F7E9D17>I<007C000182000701000E03800C 07801C0780380300380000780000700000700000F1F000F21C00F40600F80700F80380F80380F0 03C0F003C0F003C0F003C0F003C07003C07003C07003803803803807001807000C0E00061C0001 F000121F7E9D17>I<4000007FFFC07FFF807FFF80400100800200800200800400000800000800 00100000200000200000400000400000C00000C00001C000018000038000038000038000038000 078000078000078000078000078000078000078000030000121F7D9D17>I<03F0000C0C001006 003003002001806001806001806001807001807803003E03003F06001FC8000FF00003F80007FC 000C7E00103F00300F806003804001C0C001C0C000C0C000C0C000C0C000806001802001001002 000C0C0003F000121F7E9D17>I<03F0000E18001C0C00380600380700700700700380F00380F0 0380F003C0F003C0F003C0F003C0F003C07007C07007C03807C0180BC00E13C003E3C000038000 0380000380000700300700780600780E00700C002018001070000FC000121F7E9D17>I<70F8F8 F8700000000000000000000070F8F8F87005147C930D>I<70F8F8F87000000000000000000000 70F0F8F878080808101010202040051D7C930D>I<7FFFFFE0FFFFFFF000000000000000000000 00000000000000000000000000000000000000000000FFFFFFF07FFFFFE01C0C7D9023>61 D<000100000003800000038000000380000007C0000007C0000007C0000009E0000009E0000009 E0000010F0000010F0000010F00000207800002078000020780000403C0000403C0000403C0000 801E0000801E0000FFFE0001000F0001000F0001000F00020007800200078002000780040003C0 0E0003C01F0007E0FFC03FFE1F207F9F22>65 DI<000FC04000 7030C001C009C0038005C0070003C00E0001C01E0000C01C0000C03C0000C07C0000407C000040 78000040F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F80000 00780000007C0000407C0000403C0000401C0000401E0000800E000080070001000380020001C0 040000703800000FC0001A217D9F21>I69 DI<000FE0200078186000E004E0038002E0070001E00F0000E0 1E0000601E0000603C0000603C0000207C00002078000020F8000000F8000000F8000000F80000 00F8000000F8000000F8000000F8007FFCF80003E0780001E07C0001E03C0001E03C0001E01E00 01E01E0001E00F0001E0070001E0038002E000E0046000781820000FE0001E217D9F24>III76 DII<001F800000F0F00001C0380007801E000F000F000E0007001E0007803C0003C0 3C0003C07C0003E0780001E0780001E0F80001F0F80001F0F80001F0F80001F0F80001F0F80001 F0F80001F0F80001F0F80001F0780001E07C0003E07C0003E03C0003C03C0003C01E0007800E00 07000F000F0007801E0001C0380000F0F000001F80001C217D9F23>II82 D<07E0800C198010078030038060018060 0180E00180E00080E00080E00080F00000F000007800007F00003FF0001FFC000FFE0003FF0000 1F800007800003C00003C00001C08001C08001C08001C08001C0C00180C00380E00300F00600CE 0C0081F80012217D9F19>I<7FFFFFE0780F01E0600F0060400F0020400F0020C00F0030800F00 10800F0010800F0010800F0010000F0000000F0000000F0000000F0000000F0000000F0000000F 0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000 0F0000000F0000000F0000001F800007FFFE001C1F7E9E21>IIII 91 D<080410082010201040204020804080408040B85CFC7EFC7E7C3E381C0F0E7B9F17>II<1FE000303000781800781C00300E00000E00000E00000E0000FE0007 8E001E0E00380E00780E00F00E10F00E10F00E10F01E10781E103867200F83C014147E9317>97 D<0E0000FE00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E3E 000EC3800F01C00F00E00E00E00E00700E00700E00780E00780E00780E00780E00780E00780E00 700E00700E00E00F00E00D01C00CC300083E0015207F9F19>I<03F80E0C1C1E381E380C700070 00F000F000F000F000F000F00070007000380138011C020E0C03F010147E9314>I<000380003F 8000038000038000038000038000038000038000038000038000038000038003E380061B801C07 80380380380380700380700380F00380F00380F00380F00380F00380F003807003807003803803 803807801C07800E1B8003E3F815207E9F19>I<03F0000E1C001C0E0038070038070070070070 0380F00380F00380FFFF80F00000F00000F000007000007000003800801800800C010007060001 F80011147F9314>I<007C00C6018F038F07060700070007000700070007000700FFF007000700 07000700070007000700070007000700070007000700070007000700070007007FF01020809F0E >I<0000E003E3300E3C301C1C30380E00780F00780F00780F00780F00780F00380E001C1C001E 380033E0002000002000003000003000003FFE001FFF800FFFC03001E0600070C00030C00030C0 0030C000306000603000C01C038003FC00141F7F9417>I<0E0000FE00000E00000E00000E0000 0E00000E00000E00000E00000E00000E00000E00000E3E000E43000E81800F01C00F01C00E01C0 0E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C0 FFE7FC16207F9F19>I<1C001E003E001E001C000000000000000000000000000E007E000E000E 000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E00FFC00A1F809E0C> I<00E001F001F001F000E0000000000000000000000000007007F000F000700070007000700070 00700070007000700070007000700070007000700070007000700070007000706070F060F0C061 803F000C28829E0E>I<0E0000FE00000E00000E00000E00000E00000E00000E00000E00000E00 000E00000E00000E0FF00E03C00E03000E02000E04000E08000E10000E30000E70000EF8000F38 000E1C000E1E000E0E000E07000E07800E03800E03C00E03E0FFCFF815207F9F18>I<0E00FE00 0E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E 000E000E000E000E000E000E000E000E000E00FFE00B20809F0C>I<0E1F01F000FE618618000E 81C81C000F00F00E000F00F00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E00 0E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E 000E00E00E00FFE7FE7FE023147F9326>I<0E3E00FE43000E81800F01C00F01C00E01C00E01C0 0E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C0FFE7FC 16147F9319>I<01F800070E001C03803801C03801C07000E07000E0F000F0F000F0F000F0F000 F0F000F0F000F07000E07000E03801C03801C01C0380070E0001F80014147F9317>I<0E3E00FE C3800F01C00F00E00E00E00E00F00E00700E00780E00780E00780E00780E00780E00780E00700E 00F00E00E00F01E00F01C00EC3000E3E000E00000E00000E00000E00000E00000E00000E00000E 0000FFE000151D7F9319>I<03E0800619801C05803C0780380380780380700380F00380F00380 F00380F00380F00380F003807003807803803803803807801C0B800E138003E380000380000380 000380000380000380000380000380000380003FF8151D7E9318>I<0E78FE8C0F1E0F1E0F0C0E 000E000E000E000E000E000E000E000E000E000E000E000E000E00FFE00F147F9312>I<1F9030 704030C010C010C010E00078007F803FE00FF00070803880188018C018C018E030D0608F800D14 7E9312>I<020002000200060006000E000E003E00FFF80E000E000E000E000E000E000E000E00 0E000E000E000E080E080E080E080E080610031001E00D1C7F9B12>I<0E01C0FE1FC00E01C00E 01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E 03C00603C0030DC001F1FC16147F9319>III<7FC3FC0F01E00701C007018003810001C20000E40000EC 00007800003800003C00007C00004E000087000107000303800201C00601E01E01E0FF07FE1714 809318>II<3FFF380E200E201C40384078407000E001E0 01C00380078007010E011E011C0338027006700EFFFE10147F9314>I E /Fo 41 122 df<0001FF0000001FFFC000007F80F00000FE00F80003FC01FC0003F803FC0007F0 03FC0007F003FC0007F003FC0007F001F80007F000F00007F000000007F000000007F000000007 F0000000FFFFFFFC00FFFFFFFC00FFFFFFFC0007F001FC0007F001FC0007F001FC0007F001FC00 07F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC 0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001FC0007F001 FC0007F001FC007FFF1FFFC07FFF1FFFC07FFF1FFFC0222A7FA926>12 D<000E00001E00007E00 07FE00FFFE00FFFE00F8FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00 00FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE0000FE00 00FE0000FE0000FE0000FE0000FE0000FE0000FE007FFFFE7FFFFE7FFFFE17277BA622>49 D<00FF800003FFF0000FFFFC003F03FF007C00FF807C007FC0FE007FC0FF003FE0FF003FE0FF00 3FE0FF001FE07E001FE03C003FE000003FE000003FC000003FC000007F8000007F800000FF0000 01FE000001FC000003F0000007E000000FC000001F0000003E0000007C00E0007800E000F000E0 01E001C0038001C0070001C00FFFFFC01FFFFFC03FFFFFC07FFFFFC0FFFFFF80FFFFFF80FFFFFF 801B277DA622>I<007F800003FFF00007FFFC001F81FE001F00FF003F80FF003F807F803FC07F 803F807F803F807F801F007F800000FF800000FF000000FF000001FE000003F8000007F00000FF C00000FFF0000001FC000000FF0000007F8000007FC000003FC000003FE000003FE000003FE03C 003FE07E003FE0FF003FE0FF003FE0FF003FC0FF007FC0FE007F807C00FF803F01FF001FFFFC00 07FFF00000FF80001B277DA622>I<00000E0000001E0000003E0000007E000000FE000000FE00 0001FE000003FE0000077E00000E7E00000E7E00001C7E0000387E0000707E0000E07E0000E07E 0001C07E0003807E0007007E000E007E000E007E001C007E0038007E0070007E00E0007E00FFFF FFF8FFFFFFF8FFFFFFF80000FE000000FE000000FE000000FE000000FE000000FE000000FE0000 00FE00007FFFF8007FFFF8007FFFF81D277EA622>I<0C0003000F803F000FFFFE000FFFFE000F FFFC000FFFF8000FFFE0000FFFC0000FFE00000E0000000E0000000E0000000E0000000E000000 0E0000000E7FC0000FFFF8000F80FE000E007F000C003F8000003F8000001FC000001FC000001F E000001FE018001FE07E001FE0FE001FE0FE001FE0FE001FE0FE001FE0FE001FC078003FC07800 3F803C007F001F01FE000FFFFC0003FFF00000FF80001B277DA622>I<0007F000003FFC0000FF FF0001FC0F0007F01F800FE03F800FC03F801FC03F803F803F803F801F007F8000007F0000007F 0000007F000000FF000000FF0FC000FF3FF800FF70FE00FFE03F00FFC03F80FF801FC0FF801FC0 FF801FC0FF001FE0FF001FE0FF001FE0FF001FE07F001FE07F001FE07F001FE07F001FE03F801F C03F801FC01F803F800FC03F8007E0FF0003FFFC0000FFF000003FC0001B277DA622>I<380000 003E0000003FFFFFF03FFFFFF03FFFFFF07FFFFFE07FFFFFC07FFFFFC07FFFFF8070000F007000 1E0070003C00E0003800E0007800E000F0000001E0000003C0000003C000000780000007800000 0F0000001F0000001F0000001F0000003F0000003F0000003E0000007E0000007E0000007E0000 007E000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE000000FE00 00003800001C297CA822>I<000003800000000007C00000000007C0000000000FE0000000000F E0000000000FE0000000001FF0000000001FF0000000003FF8000000003FF8000000003FF80000 000073FC0000000073FC00000000F3FE00000000E1FE00000000E1FE00000001C0FF00000001C0 FF00000003C0FF80000003807F80000007807FC0000007003FC0000007003FC000000E003FE000 000E001FE000001E001FF000001C000FF000001FFFFFF000003FFFFFF800003FFFFFF800007800 07FC0000700003FC0000700003FC0000E00001FE0000E00001FE0001E00001FF0001C00000FF00 01C00000FF00FFFE001FFFFEFFFE001FFFFEFFFE001FFFFE2F297EA834>65 D69 DI73 D76 DI80 D<007F806003FFF0E00FFFFFE01F807FE03F001FE07E0007E07E0003E07C0003E0FC0001E0FC00 01E0FC0000E0FE0000E0FE0000E0FF000000FFC000007FFE00007FFFE0003FFFFC003FFFFF001F FFFF8007FFFFC003FFFFE000FFFFF00007FFF000007FF000000FF8000007F8000003F8E00003F8 E00001F8E00001F8E00001F8F00001F8F00001F0F80003F0FC0003E0FF0007E0FFE01FC0FFFFFF 00E0FFFE00C01FF0001D297CA826>83 D<7FFFFFFFFFC07FFFFFFFFFC07FFFFFFFFFC07F803FC0 3FC07E003FC007C078003FC003C078003FC003C070003FC001C0F0003FC001E0F0003FC001E0E0 003FC000E0E0003FC000E0E0003FC000E0E0003FC000E0E0003FC000E000003FC0000000003FC0 000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000 003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0 000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000003FC0000000 003FC00000007FFFFFE000007FFFFFE000007FFFFFE0002B287EA730>I86 D<01FF800007FFF0000F81FC001FC0FE001FC07F001FC07F001FC0 3F800F803F8000003F8000003F8000003F80000FFF8000FFFF8007FC3F801FE03F803F803F807F 803F807F003F80FE003F80FE003F80FE003F80FE007F80FF007F807F00FFC03F83DFFC0FFF0FFC 01FC03FC1E1B7E9A21>97 DI<001FF80000 FFFE0003F01F000FE03F801FC03F803F803F803F803F807F801F007F000000FF000000FF000000 FF000000FF000000FF000000FF000000FF000000FF000000FF0000007F0000007F8000003F8001 C03FC001C01FC003C00FE0078003F01F0000FFFC00001FE0001A1B7E9A1F>I<00003FF8000000 3FF80000003FF800000003F800000003F800000003F800000003F800000003F800000003F80000 0003F800000003F800000003F800000003F800000003F800000003F800001FE3F80000FFFBF800 03F03FF8000FE00FF8001FC007F8003F8003F8003F8003F8007F8003F8007F0003F800FF0003F8 00FF0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003F800FF0003 F8007F0003F8007F0003F8003F8003F8003F8007F8001FC00FF8000FE01FF80003F03FFF8000FF F3FF80003FC3FF80212A7EA926>I<003FE00001FFF80003F07E000FE03F001FC01F803F800FC0 3F800FC07F000FC07F0007E0FF0007E0FF0007E0FF0007E0FFFFFFE0FFFFFFE0FF000000FF0000 00FF000000FF0000007F0000007F8000003F8000E03F8001E01FC001C00FE003C003F81F8000FF FE00001FF0001B1B7E9A20>I<0007F0003FFC00FE3E01FC7F03F87F03F87F07F07F07F03E07F0 0007F00007F00007F00007F00007F00007F000FFFFC0FFFFC0FFFFC007F00007F00007F00007F0 0007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F00007F0 0007F00007F00007F00007F0007FFF807FFF807FFF80182A7EA915>I<00FF81F003FFE7FC0FC1 FE7C1F80FC7C3F80FE7C3F007E107F007F007F007F007F007F007F007F007F007F007F007F003F 007E003F80FE001F80FC000FC1F8001FFFE00018FF8000380000003C0000003C0000003E000000 3FFFF8003FFFFF001FFFFFC00FFFFFE007FFFFF01FFFFFF07E0007F87C0001F8F80001F8F80000 F8F80000F8F80000F8FC0001F87E0003F03F0007E00FC01F8003FFFE00007FF0001E287E9A22> II<07001FC01FE03FE03FE03FE01FE01FC0 07000000000000000000000000000000FFE0FFE0FFE00FE00FE00FE00FE00FE00FE00FE00FE00F E00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE0FFFEFFFEFFFE0F2B7DAA14>I107 DIII<003FE00001FFFC0003F07E000FC01F801F800F C03F800FE03F0007E07F0007F07F0007F07F0007F0FF0007F8FF0007F8FF0007F8FF0007F8FF00 07F8FF0007F8FF0007F8FF0007F87F0007F07F0007F03F800FE03F800FE01F800FC00FC01F8007 F07F0001FFFC00003FE0001D1B7E9A22>II114 D<03FE300FFFF03E03F07800F07000F0F00070F00070F80070FC0000FFE000FFFE007FFFC03FFF E01FFFF007FFF800FFFC0003FC0000FCE0007CE0003CF0003CF0003CF80078FC0078FF01F0F7FF C0C1FF00161B7E9A1B>I<00700000700000700000700000F00000F00000F00001F00003F00003 F00007F0001FFFF0FFFFF0FFFFF007F00007F00007F00007F00007F00007F00007F00007F00007 F00007F00007F00007F00007F00007F03807F03807F03807F03807F03807F03807F03803F87001 F8F000FFE0001F8015267FA51B>I III< FFFC0FFF00FFFC0FFF00FFFC0FFF0007F003C00003F807800001FC07800000FE0F000000FF1E00 00007F3C0000003FF80000001FF00000000FF00000000FF000000007F000000007F80000000FFC 0000001FFE0000001EFE0000003C7F000000783F800000F01FC00001E01FE00001C00FE00003C0 07F000FFF01FFF80FFF01FFF80FFF01FFF80211B7F9A24>II E /Fp 13 118 df<0F001F003F803F007E00F800F000C0000A08769C18>19 D<00038000000380000007C0000007C0000007C000000FE000000FE000001FF000001BF000001B F0000031F8000031F8000061FC000060FC0000E0FE0000C07E0000C07E0001803F0001FFFF0003 FFFF8003001F8003001F8006000FC006000FC00E000FE00C0007E0FFC07FFEFFC07FFE1F1C7E9B 24>65 D<07F8201FFEE03C07E07801E07000E0F000E0F00060F00060F80000FE0000FFE0007FFE 003FFF003FFF800FFFC007FFE0007FE00003F00001F00000F0C000F0C000F0C000E0E000E0F001 C0FC03C0EFFF0083FC00141C7D9B1B>83 D<0FF8001C1E003E0F803E07803E07C01C07C00007C0 007FC007E7C01F07C03C07C07C07C0F807C0F807C0F807C0780BC03E13F80FE1F815127F9117> 97 DI<03FC000E0E001C1F003C1F00781F00780E00F800 00F80000F80000F80000F80000F800007800007801803C01801C03000E0E0003F80011127E9115 >I<1E003F003F003F003F001E00000000000000000000000000FF00FF001F001F001F001F001F 001F001F001F001F001F001F001F001F001F00FFE0FFE00B1E7F9D0E>105 D109 D<01FC000F07801C01C03C01E07800F07800 F0F800F8F800F8F800F8F800F8F800F8F800F87800F07800F03C01E01E03C00F078001FC001512 7F9118>111 D114 D<1FD830786018E018E018F000FF807FE07FF01FF807FC007CC01CC01CE01CE018F830CFC00E12 7E9113>I<0300030003000300070007000F000F003FFCFFFC1F001F001F001F001F001F001F00 1F001F001F0C1F0C1F0C1F0C0F08079803F00E1A7F9913>II E /Fq 19 118 df<387C7E7E3E0E1E3C7CF860070B798416>44 DI<70F8F8F8700505788416>I<00F80003FE000FFF001F0F 803E3F803C7F8078FFC071E7C0F1C3C0E3C3C0E381C0E381C0E381C0E381C0E381C0E3C3C0F1C3 8071E78078FF003C7E003E3C001F03C00FFFC003FF0000FC0012197E9816>64 D<1FE0007FF8007FFC00783C00301E00000E00000E0003FE001FFE007E0E00F00E00E00E00E00E 00F01E00F83E007FFFE03FE7E00F83E013127E9116>97 D<7E0000FE00007E00000E00000E0000 0E00000E00000E3E000EFF800FFFC00F83E00F01E00E00F00E00F00E00700E00700E00700E0070 0E00F00F00E00F01E00F83C00FFFC00EFF00063C001419809816>I<03F80FFE1FFE3C1E780C70 00F000E000E000E000E000F000700778073E0F1FFE0FFC03F010127D9116>I<003F00007F0000 3F0000070000070000070000070003C7000FF7003FFF003C1F00780F00F00700F00700E00700E0 0700E00700E00700F00700F00F00781F007C3F003FFFE01FF7F007C7E014197F9816>I<03E00F F81FFC3C1E780E7007E007FFFFFFFFFFFFE000E000700778073C0F1FFE0FFC03F010127D9116> I<001F00007F8000FF8001E78001C30001C00001C0007FFF00FFFF00FFFF0001C00001C00001C0 0001C00001C00001C00001C00001C00001C00001C00001C00001C0003FFE007FFF003FFE001119 7F9816>I<7E0000FE00007E00000E00000E00000E00000E00000E3C000EFF000FFF800F87800F 03800F03800E03800E03800E03800E03800E03800E03800E03800E03800E03807FC7F0FFE7F87F C7F01519809816>104 D<018003C003C0018000000000000000007FC07FC07FC001C001C001C0 01C001C001C001C001C001C001C001C001C07FFFFFFF7FFF101A7D9916>I108 D<03E0000FF8001FFC003C1E00780F00700700E00380E00380E00380E00380E00380F007807007 00780F003C1E001FFC000FF80003E00011127E9116>111 D<7E3E00FEFF807FFFC00F83E00F01 E00E00F00E00F00E00700E00700E00700E00700E00F00F00E00F01E00F83C00FFFC00EFF000E3C 000E00000E00000E00000E00000E00000E00007FC000FFE0007FC000141B809116>I114 D<0FEC3FFC7FFCF03CE01CE01CF0007F801FF007 FC003EE00EE00EF00EF81EFFFCFFF8C7E00F127D9116>I<030000070000070000070000070000 7FFF00FFFF00FFFF00070000070000070000070000070000070000070000070100070380070380 07078007878003FF0003FE0000F80011177F9616>I<7E1F80FE3F807E1F800E03800E03800E03 800E03800E03800E03800E03800E03800E03800E03800E07800F0F800FFFF007FFF803E3F01512 809116>I E /Fr 44 127 df<007E0001C1800301800703C00E03C00E01800E00000E00000E00 000E00000E0000FFFFC00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01 C00E01C00E01C00E01C00E01C00E01C00E01C07F87F8151D809C17>12 D16 D<1C1C3C3870C0800707779C15>19 D<1C001E00078003C001C00380FF000A077B7E12>24 D45 D<60F0F06004047C830C>I<030007003F00C70007000700070007 000700070007000700070007000700070007000700070007000700070007000700070007000F80 FFF80D1C7C9B15>49 D<07C01830201C400C400EF00FF80FF807F8077007000F000E000E001C00 1C00380070006000C00180030006010C01180110023FFE7FFEFFFE101C7E9B15>I<0006000000 06000000060000000F0000000F0000000F00000017800000178000001780000023C0000023C000 0023C0000041E0000041E0000041E0000080F0000080F0000180F8000100780001FFF80003007C 0002003C0002003C0006003E0004001E0004001E000C001F001E001F00FF80FFF01C1D7F9C1F> 65 D<001F808000E0618001801980070007800E0003801C0003801C0001803800018078000080 7800008070000080F0000000F0000000F0000000F0000000F0000000F0000000F0000000F00000 00700000807800008078000080380000801C0001001C0001000E000200070004000180080000E0 3000001FC000191E7E9C1E>67 D69 D73 D76 D<003F800000E0E000038038 0007001C000E000E001C0007003C00078038000380780003C0780003C0700001C0F00001E0F000 01E0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0700001C0780003C0780003C038 0003803C0007801C0007000E000E0007001C000380380000E0E000003F80001B1E7E9C20>79 DI82 D<7FFFFFC0700F01C0600F00C0400F0040400F 0040C00F0020800F0020800F0020800F0020000F0000000F0000000F0000000F0000000F000000 0F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000 000F0000000F0000001F800003FFFC001B1C7F9B1E>84 DI<1FC000307000783800 781C00301C00001C00001C0001FC000F1C00381C00701C00601C00E01C40E01C40E01C40603C40 304E801F870012127E9115>97 DI<07E00C301878307870 306000E000E000E000E000E000E00060007004300418080C3007C00E127E9112>I<003F000007 0000070000070000070000070000070000070000070000070000070003E7000C1700180F003007 00700700600700E00700E00700E00700E00700E00700E00700600700700700300700180F000C37 0007C7E0131D7E9C17>I<03E00C301818300C700E6006E006FFFEE000E000E000E00060007002 300218040C1803E00F127F9112>I<00F8018C071E061E0E0C0E000E000E000E000E000E00FFE0 0E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E007FE00F1D809C0D >I<00038003C4C00C38C01C3880181800381C00381C00381C00381C001818001C38000C300013 C0001000003000001800001FF8001FFF001FFF803003806001C0C000C0C000C0C000C060018030 03001C0E0007F800121C7F9215>II<18003C003C001800 0000000000000000000000000000FC001C001C001C001C001C001C001C001C001C001C001C001C 001C001C001C001C00FF80091D7F9C0C>I<00C001E001E000C000000000000000000000000000 000FE000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E0 00E000E060E0F0C0F1C061803E000B25839C0D>I108 DII<03F0000E1C00180600300300700380600180E001C0E001C0E001C0 E001C0E001C0E001C06001807003803003001806000E1C0003F00012127F9115>II<03C1000C3300180B00300F00700700700700E00700E00700E00700E00700E00700E0070060 0700700700300F00180F000C370007C70000070000070000070000070000070000070000070000 3FE0131A7E9116>II<1F9030704030C010C010E010F8007F803FE00FF000F880388018 C018C018E010D0608FC00D127F9110>I<04000400040004000C000C001C003C00FFE01C001C00 1C001C001C001C001C001C001C001C101C101C101C101C100C100E2003C00C1A7F9910>IIII<7F8FF00F03800F030007020003840001C80001D80000F00000700000780000F800009C 00010E00020E000607000403801E07C0FF0FF81512809116>II124 D<1C043F0843F080E00E047D9B15>126 D E /Fs 7 115 df<003FC000FFF003C0F00780300F00001E00003C00003C0000780000780000780000F00000F0 0000F00000F00000F00000F00000F00000F00000F000007800007800007800003C00003C00001E 00000F000807801803C07800FFF0003F80151F7D9D1B>67 D<003F8001FFF003C0F80780380F00 181E00003C00003C0000780000780000780000F00000F00000F00000F00000F00000F00000F007 F8F007F8F000387800387800387800383C00383C00381E00380F003807803803C0F801FFF0003F 80151F7D9D1C>71 D84 D<0FC03FF07FF87038401C001C001C00FC0FFC3FFC781CE0 1CE01CE01CF07C7FFC7FDC3F1C0E127E9114>97 D<07C01FE03FF078787018601CFFFCFFFCFFFC E000E000E000700070043C1C3FFC1FF807E00E127E9112>101 D<00FC01FC03FC07000E000E00 0E000E000E000E000E00FFE0FFE00E000E000E000E000E000E000E000E000E000E000E000E000E 000E000E000E000E1D809C0D>I114 D E /Ft 31 123 df<70F8FCFC74040404040808 10102040060F7C840E>44 D<008003800F80F38003800380038003800380038003800380038003 800380038003800380038003800380038003800380038003800380038003800380038007C0FFFE 0F217CA018>49 D<1000801E07001FFF001FFE001FF80013E00010000010000010000010000010 000010000010F800130E001407001803801003800001C00001C00001E00001E00001E00001E070 01E0F001E0F001E0E001C08001C04003C04003802007001006000C1C0003F00013227EA018>53 D<01F800060E000803001001802001802000C06000C06000C06000C07000C07801803E01003F02 001FC4000FF80003F80003FC00067F00083F80100F803007C06001C06000E0C000E0C00060C000 60C00060C000606000406000C03000801803000E0E0003F00013227EA018>56 D<01F000060C000C0600180700380380700380700380F001C0F001C0F001C0F001E0F001E0F001 E0F001E0F001E07001E07003E03803E01805E00C05E00619E003E1E00001C00001C00001C00003 80000380300300780700780600700C002018001030000FC00013227EA018>I<0007E010003818 3000E0063001C00170038000F0070000F00E0000701E0000701C0000303C0000303C0000307C00 00107800001078000010F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8 00000078000000780000107C0000103C0000103C0000101C0000201E0000200E00004007000040 0380008001C0010000E0020000381C000007E0001C247DA223>67 D70 D72 D I76 D82 D87 D<0FE0001838003C0C003C0E0018070000070000070000070000FF0007C7001E07003C07007807 00700700F00708F00708F00708F00F087817083C23900FC1E015157E9418>97 D<0E0000FE00001E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00 000E00000E1F000E61C00E80600F00300E00380E003C0E001C0E001E0E001E0E001E0E001E0E00 1E0E001E0E001E0E001C0E003C0E00380F00700C80600C41C0083F0017237FA21B>I<01FE0007 03000C07801C0780380300780000700000F00000F00000F00000F00000F00000F00000F0000070 00007800403800401C00800C010007060001F80012157E9416>I<0000E0000FE00001E00000E0 0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E001F8E00704E00C02E0 1C01E03800E07800E07000E0F000E0F000E0F000E0F000E0F000E0F000E0F000E07000E07800E0 3800E01801E00C02E0070CF001F0FE17237EA21B>I<01FC000707000C03801C01C03801C07801 E07000E0F000E0FFFFE0F00000F00000F00000F00000F000007000007800203800201C00400E00 8007030000FC0013157F9416>I<00007001F198071E180E0E181C07001C07003C07803C07803C 07803C07801C07001C07000E0E000F1C0019F0001000001000001800001800001FFE000FFFC00F FFE03800F0600030400018C00018C00018C000186000306000303800E00E038003FE0015217F95 18>103 D<0E0000FE00001E00000E00000E00000E00000E00000E00000E00000E00000E00000E 00000E00000E00000E1F800E60C00E80E00F00700F00700E00700E00700E00700E00700E00700E 00700E00700E00700E00700E00700E00700E00700E00700E00700E0070FFE7FF18237FA21B>I< 1C001E003E001E001C00000000000000000000000000000000000E00FE001E000E000E000E000E 000E000E000E000E000E000E000E000E000E000E000E000E000E00FFC00A227FA10E>I<0E00FE 001E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E00 0E000E000E000E000E000E000E000E000E000E000E000E000E00FFE00B237FA20E>108 D<0E1FC07F00FE60E183801E807201C00F003C00E00F003C00E00E003800E00E003800E00E0038 00E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E00 3800E00E003800E00E003800E00E003800E00E003800E0FFE3FF8FFE27157F942A>I<0E1F80FE 60C01E80E00F00700F00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E 00700E00700E00700E00700E00700E0070FFE7FF18157F941B>I<01FC000707000C01801800C0 3800E0700070700070F00078F00078F00078F00078F00078F00078F000787000707800F03800E0 1C01C00E038007070001FC0015157F9418>I<01F8200704600E02601C01603801E07800E07800 E0F000E0F000E0F000E0F000E0F000E0F000E0F000E07000E07800E03801E01C01E00C02E0070C E001F0E00000E00000E00000E00000E00000E00000E00000E00000E00000E0000FFE171F7E941A >113 D<0E3CFE461E8F0F0F0F060F000E000E000E000E000E000E000E000E000E000E000E000E 000E000F00FFF010157F9413>I<0F8830786018C018C008C008E008F0007F803FE00FF001F800 3C801C800C800CC00CC008E018D0308FC00E157E9413>I<02000200020002000600060006000E 001E003E00FFF80E000E000E000E000E000E000E000E000E000E000E000E040E040E040E040E04 0E040708030801F00E1F7F9E13>I<0E0070FE07F01E00F00E00700E00700E00700E00700E0070 0E00700E00700E00700E00700E00700E00700E00700E00700E00F00E00F006017003827800FC7F 18157F941B>I121 D<3FFFC0380380300780200700600E00401C00403C0040380000700000E00001E00001C0000380 400700400F00400E00C01C0080380080780180700780FFFF8012157F9416>I E /Fu 21 118 df<78FCFCFCFC7806067A8512>46 D<00080000380000780001F8003FF800FE78 00C078000078000078000078000078000078000078000078000078000078000078000078000078 000078000078000078000078000078000078000078000078000078000078000078000078000078 0000780000780000780000780000780000780000780000780000780000780000780000780000FC 007FFFF87FFFF8152F7AAE21>49 D<007F800001FFF0000701F8000C007E0018003F0010001F00 20000F8040000FC0400007C0400007E0B00007E0F80003E0FC0003E0FC0003E0FC0003E0780007 E0000007E0000007C0000007C000000F8000000F8000001F0000001F0000003E0000003C000000 78000000F0000000E0000001C0000003800000070000000E0000001C0000001800000030000000 60000000C000200180002003000020060000400C00004008000040100000C03FFFFFC07FFFFF80 FFFFFF80FFFFFF801B2F7DAE21>I76 DI< FFFFFFC000FFFFFFF80007E000FE0003E0001F0003E0000F8003E00007C003E00003E003E00003 F003E00001F003E00001F003E00001F803E00001F803E00001F803E00001F803E00001F803E000 01F803E00001F003E00001F003E00003E003E00003E003E00007C003E0000F8003E0001F0003E0 00FC0003FFFFF00003E000000003E000000003E000000003E000000003E000000003E000000003 E000000003E000000003E000000003E000000003E000000003E000000003E000000003E0000000 03E000000003E000000003E000000003E000000003E000000003E000000003E000000007F00000 00FFFF800000FFFF80000025317CB02D>80 D82 D<00FE00000303C0000C00E00010007000100038003C003C00 3E001C003E001E003E001E0008001E0000001E0000001E0000001E00000FFE0000FC1E0003E01E 000F801E001F001E003E001E003C001E007C001E00F8001E04F8001E04F8001E04F8003E04F800 3E0478003E047C005E043E008F080F0307F003FC03E01E1F7D9E21>97 D<003F8000E060038018 0700040F00041E001E1C003E3C003E7C003E7C0008780000F80000F80000F80000F80000F80000 F80000F80000F80000F800007800007C00007C00003C00011E00011E00020F0002070004038018 00E060003F80181F7D9E1D>99 D<003F800000E0E0000380380007003C000E001E001E001E001C 000F003C000F007C000F0078000F8078000780F8000780F8000780FFFFFF80F8000000F8000000 F8000000F8000000F8000000F8000000780000007C0000003C0000003C0000801E0000800E0001 000F0002000780020001C00C0000F03000001FC000191F7E9E1D>101 D<0007E0001C10003838 00707C00E07C01E07C01C03803C00003C00003C00003C00003C00003C00003C00003C00003C000 03C00003C00003C000FFFFC0FFFFC003C00003C00003C00003C00003C00003C00003C00003C000 03C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C000 03C00003C00003C00003C00003C00007E0007FFF007FFF0016327FB114>I<000000F0007F0308 01C1C41C0380E81C070070080F0078001E003C001E003C003E003E003E003E003E003E003E003E 003E003E003E003E001E003C001E003C000F007800070070000780E00009C1C000087F00001800 0000180000001800000018000000180000001C0000000E0000000FFFF80007FFFF0003FFFF800E 000FC0180001E0300000F070000070E0000038E0000038E0000038E0000038E000003870000070 70000070380000E01C0001C00700070001C01C00003FE0001E2F7E9F21>I<01800000003F8000 0000FF80000000FF800000000F8000000007800000000780000000078000000007800000000780 000000078000000007800000000780000000078000000007800000000780000000078000000007 8000000007800000000780FE00000783078000078C03C000079001E00007A001E00007A000F000 07C000F00007C000F000078000F000078000F000078000F000078000F000078000F000078000F0 00078000F000078000F000078000F000078000F000078000F000078000F000078000F000078000 F000078000F000078000F000078000F000078000F000078000F000078000F0000FC001F800FFFC 1FFF80FFFC1FFF8021327EB125>I<07000F801F801F800F800700000000000000000000000000 0000000000000000000001801F80FF80FF800F8007800780078007800780078007800780078007 8007800780078007800780078007800780078007800780078007800FC0FFF8FFF80D307EAF12> I<01803F80FF80FF800F8007800780078007800780078007800780078007800780078007800780 078007800780078007800780078007800780078007800780078007800780078007800780078007 80078007800780078007800780078007800FC0FFFCFFFC0E327EB112>108 D<0180FE001FC0003F83078060F000FF8C03C1807800FF9001E2003C000FA001E4003C0007A000 F4001E0007C000F8001E0007C000F8001E00078000F0001E00078000F0001E00078000F0001E00 078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0 001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E0007 8000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F000 1E000FC001F8003F00FFFC1FFF83FFF0FFFC1FFF83FFF0341F7E9E38>I<0180FE00003F830780 00FF8C03C000FF9001E0000FA001E00007A000F00007C000F00007C000F000078000F000078000 F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0000780 00F000078000F000078000F000078000F000078000F000078000F000078000F000078000F00007 8000F000078000F000078000F0000FC001F800FFFC1FFF80FFFC1FFF80211F7E9E25>I<001FC0 0000F0780001C01C00070007000F0007801E0003C01C0001C03C0001E03C0001E0780000F07800 00F0780000F0F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F878 0000F07C0001F03C0001E03C0001E01E0003C01E0003C00F00078007800F0001C01C0000F07800 001FC0001D1F7E9E21>I<0183E03F8C18FF907CFF907C0FA07C07C03807C00007C00007C00007 800007800007800007800007800007800007800007800007800007800007800007800007800007 80000780000780000780000780000780000FC000FFFE00FFFE00161F7E9E19>114 D<00400000400000400000400000400000C00000C00000C00001C00001C00003C00007C0000FC0 001FFFE0FFFFE003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C0 0003C00003C00003C00003C00003C00003C01003C01003C01003C01003C01003C01003C01003C0 1001C02001E02000E0400078C0001F00142C7FAB19>116 D<01800030003F8007F000FF801FF0 00FF801FF0000F8001F000078000F000078000F000078000F000078000F000078000F000078000 F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0000780 00F000078000F000078000F000078000F000078000F000078001F000078001F000078001F00003 8002F00003C004F00001C008F800007030FF80001FC0FF80211F7E9E25>I E end %%EndProlog %%BeginSetup %%Feature: *Resolution 300 TeXDict begin @a4 /a4 where {pop a4} if %%EndSetup %%Page: 1 1 bop 96 342 a Fu(Reference)22 b(Man)n(ual)f(of)g(the)h(Programming)e(Language) h(Lua)h(2.1)87 468 y Ft(Rob)q(erto)17 b(Ierusalimsc)o(h)o(y)46 b(Luiz)16 b(Henrique)e(de)i(Figueiredo)48 b(W)l(aldemar)15 b(Celes)h(Filho)736 548 y Fs(T)m(eC)797 561 y(Graf)885 548 y Fr(|)e(PUC-Rio)562 606 y Fq(roberto,lhf,cele)o(s@ica)o(d.puc)o(-rio)o(.br) 741 720 y Ft(F)l(ebruary)i(8,)h(1995)830 888 y Fp(Abstract)102 963 y Fr(Lua)12 b(is)g(an)f(extension)i(programming)c(language)i(designed)h (to)g(b)q(e)h(used)g(as)f(a)g(con\014guration)g(language)102 1013 y(for)h(an)o(y)g(program)f(that)i(needs)h(one.)j(This)13 b(do)q(cumen)o(t)g(describ)q(es)j(v)o(ersion)e(2.1)e(of)h(the)h(Lua)f (program-)102 1063 y(ming)g(language)h(and)g(the)i(API)f(that)g(allo)o(ws)f (in)o(teraction)g(b)q(et)o(w)o(een)j(Lua)d(programs)g(and)h(its)g(host)g(C) 102 1113 y(program.)h(It)e(also)f(presen)o(ts)j(some)d(examples)g(of)h(using) f(the)i(main)c(features)k(of)f(the)g(system.)869 1328 y Fp(Sum\023)-24 b(ario)102 1396 y Fr(Lua)9 b(\023)-20 b(e)11 b(uma)d(linguagem)g(de)j (extens~)-21 b(ao)11 b(pro)r(jetada)f(para)h(ser)g(usada)f(como)f(linguagem)f (de)j(con\014gura\030)-18 b(c~)d(ao)102 1446 y(em)19 b(qualquer)h(programa)f (que)h(precise)i(de)f(uma.)35 b(Este)21 b(do)q(cumen)o(to)f(descrev)o(e)i(a)e (v)o(ers~)-21 b(ao)21 b(2.1)e(da)102 1496 y(linguagem)f(de)i(programa\030)-18 b(c~)d(ao)19 b(Lua)h(e)h(a)f(In)o(terface)h(de)g(Programa\030)-18 b(c~)d(ao)19 b(que)i(p)q(ermite)f(a)g(in)o(tera\030)-18 b(c~)d(ao)102 1545 y(en)o(tre)15 b(programas)e(Lua)h(e)h(o)f(programa)e(C)j(hosp)q(edeiro.) 20 b(O)14 b(do)q(cumen)o(to)g(tam)o(b)o(\023)-20 b(em)12 b(apresen)o(ta)j (alguns)102 1595 y(exemplos)e(de)h(uso)g(das)g(principais)g(caracter)-5 b(\023)-16 b(\020sticas)15 b(do)f(sistema.)-12 1738 y Fo(1)69 b(In)n(tro)r(duction)-12 1840 y Fn(Lua)18 b(is)f(an)g(extension)h (programming)f(language)g(designed)i(to)d(supp)q(ort)h(general)h(pro)q (cedural)g(program-)-12 1896 y(ming)j(features)f(with)g(data)g(description)h (facilities.)37 b(It)20 b(is)h(supp)q(osed)g(to)f(b)q(e)h(used)f(as)g(a)g (con\014guration)-12 1953 y(language)e(for)f(an)o(y)g(program)f(that)h(needs) h(one.)27 b(Its)18 b(main)g(extensions)g(are)f(related)h(to)f(ob)s (ject-orien)o(ted)-12 2009 y(facilities,)f(and)e(fallbac)o(ks,)g(but)g(it)g (has)g(some)g(other)f(minor)h(con)o(tributions.)20 b(Lua)14 b(has)g(b)q(een)h(designed)g(and)-12 2066 y(implemen)o(ted)i(b)o(y)e(W.)g (Celes)h(F.,)e(L.)h(H.)g(de)g(Figueiredo)i(and)e(R.)g(Ierusalimsc)o(h)o(y)l (.)59 2122 y(Lua)k(is)g(implemen)o(ted)h(as)e(a)g(library)l(,)i(written)f(in) g(C.)f(Being)h(an)g(extension)g(language,)g(Lua)g(has)f(no)-12 2179 y(notion)i(of)f(a)g(\\main")g(program:)28 b(it)19 b(only)h(w)o(orks)f Fm(emb)n(e)n(dde)n(d)g Fn(in)h(a)f(host)g(clien)o(t,)j(called)f(the)e Fm(emb)n(e)n(dding)-12 2235 y Fn(program.)g(This)c(host)g(program)e(can)i(in) o(v)o(ok)o(e)g(functions)h(to)e(execute)h(a)g(piece)h(of)e(co)q(de)i(in)f (Lua,)g(can)g(write)-12 2291 y(and)i(read)g(Lua)h(v)m(ariables,)g(and)f(can)g (register)g(C)g(functions)h(to)e(b)q(e)i(called)g(b)o(y)f(Lua)h(co)q(de.)25 b(Through)17 b(the)-12 2348 y(use)d(of)g(C)f(functions,)i(Lua)f(can)g(b)q(e)h (augmen)o(ted)e(to)g(cop)q(e)i(with)f(rather)f(di\013eren)o(t)h(domains,)g (th)o(us)g(creating)-12 2404 y(customized)i(programming)f(languages)g (sharing)h(a)f(syn)o(tactical)g(framew)o(ork.)59 2461 y(Lua)k(is)g(free)g (distribution)h(soft)o(w)o(are,)e(and)h(pro)o(vided)g(as)g(usual)g(with)g(no) g(guaran)o(tees.)30 b(The)19 b(imple-)-12 2517 y(men)o(tation)c(describ)q(ed) i(in)f(this)g(man)o(ual)f(is)h(a)o(v)m(ailable)h(b)o(y)e(anon)o(ymous)g(ftp)g (from)60 2611 y Fl(ftp.icad.puc-rio.br:/pub)o(/lua/lua)o(-2.1.ta)o(r.Z)-12 2705 y Fn(or)g(b)o(y)g(WWW)f(\(W)l(orld)h(Wide)h(W)l(eb\))g(from)60 2799 y Fl(http://www.inf.puc-rio.b)o(r/projet)o(os/robe)o(rto/lua)o(.html)910 2976 y Fn(1)p eop %%Page: 2 2 bop -12 160 a Fo(2)69 b(En)n(vironmen)n(t)21 b(and)i(Mo)r(dules)-12 261 y Fn(All)15 b(statemen)o(ts)d(in)j(Lua)e(are)h(executed)g(in)g(a)f Fm(glob)n(al)h(envir)n(onment)t Fn(.)k(This)d(en)o(vironmen)o(t,)e(whic)o(h)i (k)o(eeps)e(all)-12 318 y(global)19 b(v)m(ariables)g(and)f(functions,)g(is)h (initialized)i(at)c(the)h(b)q(eginning)i(of)d(the)h(em)o(b)q(edding)h (program)e(and)-12 374 y(p)q(ersists)f(un)o(til)g(its)g(end.)59 430 y(The)i(global)g(en)o(vironmen)o(t)g(can)g(b)q(e)g(manipulated)i(b)o(y)d (Lua)h(co)q(de)h(or)e(b)o(y)h(the)f(em)o(b)q(edding)j(program,)-12 487 y(whic)o(h)c(can)g(read)f(and)g(write)g(global)h(v)m(ariables)h(using)f (functions)g(in)g(the)f(library)h(that)e(implemen)o(ts)j(Lua.)59 543 y(Global)22 b(v)m(ariables)g(do)f(not)g(need)h(declaration.)39 b(An)o(y)22 b(v)m(ariable)g(is)g(assumed)g(to)e(b)q(e)i(global)g(unless)-12 600 y(explicitly)17 b(declared)f(lo)q(cal)g(\(see)e(lo)q(cal)h(declarations,) g(Section)h(4.4.5\).)h(Before)e(the)f(\014rst)g(assignmen)o(t,)g(the)-12 656 y(v)m(alue)j(of)d(a)h(global)h(v)m(ariable)h(is)e Fk(nil)p Fn(.)59 713 y(The)g(unit)h(of)f(execution)h(of)f(Lua)h(is)f(called)i(a)e Fm(mo)n(dule)s Fn(.)20 b(The)c(syn)o(tax)e(for)h(mo)q(dules)h(is:)1563 696 y Fj(1)72 785 y Fm(mo)n(dule)50 b Fi(!)g(f)p Fm(statement)32 b Fi(j)16 b Fm(function)s Fi(g)-12 857 y Fn(A)f(mo)q(dule)h(ma)o(y)f(con)o (tain)g(statemen)o(ts)f(and)h(function)g(de\014nitions,)i(and)e(ma)o(y)f(b)q (e)i(in)g(a)e(\014le)i(or)f(in)h(a)e(string)-12 913 y(inside)i(the)f(host)f (program.)k(When)d(a)f(mo)q(dule)i(is)f(executed,)g(\014rst)f(all)h(its)g (functions)g(and)f(statemen)o(ts)g(are)-12 970 y(compiled,)g(and)f(the)f (functions)h(added)g(to)f(the)g(global)h(en)o(vironmen)o(t;)g(then)g(the)f (statemen)o(ts)f(are)h(executed)-12 1026 y(in)k(sequen)o(tial)g(order.)k(All) d(mo)q(di\014cations)f(a)f(mo)q(dule)h(e\013ects)f(on)g(the)g(global)h(en)o (vironmen)o(t)f(p)q(ersist)h(after)-12 1083 y(its)g(end.)k(Those)15 b(include)j(mo)q(di\014cations)e(to)f(global)g(v)m(ariables)i(and)e (de\014nitions)i(of)e(new)g(functions)1736 1066 y Fj(2)1757 1083 y Fn(.)-12 1226 y Fo(3)69 b(T)n(yp)r(es)-12 1327 y Fn(Lua)16 b(is)h(a)e(dynamically)j(t)o(yp)q(ed)e(language.)22 b(V)l(ariables)17 b(do)f(not)f(ha)o(v)o(e)g(t)o(yp)q(es;)h(only)g(v)m(alues)h(do.)22 b(All)17 b(v)m(alues)-12 1384 y(carry)e(their)h(o)o(wn)e(t)o(yp)q(e.)20 b(Therefore,)15 b(there)g(are)g(no)g(t)o(yp)q(e)g(de\014nitions)i(in)f(the)g (language.)59 1440 y(There)e(are)f(sev)o(en)i(basic)f(t)o(yp)q(es)g(in)h (Lua:)k Fm(nil)p Fn(,)13 b Fm(numb)n(er)p Fn(,)g Fm(string)p Fn(,)g Fm(function)p Fn(,)h Fm(CF)m(unction)p Fn(,)e Fm(user)n(data)p Fn(,)i(and)-12 1497 y Fm(table)p Fn(.)25 b Fm(Nil)16 b Fn(is)h(the)g(t)o(yp)q (e)g(of)g(the)g(v)m(alue)h Fk(nil)p Fn(,)g(whose)f(main)g(prop)q(ert)o(y)g (is)g(to)f(b)q(e)i(di\013eren)o(t)f(from)f(an)o(y)h(other)-12 1553 y(v)m(alue.)k Fm(Numb)n(er)15 b Fn(represen)o(ts)h(real)f(\(\015oating)g (p)q(oin)o(t\))g(n)o(um)o(b)q(ers,)g(while)i Fm(string)d Fn(has)i(the)f (usual)h(meaning.)59 1610 y(F)l(unctions)f(are)e(considered)j(\014rst-class)e (v)m(alues)i(in)f(Lua.)k(This)c(means)f(that)g(functions)h(can)f(b)q(e)h (stored)-12 1666 y(in)h(v)m(ariables,)g(passed)f(as)f(argumen)o(ts)g(to)h (other)f(functions)i(and)f(returned)g(as)g(results.)20 b(When)15 b(a)f(function)-12 1723 y(is)j(de\014ned)h(in)g(Lua,)e(its)h(b)q(o)q(dy)h(is) f(compiled)h(and)f(stored)f(in)h(a)f(giv)o(en)h(v)m(ariable.)26 b(Lua)17 b(can)f(call)i(\(and)f(ma-)-12 1779 y(nipulate\))e(functions)g (written)f(in)h(Lua)f(and)g(functions)h(written)f(in)g(C;)g(the)g(latter)f (ha)o(v)o(e)h(t)o(yp)q(e)g Fm(CF)m(unction)s Fn(.)59 1836 y(The)i(t)o(yp)q(e) g Fm(user)n(data)h Fn(is)f(pro)o(vided)h(to)e(allo)o(w)i(arbitrary)e(C)h(p)q (oin)o(ters)g(to)g(b)q(e)h(stored)e(in)i(Lua)f(v)m(ariables.)-12 1892 y(It)21 b(corresp)q(onds)f(to)g Fl(void*)g Fn(and)g(has)g(no)h (pre-de\014ned)h(op)q(erations)e(in)h(Lua,)h(b)q(esides)g(assignmen)o(t)e (and)-12 1948 y(equalit)o(y)15 b(test.)k(Ho)o(w)o(ev)o(er,)13 b(b)o(y)h(using)h(fallbac)o(ks,)f(the)h(programmer)d(ma)o(y)i(de\014ne)h(op)q (erations)f(for)g Fm(user)n(data)-12 2005 y Fn(v)m(alues;)i(see)g(Section)g (4.7.)59 2061 y(The)d(t)o(yp)q(e)h Fm(table)e Fn(implemen)o(ts)j(asso)q (ciativ)o(e)e(arra)o(ys,)f(that)h(is,)h(arra)o(ys)e(whic)o(h)i(can)f(b)q(e)h (indexed)h(not)e(only)-12 2118 y(with)20 b(n)o(um)o(b)q(ers,)g(but)f(with)g (an)o(y)g(v)m(alue)h(\(except)g Fk(nil)p Fn(\).)32 b(Therefore,)19 b(this)h(t)o(yp)q(e)f(ma)o(y)g(b)q(e)g(used)h(not)f(only)-12 2174 y(to)c(represen)o(t)h(ordinary)g(arra)o(ys,)e(but)h(also)h(sym)o(b)q(ol) g(tables,)g(sets,)f(records,)g(etc.)21 b(T)l(o)16 b(represen)o(t)f(a)h (record,)-12 2231 y(Lua)h(uses)f(the)g(\014eld)i(name)e(as)g(an)g(index.)24 b(The)17 b(language)f(supp)q(orts)g(this)h(represen)o(tation)f(b)o(y)g(pro)o (viding)-12 2287 y Fl(a.name)f Fn(as)h(syn)o(tactic)g(sugar)g(for)f Fl(a["name"])p Fn(.)22 b(T)l(ables)17 b(ma)o(y)e(also)h(carry)g(metho)q(ds.) 23 b(Because)17 b(functions)-12 2344 y(are)g(\014rst)g(class)h(v)m(alues,)h (table)f(\014elds)g(ma)o(y)f(con)o(tain)h(functions.)27 b(The)17 b(form)g Fl(t:f\(x\))g Fn(is)h(syn)o(tactic)f(sugar)-12 2400 y(for)e Fl(t.f\(t,x\))p Fn(,)e(whic)o(h)j(calls)h(the)e(metho)q(d)g Fl(f)g Fn(from)g(the)g(table)h Fl(t)f Fn(passing)g(itself)i(as)d(the)i (\014rst)e(parameter.)59 2457 y(It)i(is)g(imp)q(ortan)o(t)f(to)g(notice)i (that)e(tables)h(are)f(ob)s(jects,)g(and)h(not)f(v)m(alues.)23 b(V)l(ariables)17 b(cannot)e(con)o(tain)-12 2513 y(tables,)e(only)h (references)f(to)f(them.)19 b(Assignmen)o(t,)13 b(parameter)f(passing)i(and)e (returns)h(alw)o(a)o(ys)f(manipulate)-12 2569 y(references)18 b(to)f(tables,)h(and)f(do)h(not)f(imply)h(an)o(y)f(kind)i(of)e(cop)o(y)l(.)26 b(Moreo)o(v)o(er,)16 b(tables)i(m)o(ust)e(b)q(e)j(explicitly)-12 2626 y(created)c(b)q(efore)h(used;)f(see)h(Section)g(4.5.7.)p -12 2665 747 2 v 40 2692 a Fh(1)57 2708 y Fg(As)d(usual,)h Ff(f)p Fe(a)s Ff(g)f Fg(means)g(0)g(or)h(more)f Fe(a)s Fg('s,)e([)p Fe(a)s Fg(])h(means)i(an)f(optional)i Fe(a)e Fg(and)g Ff(f)p Fe(a)s Ff(g)1208 2692 y Fh(+)1247 2708 y Fg(means)g(one)g(or)g(more)h Fe(a)s Fg('s.)40 2738 y Fh(2)57 2754 y Fg(Actually)m(,)g(a)f(function)i (de\014nition)h(is)d(an)g(assignmen)o(t)i(to)e(a)g(global)i(v)n(ariable;)g (see)e(Section)i(3.)910 2976 y Fn(2)p eop %%Page: 3 3 bop -12 160 a Fo(4)69 b(The)23 b(Language)-12 261 y Fn(This)16 b(section)g(describ)q(es)h(the)e(lexis,)h(syn)o(tax)e(and)i(seman)o(tics)f (of)g(Lua.)-12 383 y Fd(4.1)56 b(Lexical)17 b(Con)n(v)n(en)n(tions)-12 469 y Fn(Lua)c(is)g(a)f(case)g(sensitiv)o(e)i(language.)19 b(Iden)o(ti\014ers)14 b(can)e(b)q(e)h(an)o(y)f(string)h(of)f(letters,)g (digits,)i(and)e(underscores,)-12 525 y(not)h(b)q(eginning)h(with)f(a)g (digit.)20 b(The)13 b(follo)o(wing)g(w)o(ords)f(are)h(reserv)o(ed,)g(and)g (cannot)f(b)q(e)h(used)h(as)e(iden)o(ti\014ers:)203 619 y Fl(and)143 b(do)190 b(else)143 b(elseif)95 b(end)203 675 y(function)23 b(if)190 b(local)119 b(nil)167 b(not)203 732 y(or)g(repeat)94 b(return)h(until)119 b(then)95 b(while)59 826 y Fn(The)15 b(follo)o(wing)h (strings)f(denote)h(other)e(tok)o(ens:)203 919 y Fl(~=)47 b(<=)h(>=)f(<)72 b(>)f(==)48 b(=)71 b(..)48 b(+)71 b(-)g(*)h(/)203 976 y(\045)f(\()h(\))f({)h (})f([)h(])f(;)h(,)f(.)59 1070 y Fn(Literal)17 b(strings)f(can)h(b)q(e)g (delimited)h(b)o(y)f(matc)o(hing)f(single)i(or)d(double)j(quotes,)e(and)g (can)h(con)o(tain)f(the)-12 1126 y(C-lik)o(e)f(escap)q(e)g(sequences)g Fl('\\n')p Fn(,)e Fl('\\t')h Fn(and)g Fl('\\r')p Fn(.)19 b(Commen)o(ts)13 b(start)g(an)o(ywhere)h(outside)g(a)g(string)g(with)-12 1183 y(a)h(double)i(h)o(yphen)f(\()p Fl(--)p Fn(\))e(and)h(run)h(un)o(til)g(the)f (end)h(of)f(the)g(line.)59 1239 y(Numerical)e(constan)o(ts)e(ma)o(y)g(b)q(e)h (written)g(with)g(an)f(optional)h(decimal)i(part,)d(and)h(an)g(optional)g (decimal)-12 1296 y(exp)q(onen)o(t.)21 b(Examples)15 b(of)g(v)m(alid)i(n)o (umerical)f(constan)o(ts)f(are:)155 1389 y Fl(4)119 b(4.)g(.4)g(4.57e-3)g (.3e12)-12 1511 y Fd(4.2)56 b(Co)r(ercion)-12 1597 y Fn(Lua)17 b(pro)o(vides)g(some)g(automatic)f(con)o(v)o(ersions.)24 b(An)o(y)17 b(arithmetic)g(op)q(eration)g(applied)i(to)d(a)g(string)h(tries)-12 1653 y(to)12 b(con)o(v)o(ert)g(that)g(string)g(to)g(a)g(n)o(um)o(b)q(er,)h (follo)o(wing)g(the)g(usual)g(rules.)20 b(Con)o(v)o(ersely)l(,)13 b(whenev)o(er)g(a)f(n)o(um)o(b)q(er)h(is)-12 1710 y(used)h(when)f(a)f(string) h(is)g(exp)q(ected,)i(that)d(n)o(um)o(b)q(er)h(is)g(con)o(v)o(erted)g(to)f(a) g(string,)h(according)h(to)e(the)h(follo)o(wing)-12 1766 y(rule:)20 b(if)15 b(the)f(n)o(um)o(b)q(er)h(is)g(an)f(in)o(teger,)g(it)h(is)f(written)h (without)f(exp)q(onen)o(t)h(or)e(decimal)j(p)q(oin)o(t;)f(otherwise,)f(it)-12 1823 y(is)i(formatted)e(follo)o(wing)i(the)f(\\)p Fl(\045g)p Fn(")f(con)o(v)o(ersion)i(sp)q(eci\014cation)h(of)e(the)g(standard)g Fl(printf)f Fn(C)h(function.)-12 1944 y Fd(4.3)56 b(Adjustmen)n(t)-12 2030 y Fn(F)l(unctions)16 b(in)h(Lua)e(can)h(return)f(man)o(y)g(v)m(alues.)22 b(Because)16 b(there)f(are)h(no)f(t)o(yp)q(e)g(declarations,)h(the)g(system) -12 2087 y(do)q(es)21 b(not)f(kno)o(w)g(ho)o(w)g(man)o(y)g(v)m(alues)i(a)e (function)h(will)h(return,)g(or)e(ho)o(w)g(man)o(y)g(parameters)f(it)i (needs.)-12 2143 y(Therefore,)14 b(sometimes,)f(a)h(list)g(of)f(v)m(alues)i (m)o(ust)e(b)q(e)h Fm(adjuste)n(d)5 b Fn(,)14 b(at)f(run)h(time,)g(to)f(a)g (giv)o(en)h(length.)20 b(If)14 b(there)-12 2200 y(are)19 b(more)g(v)m(alues)i (than)e(are)g(needed,)i(the)f(last)f(v)m(alues)i(are)e(thro)o(wn)f(a)o(w)o(a) o(y)l(.)31 b(If)20 b(there)f(are)h(more)e(needs)-12 2256 y(than)d(v)m(alues,) h(the)g(list)g(is)g(extended)g(with)g(as)f(man)o(y)f Fk(nil)p Fn('s)i(as)f(needed.)22 b(Adjustmen)o(t)15 b(o)q(ccurs)g(in)h(m)o(ultiple)-12 2312 y(assignmen)o(t)f(and)h(function)g(calls.)-12 2434 y Fd(4.4)56 b(Statemen)n(ts)-12 2520 y Fn(Lua)18 b(supp)q(orts)f(an)g(almost)f(con)o(v)o (en)o(tional)i(set)e(of)h(statemen)o(ts.)24 b(The)18 b(con)o(v)o(en)o(tional) f(commands)g(include)-12 2576 y(assignmen)o(t,)d(con)o(trol)h(structures)f (and)h(pro)q(cedure)g(calls.)21 b(Non-con)o(v)o(en)o(tional)15 b(commands)g(include)i(table)-12 2633 y(constructors,)d(explained)j(in)f (Section)h(4.5.7,)c(and)i(lo)q(cal)h(v)m(ariable)h(declarations.)910 2976 y(3)p eop %%Page: 4 4 bop -12 160 a Fk(4.4.1)52 b(Blo)q(c)o(ks)-12 245 y Fn(A)13 b(blo)q(c)o(k)g(is)g(a)f(list)i(of)e(statemen)o(ts,)g(executed)h(sequen)o (tially)l(.)21 b(An)o(y)13 b(statemen)o(t)e(can)i(b)q(e)g(optionally)h(follo) o(w)o(ed)-12 302 y(b)o(y)h(a)g(semicolon.)72 370 y Fm(blo)n(ck)49 b Fi(!)h(f)p Fm(stat)16 b(sc)s Fi(g)f Fn([)p Fm(r)n(et)h(sc)s Fn(])128 427 y Fm(sc)49 b Fi(!)h Fn([';'])-12 495 y(F)l(or)14 b(syn)o(tactic)h(reasons,)e(a)i(return)f(statemen)o(t)g(can)g(only)h(b)q(e)g (written)g(as)f(the)h(last)f(statemen)o(t)g(of)g(a)g(blo)q(c)o(k.)-12 551 y(This)i(restriction)g(also)f(a)o(v)o(oids)g(some)g(\\statemen)o(t)e(not) i(reac)o(hed")g(errors.)-12 671 y Fk(4.4.2)52 b(Assignmen)n(t)-12 757 y Fn(The)17 b(language)g(allo)o(ws)g(m)o(ultiple)i(assignmen)o(t.)24 b(Therefore,)17 b(the)g(syn)o(tax)f(de\014nes)i(a)e(list)i(of)e(v)m(ariables) i(on)-12 814 y(the)13 b(left)g(side,)g(and)g(a)f(list)i(of)e(expressions)h (on)g(the)f(righ)o(t)h(side.)20 b(Both)12 b(lists)h(ha)o(v)o(e)f(their)h (elemen)o(ts)h(separated)-12 870 y(b)o(y)h(commas.)146 938 y Fm(stat)49 b Fi(!)i Fm(varlist1)16 b Fn('=')g Fm(explist1)72 995 y(varlist1)49 b Fi(!)i Fm(var)16 b Fi(f)p Fn(',')f Fm(var)5 b Fi(g)-12 1063 y Fn(This)16 b(statemen)o(t)d(\014rst)i(ev)m(aluates)g(all)h (v)m(alues)g(on)e(the)h(righ)o(t)g(side)g(and)g(ev)o(en)o(tual)g(indices)i (on)e(the)g(left)g(side,)-12 1119 y(and)h(then)f(mak)o(es)g(the)g(assignmen)o (ts.)20 b(Therefore,)14 b(it)i(can)f(b)q(e)h(used)g(to)e(exc)o(hange)i(t)o(w) o(o)e(v)m(alues,)i(as)e(in)60 1213 y Fl(x,)23 b(y)h(=)g(y,)f(x)-12 1307 y Fn(Before)18 b(the)g(assignmen)o(t,)g(the)g(list)g(of)g(v)m(alues)h (is)f Fm(adjuste)n(d)g Fn(to)f(the)h(length)h(of)e(the)h(list)h(of)e(v)m (ariables;)j(see)-12 1364 y(Section)c(4.3.)72 1436 y Fm(var)50 b Fi(!)g Fm(name)-12 1508 y Fn(A)15 b(single)i(name)e(can)g(denote)h(a)f (global)h(or)e(a)h(lo)q(cal)i(v)m(ariable,)f(or)e(a)h(formal)g(parameter.)72 1580 y Fm(var)50 b Fi(!)g Fm(var)17 b Fn('[')e Fm(exp1)i Fn(']')-12 1652 y(Square)f(brac)o(k)o(ets)f(are)g(used)h(to)f(index)i(a)e(table.)21 b(If)16 b Fl(var)f Fn(results)h(in)g(a)f(table)h(v)m(alue,)h(the)e(\014eld)i (indexed)g(b)o(y)-12 1708 y(the)i(expression)g(v)m(alue)h(gets)e(the)h (assigned)g(v)m(alue.)32 b(Otherwise,)20 b(the)f(fallbac)o(k)g Fm(settable)f Fn(is)h(called,)i(with)-12 1765 y(three)15 b(parameters:)j(the) c(v)m(alue)i(of)e Fl(var)p Fn(,)f(the)i(v)m(alue)g(of)f(expression,)h(and)g (the)f(v)m(alue)h(b)q(eing)h(assigned)f(to)e(it;)-12 1821 y(see)j(Section)g (4.7.)72 1893 y Fm(var)50 b Fi(!)g Fm(var)17 b Fn('.')j Fm(name)-12 1966 y Fn(The)c(syn)o(tax)e Fl(var.NAME)g Fn(is)i(just)f(syn)o(tactic)g (sugar)g(for)f Fl(var["NAME"])p Fn(.)-12 2086 y Fk(4.4.3)52 b(Con)o(trol)17 b(Structures)-12 2171 y Fn(The)e(condition)h(expression)f(of) f(a)h(con)o(trol)f(structure)g(can)h(return)g(an)o(y)f(v)m(alue.)21 b(All)16 b(v)m(alues)f(di\013eren)o(t)g(from)-12 2228 y Fk(nil)f Fn(are)f(considered)h(true,)f(while)i Fk(nil)f Fn(is)g(considered)g(false.)20 b Fl(if)p Fn('s,)12 b Fl(while)p Fn('s)g(and)h Fl(repeat)p Fn('s)f(ha)o(v)o(e)g(the)i(usual)-12 2284 y(meaning.)100 2352 y Fm(stat)50 b Fi(!)g Fk(while)17 b Fm(exp1)g Fk(do)f Fm(blo)n(ck)g Fk(end)275 2409 y Fi(j)32 b Fk(rep)q(eat)17 b Fm(blo)n(ck)f Fk(un)o(til)h Fm(exp1)275 2465 y Fi(j)32 b Fk(if)17 b Fm(exp1)g Fk(then)f Fm(blo)n(ck)g Fi(f)p Fm(elseif)8 b Fi(g)16 b Fn([)p Fk(else)g Fm(blo)n(ck)5 b Fn(])15 b Fk(end)72 2522 y Fm(elseif)49 b Fi(!)h Fk(elseif)17 b Fm(exp1)f Fk(then)h Fm(blo)n(ck)59 2615 y Fn(A)g Fl(return)g Fn(is)h(used)h(to)e(return)g(v)m(alues)i(from)e(a)g (function.)28 b(Because)18 b(a)g(function)g(ma)o(y)f(return)h(more)-12 2672 y(than)d(one)h(v)m(alue,)g(the)f(syn)o(tax)f(for)h(a)g(return)g (statemen)o(t)f(is:)72 2744 y Fm(r)n(et)49 b Fi(!)i Fk(return)15 b Fm(explist)910 2976 y Fn(4)p eop %%Page: 5 5 bop -12 160 a Fk(4.4.4)52 b(Expressions)16 b(as)i(Statemen)o(ts)-12 245 y Fn(All)c(expressions)e(with)h(p)q(ossible)h(side-e\013ects)e(can)h(b)q (e)f(executed)h(as)f(statemen)o(ts.)18 b(These)12 b(include)i(function)-12 302 y(calls)i(and)g(table)f(constructors:)72 361 y Fm(stat)50 b Fi(!)g Fm(functionc)n(al)r(l)72 418 y(stat)g Fi(!)g Fm(table)n(c)n (onstructor)-12 486 y Fn(Ev)o(en)o(tual)16 b(returned)g(v)m(alues)h(are)f (thro)o(wn)f(a)o(w)o(a)o(y)l(.)20 b(F)l(unction)c(calls)h(are)f(explained)i (in)e(Section)h(4.5.8;)d(con-)-12 542 y(structors)g(are)h(the)h(sub)s(ject)f (of)f(Section)i(4.5.7.)-12 662 y Fk(4.4.5)52 b(Lo)q(cal)20 b(Declarations)-12 748 y Fn(Lo)q(cal)c(v)m(ariables)g(can)f(b)q(e)g(declared) h(an)o(ywhere)f(inside)h(a)f(blo)q(c)o(k.)20 b(Their)c(scop)q(e)f(b)q(egins)h (after)e(the)h(declara-)-12 805 y(tion)i(and)h(lasts)f(un)o(til)h(the)f(end)h (of)e(the)h(blo)q(c)o(k.)27 b(The)17 b(declaration)h(ma)o(y)e(include)k(an)d (initial)i(assignmen)o(t:)122 921 y Fm(stat)50 b Fi(!)g Fk(lo)q(cal)18 b Fm(de)n(clist)e Fn([)p Fm(init)t Fn(])72 977 y Fm(de)n(clist)49 b Fi(!)h Fm(name)16 b Fi(f)p Fn(',')f Fm(name)s Fi(g)125 1033 y Fm(init)50 b Fi(!)g Fn('=')16 b Fm(explist1)-12 1102 y Fn(If)d(there)f(is)h (an)g(initial)h(assignmen)o(t,)f(it)f(has)h(the)f(same)g(seman)o(tics)h(of)f (a)g(m)o(ultiple)i(assignmen)o(t.)19 b(Otherwise,)-12 1158 y(all)d(v)m(ariables)h(are)e(initialized)j(with)e Fk(nil)p Fn(.)-12 1280 y Fd(4.5)56 b(Expressions)-12 1366 y Fk(4.5.1)c(Simple)16 b(Expressions)-12 1452 y Fn(Simple)h(expressions)f(are:)72 1520 y Fm(exp)50 b Fi(!)g Fn('\(')15 b Fm(exp)i Fn('\)')72 1576 y Fm(exp)50 b Fi(!)g Fk(nil)72 1633 y Fm(exp)g Fi(!)g Fn('n)o(um)o(b)q(er')72 1689 y Fm(exp)g Fi(!)g Fn('literal')72 1746 y Fm(exp)g Fi(!)g Fm(var)-12 1816 y Fn(Num)o(b)q(ers)17 b(\(n)o(umerical)h(constan)o(ts\))d(and)i(string)g(literals)g(are)g (explained)i(in)e(Section)h(4.1.)23 b(V)l(ariables)18 b(are)-12 1873 y(explained)f(in)g(Section)f(4.4.2.)-12 1993 y Fk(4.5.2)52 b(Arithmetic)16 b(Op)q(erators)-12 2079 y Fn(Lua)j(supp)q(orts)f(the)h(usual) g(arithmetic)g(op)q(erators.)28 b(These)19 b(op)q(erators)e(are)h(the)g (binary)h Fl(+)p Fn(,)g Fl(-)p Fn(,)f Fl(*)p Fn(,)h Fl(/)f Fn(and)-12 2135 y Fl(^)j Fn(\(exp)q(onen)o(tiation\),)h(and)f(the)f(unary)h Fl(-)p Fn(.)36 b(If)21 b(the)g(op)q(erands)g(are)f(n)o(um)o(b)q(ers,)i(or)e (strings)h(that)f(can)h(b)q(e)-12 2192 y(con)o(v)o(erted)15 b(to)f(n)o(um)o(b)q(ers,)h(according)h(to)e(the)h(rules)h(giv)o(en)f(in)h (Section)g(4.2,)e(all)i(op)q(erations)f(but)g(exp)q(onen-)-12 2248 y(tiation)i(ha)o(v)o(e)e(the)i(usual)f(meaning.)24 b(Otherwise,)17 b(the)f(fallbac)o(k)h(\\arith")e(is)i(called;)h(see)e(Section)h(4.7.)22 b(An)-12 2305 y(exp)q(onen)o(tiation)17 b(alw)o(a)o(ys)d(calls)i(this)g (fallbac)o(k.)-12 2425 y Fk(4.5.3)52 b(Relational)20 b(Op)q(erators)-12 2510 y Fn(Lua)c(o\013ers)e(the)h(follo)o(wing)h(relational)g(op)q(erators:) 155 2604 y Fl(<)72 b(>)f(<=)48 b(>=)f(~=)g(==)-12 2698 y Fn(All)17 b(return)e Fk(nil)h Fn(as)f(false)g(and)h(1)f(as)f(true.)59 2754 y(Equalit)o(y)19 b(\014rst)f(compares)g(the)g(t)o(yp)q(es)h(of)f(its)h (op)q(erands.)30 b(If)18 b(they)h(are)f(di\013eren)o(t,)h(the)g(result)g(is)g Fk(nil)p Fn(.)-12 2811 y(Otherwise,)h(their)e(v)m(alues)i(are)d(compared.)29 b(Num)o(b)q(ers)19 b(and)f(strings)g(are)g(compared)g(in)h(the)g(usual)f(w)o (a)o(y)l(.)910 2976 y(5)p eop %%Page: 6 6 bop -12 160 a Fn(T)l(ables,)13 b(CF)l(unctions,)h(and)e(functions)h(are)f (compared)h(b)o(y)f(reference,)h(that)f(is,)h(t)o(w)o(o)e(tables)i(are)f (considered)-12 216 y(equal)k(only)g(if)g(they)f(are)g(the)g(same)g(table.)20 b(The)c(op)q(erator)e Fl(~=)h Fn(is)h(exactly)f(the)g(negation)h(of)f (equalit)o(y)g(\()p Fl(=)p Fn(\).)59 273 y(The)i(other)g(op)q(erators)g(w)o (ork)f(as)h(follo)o(ws.)26 b(If)17 b(b)q(oth)h(argumen)o(ts)e(are)h(n)o(um)o (b)q(ers,)h(they)f(are)g(compared)-12 329 y(as)f(suc)o(h.)23 b(Otherwise,)16 b(if)h(b)q(oth)f(argumen)o(ts)f(can)h(b)q(e)h(con)o(v)o (erted)f(to)f(strings,)h(their)g(v)m(alues)i(are)d(compared)-12 385 y(using)h(lexicographical)i(order.)h(Otherwise,)d(the)f(fallbac)o(k)h (\\order")e(is)i(called;)h(see)e(Section)h(4.7.)-12 505 y Fk(4.5.4)52 b(Logical)20 b(Op)q(erators)-12 590 y Fn(All)g(logical)g(op)q(erators,)f(lik) o(e)h(con)o(trol)e(structures,)h(consider)h Fk(nil)g Fn(as)e(false)i(and)f (an)o(ything)g(else)g(as)g(true.)-12 647 y(Lik)o(e)d(relational)g(op)q (erators,)e(they)i(return)f Fk(nil)h Fn(as)f(false)g(and)h(1)f(as)f(true.)20 b(The)c(logical)g(op)q(erators)e(are:)298 736 y Fl(and)72 b(or)f(not)-12 825 y Fn(The)18 b(op)q(erators)f Fl(and)g Fn(and)h Fl(or)g Fn(use)g(short-cut)f(ev)m(aluation,)j(that)d(is,)h(the)g(second)h(op)q(erand) f(is)g(ev)m(aluated)-12 881 y(only)e(if)g(necessary)l(.)-12 1000 y Fk(4.5.5)52 b(Concatenation)-12 1086 y Fn(Lua)11 b(o\013ers)f(a)h (string)f(concatenation)h(op)q(erator,)g(denoted)g(b)o(y)g(\\)p Fl(..)p Fn(".)17 b(If)11 b(op)q(erands)g(are)g(strings)f(or)g(n)o(um)o(b)q (ers,)-12 1142 y(they)20 b(are)f(con)o(v)o(erted)g(to)g(strings)h(according)g (to)e(the)i(rules)g(in)h(Section)f(4.2.)32 b(Otherwise,)21 b(the)f(fallbac)o(k)-12 1199 y(\\concat")15 b(is)g(called;)i(see)e(Section)h (4.7.)-12 1318 y Fk(4.5.6)52 b(Precedence)-12 1404 y Fn(Op)q(erator)15 b(precedence)i(follo)o(ws)e(the)h(table)f(b)q(elo)o(w,)h(from)e(the)h(lo)o(w) o(er)g(to)g(the)g(higher)h(priorit)o(y:)298 1493 y Fl(and)72 b(or)298 1549 y(<)g(>)f(<=)48 b(>=)f(~=)h(=)298 1606 y(..)298 1662 y(+)72 b(-)298 1718 y(*)g(/)298 1775 y(not)48 b(-)23 b(\(unary\))298 1831 y(^)-12 1920 y Fn(All)17 b(binary)e(op)q(erators)g(are)g(left)g(asso)q (ciativ)o(e,)g(except)h(for)f Fl(^)p Fn(,)f(whic)o(h)i(is)g(righ)o(t)f(asso)q (ciativ)o(e.)-12 2039 y Fk(4.5.7)52 b(T)l(able)18 b(Constructors)-12 2125 y Fn(T)l(able)c(constructors)d(are)h(expressions)i(that)e(create)g (tables.)19 b(They)13 b(can)g(b)q(e)g(used)g(to)f(create)g(empt)o(y)g (tables,)-12 2182 y(or)j(to)f(create)h(a)g(table)h(and)f(initialize)k(some)c (\014elds.)59 2238 y(The)g(general)h(syn)o(tax)e(for)h(constructors)f(is:)72 2306 y Fm(table)n(c)n(onstructor)49 b Fi(!)h Fn(')p Fi(f)p Fn(')16 b([)p Fm(\014eld)r(list)t Fn(])e(')p Fi(g)p Fn(')241 2363 y Fm(\014eld)r(list)49 b Fi(!)h Fm(l\014eld)r(list1)15 b Fn([','])241 2419 y Fm(\014eld)r(list)49 b Fi(!)h Fm(\016eld)r(list1)16 b Fn([','])241 2476 y Fm(\014eld)r(list)49 b Fi(!)h Fm(l\014eld)r(list1)15 b Fn(';')g Fm(\016eld)r(list1)h Fn([','])59 2569 y(The)f(form)g Fm(l\014eld)r(list1)f Fn(is)h(used)h(to)f(initialize)j(lists.)72 2641 y Fm(l\014eld)r(list1)48 b Fi(!)j Fm(exp)16 b Fi(f)p Fn(',')f Fm(exp)s Fi(g)-12 2713 y Fn(The)i(expressions)f(in)h(the)g(list)f(are)g (assigned)h(to)e(consecutiv)o(e)i(n)o(umerical)h(indexes,)f(starting)f(with)g (1.)22 b(As)-12 2769 y(an)15 b(example:)60 2858 y Fl(a)24 b(=)f({"v1",)g ("v2",)g(34})910 2976 y Fn(6)p eop %%Page: 7 7 bop -12 160 a Fn(is)16 b(equiv)m(alen)o(t)h(to:)60 253 y Fl(temp)23 b(=)h({})60 310 y(temp[1])f(=)g("v1")60 366 y(temp[2])g(=)g("v2")60 423 y(temp[3])g(=)g(34)60 479 y(a)h(=)f(temp)59 573 y Fn(The)15 b(next)g(form)g(initializes)j(named)e(\014elds)g(in)g(a)f(table.)72 632 y Fm(\016eld)r(list1)49 b Fi(!)i Fm(\016eld)16 b Fi(f)p Fn(',')e Fm(\016eld)5 b Fi(g)157 689 y Fm(\016eld)49 b Fi(!)i Fm(name)16 b Fn('=')g Fm(exp)-12 757 y Fn(As)f(an)g(example:)60 851 y Fl(a)24 b(=)f({x)h(=)g(1,)f(y)h(=)g(3})-12 945 y Fn(is)16 b(equiv)m(alen)o(t)h(to:)60 1039 y Fl(temp)23 b(=)h({})60 1095 y(temp.x)f(=)h(1)60 1152 y(temp.y)f(=)h(3)60 1208 y(a)g(=)f(temp)-12 1328 y Fk(4.5.8)52 b(F)l(unction)18 b(Calls)-12 1414 y Fn(A)d(function)h (call)h(has)e(the)g(follo)o(wing)h(syn)o(tax:)72 1486 y Fm(functionc)n(al)r (l)49 b Fi(!)h Fm(var)16 b(r)n(e)n(alPar)n(ams)-12 1558 y Fn(Here,)d Fl(var)g Fn(can)g(b)q(e)h(an)o(y)e(v)m(ariable)j(\(global,)e(lo)q(cal,)h (indexed,)h(etc\).)k(If)13 b(its)g(t)o(yp)q(e)g(is)g Fm(function)j Fn(or)d Fm(CF)m(unction)s Fn(,)-12 1615 y(this)k(function)h(is)f(called.)27 b(Otherwise,)17 b(the)g(fallbac)o(k)g(\\function")h(is)f(called,)h(ha)o(ving) f(as)g(\014rst)f(parameter)-12 1671 y(the)f(v)m(alue)i(of)e Fl(var)p Fn(,)f(and)h(then)h(the)f(original)i(call)f(parameters.)59 1727 y(The)f(form:)72 1800 y Fm(functionc)n(al)r(l)49 b Fi(!)h Fm(var)16 b Fn(':')k Fm(name)c(r)n(e)n(alPar)n(ams)-12 1872 y Fn(can)g(b)q(e)f(used)h(to)f(call)h(\\metho)q(ds".)k(A)15 b(call)h Fl(var:name\(...\))d Fn(is)j(syn)o(tactic)f(sugar)g(for)36 1965 y Fl(var.name\(var,)22 b(...\))-12 2059 y Fn(except)16 b(that)e Fl(var)h Fn(is)h(ev)m(aluated)g(only)g(once.)72 2127 y Fm(r)n(e)n(alPar)n(ams)49 b Fi(!)h Fn('\(')15 b([)p Fm(explist1)6 b Fn(])16 b('\)')72 2184 y Fm(r)n(e)n(alPar)n(ams)49 b Fi(!)h Fm(table)n(c)n(onstructor)144 2240 y(explist1)g Fi(!)g Fm(exp1)17 b Fi(f)p Fn(',')e Fm(exp1)6 b Fi(g)-12 2309 y Fn(All)14 b(argumen)o(t)e (expressions)h(are)f(ev)m(aluated)i(b)q(efore)f(the)f(call;)j(then)d(the)h (list)g(of)g(argumen)o(ts)e(is)i(adjusted)g(to)-12 2365 y(the)j(length)g(of)f (the)g(list)i(of)e(parameters)f(\(see)h(Section)i(4.3\);)d(\014nally)l(,)i (this)g(list)g(is)g(assigned)g(to)f(the)h(formal)-12 2422 y(parameters.)j(A)c (call)i(of)d(the)i(form)e Fl(f{...})g Fn(is)i(syn)o(tactic)f(sugar)g(for)f Fl(f\({...}\))p Fn(,)g(that)g(is,)i(the)f(parameter)-12 2478 y(list)h(is)g(a)f(single)h(new)g(table.)59 2534 y(Because)k(a)g(function)g (can)g(return)g(an)o(y)g(n)o(um)o(b)q(er)g(of)f(results)h(\(see)g(Section)h (4.4.3\),)e(the)h(n)o(um)o(b)q(er)g(of)-12 2591 y(results)11 b(m)o(ust)f(b)q(e)h(adjusted)f(b)q(efore)h(used.)19 b(If)10 b(the)h(function)g(is)g(called)h(as)e(an)g(statemen)o(t)f(\(see)h(Section)i (4.4.4\),)-12 2647 y(its)19 b(return)g(list)g(is)h(adjusted)f(to)f(0.)30 b(If)19 b(the)g(function)g(is)h(called)g(in)g(a)e(place)i(that)e(needs)i(a)e (single)i(v)m(alue)-12 2704 y(\(syn)o(tactically)13 b(denoted)f(b)o(y)g(the)g (non-terminal)h Fl(exp1)p Fn(\),)f(its)g(return)g(list)h(is)f(adjusted)g(to)g (1.)18 b(If)12 b(the)g(function)-12 2760 y(is)i(called)h(in)g(a)e(place)i (that)d(can)i(hold)h(man)o(y)e(v)m(alues)h(\(syn)o(tactically)h(denoted)f(b)o (y)f(the)h(non-terminal)g Fl(exp)p Fn(\),)-12 2817 y(no)h(adjustmen)o(t)g(is) h(done.)910 2976 y(7)p eop %%Page: 8 8 bop -12 160 a Fd(4.6)56 b(F)-5 b(unction)19 b(De\014nitions)-12 245 y Fn(F)l(unctions)i(in)f(Lua)g(can)g(b)q(e)g(de\014ned)h(an)o(ywhere)f (in)g(the)g(global)g(lev)o(el)h(of)e(a)h(mo)q(dule.)34 b(The)20 b(syn)o(tax)f(for)-12 302 y(function)d(de\014nition)h(is:)72 374 y Fm(function)49 b Fi(!)i Fk(function)17 b Fm(name)f Fn('\(')f([)p Fm(p)n(arlist1)6 b Fn(])16 b('\)')f Fm(blo)n(ck)h Fk(end)59 503 y Fn(When)d(Lua)g(\014nds)h(a)f(function)g(de\014nition,)i(its)e(b)q(o)q (dy)h(is)g(compiled)g(to)f(in)o(termediate)g(co)q(de)h(and)f(stored,)-12 559 y(with)j(t)o(yp)q(e)f Fm(function)p Fn(,)f(in)o(to)i(the)f(global)h(v)m (ariable)g Fl(name)p Fn(.)59 615 y(P)o(arameters)e(act)g(as)h(lo)q(cal)h(v)m (ariables,)h(initialized)h(with)e(the)f(argumen)o(t)f(v)m(alues.)72 688 y Fm(p)n(arlist1)49 b Fi(!)i Fm('name')16 b Fi(f)p Fn(',')f Fm(name)s Fi(g)59 816 y Fn(Results)h(are)e(returned)h(using)h(the)e Fl(return)g Fn(statemen)o(t)g(\(see)h(Section)g(4.4.3\).)j(If)d(con)o(trol)f (reac)o(hes)h(the)-12 873 y(end)h(of)f(a)g(function)h(without)f(a)g(return)g (instruction,)h(the)f(function)h(returns)f(with)h(no)f(results.)59 929 y(There)e(is)h(a)f(sp)q(ecial)i(syn)o(tax)e(for)f(de\014nition)j(of)e (metho)q(ds,)h(that)e(is,)i(functions)g(whic)o(h)g(are)f(to)g(b)q(e)h(stored) -12 986 y(in)i(table)g(\014elds.)72 1058 y Fm(function)49 b Fi(!)i Fk(function)17 b Fm(name)f Fn(':')k Fm(name)c Fn('\(')f([)p Fm(p)n(arlist1)6 b Fn(])16 b('\)')f Fm(blo)n(ck)g Fk(end)-12 1130 y Fn(A)g(declaration)h(lik)o(e)-12 1224 y Fl(function)23 b(t:f)g(\(...\))36 1280 y(...)-12 1336 y(end)-12 1430 y Fn(is)16 b(equiv)m(alen)o(t)h(to)-12 1524 y Fl(function)23 b(temp)g(\(self,)g(...\))36 1581 y(...)-12 1637 y(end)-12 1693 y(t.f)h(=)f(temp)-12 1787 y Fn(that)18 b(is,)i(the)f(function)g(is)g(created)g(with)g(a)f(dumm)o(y)h (name)g(and)f(then)h(assigned)h(to)e(the)h(\014eld)g Fl(f)g Fn(of)f(the)-12 1844 y(table)g Fl(t)p Fn(.)24 b(Moreo)o(v)o(er,)16 b(the)h(function)h(gets)e(an)h(extra)f(formal)h(parameter)f(called)i Fl(self)p Fn(.)25 b(Notice)17 b(that)f(the)-12 1900 y(v)m(ariable)h Fl(t)e Fn(m)o(ust)f(b)q(e)i(previously)h(initialized)h(with)e(a)f(table)g(v)m (alue.)-12 2022 y Fd(4.7)56 b(F)-5 b(allbac)n(ks)-12 2108 y Fn(Lua)23 b(pro)o(vides)f(a)g(p)q(o)o(w)o(erful)h(mec)o(hanism)g(to)e(extend) i(its)g(seman)o(tics,)g(called)h Fm(fal)r(lb)n(acks)p Fn(.)40 b(Basically)l(,)26 b(a)-12 2164 y(fallbac)o(k)15 b(is)g(a)g(programmer)e (de\014ned)j(function)f(whic)o(h)g(is)g(called)h(whenev)o(er)f(Lua)g(do)q(es) g(not)f(kno)o(w)g(ho)o(w)g(to)-12 2221 y(pro)q(ceed.)59 2277 y(Lua)h(supp)q(orts)h(the)f(follo)o(wing)h(fallbac)o(ks,)f(iden)o(ti\014ed)i (b)o(y)f(the)f(giv)o(en)h(strings:)-12 2371 y Fk(\\arith")25 b Fn(called)18 b(when)g(an)e(arithmetic)i(op)q(eration)f(is)h(applied)g(to)f (non)g(n)o(umerical)h(op)q(erands,)f(or)g(when)102 2427 y(the)c(binary)g Fl(^)g Fn(op)q(eration)g(is)h(called.)21 b(Receiv)o(es)14 b(three)f(argumen)o (ts:)18 b(the)13 b(t)o(w)o(o)f(op)q(erands)h(\(the)g(second)102 2484 y(one)i(is)g(nil)h(when)f(the)f(op)q(eration)h(is)g(unary)g(min)o(us\))g (and)f(one)h(of)f(the)h(follo)o(wing)g(strings)f(describing)102 2540 y(the)h(o\013ended)h(op)q(erator:)150 2653 y Fl(add)47 b(sub)g(mul)h(div)f(pow)g(unm)102 2765 y Fn(Its)13 b(return)g(v)m(alue)h(is)f (the)g(\014nal)h(result)f(of)g(the)g(arithmetic)h(op)q(eration.)19 b(The)13 b(default)h(function)f(issues)102 2822 y(an)i(error.)910 2976 y(8)p eop %%Page: 9 9 bop -12 160 a Fk(\\order")23 b Fn(called)15 b(when)f(an)f(order)g(comparison) g(is)h(applied)h(to)e(non)g(n)o(umerical)i(or)e(non)g(string)g(op)q(erands.) 102 216 y(Receiv)o(es)18 b(three)e(argumen)o(ts:)22 b(the)16 b(t)o(w)o(o)f(op)q(erands)i(and)g(one)f(of)g(the)h(follo)o(wing)g(strings)f (describing)102 273 y(the)f(o\013ended)h(op)q(erator:)150 383 y Fl(lt)23 b(gt)h(le)f(ge)102 494 y Fn(Its)d(return)g(v)m(alue)i(is)f(the)f (\014nal)h(result)g(of)f(the)g(comparison)h(op)q(eration.)35 b(The)21 b(default)f(function)102 551 y(issues)c(an)f(error.)-12 644 y Fk(\\concat")25 b Fn(called)20 b(when)f(a)f(concatenation)h(is)g (applied)h(to)e(non)g(string)g(op)q(erands.)30 b(Receiv)o(es)20 b(the)f(t)o(w)o(o)102 700 y(op)q(erands)13 b(as)f(argumen)o(ts.)18 b(Its)13 b(return)f(v)m(alue)i(is)f(the)g(\014nal)g(result)g(of)f(the)h (concatenation)f(op)q(eration.)102 757 y(The)j(default)h(function)g(issues)g (an)f(error.)-12 850 y Fk(\\index")24 b Fn(called)13 b(when)f(Lua)g(tries)f (to)g(retriev)o(e)h(the)f(v)m(alue)i(of)e(an)g(index)i(not)e(presen)o(t)g(in) i(a)e(table.)19 b(Receiv)o(es)102 907 y(as)c(argumen)o(ts)f(the)i(table)g (and)f(the)h(index.)21 b(Its)16 b(return)f(v)m(alue)i(is)f(the)f(\014nal)h (result)g(of)f(the)g(indexing)102 963 y(op)q(eration.)20 b(The)15 b(default)h(function)g(returns)f(nil.)-12 1056 y Fk(\\gettable")25 b Fn(called)17 b(when)f(Lua)f(tries)h(to)e(index)j(a)e(non)g(table)h(v)m (alue.)21 b(Receiv)o(es)c(as)d(argumen)o(ts)h(the)g(non)102 1113 y(table)i(v)m(alue)h(and)f(the)f(index.)26 b(Its)17 b(return)f(v)m(alue) i(is)f(the)g(\014nal)h(result)f(of)f(the)h(indexing)h(op)q(eration.)102 1169 y(The)d(default)h(function)g(issues)g(an)f(error.)-12 1263 y Fk(\\settable")25 b Fn(called)16 b(when)f(Lua)g(tries)g(to)f(assign)h (indexed)h(a)e(non)h(table)g(v)m(alue.)21 b(Receiv)o(es)16 b(as)e(argumen)o(ts)102 1319 y(the)k(non)g(table)h(v)m(alue,)h(the)e(index,)h (and)g(the)f(assigned)h(v)m(alue.)29 b(The)19 b(default)f(function)h(issues)g (an)102 1375 y(error.)-12 1469 y Fk(\\function")25 b Fn(called)15 b(when)e(Lua)h(tries)f(to)f(call)i(a)f(non)g(function)h(v)m(alue.)21 b(Receiv)o(es)14 b(as)f(argumen)o(ts)f(the)h(non)102 1525 y(function)h(v)m (alue)g(and)g(the)f(argumen)o(ts)g(giv)o(en)g(in)h(the)g(original)g(call.)20 b(Its)14 b(return)f(v)m(alues)h(are)f(the)g(\014nal)102 1582 y(results)i(of)g(the)g(call)i(op)q(eration.)j(The)15 b(default)h(function)g (issues)g(an)f(error.)-12 1675 y Fk(\\gc")24 b Fn(called)18 b(during)f(garbage)e(collection.)24 b(Receiv)o(es)18 b(as)d(argumen)o(t)h (the)g(table)g(b)q(eing)i(collected.)24 b(After)102 1731 y(eac)o(h)15 b(run)g(of)g(the)g(collector)h(this)f(function)h(is)g(called)g(with)g (argumen)o(t)e(nil.)21 b(Because)16 b(this)f(function)102 1788 y(op)q(erates)j(during)i(garbage)d(collection,)k(it)e(m)o(ust)f(b)q(e)h(used) g(with)g(great)f(care,)h(and)g(programmers)102 1844 y(should)d(a)o(v)o(oid)e (the)i(creation)f(of)f(new)h(ob)s(jects)g(\(tables)g(or)f(strings\))h(in)g (this)h(function.)21 b(The)15 b(default)102 1901 y(function)h(do)q(es)f (nothing.)-12 1994 y Fk(\\error")22 b Fn(called)16 b(when)e(an)g(error)f(o)q (ccurs.)20 b(Receiv)o(es)15 b(as)e(argumen)o(t)h(a)f(string)h(describing)h (the)f(error.)19 b(The)102 2050 y(default)d(function)g(prin)o(ts)f(the)g (message)g(on)g(the)h(standard)e(error)h(output.)59 2143 y(The)e(function)h Fl(setfallback)d Fn(is)j(used)g(to)e(c)o(hange)h(a)g(fallbac)o(k)h(action.)19 b(Its)13 b(\014rst)g(argumen)o(t)f(is)i(a)e(string)-12 2199 y(describing)h(the)f(fallbac)o(k,)g(and)g(the)f(second)h(the)g(new)f (function)h(to)f(b)q(e)h(called.)20 b(It)12 b(returns)f(the)h(old)f(function) -12 2256 y(for)k(the)g(giv)o(en)h(fallbac)o(k,)f(or)g(nil)i(on)e(error.)59 2312 y(Section)h(7.4)e(sho)o(ws)h(an)g(example)h(of)f(the)g(use)g(of)g (fallbac)o(ks.)-12 2434 y Fd(4.8)56 b(Error)18 b(Handling)-12 2520 y Fn(Because)i(Lua)g(is)g(an)g(extension)g(language,)h(all)f(Lua)g (actions)f(start)g(from)g(C)g(co)q(de)h(calling)h(a)e(function)-12 2576 y(from)13 b(the)i(Lua)f(library)l(.)20 b(Whenev)o(er)15 b(an)f(error)f(o)q(ccurs)h(during)h(Lua)f(compilation)i(or)d(execution,)i(an) f(error)-12 2632 y(fallbac)o(k)h(function)g(is)g(called,)h(and)e(then)h(the)f (corresp)q(onden)o(t)g(function)i(from)d(the)h(library)h(\()p Fl(lua_dofile)p Fn(,)-12 2689 y Fl(lua_dostring)p Fn(,)d Fl(lua_call)p Fn(,)f(and)j Fl(lua_callfunction)p Fn(\))c(is)j(terminated)h(returning)f(an)g (error)f(condition.)59 2745 y(The)j(only)h(argumen)o(t)f(to)g(the)g(error)g (fallbac)o(k)h(function)g(is)g(a)f(string)h(describing)h(the)e(error)g(and)h (some)-12 2802 y(extra)k(informations,)i(lik)o(e)g(curren)o(t)f(line)i (\(when)e(the)g(error)f(is)h(at)g(compilation\))g(or)g(curren)o(t)f(function) -12 2858 y(\(when)d(the)f(error)g(is)h(at)f(execution\).)24 b(F)l(or)16 b(more)g(information)g(ab)q(out)h(an)f(error,)g(the)g(Lua)h (program)e(can)910 2976 y(9)p eop %%Page: 10 10 bop -12 160 a Fn(include)24 b(the)d(compilation)h(pragma)e Fl($debug)p Fn(.)37 b(This)22 b(pragma)e(m)o(ust)g(b)q(e)i(written)f(in)h(a)f (line)i(b)o(y)e(itself.)-12 216 y(When)13 b(an)g(error)f(o)q(ccurs)i(in)f(a)g (program)f(compiled)i(with)g(this)f(option,)g(the)g(error)f(message)h (includes)i(extra)-12 273 y(information)h(sho)o(wing)f(the)g(stac)o(k)f(of)h (calls.)59 329 y(The)d(standard)g(error)g(routine)h(only)g(prin)o(ts)g(the)f (error)g(message)g(to)g Fl(stderr)p Fn(.)18 b(If)13 b(needed,)h(it)f(is)g(p)q (ossible)-12 385 y(to)i(c)o(hange)g(the)g(error)g(fallbac)o(k)h(routine;)f (see)h(Section)g(4.7.)59 442 y(Lua)g(co)q(de)h(can)f(generate)g(an)g(error)f (b)o(y)h(calling)i(the)e(function)h Fl(error)p Fn(.)k(Its)16 b(optional)h(parameter)e(is)i(a)-12 498 y(string,)e(whic)o(h)h(is)g(used)g (as)e(the)i(error)e(message.)-12 641 y Fo(5)69 b(The)23 b(Application)e (Program)h(In)n(terface)-12 742 y Fn(This)e(section)f(describ)q(es)h(the)f (API)g(for)f(Lua,)i(that)e(is,)i(the)f(set)f(of)g(C)h(functions)g(a)o(v)m (ailable)i(to)d(the)h(host)-12 799 y(program)13 b(to)g(comm)o(unicate)h(with) g(the)f(library)l(.)21 b(The)14 b(API)g(functions)g(can)g(b)q(e)g (classi\014ed)h(in)g(the)f(follo)o(wing)-12 855 y(categories:)44 945 y(1.)22 b(executing)16 b(Lua)g(co)q(de;)44 1038 y(2.)22 b(con)o(v)o(erting)15 b(v)m(alues)h(b)q(et)o(w)o(een)g(C)f(and)g(Lua;)44 1130 y(3.)22 b(manipulating)17 b(\(reading)e(and)g(writing\))h(Lua)f(ob)s (jects;)44 1222 y(4.)22 b(calling)17 b(Lua)e(functions;)44 1315 y(5.)22 b(C)15 b(functions)h(to)e(b)q(e)i(called)h(b)o(y)e(Lua;)44 1407 y(6.)22 b(lo)q(c)o(king)16 b(Lua)g(Ob)s(jects.)-12 1497 y(All)h(API)e(functions)h(are)f(declared)i(in)f(the)f(\014le)h Fl(lua.h)p Fn(.)-12 1618 y Fd(5.1)56 b(Executing)17 b(Lua)i(Co)r(de)-12 1704 y Fn(A)d(host)g(program)e(can)i(execute)h(Lua)f(programs)f(written)h(in) h(a)e(\014le)i(or)f(in)h(a)e(string,)h(using)h(the)f(follo)o(wing)-12 1760 y(functions:)-12 1850 y Fl(int)286 b(lua_dofile)357 b(\(char)23 b(*filename\);)-12 1907 y(int)286 b(lua_dostring)309 b(\(char)23 b(*string\);)-12 1997 y Fn(Both)15 b(functions)h(return)f(an)g(error)g(co)q (de:)20 b(0,)15 b(in)h(case)f(of)g(success;)g(non)h(zero,)e(in)i(case)g(of)e (errors.)-12 2118 y Fd(5.2)56 b(Con)n(v)n(erting)19 b(V)-5 b(alues)19 b(b)r(et)n(w)n(een)f(C)h(and)g(Lua)-12 2204 y Fn(Because)24 b(Lua)g(has)g(no)g(static)f(t)o(yp)q(e)h(system,)h(all)f(v)m(alues)h(passed)f (b)q(et)o(w)o(een)g(Lua)g(and)g(C)f(ha)o(v)o(e)g(t)o(yp)q(e)-12 2260 y Fl(lua_Object)p Fn(,)14 b(whic)o(h)i(w)o(orks)e(lik)o(e)i(an)f (abstract)f(t)o(yp)q(e)i(in)g(C)f(that)f(can)i(hold)g(an)o(y)e(Lua)i(v)m (alue.)59 2317 y(Lua)24 b(has)g(automatic)f(memory)g(managemen)o(t,)i(and)f (garbage)f(collection.)48 b(Because)24 b(of)g(that,)h(a)-12 2373 y Fl(lua_Object)15 b Fn(has)h(a)f(limited)j(scop)q(e,)e(and)g(is)h(only) f(v)m(alid)i(inside)g(the)e Fm(blo)n(ck)k Fn(where)c(it)g(w)o(as)f(created.) 23 b(A)16 b(C)-12 2429 y(function)j(called)g(from)f(Lua)g(is)g(a)g(blo)q(c)o (k,)h(and)f(its)g(parameters)f(are)h(v)m(alid)h(only)g(un)o(til)g(its)f(end.) 28 b(A)18 b(go)q(o)q(d)-12 2486 y(programming)d(practice)g(is)h(to)e(con)o(v) o(ert)h(Lua)g(ob)s(jects)g(to)f(C)h(v)m(alues)h(as)f(so)q(on)g(as)g(they)g (are)g(a)o(v)m(ailable,)h(and)-12 2542 y(nev)o(er)g(to)e(store)h Fl(lua_Object)p Fn(s)e(in)j(global)g(v)m(ariables.)59 2599 y(When)h(C)f(co)q(de)i(calls)f(Lua)g(rep)q(eatedly)l(,)h(as)f(in)g(a)g(lo)q (op,)g(ob)s(jects)f(returned)h(b)o(y)g(there)f(calls)i(ma)o(y)e(acu-)-12 2655 y(m)o(ulate,)21 b(creating)g(a)f(memory)g(problem.)36 b(T)l(o)20 b(a)o(v)o(oid)g(this,)i(nested)e(blo)q(c)o(ks)h(can)g(b)q(e)g (de\014ned)h(with)e(the)-12 2712 y(functions:)-12 2802 y Fl(void)262 b(lua_beginblock)f(\(void\);)-12 2858 y(void)h(lua_endblock)309 b(\(void\);)899 2976 y Fn(10)p eop %%Page: 11 11 bop -12 160 a Fn(After)15 b(the)g(end)h(of)f(the)g(blo)q(c)o(k,)h(all)g Fl(lua_Object)p Fn('s)d(created)i(inside)i(it)f(are)f(released.)59 216 y(T)l(o)g(c)o(hec)o(k)g(the)g(t)o(yp)q(e)h(of)e(a)h Fl(lua_Object)p Fn(,)f(the)h(follo)o(wing)h(function)g(is)g(a)o(v)m(ailable:)-12 310 y Fl(int)286 b(lua_type)405 b(\(lua_Object)22 b(object\);)-12 404 y Fn(plus)16 b(the)g(follo)o(wing)g(macros:)-12 498 y Fl(int)286 b(lua_isnil)381 b(\(lua_Object)22 b(object\);)-12 554 y(int)286 b(lua_isnumber)309 b(\(lua_Object)22 b(object\);)-12 610 y(int)286 b(lua_isstring)309 b(\(lua_Object)22 b(object\);)-12 667 y(int)286 b(lua_istable)333 b(\(lua_Object)22 b(object\);)-12 723 y(int)286 b(lua_iscfunction)237 b(\(lua_Object)22 b(object\);)-12 780 y(int)286 b(lua_isuserdata)261 b(\(lua_Object)22 b(object\);)-12 874 y Fn(All)17 b(macros)d(return)h(1)g(if)h(the)f(ob)s(ject)g(has)g(the)g (giv)o(en)h(t)o(yp)q(e,)f(and)g(0)g(otherwise.)59 930 y(The)f(function)h Fl(lua_type)e Fn(can)h(b)q(e)h(used)g(to)e(distinguish)k(b)q(et)o(w)o(een)d (di\013eren)o(t)g(kinds)i(of)d(user)i(data;)e(see)-12 987 y(b)q(elo)o(w.)59 1043 y(T)l(o)i(translate)f(a)h(v)m(alue)i(from)d(t)o(yp)q(e)h Fl(lua_Object)f Fn(to)h(a)g(sp)q(eci\014c)i(C)e(t)o(yp)q(e,)g(the)g (programmer)f(can)h(use:)-12 1137 y Fl(double)214 b(lua_getnumber)285 b(\(lua_Object)22 b(object\);)-12 1193 y(char)238 b(*lua_getstring)285 b(\(lua_Object)22 b(object\);)-12 1250 y(lua_CFunction)46 b(lua_getcfunction) 213 b(\(lua_Object)22 b(object\);)-12 1306 y(void)238 b(*lua_getuserdata)f (\(lua_Object)22 b(object\);)-12 1400 y(lua_getnumber)16 b Fn(con)o(v)o(erts)h(a)h Fl(lua_Object)e Fn(to)h(a)h(\015oat.)27 b(This)18 b Fl(lua_Object)f Fn(m)o(ust)g(b)q(e)i(a)e(n)o(um)o(b)q(er)h(or)g (a)-12 1456 y(string)d(con)o(v)o(ertible)i(to)d(n)o(um)o(b)q(er)i(\(see)f (Section)h(4.2\);)d(otherwise,)i(the)h(function)g(returns)f(0.)59 1513 y Fl(lua_getstring)f Fn(con)o(v)o(erts)h(a)h Fl(lua_Object)e Fn(to)i(a)g(string)f(\()p Fl(char)23 b(*)p Fn(\).)f(This)17 b Fl(lua_Object)d Fn(m)o(ust)i(b)q(e)h(a)-12 1569 y(string)h(or)g(a)g(n)o(um) o(b)q(er;)i(otherwise,)f(the)f(function)i(returns)e(0)g(\(the)g(n)o(ull)i(p)q (oin)o(ter\).)29 b(This)19 b(function)g(do)q(es)-12 1626 y(not)14 b(create)g(a)g(new)g(string,)g(but)g(returns)g(a)g(p)q(oin)o(ter)h(to)e(a)h (string)g(inside)i(the)e(Lua)h(en)o(vironmen)o(t.)20 b(Because)-12 1682 y(Lua)14 b(has)f(garbage)f(collection,)k(there)d(is)h(no)f(guaran)o(tee) g(that)f(suc)o(h)i(p)q(oin)o(ter)g(will)h(b)q(e)f(v)m(alid)h(after)d(the)i (blo)q(c)o(k)-12 1739 y(ends.)59 1795 y Fl(lua_getcfunction)h Fn(con)o(v)o(erts)i(a)g Fl(lua_Object)g Fn(to)f(a)i(C)f(function.)28 b(This)18 b Fl(lua_Object)f Fn(m)o(ust)g(ha)o(v)o(e)-12 1852 y(t)o(yp)q(e)c Fm(CF)m(unction)s Fn(;)f(otherwise,)i(the)f(function)g (returns)g(0)g(\(the)f(n)o(ull)j(p)q(oin)o(ter\).)k(The)13 b(t)o(yp)q(e)g Fl(lua_CFunction)-12 1908 y Fn(is)j(explained)h(in)f(Section)g (5.5.)59 1965 y Fl(lua_getuserdata)k Fn(con)o(v)o(erts)h(a)h Fl(lua_Object)e Fn(to)i Fl(void*)p Fn(.)40 b(This)22 b Fl(lua_Object)f Fn(m)o(ust)h(ha)o(v)o(e)f(t)o(yp)q(e)-12 2021 y Fm(user)n(data)s Fn(;)16 b(otherwise,)f(the)g(function)h(returns)f(0)g(\(the)g(n)o(ull)i(p)q (oin)o(ter\).)59 2077 y(The)12 b(rev)o(erse)g(pro)q(cess,)h(that)e(is,)i (passing)g(a)f(sp)q(eci\014c)i(C)d(v)m(alue)j(to)d(Lua,)i(is)g(done)f(b)o(y)g (using)h(the)g(follo)o(wing)-12 2134 y(functions:)-12 2228 y Fl(void)262 b(lua_pushnumber)f(\(double)23 b(n\);)-12 2284 y(void)262 b(lua_pushstring)f(\(char)23 b(*s\);)-12 2341 y(void)262 b(lua_pushliteral)237 b(\(char)23 b(*s\);)-12 2397 y(void)262 b(lua_pushcfunction)189 b(\(lua_CFunction)22 b(f\);)-12 2454 y(void)262 b(lua_pushusertag)237 b(\(void)23 b(*u,)g(int)h(tag\);)-12 2547 y Fn(plus)16 b(the)g(macro:)-12 2641 y Fl(void)262 b(lua_pushuserdata) 213 b(\(void)23 b(*u\);)-12 2735 y Fn(All)16 b(of)d(them)h(receiv)o(e)h(a)f (C)g(v)m(alue,)h(con)o(v)o(ert)f(it)g(to)g(a)f Fl(lua_Object)p Fn(,)g(and)h(lea)o(v)o(e)h(their)f(results)h(on)f(the)g(top)g(of)-12 2791 y(the)h(Lua)f(stac)o(k,)g(where)g(it)h(can)g(b)q(e)g(assigned)g(to)e(a)h (v)m(ariable,)i(passed)f(as)f(paramen)o(ter)f(to)h(a)g(Lua)h(function,)-12 2848 y(etc)f(\(see)g(b)q(elo)o(w\).)20 b Fl(lua_pushliteral)11 b Fn(is)k(lik)o(e)g Fl(lua_pushstring)p Fn(,)d(but)i(also)g(puts)f(the)h (string)g(in)h(the)f(Lua)899 2976 y(11)p eop %%Page: 12 12 bop -12 160 a Fn(literal)17 b(table.)k(This)16 b(a)o(v)o(oids)f(the)h(string) f(to)g(b)q(e)h(garbage)f(collected,)h(and)g(therefore)f(has)h(a)f(b)q(etter)g (o)o(v)o(erall)-12 216 y(p)q(erformance.)20 b(As)14 b(a)h(rule,)g(when)g(the) f(string)h(to)e(b)q(e)j(pushed)f(is)g(a)f(literal,)i Fl(lua_pushliteral)c Fn(should)k(b)q(e)-12 273 y(used.)59 329 y(User)g(data)f(can)i(ha)o(v)o(e)e (di\013eren)o(t)i(tags,)e(whose)h(seman)o(tics)g(are)g(de\014ned)i(b)o(y)e (the)g(host)g(program.)21 b(An)o(y)-12 385 y(p)q(ositiv)o(e)e(in)o(teger)f (can)g(b)q(e)g(used)h(to)e(tag)g(a)g(user)h(data.)27 b(When)18 b(a)g(user)g(data)f(is)h(retriev)o(ed,)h(the)e(function)-12 442 y Fl(lua_type)d Fn(can)i(b)q(e)f(used)h(to)f(get)g(its)g(tag.)59 498 y(T)l(o)d(complete)h(the)g(set,)g(the)f(v)m(alue)i Fk(nil)g Fn(or)e(a)g Fl(lua_Object)g Fn(can)g(also)h(b)q(e)g(pushed)h(on)o(to)e(the)g (stac)o(k,)g(with:)-12 588 y Fl(void)262 b(lua_pushnil)333 b(\(void\);)-12 644 y(void)262 b(lua_pushobject)f(\(lua_Object)22 b(object\);)-12 765 y Fd(5.3)56 b(Manipulating)18 b(Lua)h(Ob)s(jects)-12 851 y Fn(T)l(o)c(read)g(the)h(v)m(alue)g(of)f(an)o(y)g(global)g(Lua)h(v)m (ariable,)g(one)f(can)h(use)f(the)h(function:)-12 940 y Fl(lua_Object)118 b(lua_getglobal)285 b(\(char)23 b(*varname\);)-12 1029 y Fn(T)l(o)15 b(store)g(a)f(v)m(alue)j(previously)f(pushed)h(on)o(to)d(the)h(stac)o(k)g(in) h(a)f(global)g(v)m(ariable,)i(there)e(is)h(the)f(function:)-12 1119 y Fl(void)262 b(lua_storeglobal)237 b(\(char)23 b(*varname\);)59 1208 y Fn(T)l(ables)16 b(can)f(also)g(b)q(e)h(manipulated)h(via)e(the)g(API.) h(The)f(function)-12 1297 y Fl(lua_Object)118 b(lua_getsubscript)213 b(\(void\);)-12 1386 y Fn(exp)q(ects)15 b(on)g(the)f(stac)o(k)g(a)g(table)h (and)g(an)f(index,)i(and)e(returns)h(the)f(con)o(ten)o(ts)g(of)g(the)h(table) g(at)f(that)f(index.)-12 1443 y(As)22 b(in)h(Lua,)g(if)f(the)g(\014rst)g(ob)s (ject)f(is)h(not)g(a)f(table,)j(or)d(the)h(index)h(is)g(not)e(presen)o(t)h (in)h(the)f(table,)h(the)-12 1499 y(corresp)q(onden)o(t)16 b(fallbac)o(k)g(is)f(called.)59 1556 y(F)l(or)f(compatibilit)o(y)j(with)f (previous)g(v)o(ersions)f(of)g(the)g(API,)g(the)g(follo)o(wing)h(macros)f (are)g(supp)q(orted:)-12 1645 y Fl(lua_Object)118 b(lua_getindexed)261 b(\(lua_Object)22 b(table,)h(float)g(index\);)-12 1702 y(lua_Object)118 b(lua_getfield)309 b(\(lua_Object)22 b(table,)h(char)g(*field\);)-12 1791 y Fn(The)16 b(\014rst)e(one)i(is)f(used)h(for)f(n)o(umeric)h(indices,)h (while)f(the)g(second)f(can)h(b)q(e)g(used)f(for)g(an)o(y)g(string)g(index.) 59 1847 y(T)l(o)h(store)g(a)h(v)m(alue)h(in)g(an)f(index,)h(the)f(program)e (m)o(ust)i(push)g(on)o(to)f(the)h(stac)o(k)f(the)h(table,)g(the)g(index,)-12 1904 y(and)f(the)f(v)m(alue,)h(and)f(then)h(call)g(the)f(function:)-12 1993 y Fl(void)24 b(lua_storesubscript)d(\(void\);)-12 2082 y Fn(Again,)15 b(the)h(corresp)q(onden)o(t)f(fallbac)o(k)h(is)g(called)h(if)e (needed.)59 2139 y(Finally)l(,)h(the)g(function)-12 2228 y Fl(lua_Object)118 b(lua_createtable)237 b(\(void\);)-12 2317 y Fn(creates)15 b(a)g(new)g(table.)59 2374 y Fm(Ple)n(ase)g(Notic)n(e:)24 b Fn(Most)15 b(functions)h(from)g(the)f(Lua)i(library)f(receiv)o(e)h (parameters)e(through)h(the)f(stac)o(k.)-12 2430 y(Because)k(other)f (functions)h(also)f(use)h(the)f(stac)o(k,)g(it)g(is)h(imp)q(ortan)o(t)f(that) f(these)i(parameters)e(b)q(e)i(pushed)-12 2487 y(just)c(b)q(efore)g(the)f (corresp)q(onden)o(t)h(call,)h(without)f(in)o(termediate)g(calls)h(to)e(the)h (Lua)g(library)l(.)21 b(F)l(or)14 b(instance,)-12 2543 y(supp)q(ose)i(the)f (user)h(w)o(an)o(ts)e(the)h(v)m(alue)i(of)d Fl(a[i])p Fn(.)20 b(A)15 b(simplistic)i(solution)f(w)o(ould)g(b)q(e:)36 2632 y Fl(/*)24 b(Warning:)e(WRONG)h(CODE)h(*/)36 2689 y(lua_Object)e(result;)36 2745 y(lua_pushobject\(lua_getglo)o(bal\("a"\))o(\);)45 b(/*)23 b(push)h(table)f(*/)36 2802 y(lua_pushobject\(lua_getglo)o(bal\("i"\))o(\);) 45 b(/*)23 b(push)h(index)f(*/)36 2858 y(result)g(=)h(lua_getsubscript\(\);) 899 2976 y Fn(12)p eop %%Page: 13 13 bop -12 160 a Fn(Ho)o(w)o(ev)o(er,)12 b(the)g(call)h Fl(lua_getglobal\("i"\)) c Fn(mo)q(di\014es)14 b(the)e(stac)o(k,)f(and)h(in)o(v)m(alidates)i(the)e (previous)h(pushed)-12 216 y(v)m(alue.)21 b(A)16 b(correct)e(solution)i (could)g(b)q(e:)36 310 y Fl(lua_Object)22 b(index,)h(result;)36 366 y(index)g(=)h(lua_getglobal\("i"\);)36 423 y(lua_pushobject\(lua_getglo)o (bal\("a"\))o(\);)45 b(/*)23 b(push)h(table)f(*/)36 479 y (lua_pushobject\(index\);)355 b(/*)23 b(push)h(index)f(*/)36 536 y(result)g(=)h(lua_getsubscript\(\);)-12 657 y Fd(5.4)56 b(Calling)18 b(Lua)h(F)-5 b(unctions)-12 743 y Fn(F)l(unctions)12 b(de\014ned)h(in)f(Lua)g(b)o(y)f(a)h(mo)q(dule)g(executed)g(with)g Fl(dofile)f Fn(or)g Fl(dostring)f Fn(can)h(b)q(e)i(called)g(from)d(the)-12 800 y(host)h(program.)17 b(This)12 b(is)g(done)g(using)g(the)f(follo)o(wing)h (proto)q(col:)18 b(\014rst,)11 b(the)g(argumen)o(ts)g(to)f(the)i(function)g (are)-12 856 y(pushed)17 b(on)o(to)e(the)h(Lua)g(stac)o(k)f(\(see)h(Section)g (5.2\),)f(in)h(direct)h(order,)e(i.e.,)h(the)f(\014rst)h(argumen)o(t)f(is)h (pushed)-12 913 y(\014rst.)24 b(Again,)18 b(it)f(is)g(imp)q(ortan)o(t)f(to)g (emphasize)i(that,)e(during)i(this)f(phase,)g(no)g(other)f(Lua)i(function)f (can)-12 969 y(b)q(e)f(called.)59 1026 y(Then,)f(the)g(function)h(is)g (called)h(using)-12 1119 y Fl(int)286 b(lua_call)405 b(\(char)23 b(*functionname\);)-12 1213 y Fn(or)-12 1307 y Fl(int)286 b(lua_callfunction) 213 b(\(lua_Object)22 b(function\);)-12 1401 y Fn(Both)16 b(functions)g (return)g(an)f(error)g(co)q(de:)21 b(0,)15 b(in)i(case)e(of)g(success;)h(non) g(zero,)f(in)i(case)f(of)f(errors.)20 b(Finally)l(,)-12 1457 y(the)15 b(returned)g(v)m(alues)g(\(a)f(Lua)h(function)h(ma)o(y)e(return)g (man)o(y)g(v)m(alues\))i(can)e(b)q(e)h(retriev)o(ed)g(with)g(the)g(macro)-12 1551 y Fl(lua_Object)118 b(lua_getresult)309 b(\(int)23 b(number\);)-12 1645 y(number)15 b Fn(is)g(the)h(order)f(of)f(the)i(result,)f(starting)f (with)i(1.)k(When)15 b(called)i(with)f(a)f(n)o(um)o(b)q(er)g(larger)g(than)g (the)-12 1701 y(actual)h(n)o(um)o(b)q(er)f(of)g(results,)g(this)h(function)g (returns)f Fl(LUA_NOOBJECT)p Fn(.)59 1758 y(Tw)o(o)c(sp)q(ecial)i(Lua)g (functions)f(ha)o(v)o(e)g(exclusiv)o(e)h(in)o(terfaces:)19 b Fl(error)11 b Fn(and)h Fl(setfallback)p Fn(.)17 b(A)12 b(C)f(function)-12 1814 y(can)16 b(generate)e(a)h(Lua)h(error)e(calling)j(the)f(function)-12 1908 y Fl(void)24 b(lua_error)e(\(char)h(*message\);)-12 2002 y Fn(This)c(function)h(nev)o(er)e(returns.)30 b(If)19 b(the)g(C)f(function)h (has)g(b)q(een)g(called)i(from)c(Lua,)j(the)e(corresp)q(onding)-12 2058 y(Lua)g(execution)h(terminates,)f(as)f(if)i(an)e(error)g(had)h(o)q (ccured)h(inside)h(Lua)e(co)q(de.)28 b(Otherwise,)19 b(the)f(whole)-12 2115 y(program)c(terminates.)59 2171 y(F)l(allbac)o(ks)i(can)f(b)q(e)h(c)o (hanged)f(with:)-12 2265 y Fl(lua_Object)23 b(lua_setfallback)e(\(char)j (*name,)f(lua_CFunction)f(fallback\);)-12 2359 y Fn(The)17 b(\014rst)g(parameter)f(is)h(the)g(fallbac)o(k)h(name,)e(and)h(the)g(second)h (a)e(CF)l(unction)i(to)e(b)q(e)h(used)h(as)e(the)h(new)-12 2415 y(fallbac)o(k.)32 b(This)19 b(function)h(returns)e(a)h Fl(lua_Object)p Fn(,)f(whic)o(h)h(is)h(the)f(old)g(fallbac)o(k)h(v)m(alue,)g (or)e(nil)j(on)d(fail)-12 2472 y(\(in)o(v)m(alid)f(fallbac)o(k)f(name\).)k (This)c(old)f(v)m(alue)i(can)e(b)q(e)h(used)g(for)e(c)o(haining)j(fallbac)o (ks.)59 2528 y(An)e(example)h(of)f(C)g(co)q(de)h(calling)h(a)e(Lua)g (function)h(is)g(sho)o(wn)f(in)h(Section)g(7.6.)899 2976 y(13)p eop %%Page: 14 14 bop -12 160 a Fd(5.5)56 b(C)19 b(F)-5 b(unctions)-12 245 y Fn(T)l(o)15 b(register)g(a)g(C)g(function)h(to)f(Lua,)g(there)g(is)h(the)f (follo)o(wing)h(macro:)-12 322 y Fl(#define)23 b(lua_register\(n,f\))165 b(\(lua_pushcfunction\(f\),)21 b(lua_storeglobal\(n\)\))-12 378 y(/*)j(char)f(*n;)214 b(*/)-12 435 y(/*)24 b(lua_CFunction)e(f;)h(*/)-12 511 y Fn(whic)o(h)d(receiv)o(es)f(the)g(name)g(the)g(function)g(will)i(ha)o (v)o(e)d(in)h(Lua,)h(and)f(a)f(p)q(oin)o(ter)i(to)e(the)g(function.)32 b(This)-12 567 y(p)q(oin)o(ter)16 b(m)o(ust)f(ha)o(v)o(e)f(t)o(yp)q(e)i Fl(lua_CFunction)p Fn(,)d(whic)o(h)j(is)f(de\014ned)i(as)-12 644 y Fl(typedef)23 b(void)g(\(*lua_CFunction\))f(\(void\);)-12 720 y Fn(that)15 b(is,)g(a)g(p)q(oin)o(ter)h(to)e(a)h(function)h(with)g(no)f (parameters)f(and)h(no)h(results.)59 776 y(In)j(order)f(to)g(comm)o(unicate)g (prop)q(erly)i(with)e(Lua,)i(a)e(C)g(function)h(m)o(ust)f(follo)o(w)h(a)f (proto)q(col,)g(whic)o(h)-12 833 y(de\014nes)e(the)g(w)o(a)o(y)e(parameters)g (and)i(results)f(are)g(passed.)59 889 y(T)l(o)g(access)g(its)g(argumen)o(ts,) f(a)h(C)g(function)h(calls:)-12 965 y Fl(lua_Object)118 b(lua_getparam)309 b(\(int)23 b(number\);)-12 1042 y(number)17 b Fn(starts)g(with)h(1)g(to)f (get)g(the)h(\014rst)g(argumen)o(t.)27 b(When)18 b(called)i(with)e(a)f(n)o (um)o(b)q(er)i(larger)e(than)h(the)-12 1098 y(actual)d(n)o(um)o(b)q(er)g(of)f (argumen)o(ts,)f(this)j(function)f(returns)f Fl(LUA_NOOBJECT)p Fn(.)f(In)i(this)g(w)o(a)o(y)l(,)f(it)g(is)i(p)q(ossible)g(to)-12 1155 y(write)f(functions)h(that)f(w)o(ork)f(with)i(a)f(v)m(ariable)h(n)o(um)o (b)q(er)g(of)e(parameters.)59 1211 y(T)l(o)j(return)h(v)m(alues,)i(a)d(C)h (function)h(just)f(pushes)g(them)g(on)o(to)f(the)i(stac)o(k,)e(in)i(direct)g (order;)f(see)h(Sec-)-12 1268 y(tion)d(5.2.)j(Lik)o(e)d(a)f(Lua)g(function,)h (a)f(C)g(function)h(called)g(b)o(y)g(Lua)f(can)g(also)h(return)f(man)o(y)f (results.)59 1324 y(Section)i(7.5)e(presen)o(ts)h(an)g(example)h(of)f(a)g(CF) l(unction.)-12 1442 y Fd(5.6)56 b(Lo)r(c)n(king)17 b(Lua)i(Ob)s(jects)-12 1528 y Fn(As)14 b(already)g(noted,)g Fl(lua_Object)p Fn(s)f(are)g(v)o (olatile.)21 b(If)14 b(the)g(C)g(co)q(de)g(needs)h(to)e(k)o(eep)i(a)e Fl(lua_Object)g Fn(outside)-12 1585 y(blo)q(c)o(k)f(b)q(oundaries,)g(it)f (has)g(to)f Fm(lo)n(ck)g Fn(the)h(ob)s(ject.)18 b(The)11 b(routines)g(to)f (manipulate)i(lo)q(c)o(king)g(are)e(the)h(follo)o(wing:)-12 1661 y Fl(int)191 b(lua_lock)22 b(\(void\);)-12 1717 y(lua_Object)h (lua_getlocked)46 b(\(int)23 b(ref\);)-12 1774 y(void)167 b(lua_pushlocked)22 b(\(int)h(ref\);)-12 1830 y(void)167 b(lua_unlock)22 b(\(int)h(ref\);)-12 1907 y Fn(The)f(function)h Fl(lua_lock)d Fn(lo)q(c)o(ks)i(the)g(ob)s(ject)f (whic)o(h)h(are)g(on)f(the)h(top)f(of)g(the)h(stac)o(k,)g(and)g(returns)g(a) -12 1963 y(reference)g(to)f(it.)37 b(Whenev)o(er)22 b(the)f(lo)q(c)o(k)o(ed)h (ob)s(ject)f(is)g(needed,)j(a)d(call)h(to)e Fl(lua_getlocked)g Fn(returns)h(a)-12 2019 y(handle)c(to)f(it,)g(while)h Fl(lua_pushlocked)d Fn(pushes)j(the)f(handle)h(on)f(the)g(stac)o(k.)22 b(When)16 b(a)g(lo)q(c)o(k)o(ed)g(ob)s(ject)g(is)-12 2076 y(no)f(longer)h(needed,)g(it) f(can)h(b)q(e)g(unlo)q(c)o(k)o(ed)g(with)g(a)e(call)j(to)d Fl(lua_unlock)p Fn(.)-12 2216 y Fo(6)69 b(Prede\014ned)23 b(F)-6 b(unctions)23 b(and)g(Libraries)-12 2317 y Fn(The)12 b(set)f(of)g (prede\014ned)i(functions)f(in)g(Lua)g(is)f(small)h(but)g(p)q(o)o(w)o(erful.) 19 b(Most)10 b(of)h(them)g(pro)o(vide)h(features)f(that)-12 2374 y(allo)o(ws)16 b(some)f(degree)h(of)f(re\015exivit)o(y)h(in)h(the)e (language.)21 b(Man)o(y)15 b(of)g(these)h(features)f(cannot)g(b)q(e)h(sim)o (ulated)-12 2430 y(with)g(the)f(rest)g(of)g(the)g(Language)g(nor)g(with)g (the)h(standard)f(API.)59 2487 y(The)21 b(libraries,)i(on)d(the)h(other)f (hand,)i(pro)o(vide)g(useful)f(routines)g(that)f(are)h(implemen)o(ted)h (directly)-12 2543 y(through)13 b(the)f(standard)h(API.)f(Therefore,)h(they)g (are)f(not)g(necessary)h(to)f(the)h(language,)g(and)g(are)f(pro)o(vided)-12 2600 y(as)j(separated)g(C)g(mo)q(dules.)21 b(Curren)o(tly)15 b(there)g(are)g(three)h(standard)e(libraries:)56 2676 y Fi(\017)23 b Fn(string)15 b(manipulation;)56 2763 y Fi(\017)23 b Fn(mathematical)15 b(functions)h(\(sin,)f(cos,)g(etc\);)56 2849 y Fi(\017)23 b Fn(input)16 b(and)f(output;)899 2976 y(14)p eop %%Page: 15 15 bop -12 160 a Fd(6.1)56 b(Prede\014ned)18 b(F)-5 b(unctions)-12 245 y Fl(dofile)23 b(\(filename\))-12 331 y Fn(This)e(function)g(receiv)o(es) g(a)f(\014le)h(name,)g(op)q(ens)f(it)h(and)f(executes)h(its)f(con)o(ten)o(ts) g(as)f(a)h(Lua)g(mo)q(dule.)36 b(It)-12 388 y(returns)15 b(1)g(if)h(there)f (are)g(no)g(errors,)f Fk(nil)i Fn(otherwise.)-12 508 y Fl(dostring)23 b(\(string\))-12 594 y Fn(This)17 b(function)f(executes)h(a)e(giv)o(en)i (string)e(as)h(a)f(Lua)i(mo)q(dule.)23 b(It)16 b(returns)f(1)h(if)g(there)g (are)g(no)f(errors,)g Fk(nil)-12 650 y Fn(otherwise.)-12 770 y Fl(next)24 b(\(table,)e(index\))-12 856 y Fn(This)16 b(function)h(allo)o (ws)e(a)g(program)g(to)g(en)o(umerate)g(all)h(\014elds)h(of)e(a)g(table.)21 b(Its)16 b(\014rst)f(argumen)o(t)g(is)h(a)f(table)-12 912 y(and)i(its)g (second)g(argumen)o(t)f(is)h(an)g(index)g(in)h(this)f(table;)g(this)g(index)h (can)f(b)q(e)g(a)g(n)o(um)o(b)q(er)g(or)f(a)g(string.)24 b(It)-12 969 y(returns)15 b(the)f(next)h(index)h(of)e(the)g(table)h(and)g(the)g(v)m (alue)h(asso)q(ciated)e(with)h(the)g(index.)21 b(When)15 b(called)h(with)-12 1025 y Fk(nil)g Fn(as)e(its)g(second)h(argumen)o(t,)f(the)g(function)i (returns)e(the)h(\014rst)f(index)i(of)e(the)g(table)h(\(and)f(its)h(asso)q (ciated)-12 1082 y(v)m(alue\).)21 b(When)16 b(called)g(with)g(the)f(last)g (index,)h(or)f(with)h Fk(nil)g Fn(in)g(an)f(empt)o(y)g(table,)g(it)h(returns) f Fk(nil)p Fn(.)59 1138 y(In)h(Lua)h(there)f(is)g(no)g(declaration)h(of)e (\014elds;)i(seman)o(tically)l(,)h(there)e(is)g(no)g(di\013erence)h(b)q(et)o (w)o(een)f(a)g(\014eld)-12 1195 y(not)i(presen)o(t)f(in)i(a)f(table)g(or)f(a) h(\014eld)h(with)f(v)m(alue)h Fk(nil)p Fn(.)29 b(Therefore,)18 b(the)f(function)i(only)f(considers)h(\014elds)-12 1251 y(with)d(non)f(nil)i (v)m(alues.)k(The)16 b(order)f(the)g(indices)j(are)d(en)o(umerated)g(are)g (not)g(sp)q(eci\014ed,)i Fm(even)f(for)g(numeric)-12 1308 y(indic)n(es)p Fn(.)59 1364 y(See)g(Section)g(7.1)e(for)g(an)i(example)g(of)e(the)i(use)f (of)g(this)h(function.)-12 1484 y Fl(nextvar)23 b(\(name\))-12 1570 y Fn(This)14 b(function)g(is)g(similar)g(to)e(the)i(function)g Fl(next)p Fn(,)e(but)i(it)f(iterates)g(o)o(v)o(er)f(the)i(global)f(v)m (ariables.)21 b(Its)13 b(single)-12 1626 y(argumen)o(t)18 b(is)i(the)f(name)g (of)g(a)f(global)i(v)m(ariable,)h(or)d Fk(nil)i Fn(to)f(get)f(a)h(\014rst)f (name.)32 b(Similarly)21 b(to)d Fl(next)p Fn(,)h(it)-12 1683 y(returns)e(the)f(name)h(of)f(another)g(v)m(ariable)i(and)f(its)g(v)m(alue,)h (or)e Fk(nil)h Fn(if)h(there)e(are)h(no)f(more)g(v)m(ariables.)26 b(See)-12 1739 y(Section)16 b(7.1)f(for)f(an)h(example)h(of)f(the)g(use)h(of) f(this)g(function.)-12 1859 y Fl(print)23 b(\(e1,)h(e2,)f(...\))-12 1945 y Fn(This)13 b(function)g(receiv)o(es)g(an)o(y)f(n)o(um)o(b)q(er)g(of)g (argumen)o(ts,)g(and)g(prin)o(ts)g(their)h(v)m(alues)h(in)f(a)e(reasonable)i (format.)-12 2002 y(Eac)o(h)h(v)m(alue)i(is)e(prin)o(ted)h(in)g(a)f(new)h (line.)21 b(This)15 b(function)g(is)f(not)g(in)o(tended)i(for)e(formatted)f (output,)g(but)i(as)-12 2058 y(a)g(quic)o(k)h(w)o(a)o(y)e(to)h(sho)o(w)g(a)g (v)m(alue,)h(for)f(instance)h(for)e(error)h(messages)g(or)f(debugging.)22 b(See)15 b(Section)i(6.4)d(for)-12 2114 y(functions)i(for)f(formatted)f (output.)-12 2235 y Fl(tonumber)23 b(\(e\))-12 2320 y Fn(This)18 b(function)g(receiv)o(es)f(one)g(argumen)o(t,)g(and)g(tries)g(to)f(con)o(v)o (ert)h(it)g(to)f(a)h(n)o(um)o(b)q(er.)25 b(If)18 b(the)f(argumen)o(t)f(is)-12 2377 y(already)e(a)f(n)o(um)o(b)q(er)h(or)f(a)g(string)g(con)o(v)o(ertible)h (to)f(a)g(n)o(um)o(b)q(er)h(\(see)f(Section)i(4.2\),)d(it)h(returns)h(that)e (n)o(um)o(b)q(er;)-12 2433 y(otherwise,)j(it)h(returns)f Fk(nil)p Fn(.)-12 2553 y Fl(type)24 b(\(v\))-12 2639 y Fn(This)16 b(function)g(allo)o (ws)f(Lua)h(to)e(test)h(the)g(t)o(yp)q(e)g(of)g(a)f(v)m(alue.)21 b(It)16 b(receiv)o(es)g(one)f(argumen)o(t,)f(and)h(returns)g(its)-12 2696 y(t)o(yp)q(e,)h(co)q(ded)g(as)g(a)f(string.)21 b(The)16 b(p)q(ossible)i(results)e(of)f(this)h(function)g(are)g Fl('nil')p Fn(,)f Fl('number')p Fn(,)f Fl('string')p Fn(,)-12 2752 y Fl('table')p Fn(,)g Fl('cfunction')p Fn(,)f Fl('function')p Fn(,)h(and)h Fl('userdata')p Fn(.)899 2976 y(15)p eop %%Page: 16 16 bop -12 160 a Fl(error)23 b(\(message\))-12 245 y Fn(This)16 b(function)h(issues)f(an)f(error)g(message)g(and)h(terminates)g(the)f(last)h (called)h(function)f(from)f(the)h(library)-12 302 y(\()p Fl(lua_dofile)p Fn(,)d Fl(lua_dostring)p Fn(,)g Fc(:)8 b(:)g(:)e Fn(\).)20 b(It)15 b(nev)o(er)g(returns.)-12 422 y Fl(setglobal)23 b(\(name,)g(value\)) -12 508 y Fn(This)18 b(function)g(assigns)g(the)f(giv)o(en)h(v)m(alue)h(to)d (a)h(global)i(v)m(ariable.)27 b(The)18 b(string)f Fl(name)g Fn(do)q(es)h(not)f(need)h(to)-12 564 y(b)q(e)g(a)f(syn)o(tactically)h(v)m (alid)h(v)m(ariable)g(name.)26 b(Therefore,)18 b(this)g(function)g(can)f(set) g(global)h(v)m(ariables)h(with)-12 621 y(strange)c(names)g(lik)o(e)h Fl(m)24 b(v)g(1)15 b Fn(or)f Fl(34)p Fn(.)-12 741 y Fl(getglobal)23 b(\(name\))-12 827 y Fn(This)18 b(function)f(retriev)o(es)g(the)g(v)m(alue)h (of)f(a)f(global)i(v)m(ariable.)26 b(The)17 b(string)g Fl(name)f Fn(do)q(es)i(not)e(need)i(to)e(b)q(e)i(a)-12 883 y(syn)o(tactically)e(v)m (alid)h(v)m(ariable)g(name.)-12 1003 y Fl(setfallback)23 b(\(fallbackname,)e (newfallback\))-12 1089 y Fn(This)f(function)g(sets)f(a)g(new)g(fallbac)o(k)h (function)g(to)e(the)h(giv)o(en)h(fallbac)o(k.)32 b(It)20 b(returns)f(the)g (old)h(fallbac)o(k)-12 1145 y(function,)c(or)f(nil)h(in)g(case)f(of)g(error)g (\(in)o(v)m(alid)i(fallbac)o(k)f(name,)f(or)f Fl(newfallback)g Fn(is)i(not)e(a)h(function\).)-12 1267 y Fd(6.2)56 b(String)18 b(Manipulation)-12 1353 y Fn(This)e(library)f(pro)o(vides)h(generic)g (functions)f(for)f(string)h(manipulation,)h(suc)o(h)g(as)e(\014nding)i(and)f (extracting)-12 1409 y(substrings.)20 b(When)14 b(indexing)h(a)e(string,)g (the)h(\014rst)f(c)o(haracter)f(has)i(p)q(osition)g(1.)19 b(See)14 b(Section)g(7.2)f(for)g(some)-12 1466 y(examples)j(on)f(string)g (manipulation)i(in)f(Lua.)-12 1586 y Fl(strfind)23 b(\(str,)g(substr,)g ([init,)g([end]]\))-12 1672 y Fn(Receiv)o(es)15 b(t)o(w)o(o)d(string)i (argumen)o(ts,)e(and)i(returns)f(a)g(n)o(um)o(b)q(er.)20 b(This)14 b(n)o(um)o(b)q(er)g(indicates)h(the)e(\014rst)g(p)q(osition)-12 1728 y(where)20 b(the)f(second)h(argumen)o(t)e(app)q(ears)i(in)g(the)f (\014rst)g(argumen)o(t.)31 b(If)19 b(the)h(second)g(argumen)o(t)e(is)i(not)f (a)-12 1785 y(substring)i(of)f(the)g(\014rst)g(one,)i(then)e Fl(strfind)g Fn(returns)g Fk(nil)p Fn(.)36 b(A)21 b(third)g(optional)f(n)o (umerical)i(argumen)o(t)-12 1841 y(sp)q(eci\014es)e(where)f(to)f(start)f(the) i(searc)o(h.)29 b(Another)19 b(optional)g(n)o(umerical)g(argumen)o(t)f(sp)q (eci\014es)i(where)f(to)-12 1897 y(stop)c(it.)-12 2018 y Fl(strlen)23 b(\(s\))-12 2103 y Fn(Receiv)o(es)17 b(a)e(string)g(and)g(returns)g(its)h (length.)-12 2223 y Fl(strsub)23 b(\(s,)h(i,)f(j\))-12 2309 y Fn(Returns)13 b(another)f(string,)h(whic)o(h)g(is)g(a)f(substring)h(of)f Fl(s)p Fn(,)h(starting)f(at)g Fl(i)g Fn(and)h(runing)g(un)o(til)h Fl(j)p Fn(.)k(If)13 b Fl(j)g Fn(is)g(absen)o(t)-12 2366 y(or)18 b(is)g Fk(nil)p Fn(,)i(it)e(is)g(assumed)h(to)e(b)q(e)i(equal)g(to)e(the)h (length)h(of)e Fl(s)p Fn(.)29 b(P)o(articularly)l(,)19 b(the)f(call)h Fl(strsub\(s,1,j\))-12 2422 y Fn(returns)e(a)f(pre\014x)i(of)e Fl(s)h Fn(with)g(length)g Fl(j)p Fn(,)g(while)h(the)f(call)h Fl(strsub\(s,i\))d Fn(returns)i(a)f(su\016x)h(of)f Fl(s)p Fn(,)h(starting)-12 2479 y(at)e Fl(i)p Fn(..)-12 2599 y Fl(strlower)23 b(\(s\))-12 2684 y Fn(Receiv)o(es)16 b(a)d(string)i(and)f(returns)g(a)f(cop)o(y)h(of)g (that)f(string)h(with)h(all)g(upp)q(er)g(case)f(letters)g(c)o(hanged)g(to)g (lo)o(w)o(er)-12 2741 y(case.)20 b(All)d(other)d(c)o(haracters)h(are)g(left)g (unc)o(hanged.)899 2976 y(16)p eop %%Page: 17 17 bop -12 160 a Fl(strupper)23 b(\(s\))-12 245 y Fn(Receiv)o(es)16 b(a)d(string)i(and)f(returns)g(a)f(cop)o(y)h(of)g(that)f(string)h(with)h(all) g(lo)o(w)o(er)e(case)h(letters)h(c)o(hanged)f(to)f(upp)q(er)-12 302 y(case.)20 b(All)d(other)d(c)o(haracters)h(are)g(left)g(unc)o(hanged.)-12 424 y Fd(6.3)56 b(Mathematical)16 b(F)-5 b(unctions)-12 509 y Fn(This)20 b(library)f(is)h(an)f(in)o(terface)g(to)f(some)h(functions)h(of) e(the)h(standard)g(C)f(math)h(library)l(.)32 b(Moreo)o(v)o(er,)18 b(it)-12 566 y(registers)d(a)f(fallbac)o(k)h(for)f(the)h(binary)g(op)q (erator)f Fl(^)h Fn(whic)o(h,)g(when)g(applied)i(to)d(n)o(um)o(b)q(ers)h Fl(x^y)p Fn(,)e(returns)i Fc(x)1821 549 y Fb(y)1842 566 y Fn(.)59 622 y(The)g(library)h(pro)o(vides)g(the)f(follo)o(wing)h(functions:)-12 716 y Fl(abs)24 b(acos)f(asin)g(atan)h(ceil)f(cos)g(floor)h(log)f(log10)-12 773 y(max)h(min)47 b(mod)g(sin)h(sqrt)23 b(tan)-12 866 y Fn(Most)16 b(of)g(them)h(are)g(only)g(in)o(terfaces)g(to)f(the)h(homon)o(ymous)f (functions)i(in)g(the)f(C)f(library)l(,)i(except)f(that,)-12 923 y(for)e(the)g(trigonometric)g(functions,)h(all)g(angles)f(are)g (expressed)h(in)g(degrees.)59 979 y(The)d(function)g Fl(max)g Fn(returns)f(the)h(maxim)o(um)g(v)m(alue)h(in)f(a)g(list)g(of)g(n)o(umeric)g (argumen)o(ts.)19 b(Similarly)l(,)c Fl(min)-12 1036 y Fn(computes)g(the)h (minim)o(um.)21 b(Both)15 b(can)g(b)q(e)h(used)g(with)f(an)g(unlimited)j(n)o (um)o(b)q(er)d(of)g(argumen)o(ts.)59 1092 y(The)g(function)h Fl(mod)f Fn(is)h(equiv)m(alen)o(t)h(to)d(the)h Fl(\045)g Fn(op)q(erator)g(in) h(C.)-12 1214 y Fd(6.4)56 b(I/O)18 b(F)-5 b(acilities)-12 1300 y Fn(All)16 b(I/O)g(op)q(erations)f(in)h(Lua)f(are)g(done)g(o)o(v)o(er)f(t)o (w)o(o)g Fm(curr)n(ent)h Fn(\014les,)g(one)h(for)e(reading)i(and)f(one)g(for) f(writing.)-12 1356 y(Initially)l(,)k(the)d(curren)o(t)g(input)h(\014le)h(is) e Fl(stdin)p Fn(,)f(and)i(the)f(curren)o(t)g(output)g(\014le)h(is)g Fl(stdout)p Fn(.)59 1413 y(Unless)g(otherwised)g(stated,)e(all)i(I/O)g (functions)g(return)f(1)g(on)g(success)h(and)f Fk(nil)h Fn(on)f(failure.)-12 1533 y Fl(readfrom)23 b(\(filename\))-12 1619 y Fn(This)17 b(function)g(op)q(ens)g(a)f(\014le)h(named)g Fl(filename)e Fn(and)i(sets)f(it)g(as)g(the)g Fm(curr)n(ent)h Fn(input)g(\014le.)24 b(When)17 b(called)-12 1675 y(without)e(parameters,)f(this)i(function)g (restores)e Fl(stdin)h Fn(as)g(the)g(curren)o(t)g(input)h(\014le.)-12 1795 y Fl(writeto)23 b(\(filename\))-12 1881 y Fn(This)16 b(function)g(op)q (ens)g(a)f(\014le)h(named)f Fl(filename)f Fn(and)i(sets)e(it)i(as)f(the)g Fm(curr)n(ent)g Fn(output)g(\014le.)21 b(Notice)15 b(that,)-12 1937 y(if)21 b(the)g(\014le)g(already)g(exists,)h(it)f(is)g(completely)h (erased)e(with)h(this)g(op)q(eration.)36 b(When)21 b(called)h(without)-12 1994 y(parameters,)14 b(this)i(function)g(restores)e Fl(stdout)h Fn(as)f(the)i(curren)o(t)f(output)g(\014le.)-12 2114 y Fl(appendto)23 b(\(filename\))-12 2200 y Fn(This)18 b(function)g(op)q(ens)f(a)g(\014le)h (named)f Fl(filename)f Fn(and)h(sets)g(it)g(as)g(the)g Fm(curr)n(ent)g Fn(output)f(\014le.)27 b(Unlik)o(e)18 b(the)-12 2256 y Fl(writeto)d Fn(op)q(eration,)h(this)g(function)g(do)q(es)g(not)g(erase)f(an)o(y)h (previous)g(con)o(ten)o(t)f(of)g(the)h(\014le.)23 b(When)16 b(called)-12 2313 y(without)j(parameters,)g(this)h(function)g(restores)f Fl(stdout)f Fn(as)h(the)g(curren)o(t)g(output)h(\014le.)33 b(This)19 b(function)-12 2369 y(returns)c(2)g(if)h(the)f(\014le)h(already)g (exists,)f(1)g(if)g(it)h(creates)f(a)g(new)g(\014le,)h(and)f Fk(nil)i Fn(on)e(failure.)-12 2489 y Fl(read)24 b(\([format]\))-12 2575 y Fn(This)12 b(function)g(returns)e(a)h(v)m(alue)h(read)f(from)f(the)h (curren)o(t)g(input.)20 b(An)11 b(optional)g(string)g(argumen)o(t)f(sp)q (eci\014es)-12 2631 y(the)15 b(w)o(a)o(y)g(the)g(input)h(is)g(in)o (terpreted.)59 2688 y(Without)j(a)g(format)e(argumen)o(t,)i Fl(read)g Fn(\014rst)g(skips)h(blanks,)g(tabs)f(and)g(newlines.)34 b(Then)20 b(it)f(c)o(hec)o(ks)-12 2744 y(whether)g(the)h(curren)o(t)e(c)o (haracter)h(is)g Fl(")g Fn(or)g Fl(')p Fn(.)31 b(If)19 b(so,)g(it)h(reads)f (a)f(string)h(up)h(to)e(the)h(ending)i(quotation)-12 2801 y(mark,)14 b(and)h(returns)f(this)h(string,)g(without)f(the)h(quotation)f(marks.)19 b(Otherwise)d(it)f(reads)f(up)h(to)g(a)f(blank,)-12 2857 y(tab)h(or)g (newline.)899 2976 y(17)p eop %%Page: 18 18 bop 59 160 a Fn(The)15 b(format)f(string)h(can)h(ha)o(v)o(e)e(the)i(follo)o (wing)g(format:)60 253 y Fl(?[n])-12 347 y Fn(where)g Fl(?)f Fn(can)g(b)q(e:)-12 441 y Fk('s')h(or)h('S')22 b Fn(to)15 b(read)g(a)g (string;)-12 535 y Fk('f)5 b(')17 b(or)g('F')k Fn(to)15 b(read)g(a)g(real)g (n)o(um)o(b)q(er;)-12 629 y Fk('i')i(or)g('I')22 b Fn(to)14 b(read)i(an)f(in)o(teger.)-12 723 y(The)g(optional)g Fl(n)f Fn(is)h(a)g(n)o(um)o(b)q(er)f(whic)o(h)i(sp)q(eci\014es)g(ho)o(w)e(man)o(y)g (c)o(haracters)g(m)o(ust)g(b)q(e)h(read)g(to)f(comp)q(ose)g(the)-12 779 y(input)i(v)m(alue.)-12 899 y Fl(write)23 b(\(value,)g([format]\))-12 985 y Fn(This)16 b(function)g(writes)f(the)h(v)m(alue)g(of)f(its)g(\014rst)g (argumen)o(t)g(to)f(the)i(curren)o(t)f(output.)k(An)d(optional)g(second)-12 1041 y(argumen)o(t)g(sp)q(eci\014es)j(the)e(format)e(to)i(b)q(e)g(used.)26 b(This)17 b(format)e(is)j(giv)o(en)f(as)g(a)f(string,)h(comp)q(osed)g(of)g (four)-12 1098 y(parts.)i(The)d(\014rst)f(part)f(is)i(the)f(only)h(not)f (optional,)g(and)h(m)o(ust)e(b)q(e)i(one)f(of)g(the)g(follo)o(wing)h(c)o (haracters:)-12 1192 y Fk('s')g(or)h('S')22 b Fn(to)15 b(write)g(strings;)-12 1285 y Fk('f)5 b(')17 b(or)g('F')k Fn(to)15 b(write)g(\015oats;)-12 1379 y Fk('i')i(or)g('I')22 b Fn(to)14 b(write)i(in)o(tegers.)-12 1473 y(These)g(c)o(haracters)e(can)i(b)q(e)f(follo)o(w)o(ed)h(b)o(y)60 1567 y Fl([?][m][.n])-12 1661 y Fn(where:)-12 1754 y Fl(?)23 b Fn(indicates)16 b(justi\014cation)g(inside)h(the)f(\014eld.)130 1848 y(')p Fl(<)p Fn(')22 b(righ)o(t)15 b(justi\014cation;)130 1921 y(')p Fl(>)p Fn(')22 b(left)15 b(justi\014cation;)130 1994 y(')p Fl(|)p Fn(')22 b(cen)o(ter)15 b(justi\014cation.)-12 2088 y Fl(m)23 b Fn(Indicates)16 b(the)f(\014eld)i(size)f(in)g(c)o (haracters.)-12 2182 y Fl(.n)23 b Fn(F)l(or)16 b(reals,)i(indicates)g(the)f (n)o(um)o(b)q(er)h(of)e(digital)j(places.)26 b(F)l(or)16 b(in)o(tegers,)i(it) f(is)h(the)f(minim)o(um)h(n)o(um)o(b)q(er)102 2238 y(of)d(digits.)20 b(This)c(option)f(has)h(no)f(meaning)g(for)g(strings.)59 2332 y(When)e(called)i(without)e(a)g(format)f(string,)h(this)h(function)g(writes)f (n)o(um)o(b)q(ers)g(using)h(the)f Fl(\045g)g Fn(format)f(and)-12 2389 y(strings)j(with)h Fl(\045s)p Fn(.)-12 2509 y Fl(debug)23 b(\(\))-12 2595 y Fn(This)e(function,)g(when)g(called,)h(rep)q(eatedly)f (presen)o(ts)f(a)g(prompt)f Fl(lua_debug>)42 b Fn(in)21 b(the)f(error)f (output)-12 2651 y(stream)h(\()p Fl(stderr)p Fn(\),)f(reads)i(a)f(line)i (from)d(the)i(standard)f(input,)i(and)e(executes)h(\(\\dostring"\))f(the)g (line.)-12 2708 y(The)e(lo)q(op)g(ends)f(when)h(the)g(user)f(t)o(yp)q(es)g Fl(cont)g Fn(to)g(the)g(prompt.)26 b(This)18 b(function)g(then)g(returns)f (and)g(the)-12 2764 y(execution)f(of)f(the)h(program)e(con)o(tin)o(ues.)899 2976 y(18)p eop %%Page: 19 19 bop -12 160 a Fo(7)69 b(Some)21 b(Examples)-12 261 y Fn(This)f(section)h(giv) o(es)e(examples)i(sho)o(wing)e(some)h(features)f(of)g(Lua.)34 b(It)19 b(do)q(es)h(not)g(in)o(tend)g(to)f(co)o(v)o(er)g(the)-12 318 y(whole)d(language,)f(but)g(only)h(to)f(illustrate)h(some)f(in)o (teresting)h(uses)f(of)g(the)g(system.)-12 437 y Fd(7.1)56 b(The)18 b(F)-5 b(unctions)19 b Fa(next)e Fd(and)j Fa(nextvar)-12 523 y Fn(This)c(example)g(sho)o(ws)f(ho)o(w)f(to)h(use)g(the)h(function)g Fl(next)e Fn(to)h(iterate)g(o)o(v)o(er)f(the)i(\014elds)g(of)f(a)g(table.)-12 605 y Fl(function)23 b(f)h(\(t\))357 b(--)24 b(t)g(is)f(a)h(table)36 661 y(local)f(i,)h(v)f(=)h(next\(t,)f(nil\))47 b(--)24 b(i)g(is)f(an)h(index) f(of)g(t,)h(v)g(=)g(t[i])36 718 y(while)f(i)h(do)84 774 y(...)524 b(--)24 b(do)f(something)g(with)g(i)h(and)g(v)84 831 y(i,)f(v)h(=)g(next\(t,) f(i\))190 b(--)24 b(get)f(next)h(index)36 887 y(end)-12 944 y(end)59 1026 y Fn(The)13 b(next)g(example)h(prin)o(ts)f(the)g(names)g(of)f (all)i(global)g(v)m(ariables)g(in)g(the)f(system)g(with)g(non)g(nil)i(v)m (alues:)-12 1108 y Fl(function)23 b(printGlobalVariables)e(\(\))36 1164 y(local)i(i,)h(v)f(=)h(nextvar\(nil\))36 1221 y(while)f(i)h(do)84 1277 y(print\(i\))84 1334 y(i,)f(v)h(=)g(nextvar\(i\))36 1390 y(end)-12 1447 y(end)-12 1566 y Fd(7.2)56 b(String)18 b(Manipulation)-12 1652 y Fn(The)e(\014rst)e(example)i(is)g(a)f(function)h(to)f(trim)g(extra)f (blanks)i(at)f(the)g(b)q(eginning)i(and)f(end)g(of)e(a)h(string.)-12 1734 y Fl(function)23 b(trim\(s\))36 1791 y(local)g(l)h(=)g(1)36 1847 y(while)f(strsub\(s,l,l\))f(==)i(')f(')h(do)84 1904 y(l)f(=)h(l+1)36 1960 y(end)36 2017 y(local)f(r)h(=)g(strlen\(s\))36 2073 y(while)f (strsub\(s,r,r\))f(==)i(')f(')h(do)84 2129 y(r)f(=)h(r-1)36 2186 y(end)36 2242 y(return)f(strsub\(s,l,r\))-12 2299 y(end)59 2381 y Fn(The)15 b(second)h(example)g(sho)o(ws)e(a)h(function)h(that)f (eliminates)i(all)f(blanks)g(of)f(a)f(string.)-12 2463 y Fl(function)23 b(remove_blanks)f(\(s\))36 2520 y(local)h(b)h(=)g(strfind\(s,)e(')i('\))36 2576 y(while)f(b)h(do)84 2632 y(s)f(=)h(strsub\(s,)f(1,)g(b-1\))h(..)f (strsub\(s,)g(b+1\))84 2689 y(b)g(=)h(strfind\(s,)f(')g('\))36 2745 y(end)36 2802 y(return)g(s)-12 2858 y(end)899 2976 y Fn(19)p eop %%Page: 20 20 bop -12 160 a Fd(7.3)56 b(P)n(ersistence)-12 245 y Fn(Because)19 b(of)f(its)h(re\015exiv)o(e)g(facilities,)i(p)q(ersistence)e(in)g(Lua)g(can)g (b)q(e)f(ac)o(hiev)o(ed)i(with)e(Lua.)30 b(This)19 b(section)-12 302 y(sho)o(ws)c(some)h(w)o(a)o(ys)e(to)i(store)f(and)h(retriev)o(e)f(v)m (alues)i(in)g(Lua,)f(using)g(a)g(text)f(\014le)i(written)f(in)g(the)g (language)-12 358 y(itself)g(as)f(the)g(storage)f(media.)59 415 y(T)l(o)h(store)f(a)h(single)i(v)m(alue)f(with)g(a)e(name,)h(the)h(follo) o(wing)f(co)q(de)h(is)g(enough:)-12 509 y Fl(function)23 b(store)g(\(name,)g (value\))36 565 y(write\('\\n')f(..)i(name)f(..)h('='\))36 622 y(write_value\(value\))-12 678 y(end)-12 784 y(function)f(write_value)f (\(value\))36 841 y(local)h(t)h(=)g(type\(value\))131 897 y(if)g(t)g(==)f ('nil')95 b(then)23 b(write\('nil'\))36 954 y(elseif)g(t)h(==)f('number')g (then)g(write\(value\))36 1010 y(elseif)g(t)h(==)f('string')g(then)g (write\('"')g(..)h(value)f(..)g('"'\))36 1067 y(end)-12 1123 y(end)-12 1229 y Fn(In)16 b(order)f(to)g(restore)f(this)i(v)m(alue,)g(a)f Fl(lua_dofile)e Fn(su\016ces.)59 1286 y(Storing)k(tables)g(is)g(a)g(little)h (more)f(complex.)25 b(Assuming)18 b(that)e(the)h(table)h(is)f(a)g(tree,)f (and)h(all)h(indices)-12 1342 y(are)e(iden)o(ti\014ers)i(\(that)d(is,)h(the)h (tables)f(are)g(b)q(eing)i(used)e(as)g(records\),)g(its)g(v)m(alue)i(can)e(b) q(e)h(written)f(directly)-12 1399 y(with)g(table)f(constructors.)k(First,)c (the)g(function)h Fl(write_value)e Fn(is)i(c)o(hanged)f(to)-12 1492 y Fl(function)23 b(write_value)f(\(value\))36 1549 y(local)h(t)h(=)g (type\(value\))131 1605 y(if)g(t)g(==)f('nil')95 b(then)23 b(write\('nil'\))36 1662 y(elseif)g(t)h(==)f('number')g(then)g (write\(value\))36 1718 y(elseif)g(t)h(==)f('string')g(then)g(write\('"')g (..)h(value)f(..)g('"'\))36 1775 y(elseif)g(t)h(==)f('table')47 b(then)23 b(write_record\(value\))36 1831 y(end)-12 1888 y(end)-12 1981 y Fn(The)16 b(function)g Fl(write_record)d Fn(is:)-12 2075 y Fl(function)23 b(write_record\(t\))36 2132 y(local)g(i,)h(v)f(=)h (next\(t,)f(nil\))36 2188 y(write\('{'\))46 b(--)24 b(starts)f(constructor)36 2245 y(while)g(i)h(do)84 2301 y(store\(i,)e(v\))84 2358 y(write\(',)g('\))84 2414 y(i,)h(v)h(=)g(next\(t,)f(i\))36 2470 y(end)36 2527 y(write\('}'\))46 b(--)24 b(closes)f(constructor)-12 2583 y(end)-12 2705 y Fd(7.4)56 b(Inheritance)-12 2791 y Fn(The)18 b(fallbac)o(k)h(for)f(absen)o(t)f(indices) j(can)f(b)q(e)f(used)h(to)e(implemen)o(t)j(man)o(y)d(kinds)i(of)f (inheritance)h(in)g(Lua.)-12 2847 y(As)c(an)g(example,)h(the)f(follo)o(wing)h (co)q(de)g(implemen)o(ts)h(single)f(inheritance:)899 2976 y(20)p eop %%Page: 21 21 bop -12 160 a Fl(function)23 b(Index)g(\(t,f\))36 216 y(if)h(f)f(==)h ('parent')f(then)47 b(--)23 b(to)h(avoid)f(loop)84 273 y(return)g (OldIndex\(t,f\))36 329 y(end)36 385 y(local)g(p)h(=)g(t.parent)36 442 y(if)g(type\(p\))e(==)i('table')f(then)84 498 y(return)g(p[f])36 555 y(else)84 611 y(return)g(OldIndex\(t,f\))36 668 y(end)-12 724 y(end)-12 837 y(OldIndex)g(=)h(setfallback\("index",)d(Index\))-12 931 y Fn(Whenev)o(er)13 b(Lua)f(attempts)g(to)f(access)i(an)f(absen)o(t)g (\014eld)i(in)f(a)f(table,)h(it)f(calls)i(the)e(fallbac)o(k)h(function)g Fl(Index)p Fn(.)-12 987 y(If)h(the)g(table)g(has)g(a)f(\014eld)i Fl(parent)e Fn(with)h(a)g(table)g(v)m(alue,)h(then)f(Lua)g(attempts)f(to)g (access)h(the)g(desired)h(\014eld)-12 1044 y(in)g(this)g(paren)o(t)f(ob)s (ject.)19 b(This)c(pro)q(cess)f(is)h(rep)q(eated)g(\\up)o(w)o(ards")e(un)o (til)i(a)f(v)m(alue)i(for)e(the)g(\014eld)h(is)g(found)g(or)-12 1100 y(the)i(ob)s(ject)g(has)g(no)g(paren)o(t.)24 b(In)18 b(the)f(latter)g (case,)g(the)g(previous)h(fallbac)o(k)g(is)f(called)i(to)d(supply)i(a)f(v)m (alue)-12 1157 y(for)e(the)g(\014eld.)59 1213 y(When)h(b)q(etter)h(p)q (erformance)f(is)h(needed,)g(the)g(same)f(fallbac)o(k)h(ma)o(y)e(b)q(e)i (implemen)o(ted)h(in)f(C,)f(as)g(ilus-)-12 1270 y(trated)f(in)h(Figure)f(1.) 20 b(This)15 b(co)q(de)h(m)o(ust)f(b)q(e)h(registered)f(with:)36 1363 y Fl(lua_pushliteral\("parent"\))o(;)36 1420 y(lockedParentName)22 b(=)h(lua_lock\(\);)36 1476 y(lua_pushobject\(lua_setfal)o(lback\("i)o (ndex",)d(Index\)\);)36 1533 y(lockedOldIndex)i(=)i(lua_lock\(\);)-12 1627 y Fn(Notice)16 b(that)e(the)i(string)f Fl("parent")f Fn(is)i(k)o(ept)f (lo)q(c)o(k)o(ed)g(in)h(Lua)g(for)f(optimal)g(p)q(erformace.)-12 1748 y Fd(7.5)56 b(A)19 b(CF)-5 b(unction)-12 1834 y Fn(A)12 b(CF)l(unction)h(to)e(compute)i(the)f(maxim)o(um)g(of)f(a)h(v)m(ariable)h(n)o (um)o(b)q(er)g(of)e(argumen)o(ts)h(is)g(sho)o(wn)g(in)h(Figure)f(2.)-12 1891 y(After)j(registered)h(with)-12 1984 y Fl(lua_register)22 b(\("max",)h(math_max\);)-12 2078 y Fn(this)16 b(function)g(is)g(a)o(v)m (ailable)g(in)g(Lua,)g(as)e(follo)o(ws:)-12 2172 y Fl(i)24 b(=)g(max\(4,)f(5,)g(10,)h(-34\))47 b(--)23 b(i)h(receives)f(10)-12 2294 y Fd(7.6)56 b(Calling)18 b(Lua)h(F)-5 b(unctions)-12 2380 y Fn(This)15 b(example)g(illustrates)g(ho)o(w)f(a)g(C)g(function)h(can)f (call)i(the)e(Lua)g(function)h Fl(remove_blanks)e Fn(presen)o(ted)-12 2436 y(in)j(Section)g(7.2.)-12 2530 y Fl(void)24 b(remove_blanks)e(\(char)h (*s\))-12 2586 y({)36 2643 y(lua_pushstring\(s\);)45 b(/*)24 b(prepare)f(parameter)f(*/)36 2699 y(lua_call\("remove_blanks"\))o(;)45 b(/*)24 b(call)f(Lua)g(function)g(*/)36 2756 y(strcpy\(s,)g (lua_getstring\(lua_getre)o(sult\(1\))o(\)\);)45 b(/*)23 b(copy)h(result)f (back)g(to)h('s')f(*/)-12 2812 y(})899 2976 y Fn(21)p eop %%Page: 22 22 bop -12 417 1867 6 v -12 511 a Fl(int)24 b(lockedParentName;)45 b(/*)24 b(stores)f(the)g(lock)g(index)h(for)f(the)h(string)f("parent")f(*/) -12 567 y(int)i(lockedOldIndex;)93 b(/*)24 b(previous)e(fallback)h(function)g (*/)-12 680 y(void)h(callOldFallback)d(\(lua_Object)i(table,)g(lua_Object)f (index\))-12 736 y({)36 793 y(lua_Object)g(oldIndex)h(=)h (lua_getlocked\(lockedOldIn)o(dex\);)36 849 y(lua_pushobject\(table\);)36 906 y(lua_pushobject\(index\);)36 962 y(lua_callfunction\(oldIndex)o(\);)-12 1019 y(})-12 1132 y(void)g(Index)f(\(void\))-12 1188 y({)36 1245 y(lua_Object)f(table)i(=)f(lua_getparam\(1\);)36 1301 y(lua_Object)f(index)i(=)f(lua_getparam\(2\);)36 1357 y(lua_Object)f(parent;) 36 1414 y(if)i(\(lua_isstring\(index\))d(&&)i (strcmp\(lua_getstring\(index\),)d("parent"\))j(==)g(0\))36 1470 y({)84 1527 y(callOldFallback\(table,)d(index\);)84 1583 y(return;)36 1640 y(})36 1696 y(lua_pushobject\(table\);)36 1753 y(lua_pushlocked\(lockedPare)o(ntName\);)36 1809 y(parent)j(=)h (lua_getsubscript\(\);)36 1866 y(if)g(\(lua_istable\(parent\)\))36 1922 y({)84 1978 y(lua_pushobject\(parent\);)84 2035 y (lua_pushobject\(index\);)84 2091 y(/*)f(return)g(result)g(from)h (getsubscript)e(*/)84 2148 y(lua_pushobject\(lua_gets)o(ubscript)o(\(\)\);)36 2204 y(})36 2261 y(else)84 2317 y(callOldFallback\(table,)e(index\);)-12 2374 y(})653 2509 y Fn(Figure)c(1:)j(Inheritance)e(in)f(C.)p -12 2565 V 899 2976 a(22)p eop %%Page: 23 23 bop -12 727 1867 6 v -12 821 a Fl(void)24 b(math_max)e(\(void\))-12 878 y({)12 934 y(int)i(i=1;)71 b(/*)23 b(number)g(of)h(arguments)e(*/)12 991 y(double)h(d,)h(dmax;)12 1047 y(lua_Object)f(o;)12 1103 y(/*)h(the)f(function)g(must)g(get)h(at)f(least)g(one)h(argument)f(*/)12 1160 y(if)h(\(\(o)f(=)h(lua_getparam\(i++\)\))d(==)j(LUA_NOOBJECT\))60 1216 y(lua_error)e(\("too)i(few)f(arguments)g(to)g(function)g(`max'"\);)12 1273 y(/*)h(and)f(this)g(argument)g(must)g(be)h(a)g(number)f(*/)12 1329 y(if)h(\(!lua_isnumber\(o\)\))60 1386 y(lua_error)e(\("incorrect)h (argument)g(to)g(function)g(`max'"\);)12 1442 y(dmax)g(=)h(lua_getnumber)e (\(o\);)12 1499 y(/*)i(loops)f(until)g(there)g(is)h(no)f(more)h(arguments)e (*/)12 1555 y(while)h(\(\(o)h(=)f(lua_getparam\(i++\)\))f(!=)h (LUA_NOOBJECT\))12 1612 y({)36 1668 y(if)h(\(!lua_isnumber\(o\)\))84 1724 y(lua_error)e(\("incorrect)h(argument)f(to)i(function)f(`max'"\);)36 1781 y(d)h(=)f(lua_getnumber)f(\(o\);)36 1837 y(if)i(\(d)f(>)h(dmax\))f(dmax) g(=)h(d;)12 1894 y(})12 1950 y(/*)g(push)f(the)g(result)g(to)h(be)g(returned) e(*/)12 2007 y(lua_pushnumber)g(\(dmax\);)-12 2063 y(})610 2198 y Fn(Figure)16 b(2:)j(C)c(function)h Fl(math)p 1134 2198 15 2 v 17 w(max)p Fn(.)p -12 2255 1867 6 v 899 2976 a(23)p eop %%Page: 24 24 bop -12 160 a Fo(Ac)n(kno)n(wledgme)o(n)n(ts)-12 261 y Fn(The)17 b(authors)f(w)o(ould)i(lik)o(e)g(to)e(thank)h(CENPES/PETR)o(OBR)1099 250 y(\023)1093 261 y(AS)g(whic)o(h,)h(join)o(tly)f(with)h(T)l(eCGraf,)e (used)-12 318 y(extensiv)o(ely)g(early)f(v)o(ersions)f(of)g(this)h(system)f (and)h(ga)o(v)o(e)f(v)m(aluable)i(commen)o(ts.)j(The)c(authors)e(w)o(ould)i (also)-12 374 y(lik)o(e)i(to)d(thank)h(Carlos)g(Henrique)h(Levy)l(,)g(who)f (found)h(the)f(name)g(of)g(the)g(game)1371 358 y Fj(3)1390 374 y Fn(.)-12 517 y Fo(A)69 b(Incompatibi)o(l)o(i)o(ti)o(es)20 b(with)h(Previous)i(V)-6 b(ersions)-12 619 y Fn(Although)13 b(great)f(care)g(has)h(b)q(een)g(tak)o(en)f(to)g(a)o(v)o(oid)h (incompatibilities)j(with)d(the)f(previous)h(public)i(v)o(ersions)-12 675 y(of)g(Lua,)g(some)g(di\013erences)h(had)g(to)e(b)q(e)i(in)o(tro)q (duced.)21 b(Here)16 b(is)f(a)g(list)h(of)f(all)h(these)g(di\013erences.)-12 797 y Fd(Incompatibilitie)o(s)g(in)i(the)h(Language)56 883 y Fi(\017)k Fn(The)15 b(equalit)o(y)h(test)f(op)q(erator)f(no)o(w)h(is)h (denoted)f(b)o(y)g Fl(==)p Fn(,)g(instead)h(of)f Fl(=)p Fn(.)56 976 y Fi(\017)23 b Fn(The)14 b(syn)o(tax)f(for)g(table)h(construction)g(has)f (b)q(een)i(greatly)f(simpli\014ed.)22 b(The)14 b(old)g Fl(@\(size\))f Fn(has)g(b)q(een)102 1033 y(substituted)20 b(b)o(y)f Fl({})p Fn(.)32 b(The)20 b(list)g(constructor)f(\(formerly)g Fl(@[...])p Fn(\))f(and)h(the)h(record)f(constructor)102 1089 y(\(formerly)g Fl(@{...})p Fn(\))g(no)o(w)h(are)g(b)q(oth)g(co)q(ded)h(lik)o(e)g Fl({...})p Fn(.)34 b(When)20 b(the)h(construction)f(in)o(v)o(olv)o(es)h(a)102 1146 y(function)15 b(call,)h(lik)o(e)g(in)f Fl(@func{...})p Fn(,)e(the)i(new)g(syn)o(tax)f(do)q(es)h(not)g(use)g(the)f Fl(@)p Fn(.)20 b(More)14 b(imp)q(ortan)o(t,)g Fm(a)102 1202 y(c)n(onstruction)h(function)h(must)h(now)f(explicitly)g(r)n(eturn)g(the)h(c) n(onstructe)n(d)e(table)p Fn(.)-12 1324 y Fd(Incompatibilitie)o(s)h(in)i(the) h(API)56 1410 y Fi(\017)k Fn(The)15 b(function)h Fl(lua_call)e Fn(no)h(longer)h(has)f(the)g(parameter)g Fl(nparam)p Fn(.)56 1504 y Fi(\017)23 b Fn(The)16 b(function)i Fl(lua_pop)d Fn(is)i(no)f(longer)h (a)o(v)m(ailable,)h(since)g(it)e(could)i(lead)f(to)f(strange)g(b)q(eha)o (vior.)24 b(In)102 1560 y(particular,)13 b(to)e(access)i(results)f(returned)h (from)e(a)h(Lua)h(function,)g(the)f(new)h(macro)e Fl(lua_getresult)102 1617 y Fn(should)16 b(b)q(e)g(used.)56 1710 y Fi(\017)23 b Fn(The)15 b(old)h(functions)g Fl(lua_storefield)d Fn(and)j Fl(lua_storeindexed)d Fn(ha)o(v)o(e)h(b)q(een)j(replaced)f(b)o(y)102 1823 y Fl(int)23 b(lua_storesubscript)f(\(void\);)102 1935 y Fn(with)15 b(the)h(parameters)e(explicitly)k(pushed)e(on)f(the)h(stac)o(k.) 56 2029 y Fi(\017)23 b Fn(The)16 b(functionalit)o(y)h(of)f(the)g(function)g Fl(lua_errorfunction)e Fn(has)i(b)q(een)h(replaced)g(b)o(y)f(the)g Fm(fal)r(lb)n(ack)102 2086 y Fn(mec)o(hanism;)f(see)h(Section)g(4.8.)56 2179 y Fi(\017)23 b Fn(When)14 b(calling)i(a)d(function)i(from)e(the)h(Lua)g (library)l(,)g(parameters)f(passed)h(through)g(the)g(stac)o(k)f(m)o(ust)102 2236 y(b)q(e)j(pushed)h(just)e(b)q(efore)h(the)f(corresp)q(onden)o(t)h(call,) h(with)f(no)f(in)o(termediate)h(calls)h(to)e(Lua.)21 b(Sp)q(ecial)102 2292 y(care)15 b(should)h(b)q(e)g(tak)o(en)f(with)g(macros)g(lik)o(e)h Fl(lua_getindexed)d Fn(and)j Fl(lua_getfield)p Fn(.)p -12 2815 747 2 v 40 2842 a Fh(3)57 2858 y Fg(BTW,)d(Lua)g(means)h Fe(mo)n(on)e Fg(in)i(P)o(ortuguese.)899 2976 y Fn(24)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF