home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Tool Chest / Dev.CD Aug 98 TC.toast / Tool Chest / Testing & Debugging / Virtual User / Virtual User Current Release / Examples / Example Libraries / Library Reference < prev    next >
MacBinary  |  1998-06-04  |  130.6 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Tue Oct 8 13:30:00 1996, modified Thu Jun 4 10:45:02 1998, creator 'HLX2', type 'ONLN', 129175 bytes "Library Reference" , at 0x1f917 4269 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 4c 69 62 72 61 72 | 79 20 52 65 66 65 72 65 |..Librar|y Refere|
|00000010| 6e 63 65 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |nce.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 01 f8 97 00 | 00 10 ad ae 80 40 18 b1 |........|.....@..|
|00000060| 9c 63 6e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.cn.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ca 48 00 00 |........|.....H..|
|00000080| 56 69 72 74 75 61 6c 20 | 55 73 65 72 20 32 2e 30 |Virtual |User 2.0|
|00000090| 0d 4c 69 62 72 61 72 79 | 20 52 65 66 65 72 65 6e |.Library| Referen|
|000000a0| 63 65 0d 4e 6f 74 65 73 | 20 61 62 6f 75 74 20 74 |ce.Notes| about t|
|000000b0| 68 69 73 20 64 6f 63 75 | 6d 65 6e 74 3a 0d 50 61 |his docu|ment:.Pa|
|000000c0| 72 61 6d 65 74 65 72 73 | 20 61 72 65 20 6c 69 73 |rameters| are lis|
|000000d0| 74 65 64 20 69 6e 20 74 | 68 65 20 6f 72 64 65 72 |ted in t|he order|
|000000e0| 20 74 68 61 74 20 74 68 | 65 79 20 61 72 65 20 74 | that th|ey are t|
|000000f0| 6f 20 62 65 20 70 61 73 | 73 65 64 20 74 6f 20 74 |o be pas|sed to t|
|00000100| 68 65 20 74 61 73 6b 2e | 20 20 49 66 20 74 68 65 |he task.| If the|
|00000110| 20 70 61 72 61 6d 65 74 | 65 72 73 20 66 6f 72 20 | paramet|ers for |
|00000120| 6d 79 46 69 72 73 74 54 | 61 73 6b 20 61 72 65 20 |myFirstT|ask are |
|00000130| 6c 69 73 74 65 64 20 61 | 73 3a 0d 09 09 70 61 72 |listed a|s:...par|
|00000140| 61 6d 31 20 2d 20 69 6e | 74 65 67 65 72 0d 09 09 |am1 - in|teger...|
|00000150| 70 61 72 61 6d 32 20 2d | 20 73 74 72 69 6e 67 0d |param2 -| string.|
|00000160| 09 09 70 61 72 61 6d 33 | 20 2d 20 6c 69 73 74 0d |..param3| - list.|
|00000170| 54 68 65 6e 20 74 68 65 | 20 74 61 73 6b 20 69 74 |Then the| task it|
|00000180| 73 65 6c 66 20 77 6f 75 | 6c 64 20 62 65 20 63 61 |self wou|ld be ca|
|00000190| 6c 6c 65 64 20 77 69 74 | 68 3a 0d 09 09 6d 79 46 |lled wit|h:...myF|
|000001a0| 69 72 73 74 74 61 73 6b | 28 70 61 72 61 6d 31 2c |irsttask|(param1,|
|000001b0| 20 70 61 72 61 6d 32 2c | 20 70 61 72 61 6d 33 29 | param2,| param3)|
|000001c0| 3b 0d 43 6f 6e 74 72 6f | 6c 50 61 6e 65 6c 73 2e |;.Contro|lPanels.|
|000001d0| 76 75 6c 69 62 0d 54 61 | 73 6b 73 20 74 6f 20 68 |vulib.Ta|sks to h|
|000001e0| 61 6e 64 6c 65 20 61 20 | 66 65 77 20 63 6f 6d 6d |andle a |few comm|
|000001f0| 6f 6e 20 63 6f 6e 74 72 | 6f 6c 20 70 61 6e 65 6c |on contr|ol panel|
|00000200| 20 64 69 61 6c 6f 67 73 | 2e 0d 4c 69 62 72 61 72 | dialogs|..Librar|
|00000210| 69 65 73 20 72 65 71 75 | 69 72 65 64 3a 20 20 51 |ies requ|ired: Q|
|00000220| 75 69 63 6b 54 61 73 6b | 73 2e 76 75 6c 69 62 2c |uickTask|s.vulib,|
|00000230| 20 55 74 69 6c 69 74 79 | 54 61 73 6b 73 2e 76 75 | Utility|Tasks.vu|
|00000240| 6c 69 62 0d 4b 65 79 62 | 6f 61 72 64 43 44 45 56 |lib.Keyb|oardCDEV|
|00000250| 0d 09 50 61 72 61 6d 65 | 74 65 72 73 3a 09 6e 6f |..Parame|ters:.no|
|00000260| 6e 65 0d 09 52 65 74 75 | 72 6e 73 3a 09 62 6f 6f |ne..Retu|rns:.boo|
|00000270| 6c 65 61 6e 20 2d 20 74 | 72 75 65 20 6f 6e 20 73 |lean - t|rue on s|
|00000280| 75 63 63 65 73 73 66 75 | 6c 20 6c 61 75 6e 63 68 |uccessfu|l launch|
|00000290| 20 6f 66 20 4b 65 79 62 | 6f 61 72 64 20 63 6f 6e | of Keyb|oard con|
|000002a0| 74 72 6f 6c 20 70 61 6e | 65 6c 2c 20 66 61 6c 73 |trol pan|el, fals|
|000002b0| 65 20 6f 6e 20 66 61 69 | 6c 75 72 65 0d 09 46 75 |e on fai|lure..Fu|
|000002c0| 6e 63 74 69 6f 6e 3a 09 | 57 69 6c 6c 20 74 75 72 |nction:.|Will tur|
|000002d0| 6e 20 6f 66 66 20 74 68 | 65 20 6b 65 79 20 70 72 |n off th|e key pr|
|000002e0| 65 73 73 20 72 65 70 65 | 61 74 20 61 62 69 6c 69 |ess repe|at abili|
|000002f0| 74 79 20 6f 6e 20 74 68 | 65 20 74 61 72 67 65 74 |ty on th|e target|
|00000300| 20 6d 61 63 68 69 6e 65 | 2e 0d 09 45 78 61 6d 70 | machine|...Examp|
|00000310| 6c 65 3a 09 6b 65 79 62 | 72 64 53 75 63 63 65 73 |le:.keyb|rdSucces|
|00000320| 73 20 3a 3d 20 4b 65 79 | 62 6f 61 72 64 43 44 45 |s := Key|boardCDE|
|00000330| 56 28 29 3b 0d 4d 6f 6e | 69 74 6f 72 73 43 44 45 |V();.Mon|itorsCDE|
|00000340| 56 0d 09 50 61 72 61 6d | 65 74 65 72 73 3a 09 6d |V..Param|eters:.m|
|00000350| 6f 6e 54 79 70 65 20 2d | 20 d2 67 72 61 79 d3 20 |onType -| .gray. |
|00000360| 6f 72 20 d2 63 6f 6c 6f | 72 d3 0d 09 52 65 74 75 |or .colo|r...Retu|
|00000370| 72 6e 73 3a 09 62 6f 6f | 6c 65 61 6e 20 2d 20 74 |rns:.boo|lean - t|
|00000380| 72 75 65 20 6f 6e 20 73 | 75 63 63 65 73 73 66 75 |rue on s|uccessfu|
|00000390| 6c 20 6c 61 75 6e 63 68 | 20 6f 66 20 4d 6f 6e 69 |l launch| of Moni|
|000003a0| 74 6f 72 73 20 63 6f 6e | 74 72 6f 6c 20 70 61 6e |tors con|trol pan|
|000003b0| 65 6c 2c 20 66 61 6c 73 | 65 20 6f 6e 20 66 61 69 |el, fals|e on fai|
|000003c0| 6c 75 72 65 0d 09 46 75 | 6e 63 74 69 6f 6e 3a 09 |lure..Fu|nction:.|
|000003d0| 57 69 6c 6c 20 73 65 74 | 20 74 68 65 20 63 75 72 |Will set| the cur|
|000003e0| 72 65 6e 74 6c 79 20 73 | 65 6c 65 63 74 65 64 20 |rently s|elected |
|000003f0| 6d 6f 6e 69 74 6f 72 20 | 74 6f 20 65 69 74 68 65 |monitor |to eithe|
|00000400| 72 20 67 72 61 79 73 63 | 61 6c 65 20 6f 72 20 63 |r graysc|ale or c|
|00000410| 6f 6c 6f 72 20 75 73 69 | 6e 67 20 74 68 65 20 4d |olor usi|ng the M|
|00000420| 6f 6e 69 74 6f 72 73 20 | 43 6f 6e 74 72 6f 6c 20 |onitors |Control |
|00000430| 50 61 6e 65 6c 2e 0d 09 | 45 78 61 6d 70 6c 65 3a |Panel...|Example:|
|00000440| 09 6d 6f 6e 53 75 63 63 | 65 73 73 20 3a 3d 20 4d |.monSucc|ess := M|
|00000450| 6f 6e 69 74 6f 72 73 43 | 44 45 56 28 d2 67 72 61 |onitorsC|DEV(.gra|
|00000460| 79 d3 29 3b 0d 53 68 61 | 72 69 6e 67 53 65 74 75 |y.);.Sha|ringSetu|
|00000470| 70 43 44 45 56 0d 09 50 | 61 72 61 6d 65 74 65 72 |pCDEV..P|arameter|
|00000480| 73 3a 09 73 65 74 75 70 | 54 61 73 6b 20 2d 20 d2 |s:.setup|Task - .|
|00000490| 73 68 61 72 69 6e 67 d3 | 20 6f 72 20 d2 6c 69 6e |sharing.| or .lin|
|000004a0| 6b 69 6e 67 d3 0d 09 09 | 63 6c 6f 73 65 54 69 6d |king....|closeTim|
|000004b0| 65 20 2d 20 69 6e 74 65 | 67 65 72 0d 09 52 65 74 |e - inte|ger..Ret|
|000004c0| 75 72 6e 73 3a 09 62 6f | 6f 6c 65 61 6e 20 2d 20 |urns:.bo|olean - |
|000004d0| 74 72 75 65 20 6f 6e 20 | 73 75 63 63 65 73 73 66 |true on |successf|
|000004e0| 75 6c 20 6c 61 75 6e 63 | 68 20 6f 66 20 53 68 61 |ul launc|h of Sha|
|000004f0| 72 69 6e 67 20 53 65 74 | 75 70 20 63 6f 6e 74 72 |ring Set|up contr|
|00000500| 6f 6c 20 70 61 6e 65 6c | 2c 20 66 61 6c 73 65 20 |ol panel|, false |
|00000510| 6f 6e 20 66 61 69 6c 75 | 72 65 0d 09 46 75 6e 63 |on failu|re..Func|
|00000520| 74 69 6f 6e 3a 09 54 68 | 69 73 20 77 69 6c 6c 20 |tion:.Th|is will |
|00000530| 77 6f 72 6b 20 77 69 74 | 68 20 74 68 65 20 53 68 |work wit|h the Sh|
|00000540| 61 72 69 6e 67 20 53 65 | 74 75 70 20 63 6f 6e 74 |aring Se|tup cont|
|00000550| 72 6f 6c 20 70 61 6e 65 | 6c 2c 20 65 69 74 68 65 |rol pane|l, eithe|
|00000560| 72 20 74 6f 67 67 6c 69 | 6e 67 20 74 68 65 20 73 |r toggli|ng the s|
|00000570| 74 61 74 65 20 6f 66 20 | 66 69 6c 65 20 73 68 61 |tate of |file sha|
|00000580| 72 69 6e 67 20 6f 72 20 | 70 72 6f 67 72 61 6d 20 |ring or |program |
|00000590| 6c 69 6e 6b 69 6e 67 2c | 20 64 65 70 65 6e 64 20 |linking,| depend |
|000005a0| 77 68 65 74 68 65 72 20 | 6f 72 20 6e 6f 74 20 74 |whether |or not t|
|000005b0| 68 65 20 6b 65 79 77 6f | 72 64 20 d2 73 68 61 72 |he keywo|rd .shar|
|000005c0| 69 6e 67 d3 20 6f 72 20 | d2 6c 69 6e 6b 69 6e 67 |ing. or |.linking|
|000005d0| d3 20 69 73 20 70 61 73 | 73 65 64 20 74 6f 20 69 |. is pas|sed to i|
|000005e0| 74 2e 20 20 54 68 65 20 | 76 61 72 69 61 62 6c 65 |t. The |variable|
|000005f0| 20 63 6c 6f 73 65 54 69 | 6d 65 20 73 70 65 63 69 | closeTi|me speci|
|00000600| 66 69 65 73 20 74 68 65 | 20 61 6d 6f 75 6e 74 20 |fies the| amount |
|00000610| 6f 66 20 74 69 6d 65 20 | 74 6f 20 6c 65 61 76 65 |of time |to leave|
|00000620| 20 75 73 65 72 73 20 63 | 6f 6e 6e 65 63 74 65 64 | users c|onnected|
|00000630| 20 69 66 20 66 69 6c 65 | 20 73 68 61 72 69 6e 67 | if file| sharing|
|00000640| 20 69 73 20 62 65 69 6e | 67 20 74 75 72 6e 65 64 | is bein|g turned|
|00000650| 20 6f 66 66 2e 0d 09 45 | 78 61 6d 70 6c 65 3a 09 | off...E|xample:.|
|00000660| 73 68 61 72 53 65 74 53 | 75 63 63 65 73 73 20 3a |sharSetS|uccess :|
|00000670| 3d 20 53 68 61 72 69 6e | 67 53 65 74 75 70 43 44 |= Sharin|gSetupCD|
|00000680| 45 56 28 d2 73 68 61 72 | 69 6e 67 d3 2c 20 35 29 |EV(.shar|ing., 5)|
|00000690| 3b 0d 56 69 65 77 73 43 | 44 45 56 0d 09 50 61 72 |;.ViewsC|DEV..Par|
|000006a0| 61 6d 65 74 65 72 73 3a | 09 66 6f 6e 74 4e 61 6d |ameters:|.fontNam|
|000006b0| 65 20 2d 20 73 74 72 69 | 6e 67 20 6f 66 20 61 6e |e - stri|ng of an|
|000006c0| 79 20 76 61 6c 69 64 20 | 69 6e 73 74 61 6c 6c 65 |y valid |installe|
|000006d0| 64 20 66 6f 6e 74 0d 09 | 09 66 6f 6e 74 53 69 7a |d font..|.fontSiz|
|000006e0| 65 20 2d 20 73 74 72 69 | 6e 67 20 6f 66 20 61 6e |e - stri|ng of an|
|000006f0| 79 20 76 61 6c 69 64 20 | 66 6f 6e 74 20 73 69 7a |y valid |font siz|
|00000700| 65 0d 09 09 69 63 6f 6e | 56 69 65 77 20 2d 20 d2 |e...icon|View - .|
|00000710| 64 65 66 61 75 6c 74 d3 | 20 6f 72 20 d2 73 68 6f |default.| or .sho|
|00000720| 77 6e 6f 74 68 69 6e 67 | d3 0d 09 09 6c 69 73 74 |wnothing|....list|
|00000730| 56 69 65 77 20 2d 20 d2 | 64 65 66 61 75 6c 74 d3 |View - .|default.|
|00000740| 20 6f 72 20 d2 61 6c 77 | 61 79 73 73 6e 61 70 d3 | or .alw|ayssnap.|
|00000750| 0d 09 09 69 63 6f 6e 53 | 69 7a 65 20 2d 20 d2 73 |...iconS|ize - .s|
|00000760| 6d 61 6c 6c d3 2c 20 d2 | 6d 65 64 69 75 6d d3 20 |mall., .|medium. |
|00000770| 6f 72 20 d2 6c 61 72 67 | 65 d3 0d 09 52 65 74 75 |or .larg|e...Retu|
|00000780| 72 6e 73 3a 09 62 6f 6f | 6c 65 61 6e 20 2d 20 74 |rns:.boo|lean - t|
|00000790| 72 75 65 20 6f 6e 20 74 | 68 65 20 73 75 63 63 65 |rue on t|he succe|
|000007a0| 73 73 66 75 6c 20 6c 61 | 75 6e 63 68 20 6f 66 20 |ssful la|unch of |
|000007b0| 74 68 65 20 56 69 65 77 | 73 20 63 6f 6e 74 72 6f |the View|s contro|
|000007c0| 6c 20 70 61 6e 65 6c 2c | 20 66 61 6c 73 65 20 69 |l panel,| false i|
|000007d0| 66 20 66 61 69 6c 75 72 | 65 0d 09 46 75 6e 63 74 |f failur|e..Funct|
|000007e0| 69 6f 6e 3a 09 41 6c 6c | 6f 77 73 20 64 65 74 61 |ion:.All|ows deta|
|000007f0| 69 6c 65 64 20 63 6f 6e | 74 72 6f 6c 20 6f 66 20 |iled con|trol of |
|00000800| 74 68 65 20 56 69 65 77 | 73 20 63 6f 6e 74 72 6f |the View|s contro|
|00000810| 6c 20 70 61 6e 65 6c 2e | 20 20 54 68 65 20 69 63 |l panel.| The ic|
|00000820| 6f 6e 56 69 65 77 20 61 | 6e 64 20 6c 69 73 74 56 |onView a|nd listV|
|00000830| 69 65 77 20 70 61 72 61 | 6d 65 74 65 72 73 20 63 |iew para|meters c|
|00000840| 61 6e 20 62 65 20 63 75 | 73 74 6f 6d 69 7a 65 64 |an be cu|stomized|
|00000850| 20 62 79 20 61 64 64 69 | 6e 67 20 61 64 64 69 74 | by addi|ng addit|
|00000860| 69 6f 6e 61 6c 20 69 66 | 2d 65 6c 73 65 20 63 6c |ional if|-else cl|
|00000870| 61 75 73 65 73 20 69 6e | 20 74 68 65 20 74 61 73 |auses in| the tas|
|00000880| 6b 20 74 6f 20 61 63 63 | 6f 6d 6f 64 61 74 65 20 |k to acc|omodate |
|00000890| 6d 6f 72 65 20 63 68 6f | 69 63 65 73 2e 0d 09 45 |more cho|ices...E|
|000008a0| 78 61 6d 70 6c 65 3a 09 | 76 69 65 77 73 53 75 63 |xample:.|viewsSuc|
|000008b0| 63 65 73 73 20 3a 3d 20 | 56 69 65 77 73 43 44 45 |cess := |ViewsCDE|
|000008c0| 56 28 d2 54 69 6d 65 73 | d3 2c 20 d2 31 32 d3 2c |V(.Times|., .12.,|
|000008d0| 20 d2 64 65 66 61 75 6c | 74 d3 2c 20 d2 61 6c 77 | .defaul|t., .alw|
|000008e0| 61 79 73 73 6e 61 70 d3 | 2c 20 d2 6d 65 64 69 75 |ayssnap.|, .mediu|
|000008f0| 6d d3 29 3b 0d 44 61 74 | 61 55 74 69 6c 73 2e 76 |m.);.Dat|aUtils.v|
|00000900| 75 6c 69 62 0d 54 61 73 | 6b 73 20 74 6f 20 6d 61 |ulib.Tas|ks to ma|
|00000910| 6e 69 70 75 6c 61 74 65 | 20 64 61 74 61 20 66 6f |nipulate| data fo|
|00000920| 72 6d 73 2e 0d 4c 69 62 | 72 61 72 69 65 73 20 72 |rms..Lib|raries r|
|00000930| 65 71 75 69 72 65 64 3a | 20 20 6e 6f 6e 65 0d 41 |equired:| none.A|
|00000940| 62 73 0d 09 50 61 72 61 | 6d 65 74 65 72 73 3a 09 |bs..Para|meters:.|
|00000950| 6e 75 6d 62 65 72 20 2d | 20 69 6e 74 65 67 65 72 |number -| integer|
|00000960| 0d 09 52 65 74 75 72 6e | 73 3a 09 69 6e 74 65 67 |..Return|s:.integ|
|00000970| 65 72 20 2d 20 74 68 65 | 20 61 62 73 6f 6c 75 74 |er - the| absolut|
|00000980| 65 20 76 61 6c 75 65 20 | 6f 66 20 74 68 65 20 6e |e value |of the n|
|00000990| 75 6d 62 65 72 20 70 61 | 73 73 65 64 20 74 6f 20 |umber pa|ssed to |
|000009a0| 41 62 73 28 29 0d 09 46 | 75 6e 63 74 69 6f 6e 3a |Abs()..F|unction:|
|000009b0| 09 47 69 76 65 6e 20 61 | 6e 20 69 6e 74 65 67 65 |.Given a|n intege|
|000009c0| 72 2c 20 41 62 73 20 77 | 69 6c 6c 20 72 65 74 75 |r, Abs w|ill retu|
|000009d0| 72 6e 20 68 65 20 61 62 | 73 6f 6c 75 74 65 20 76 |rn he ab|solute v|
|000009e0| 61 6c 75 65 20 6f 66 20 | 74 68 61 74 20 6e 75 6d |alue of |that num|
|000009f0| 62 65 72 2e 0d 09 45 78 | 61 6d 70 6c 65 3a 09 70 |ber...Ex|ample:.p|
|00000a00| 72 69 6e 74 6c 6e 20 41 | 62 73 28 2d 35 29 3b 0d |rintln A|bs(-5);.|
|00000a10| 09 09 09 35 0d 41 64 64 | 54 6f 4c 69 73 74 0d 09 |...5.Add|ToList..|
|00000a20| 50 61 72 61 6d 65 74 65 | 72 73 3a 09 74 68 65 45 |Paramete|rs:.theE|
|00000a30| 6c 65 6d 65 6e 74 20 2d | 20 61 6e 79 20 76 61 6c |lement -| any val|
|00000a40| 69 64 20 76 61 72 69 61 | 62 6c 65 20 74 68 61 74 |id varia|ble that|
|00000a50| 20 63 61 6e 20 62 65 20 | 61 20 6d 65 6d 62 65 72 | can be |a member|
|00000a60| 20 6f 66 20 61 20 6c 69 | 73 74 0d 09 09 74 68 65 | of a li|st...the|
|00000a70| 4c 69 73 74 20 2d 20 61 | 20 6c 69 73 74 2c 20 64 |List - a| list, d|
|00000a80| 65 66 61 75 6c 74 73 20 | 74 6f 20 74 68 65 20 65 |efaults |to the e|
|00000a90| 6d 70 74 79 20 6c 69 73 | 74 0d 09 09 74 6f 46 72 |mpty lis|t...toFr|
|00000aa0| 6f 6e 74 20 2d 20 62 6f | 6f 6c 65 61 6e 2c 20 64 |ont - bo|olean, d|
|00000ab0| 65 66 61 75 6c 74 73 20 | 74 6f 20 66 61 6c 73 65 |efaults |to false|
|00000ac0| 0d 09 52 65 74 75 72 6e | 73 3a 09 61 20 72 65 73 |..Return|s:.a res|
|00000ad0| 75 6c 74 61 6e 74 20 6c | 69 73 74 20 77 69 74 68 |ultant l|ist with|
|00000ae0| 20 74 68 65 20 61 64 64 | 65 64 20 65 6c 65 6d 65 | the add|ed eleme|
|00000af0| 6e 74 0d 09 46 75 6e 63 | 74 69 6f 6e 3a 09 47 69 |nt..Func|tion:.Gi|
|00000b00| 76 65 6e 20 61 6e 20 65 | 6c 65 6d 65 6e 74 20 61 |ven an e|lement a|
|00000b10| 6e 64 20 61 20 6c 69 73 | 74 2c 20 41 64 64 54 6f |nd a lis|t, AddTo|
|00000b20| 4c 69 73 74 20 77 69 6c | 6c 20 69 6e 73 65 72 74 |List wil|l insert|
|00000b30| 20 74 68 65 20 65 6c 65 | 6d 65 6e 74 20 69 6e 74 | the ele|ment int|
|00000b40| 6f 20 74 68 65 20 6c 69 | 73 74 20 65 69 74 68 65 |o the li|st eithe|
|00000b50| 72 20 74 6f 20 74 68 65 | 20 62 61 63 6b 20 6f 66 |r to the| back of|
|00000b60| 20 74 68 65 20 6c 69 73 | 74 20 62 79 20 64 65 66 | the lis|t by def|
|00000b70| 61 75 6c 74 20 6f 72 20 | 74 6f 20 74 68 65 20 66 |ault or |to the f|
|00000b80| 72 6f 6e 74 20 69 66 20 | 74 68 65 20 74 6f 46 72 |ront if |the toFr|
|00000b90| 6f 6e 74 20 70 61 72 61 | 6d 65 74 65 72 20 69 73 |ont para|meter is|
|00000ba0| 20 73 65 74 20 74 6f 20 | 74 72 75 65 2e 0d 09 45 | set to |true...E|
|00000bb0| 78 61 6d 70 6c 65 3a 09 | 70 72 69 6e 74 6c 6e 20 |xample:.|println |
|00000bc0| 41 64 64 54 6f 4c 69 73 | 74 28 d2 68 65 6c 6c 6f |AddToLis|t(.hello|
|00000bd0| d3 2c 20 7b d2 20 49 d3 | 2c 20 d2 61 6d d3 2c 20 |., {. I.|, .am., |
|00000be0| d2 79 6f 75 72 d3 2c 20 | d2 66 72 69 65 6e 64 d3 |.your., |.friend.|
|00000bf0| 7d 2c 20 74 72 75 65 29 | 3b 0d 09 09 09 7b d2 68 |}, true)|;....{.h|
|00000c00| 65 6c 6c 6f d3 2c 20 d2 | 49 d3 2c 20 d2 61 6d d3 |ello., .|I., .am.|
|00000c10| 2c 20 d2 79 6f 75 72 d3 | 2c 20 d2 66 72 69 65 6e |, .your.|, .frien|
|00000c20| 64 d3 7d 0d 43 6f 6e 63 | 61 74 53 74 72 69 6e 67 |d.}.Conc|atString|
|00000c30| 73 0d 09 50 61 72 61 6d | 65 74 65 72 73 3a 09 73 |s..Param|eters:.s|
|00000c40| 74 72 69 6e 67 4c 69 73 | 74 20 2d 20 61 20 6c 69 |tringLis|t - a li|
|00000c50| 73 74 20 6f 66 20 73 74 | 72 69 6e 67 73 20 74 6f |st of st|rings to|
|00000c60| 20 62 65 20 63 6f 6e 63 | 61 74 65 6e 61 74 65 64 | be conc|atenated|
|00000c70| 0d 09 52 65 74 75 72 6e | 73 3a 09 73 74 72 69 6e |..Return|s:.strin|
|00000c80| 67 20 2d 20 74 68 65 20 | 72 65 73 75 6c 74 20 6f |g - the |result o|
|00000c90| 66 20 74 68 65 20 73 74 | 72 69 6e 67 20 63 6f 6e |f the st|ring con|
|00000ca0| 63 61 74 65 6e 61 74 69 | 6f 6e 0d 09 46 75 6e 63 |catenati|on..Func|
|00000cb0| 74 69 6f 6e 3a 09 43 6f | 6e 63 61 74 53 74 72 69 |tion:.Co|ncatStri|
|00000cc0| 6e 67 73 20 77 69 6c 6c | 20 74 75 72 6e 20 61 20 |ngs will| turn a |
|00000cd0| 6c 69 73 74 20 6f 66 20 | 73 74 72 69 6e 67 73 20 |list of |strings |
|00000ce0| 69 6e 74 6f 20 61 20 73 | 69 6e 67 6c 65 20 73 74 |into a s|ingle st|
|00000cf0| 72 69 6e 67 20 61 6e 64 | 20 72 65 74 75 72 6e 20 |ring and| return |
|00000d00| 74 68 65 20 72 65 73 75 | 6c 74 2e 0d 09 45 78 61 |the resu|lt...Exa|
|00000d10| 6d 70 6c 65 3a 09 70 72 | 69 6e 74 6c 6e 20 43 6f |mple:.pr|intln Co|
|00000d20| 6e 63 61 74 53 74 72 69 | 6e 67 73 28 7b d2 6f 6e |ncatStri|ngs({.on|
|00000d30| 65 20 d2 2c 20 d2 74 77 | 6f 20 d2 2c 20 d2 74 68 |e ., .tw|o ., .th|
|00000d40| 72 65 65 20 d2 2c 20 d2 | 66 6f 75 72 20 d2 2c 20 |ree ., .|four ., |
|00000d50| d2 61 6e 64 20 d2 2c 20 | d2 66 69 76 65 21 d3 7d |.and ., |.five!.}|
|00000d60| 29 3b 0d 09 09 09 6f 6e | 65 20 74 77 6f 20 74 68 |);....on|e two th|
|00000d70| 72 65 65 20 66 6f 75 72 | 20 61 6e 64 20 66 69 76 |ree four| and fiv|
|00000d80| 65 21 0d 46 69 72 73 74 | 0d 09 50 61 72 61 6d 65 |e!.First|..Parame|
|00000d90| 74 65 72 73 3a 09 74 68 | 65 4c 69 73 74 20 2d 20 |ters:.th|eList - |
|00000da0| 61 6e 79 20 76 61 6c 69 | 64 20 6c 69 73 74 20 6f |any vali|d list o|
|00000db0| 66 20 65 6c 65 6d 65 6e | 74 73 0d 09 52 65 74 75 |f elemen|ts..Retu|
|00000dc0| 72 6e 73 3a 09 73 69 6e | 67 6c 65 20 65 6c 65 6d |rns:.sin|gle elem|
|00000dd0| 65 6e 74 20 2d 20 69 66 | 20 74 68 65 20 6f 70 65 |ent - if| the ope|
|00000de0| 72 61 74 69 6f 6e 20 63 | 6f 75 6c 64 20 6e 6f 74 |ration c|ould not|
|00000df0| 20 62 65 20 70 65 72 66 | 6f 72 6d 65 64 20 74 68 | be perf|ormed th|
|00000e00| 65 6e 20 75 6e 64 65 66 | 69 6e 65 64 20 69 73 20 |en undef|ined is |
|00000e10| 72 65 74 75 72 6e 65 64 | 0d 09 46 75 6e 63 74 69 |returned|..Functi|
|00000e20| 6f 6e 3a 09 46 69 72 73 | 74 20 77 69 6c 6c 20 72 |on:.Firs|t will r|
|00000e30| 65 74 75 72 6e 20 74 68 | 65 20 66 69 72 73 74 20 |eturn th|e first |
|00000e40| 65 6c 65 6d 65 6e 74 20 | 6f 66 20 61 20 6c 69 73 |element |of a lis|
|00000e50| 74 20 6f 66 20 65 6c 65 | 6d 65 6e 74 73 2e 20 20 |t of ele|ments. |
|00000e60| 49 66 20 74 68 65 20 6c | 69 73 74 20 69 73 20 65 |If the l|ist is e|
|00000e70| 6d 70 74 79 20 74 68 65 | 6e 20 75 6e 64 65 66 69 |mpty the|n undefi|
|00000e80| 6e 65 64 20 69 73 20 72 | 65 74 75 72 6e 65 64 2e |ned is r|eturned.|
|00000e90| 0d 09 45 78 61 6d 70 6c | 65 3a 09 70 72 69 6e 74 |..Exampl|e:.print|
|00000ea0| 6c 6e 20 46 69 72 73 74 | 28 7b d2 6d 79 20 73 74 |ln First|({.my st|
|00000eb0| 72 69 6e 67 d3 2c 20 32 | 2c 20 33 2c 20 d2 61 6e |ring., 2|, 3, .an|
|00000ec0| 6f 74 68 65 72 20 73 74 | 72 69 6e 67 d3 7d 29 3b |other st|ring.});|
|00000ed0| 0d 09 09 09 6d 79 20 73 | 74 72 69 6e 67 0d 09 09 |....my s|tring...|
|00000ee0| 70 72 69 6e 74 6c 6e 20 | 52 65 73 74 28 7b 7d 29 |println |Rest({})|
|00000ef0| 3b 0d 09 09 09 75 6e 64 | 65 66 69 6e 65 64 0d 49 |;....und|efined.I|
|00000f00| 73 53 75 62 73 74 72 69 | 6e 67 0d 09 50 61 72 61 |sSubstri|ng..Para|
|00000f10| 6d 65 74 65 72 73 3a 09 | 74 68 65 53 75 62 53 74 |meters:.|theSubSt|
|00000f20| 72 69 6e 67 2c 20 74 68 | 65 53 74 72 69 6e 67 20 |ring, th|eString |
|00000f30| 2d 20 73 74 72 69 6e 67 | 73 0d 09 52 65 74 75 72 |- string|s..Retur|
|00000f40| 6e 73 3a 09 69 6e 74 65 | 67 65 72 20 66 6f 72 20 |ns:.inte|ger for |
|00000f50| 73 75 63 63 65 73 73 66 | 75 6c 20 73 65 61 72 63 |successf|ul searc|
|00000f60| 68 2c 20 6f 74 68 65 72 | 77 69 73 65 20 66 61 6c |h, other|wise fal|
|00000f70| 73 65 2f 30 20 66 6f 72 | 20 66 61 69 6c 75 72 65 |se/0 for| failure|
|00000f80| 0d 09 46 75 6e 63 74 69 | 6f 6e 3a 09 57 68 65 6e |..Functi|on:.When|
|00000f90| 20 67 69 76 65 6e 20 74 | 77 6f 20 73 74 72 69 6e | given t|wo strin|
|00000fa0| 67 73 2c 20 74 68 65 20 | 6d 61 69 6e 20 73 74 72 |gs, the |main str|
|00000fb0| 69 6e 67 20 28 74 68 65 | 53 74 72 69 6e 67 29 20 |ing (the|String) |
|00000fc0| 61 6e 64 20 61 20 73 74 | 72 69 6e 67 20 74 6f 20 |and a st|ring to |
|00000fd0| 6c 6f 6f 6b 20 66 6f 72 | 20 28 74 68 65 53 75 62 |look for| (theSub|
|00000fe0| 53 74 72 69 6e 67 29 20 | 49 73 53 75 62 73 74 72 |String) |IsSubstr|
|00000ff0| 69 6e 67 20 77 69 6c 6c | 20 72 65 74 75 72 6e 20 |ing will| return |
|00001000| 74 68 65 20 73 74 61 72 | 74 69 6e 67 20 69 6e 64 |the star|ting ind|
|00001010| 65 78 20 69 6e 20 74 68 | 65 53 74 72 69 6e 67 20 |ex in th|eString |
|00001020| 77 68 65 72 65 20 74 68 | 65 53 75 62 53 74 72 69 |where th|eSubStri|
|00001030| 6e 67 20 66 69 72 73 74 | 20 6f 63 63 75 72 72 73 |ng first| occurrs|
|00001040| 2e 20 20 49 66 20 74 68 | 65 53 75 62 53 74 72 69 |. If th|eSubStri|
|00001050| 6e 67 20 64 6f 65 73 20 | 6e 6f 74 20 6f 63 63 75 |ng does |not occu|
|00001060| 72 72 20 69 6e 20 74 68 | 65 53 74 72 69 6e 67 2c |rr in th|eString,|
|00001070| 20 74 68 65 6e 20 66 61 | 6c 73 65 20 69 73 20 72 | then fa|lse is r|
|00001080| 65 74 75 72 6e 65 64 2e | 0d 09 45 78 61 6d 70 6c |eturned.|..Exampl|
|00001090| 65 3a 09 70 72 69 6e 74 | 6c 6e 20 49 73 53 75 62 |e:.print|ln IsSub|
|000010a0| 53 74 72 69 6e 67 28 d2 | 74 6f 6d d3 2c 20 d2 61 |String(.|tom., .a|
|000010b0| 75 74 6f 6d 61 74 69 6f | 6e d3 29 3b 0d 09 09 09 |utomatio|n.);....|
|000010c0| 33 0d 4d 61 6b 65 41 73 | 73 6f 63 0d 09 50 61 72 |3.MakeAs|soc..Par|
|000010d0| 61 6d 65 74 65 72 73 3a | 09 6f 62 6a 65 63 74 4c |ameters:|.objectL|
|000010e0| 69 73 74 2c 20 64 61 74 | 61 4c 69 73 74 20 2d 20 |ist, dat|aList - |
|000010f0| 74 77 6f 20 6c 69 73 74 | 73 20 6f 66 20 65 71 75 |two list|s of equ|
|00001100| 61 6c 20 73 69 7a 65 0d | 09 52 65 74 75 72 6e 73 |al size.|.Returns|
|00001110| 3a 09 6c 69 73 74 20 2d | 20 61 6e 20 61 73 73 6f |:.list -| an asso|
|00001120| 63 69 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 6f |ciation |of the o|
|00001130| 62 6a 65 63 74 73 20 61 | 6e 64 20 64 61 74 61 20 |bjects a|nd data |
|00001140| 70 61 73 73 65 64 20 69 | 6e 74 6f 20 74 68 65 20 |passed i|nto the |
|00001150| 74 61 73 6b 0d 09 46 75 | 6e 63 74 69 6f 6e 3a 09 |task..Fu|nction:.|
|00001160| 4d 61 6b 65 41 73 73 6f | 63 20 70 72 6f 76 69 64 |MakeAsso|c provid|
|00001170| 65 73 20 61 20 71 75 69 | 63 6b 20 77 61 79 20 74 |es a qui|ck way t|
|00001180| 6f 20 62 75 69 6c 64 20 | 6f 66 20 61 20 6c 69 73 |o build |of a lis|
|00001190| 74 20 6f 66 20 61 73 73 | 6f 63 69 61 74 65 64 20 |t of ass|ociated |
|000011a0| 64 61 74 61 20 74 68 61 | 74 20 63 61 6e 20 6c 61 |data tha|t can la|
|000011b0| 74 65 72 20 62 65 20 61 | 63 63 65 73 73 65 64 20 |ter be a|ccessed |
|000011c0| 62 79 20 74 68 65 20 62 | 75 69 6c 64 20 69 6e 20 |by the b|uild in |
|000011d0| 74 61 73 6b 20 61 73 73 | 6f 63 2e 20 20 54 68 65 |task ass|oc. The|
|000011e0| 20 74 61 73 6b 20 6d 61 | 6b 65 73 20 61 6e 64 20 | task ma|kes and |
|000011f0| 72 65 74 75 72 6e 73 20 | 61 20 6c 69 73 74 20 6f |returns |a list o|
|00001200| 66 20 70 61 69 72 73 20 | 62 61 73 65 64 20 6f 6e |f pairs |based on|
|00001210| 20 74 68 65 20 74 77 6f | 20 6c 69 73 74 73 20 70 | the two| lists p|
|00001220| 61 73 73 65 64 20 69 6e | 2e 0d 09 45 78 61 6d 70 |assed in|...Examp|
|00001230| 6c 65 3a 09 6d 79 41 73 | 73 6f 63 20 3a 3d 20 4d |le:.myAs|soc := M|
|00001240| 61 6b 65 41 73 73 6f 63 | 28 7b d2 61 72 74 d3 2c |akeAssoc|({.art.,|
|00001250| 20 d2 62 6f 62 d3 2c 20 | d2 74 6f 6d d3 7d 2c 20 | .bob., |.tom.}, |
|00001260| 7b 30 2c 20 35 2c 20 31 | 30 7d 29 3b 0d 09 09 70 |{0, 5, 1|0});...p|
|00001270| 72 69 6e 74 6c 6e 20 d2 | 42 6f 62 20 68 61 73 20 |rintln .|Bob has |
|00001280| 77 6f 72 6b 65 64 20 66 | 6f 72 20 d3 2c 20 61 73 |worked f|or ., as|
|00001290| 73 6f 63 28 d2 62 6f 62 | d3 2c 20 6d 79 41 73 73 |soc(.bob|., myAss|
|000012a0| 6f 63 7d 2c 20 d2 79 65 | 61 72 73 2e d3 3b 0d 09 |oc}, .ye|ars..;..|
|000012b0| 09 09 42 6f 62 20 68 61 | 73 20 77 6f 72 6b 65 64 |..Bob ha|s worked|
|000012c0| 20 66 6f 72 20 35 20 79 | 65 61 72 73 2e 0d 50 6f | for 5 y|ears..Po|
|000012d0| 70 53 74 61 63 6b 0d 09 | 50 61 72 61 6d 65 74 65 |pStack..|Paramete|
|000012e0| 72 73 3a 09 74 68 65 53 | 74 61 63 6b 20 2d 20 73 |rs:.theS|tack - s|
|000012f0| 69 6d 75 6c 61 74 65 64 | 20 73 74 61 63 6b 20 69 |imulated| stack i|
|00001300| 6e 20 74 68 65 20 66 6f | 72 6d 20 6f 66 20 61 20 |n the fo|rm of a |
|00001310| 6c 69 73 74 0d 09 52 65 | 74 75 72 6e 73 3a 09 6c |list..Re|turns:.l|
|00001320| 69 73 74 20 2d 20 74 77 | 6f 20 69 74 65 6d 73 20 |ist - tw|o items |
|00001330| 69 6e 20 74 68 65 20 6c | 69 73 74 20 74 68 65 20 |in the l|ist the |
|00001340| 66 69 72 73 74 20 69 73 | 20 74 68 65 20 d2 70 6f |first is| the .po|
|00001350| 70 70 65 64 d3 20 65 6c | 65 6d 65 6e 74 20 69 6e |pped. el|ement in|
|00001360| 20 74 68 65 20 6c 69 73 | 74 20 61 6e 64 20 74 68 | the lis|t and th|
|00001370| 65 20 73 65 63 6f 6e 64 | 20 69 73 20 74 68 65 20 |e second| is the |
|00001380| 6e 65 77 20 d2 73 74 61 | 63 6b d3 0d 09 46 75 6e |new .sta|ck...Fun|
|00001390| 63 74 69 6f 6e 3a 09 54 | 68 69 73 20 74 61 73 6b |ction:.T|his task|
|000013a0| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 77 69 74 | can be |used wit|
|000013b0| 68 20 74 68 65 20 50 75 | 73 68 53 74 61 63 6b 20 |h the Pu|shStack |
|000013c0| 74 61 73 6b 20 74 6f 20 | 73 69 6d 75 6c 61 74 65 |task to |simulate|
|000013d0| 20 61 20 73 74 61 63 6b | 20 77 69 74 68 20 6c 69 | a stack| with li|
|000013e0| 73 74 73 2e 20 20 47 69 | 76 65 6e 20 61 20 73 74 |sts. Gi|ven a st|
|000013f0| 61 63 6b 20 69 6e 20 74 | 68 65 20 66 6f 72 6d 20 |ack in t|he form |
|00001400| 6f 66 20 61 20 6c 69 73 | 74 2c 20 50 6f 70 53 74 |of a lis|t, PopSt|
|00001410| 61 63 6b 20 77 69 6c 6c | 20 72 65 74 75 72 6e 20 |ack will| return |
|00001420| 74 68 65 20 d2 70 6f 70 | 70 65 64 d3 20 65 6c 65 |the .pop|ped. ele|
|00001430| 6d 65 6e 74 20 6f 66 20 | 74 68 65 20 73 74 61 63 |ment of |the stac|
|00001440| 6b 20 61 6e 64 20 74 68 | 65 20 6e 65 77 20 73 74 |k and th|e new st|
|00001450| 61 63 6b 2e 20 20 49 74 | 20 69 73 20 75 70 20 74 |ack. It| is up t|
|00001460| 6f 20 74 68 65 20 75 73 | 65 72 20 74 6f 20 70 72 |o the us|er to pr|
|00001470| 6f 70 65 72 6c 79 20 61 | 73 73 69 67 6e 20 74 68 |operly a|ssign th|
|00001480| 65 20 70 6f 70 70 65 64 | 20 65 6c 65 6d 65 6e 74 |e popped| element|
|00001490| 20 74 6f 20 61 6e 20 61 | 70 70 72 6f 70 72 69 61 | to an a|ppropria|
|000014a0| 74 65 20 76 61 72 69 61 | 62 6c 65 20 61 73 20 77 |te varia|ble as w|
|000014b0| 65 6c 6c 20 61 73 20 75 | 70 64 61 74 65 20 74 68 |ell as u|pdate th|
|000014c0| 65 20 73 74 61 63 6b 20 | 76 61 72 69 61 62 6c 65 |e stack |variable|
|000014d0| 20 74 6f 20 69 74 73 20 | 6e 65 77 20 76 61 6c 75 | to its |new valu|
|000014e0| 65 2e 0d 09 45 78 61 6d | 70 6c 65 3a 09 74 65 6d |e...Exam|ple:.tem|
|000014f0| 70 4c 69 73 74 20 3a 3d | 20 50 6f 70 53 74 61 63 |pList :=| PopStac|
|00001500| 6b 28 73 6f 6d 65 53 74 | 61 63 6b 29 3b 0d 09 09 |k(someSt|ack);...|
|00001510| 70 6f 70 70 65 64 45 6c | 65 6d 65 6e 74 20 3a 3d |poppedEl|ement :=|
|00001520| 20 46 69 72 73 74 28 74 | 65 6d 70 4c 69 73 74 29 | First(t|empList)|
|00001530| 3b 0d 09 09 73 6f 6d 65 | 53 74 61 63 6b 20 3a 3d |;...some|Stack :=|
|00001540| 20 52 65 73 74 28 74 65 | 6d 70 4c 69 73 74 29 3b | Rest(te|mpList);|
|00001550| 0d 50 75 73 68 53 74 61 | 63 6b 0d 09 50 61 72 61 |.PushSta|ck..Para|
|00001560| 6d 65 74 65 72 73 3a 09 | 74 68 65 45 6c 65 6d 65 |meters:.|theEleme|
|00001570| 6e 74 20 2d 20 61 6e 79 | 20 65 6c 65 6d 65 6e 74 |nt - any| element|
|00001580| 20 74 68 61 74 20 63 61 | 6e 20 62 65 20 69 6e 63 | that ca|n be inc|
|00001590| 6f 72 70 6f 72 61 74 65 | 64 20 69 6e 74 6f 20 61 |orporate|d into a|
|000015a0| 20 6c 69 73 74 0d 09 09 | 74 68 65 53 74 61 63 6b | list...|theStack|
|000015b0| 20 2d 20 73 69 6d 75 6c | 61 74 65 64 20 73 74 61 | - simul|ated sta|
|000015c0| 63 6b 20 69 6e 20 74 68 | 65 20 66 6f 72 6d 20 6f |ck in th|e form o|
|000015d0| 66 20 61 20 6c 69 73 74 | 0d 09 52 65 74 75 72 6e |f a list|..Return|
|000015e0| 73 3a 09 6c 69 73 74 20 | 2d 20 74 68 65 20 75 70 |s:.list |- the up|
|000015f0| 64 61 74 65 64 20 d2 73 | 74 61 63 6b d3 20 77 69 |dated .s|tack. wi|
|00001600| 74 68 20 74 68 65 45 6c | 65 6d 65 6e 74 20 d2 70 |th theEl|ement .p|
|00001610| 75 73 68 65 64 d3 20 6f | 6e 20 74 6f 20 69 74 0d |ushed. o|n to it.|
|00001620| 09 46 75 6e 63 74 69 6f | 6e 3a 09 54 68 69 73 20 |.Functio|n:.This |
|00001630| 74 61 73 6b 20 63 61 6e | 20 62 65 20 75 73 65 64 |task can| be used|
|00001640| 20 77 69 74 68 20 74 68 | 65 20 50 6f 70 53 74 61 | with th|e PopSta|
|00001650| 63 6b 20 74 61 73 6b 20 | 74 6f 20 73 69 6d 75 6c |ck task |to simul|
|00001660| 61 74 65 20 61 20 73 74 | 61 63 6b 20 77 69 74 68 |ate a st|ack with|
|00001670| 20 6c 69 73 74 73 2e 20 | 20 47 69 76 65 6e 20 61 | lists. | Given a|
|00001680| 20 73 74 61 63 6b 20 69 | 6e 20 74 68 65 20 66 6f | stack i|n the fo|
|00001690| 72 6d 20 6f 66 20 61 20 | 6c 69 73 74 20 61 6e 64 |rm of a |list and|
|000016a0| 20 61 6e 20 65 6c 65 6d | 65 6e 74 2c 20 50 75 73 | an elem|ent, Pus|
|000016b0| 68 53 74 61 63 6b 20 77 | 69 6c 6c 20 61 64 64 20 |hStack w|ill add |
|000016c0| 74 68 65 20 65 6c 65 6d | 65 6e 74 20 74 6f 20 74 |the elem|ent to t|
|000016d0| 68 65 20 66 72 6f 6e 74 | 20 6f 66 20 74 68 65 20 |he front| of the |
|000016e0| 6c 69 73 74 2c 20 69 6e | 20 65 66 66 65 63 74 20 |list, in| effect |
|000016f0| d2 70 75 73 68 69 6e 67 | d3 20 69 6e 20 6f 6e 74 |.pushing|. in ont|
|00001700| 6f 20 74 68 65 20 73 69 | 6d 75 6c 61 74 65 64 20 |o the si|mulated |
|00001710| 73 74 61 63 6b 20 66 6f | 72 20 6c 61 74 65 72 20 |stack fo|r later |
|00001720| 75 73 65 2e 20 20 49 74 | 20 69 73 20 75 70 20 74 |use. It| is up t|
|00001730| 6f 20 74 68 65 20 75 73 | 65 72 20 74 6f 20 75 70 |o the us|er to up|
|00001740| 64 61 74 65 20 74 68 65 | 20 73 69 6d 75 6c 61 74 |date the| simulat|
|00001750| 65 64 20 73 74 61 63 6b | 20 76 61 72 69 61 62 6c |ed stack| variabl|
|00001760| 65 20 6f 66 20 74 68 65 | 20 63 68 61 6e 67 65 20 |e of the| change |
|00001770| 6d 61 64 65 2e 0d 09 45 | 78 61 6d 70 6c 65 3a 09 |made...E|xample:.|
|00001780| 73 6f 6d 65 53 74 61 63 | 6b 20 3a 3d 20 50 75 73 |someStac|k := Pus|
|00001790| 68 53 74 61 63 6b 28 6d | 79 56 61 72 69 61 62 6c |hStack(m|yVariabl|
|000017a0| 65 2c 20 73 6f 6d 65 53 | 74 61 63 6b 29 3b 0d 52 |e, someS|tack);.R|
|000017b0| 65 73 74 0d 09 50 61 72 | 61 6d 65 74 65 72 73 3a |est..Par|ameters:|
|000017c0| 09 74 68 65 4c 69 73 74 | 20 2d 20 61 6e 79 20 76 |.theList| - any v|
|000017d0| 61 6c 69 64 20 6c 69 73 | 74 20 6f 66 20 65 6c 65 |alid lis|t of ele|
|000017e0| 6d 65 6e 74 73 0d 09 52 | 65 74 75 72 6e 73 3a 09 |ments..R|eturns:.|
|000017f0| 6c 69 73 74 20 2d 20 74 | 68 65 20 72 65 73 75 6c |list - t|he resul|
|00001800| 74 61 6e 74 20 6c 69 73 | 74 2c 20 6f 72 20 75 6e |tant lis|t, or un|
|00001810| 64 65 66 69 6e 65 64 20 | 69 66 20 74 68 65 20 6c |defined |if the l|
|00001820| 69 73 74 20 69 73 20 6f | 66 20 6f 6e 65 20 6f 72 |ist is o|f one or|
|00001830| 20 66 65 77 65 72 20 65 | 6c 65 6d 65 6e 74 73 20 | fewer e|lements |
|00001840| 69 6e 20 73 69 7a 65 0d | 09 46 75 6e 63 74 69 6f |in size.|.Functio|
|00001850| 6e 3a 09 52 65 73 74 20 | 77 69 6c 6c 20 72 65 74 |n:.Rest |will ret|
|00001860| 75 72 6e 20 61 6c 6c 20 | 6f 66 20 74 68 65 20 65 |urn all |of the e|
|00001870| 6c 65 6d 65 6e 74 73 20 | 6f 66 20 61 20 6c 69 73 |lements |of a lis|
|00001880| 74 20 65 78 63 65 70 74 | 20 74 68 65 20 66 69 72 |t except| the fir|
|00001890| 73 74 20 65 6c 65 6d 65 | 6e 74 2e 20 20 49 66 20 |st eleme|nt. If |
|000018a0| 74 68 65 72 65 20 61 72 | 65 20 6f 6e 65 20 6f 72 |there ar|e one or|
|000018b0| 20 6e 6f 20 65 6c 65 6d | 65 6e 74 73 20 69 6e 20 | no elem|ents in |
|000018c0| 74 68 65 20 6c 69 73 74 | 2c 20 74 68 65 6e 20 75 |the list|, then u|
|000018d0| 6e 64 65 66 69 6e 65 64 | 20 69 73 20 72 65 74 75 |ndefined| is retu|
|000018e0| 72 6e 65 64 2e 0d 09 45 | 78 61 6d 70 6c 65 3a 09 |rned...E|xample:.|
|000018f0| 70 72 69 6e 74 6c 6e 20 | 52 65 73 74 28 7b d2 6d |println |Rest({.m|
|00001900| 79 20 73 74 72 69 6e 67 | d3 2c 20 32 2c 20 33 2c |y string|., 2, 3,|
|00001910| 20 d2 61 6e 6f 74 68 65 | 72 20 73 74 72 69 6e 67 | .anothe|r string|
|00001920| d3 7d 29 3b 0d 09 09 09 | 7b 32 2c 20 33 2c 20 d2 |.});....|{2, 3, .|
|00001930| 61 6e 6f 74 68 65 72 20 | 73 74 72 69 6e 67 d3 7d |another |string.}|
|00001940| 0d 09 09 70 72 69 6e 74 | 6c 6e 20 52 65 73 74 28 |...print|ln Rest(|
|00001950| 7b d2 6d 79 20 73 74 72 | 69 6e 67 d3 7d 29 3b 0d |{.my str|ing.});.|
|00001960| 09 09 09 75 6e 64 65 66 | 69 6e 65 64 0d 53 6f 72 |...undef|ined.Sor|
|00001970| 74 4c 69 73 74 0d 09 50 | 61 72 61 6d 65 74 65 72 |tList..P|arameter|
|00001980| 73 3a 09 74 68 65 4c 69 | 73 74 20 2d 20 74 68 65 |s:.theLi|st - the|
|00001990| 20 6c 69 73 74 20 74 6f | 20 62 65 20 73 6f 72 74 | list to| be sort|
|000019a0| 65 64 0d 09 52 65 74 75 | 72 6e 73 3a 09 6c 69 73 |ed..Retu|rns:.lis|
|000019b0| 74 20 2d 20 74 68 65 20 | 6e 65 77 6c 79 20 73 6f |t - the |newly so|
|000019c0| 72 74 65 64 20 6c 69 73 | 74 0d 09 46 75 6e 63 74 |rted lis|t..Funct|
|000019d0| 69 6f 6e 3a 09 53 6f 72 | 74 4c 69 73 74 20 70 65 |ion:.Sor|tList pe|
|000019e0| 72 66 6f 72 6d 73 20 61 | 20 62 75 62 62 6c 65 20 |rforms a| bubble |
|000019f0| 73 6f 72 74 20 6f 6e 20 | 74 68 65 20 64 61 74 61 |sort on |the data|
|00001a00| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 6e 20 61 20 | contain|ed in a |
|00001a10| 6c 69 73 74 2e 0d 09 45 | 78 61 6d 70 6c 65 3a 09 |list...E|xample:.|
|00001a20| 70 72 69 6e 74 6c 6e 20 | 53 6f 72 74 4c 69 73 74 |println |SortList|
|00001a30| 28 7b 33 2c 20 35 2c 20 | 32 2c 20 33 2c 20 39 2c |({3, 5, |2, 3, 9,|
|00001a40| 20 34 7d 29 3b 0d 09 09 | 09 7b 32 2c 20 33 2c 20 | 4});...|.{2, 3, |
|00001a50| 33 2c 20 34 2c 20 35 2c | 20 39 7d 0d 45 78 63 65 |3, 4, 5,| 9}.Exce|
|00001a60| 70 74 69 6f 6e 43 6f 64 | 65 73 2e 76 75 6c 69 62 |ptionCod|es.vulib|
|00001a70| 0d 44 65 66 69 6e 65 20 | 67 6c 6f 62 61 6c 20 65 |.Define |global e|
|00001a80| 78 63 65 70 74 69 6f 6e | 20 63 6f 64 65 20 63 6f |xception| code co|
|00001a90| 6e 73 74 61 6e 74 73 2e | 0d 4c 69 62 72 61 72 69 |nstants.|.Librari|
|00001aa0| 65 73 20 72 65 71 75 69 | 72 65 64 3a 20 6e 6f 6e |es requi|red: non|
|00001ab0| 65 0d 53 65 74 45 78 63 | 65 70 74 69 6f 6e 43 6f |e.SetExc|eptionCo|
|00001ac0| 6e 73 74 61 6e 74 73 0d | 09 50 61 72 61 6d 65 74 |nstants.|.Paramet|
|00001ad0| 65 72 73 3a 09 6e 6f 6e | 65 0d 09 52 65 74 75 72 |ers:.non|e..Retur|
|00001ae0| 6e 73 3a 09 6e 6f 6e 74 | 68 69 6e 67 0d 09 46 75 |ns:.nont|hing..Fu|
|00001af0| 6e 63 74 69 6f 6e 3a 09 | 53 65 74 45 78 63 65 70 |nction:.|SetExcep|
|00001b00| 74 69 6f 6e 43 6f 6e 73 | 74 61 6e 74 73 20 64 65 |tionCons|tants de|
|00001b10| 66 69 6e 65 73 20 67 6c | 6f 62 61 6c 20 63 6f 6e |fines gl|obal con|
|00001b20| 73 74 61 6e 74 73 20 66 | 6f 72 20 6d 61 6a 6f 72 |stants f|or major|
|00001b30| 20 65 78 63 65 70 74 69 | 6f 6e 20 63 6f 64 65 73 | excepti|on codes|
|00001b40| 20 74 68 61 74 20 6d 61 | 79 20 62 65 20 72 65 74 | that ma|y be ret|
|00001b50| 75 72 6e 65 64 20 77 68 | 65 6e 20 75 73 69 6e 67 |urned wh|en using|
|00001b60| 20 74 68 65 20 53 63 72 | 69 70 74 45 72 72 6f 72 | the Scr|iptError|
|00001b70| 20 62 75 69 6c 74 20 69 | 6e 20 74 61 73 6b 2e 0d | built i|n task..|
|00001b80| 09 45 78 61 6d 70 6c 65 | 3a 09 53 65 74 45 78 63 |.Example|:.SetExc|
|00001b90| 65 70 74 69 6f 6e 43 6f | 6e 74 61 6e 74 73 28 29 |eptionCo|ntants()|
|00001ba0| 3b 0d 09 09 6d 79 54 61 | 73 6b 28 29 3b 0d 09 09 |;...myTa|sk();...|
|00001bb0| 69 66 20 28 67 6c 6f 62 | 61 6c 20 6b 4f 76 65 72 |if (glob|al kOver|
|00001bc0| 46 6c 6f 77 45 72 72 20 | 3d 20 53 63 72 69 70 74 |FlowErr |= Script|
|00001bd0| 45 72 72 6f 72 28 29 29 | 0d 09 09 09 70 72 69 6e |Error())|....prin|
|00001be0| 74 6c 6e 20 d2 6f 6f 70 | 73 d3 3b 0d 47 65 73 74 |tln .oop|s.;.Gest|
|00001bf0| 61 6c 74 2e 76 75 6c 69 | 62 0d 54 61 73 6b 73 20 |alt.vuli|b.Tasks |
|00001c00| 74 6f 20 77 6f 72 6b 20 | 77 69 74 68 20 47 65 73 |to work |with Ges|
|00001c10| 74 61 6c 74 20 73 79 73 | 74 65 6d 20 69 6e 66 6f |talt sys|tem info|
|00001c20| 72 6d 61 74 69 6f 6e 20 | 63 61 6c 6c 73 2e 20 20 |rmation |calls. |
|00001c30| 57 69 74 68 20 74 68 65 | 20 65 78 63 65 70 74 69 |With the| excepti|
|00001c40| 6f 6e 20 6f 66 20 74 68 | 65 20 47 65 74 47 65 73 |on of th|e GetGes|
|00001c50| 74 61 6c 74 4c 6f 67 69 | 63 61 6c 52 41 4d 20 61 |taltLogi|calRAM a|
|00001c60| 6e 64 20 47 65 74 47 65 | 73 74 61 6c 74 50 68 79 |nd GetGe|staltPhy|
|00001c70| 73 69 63 61 6c 52 41 4d | 2c 20 61 6c 6c 20 74 61 |sicalRAM|, all ta|
|00001c80| 73 6b 73 20 72 65 74 75 | 72 6e 20 6f 6e 6c 79 20 |sks retu|rn only |
|00001c90| 73 74 72 69 6e 67 73 2e | 20 20 54 68 65 73 65 20 |strings.| These |
|00001ca0| 73 74 72 69 6e 67 73 20 | 61 72 65 20 73 69 6d 69 |strings |are simi|
|00001cb0| 6c 61 72 20 74 6f 20 74 | 68 65 20 6e 61 6d 65 73 |lar to t|he names|
|00001cc0| 20 6f 66 20 74 68 65 20 | 73 79 6d 62 6f 6c 69 63 | of the |symbolic|
|00001cd0| 20 47 65 73 74 61 6c 74 | 20 63 6f 6e 73 74 61 6e | Gestalt| constan|
|00001ce0| 74 73 20 61 73 20 64 65 | 66 69 6e 65 64 20 69 6e |ts as de|fined in|
|00001cf0| 20 49 6e 73 69 64 65 20 | 4d 61 63 69 6e 74 6f 73 | Inside |Macintos|
|00001d00| 68 20 56 6f 6c 75 6d 65 | 20 56 49 2e 20 20 41 6e |h Volume| VI. An|
|00001d10| 79 20 72 65 74 75 72 6e | 65 64 20 73 74 72 69 6e |y return|ed strin|
|00001d20| 67 20 77 69 74 68 20 61 | 6e 20 d2 75 6e 6b 6e d3 |g with a|n .unkn.|
|00001d30| 20 70 72 65 66 69 78 20 | 6d 65 61 6e 73 20 74 68 | prefix |means th|
|00001d40| 61 74 20 74 68 65 20 73 | 79 73 74 65 6d 20 62 65 |at the s|ystem be|
|00001d50| 69 6e 67 20 70 6f 6c 6c | 65 64 20 69 73 20 61 77 |ing poll|ed is aw|
|00001d60| 61 72 65 20 6f 66 20 74 | 68 65 20 70 6f 73 73 69 |are of t|he possi|
|00001d70| 62 6c 69 74 79 20 6f 66 | 20 74 68 65 20 61 62 69 |blity of| the abi|
|00001d80| 6c 69 74 79 20 69 6e 20 | 71 75 65 73 74 69 6f 6e |lity in |question|
|00001d90| 2c 20 62 75 74 20 74 68 | 61 74 20 69 74 20 69 73 |, but th|at it is|
|00001da0| 20 6e 6f 74 20 63 75 72 | 72 65 6e 74 6c 79 20 61 | not cur|rently a|
|00001db0| 63 74 69 76 65 2e 20 20 | 46 6f 72 20 69 6e 73 74 |ctive. |For inst|
|00001dc0| 61 6e 63 65 2c 20 74 68 | 65 20 47 65 74 47 65 73 |ance, th|e GetGes|
|00001dd0| 74 61 6c 74 56 4d 41 74 | 74 72 20 77 69 6c 6c 20 |taltVMAt|tr will |
|00001de0| 75 73 75 61 6c 6c 79 20 | 72 65 74 75 72 6e 20 6f |usually |return o|
|00001df0| 6e 65 20 6f 66 20 74 77 | 6f 20 70 6f 73 73 69 62 |ne of tw|o possib|
|00001e00| 69 6c 69 74 69 65 73 3a | 20 20 d2 56 4d 50 72 65 |ilities:| .VMPre|
|00001e10| 73 65 6e 74 d3 20 61 6e | 64 20 d2 75 6e 6b 6e 56 |sent. an|d .unknV|
|00001e20| 4d 41 74 74 72 2e d3 20 | 20 49 66 20 74 68 65 20 |MAttr.. | If the |
|00001e30| 74 61 72 67 65 74 20 68 | 61 73 20 76 69 72 74 75 |target h|as virtu|
|00001e40| 61 6c 20 6d 65 6d 6f 72 | 79 2c 20 d2 56 4d 50 72 |al memor|y, .VMPr|
|00001e50| 65 73 65 6e 74 d3 20 77 | 6f 75 6c 64 20 62 65 20 |esent. w|ould be |
|00001e60| 72 65 75 74 72 6e 65 64 | 2c 20 77 68 69 6c 65 20 |reutrned|, while |
|00001e70| 69 66 20 74 68 65 20 74 | 61 72 67 65 74 20 64 6f |if the t|arget do|
|00001e80| 65 73 20 6e 6f 74 20 68 | 61 76 65 20 76 69 72 74 |es not h|ave virt|
|00001e90| 75 61 6c 20 6d 65 6d 6f | 72 79 20 61 63 74 69 76 |ual memo|ry activ|
|00001ea0| 65 2c 20 d2 75 6e 6b 6e | 56 4d 41 74 74 72 d3 20 |e, .unkn|VMAttr. |
|00001eb0| 69 73 20 72 65 74 75 72 | 6e 65 64 2e 20 0d 4c 69 |is retur|ned. .Li|
|00001ec0| 62 72 61 72 69 65 73 20 | 72 65 71 75 69 72 65 64 |braries |required|
|00001ed0| 3a 20 44 61 74 61 55 74 | 69 6c 73 2e 76 75 6c 69 |: DataUt|ils.vuli|
|00001ee0| 62 20 0d 47 65 73 74 61 | 6c 74 47 65 74 45 72 72 |b .Gesta|ltGetErr|
|00001ef0| 6f 72 0d 09 50 61 72 61 | 6d 65 74 65 72 73 3a 09 |or..Para|meters:.|
|00001f00| 67 65 73 74 61 6c 74 41 | 6e 73 77 65 72 20 2d 20 |gestaltA|nswer - |
|00001f10| 47 65 73 74 61 6c 74 20 | 74 61 73 6b 20 63 61 6c |Gestalt |task cal|
|00001f20| 6c 20 72 65 73 70 6f 6e | 73 65 20 77 68 69 63 68 |l respon|se which|
|00001f30| 20 69 73 20 61 20 6c 69 | 73 74 20 6f 66 20 74 68 | is a li|st of th|
|00001f40| 65 20 65 72 72 6f 72 20 | 63 6f 64 65 20 72 65 74 |e error |code ret|
|00001f50| 75 72 6e 65 64 20 62 79 | 20 47 65 73 74 61 6c 74 |urned by| Gestalt|
|00001f60| 20 61 6e 64 20 61 20 70 | 61 69 72 20 6f 66 20 77 | and a p|air of w|
|00001f70| 6f 72 64 73 20 66 6f 72 | 6d 69 6e 67 20 74 68 65 |ords for|ming the|
|00001f80| 20 47 65 73 74 61 6c 74 | 20 61 6e 73 77 65 72 2e | Gestalt| answer.|
|00001f90| 0d 09 52 65 74 75 72 6e | 73 3a 09 69 6e 74 65 67 |..Return|s:.integ|
|00001fa0| 65 72 20 2d 20 74 68 65 | 20 65 72 72 6f 72 20 63 |er - the| error c|
|00001fb0| 6f 64 65 20 70 6f 72 74 | 69 6f 6e 20 6f 66 20 61 |ode port|ion of a|
|00001fc0| 20 47 65 73 74 61 6c 74 | 20 72 65 73 70 6f 6e 73 | Gestalt| respons|
|00001fd0| 65 0d 09 46 75 6e 63 74 | 69 6f 6e 3a 09 47 65 73 |e..Funct|ion:.Ges|
|00001fe0| 74 61 6c 74 47 65 74 45 | 72 72 6f 72 20 65 78 74 |taltGetE|rror ext|
|00001ff0| 72 61 63 74 73 20 61 6e | 64 20 72 65 74 75 72 6e |racts an|d return|
|00002000| 73 20 74 68 65 20 65 72 | 72 6f 72 20 63 6f 64 65 |s the er|ror code|
|00002010| 20 70 6f 72 74 69 6f 6e | 20 6f 66 20 61 20 67 69 | portion| of a gi|
|00002020| 76 65 6e 20 47 65 73 74 | 61 6c 74 20 72 65 73 70 |ven Gest|alt resp|
|00002030| 6f 6e 73 65 2e 0d 09 45 | 78 61 6d 70 6c 65 3a 09 |onse...E|xample:.|
|00002040| 6d 79 45 72 72 6f 72 20 | 3a 3d 20 47 65 74 47 65 |myError |:= GetGe|
|00002050| 73 74 61 6c 45 72 72 6f | 72 28 67 65 73 74 61 6c |stalErro|r(gestal|
|00002060| 74 28 6d 79 53 65 6c 65 | 63 74 6f 72 29 29 3b 0d |t(mySele|ctor));.|
|00002070| 47 65 73 74 61 6c 74 47 | 65 74 4c 6f 6e 67 45 72 |GestaltG|etLongEr|
|00002080| 72 6f 72 0d 09 50 61 72 | 61 6d 65 74 65 72 73 3a |ror..Par|ameters:|
|00002090| 09 67 65 73 74 61 6c 74 | 41 6e 73 77 65 72 20 2d |.gestalt|Answer -|
|000020a0| 20 47 65 73 74 61 6c 74 | 20 74 61 73 6b 20 63 61 | Gestalt| task ca|
|000020b0| 6c 6c 20 72 65 73 70 6f | 6e 73 65 20 77 68 69 63 |ll respo|nse whic|
|000020c0| 68 20 69 73 20 61 20 6c | 69 73 74 20 6f 66 20 74 |h is a l|ist of t|
|000020d0| 68 65 20 65 72 72 6f 72 | 20 63 6f 64 65 20 72 65 |he error| code re|
|000020e0| 74 75 72 6e 65 64 20 62 | 79 20 47 65 73 74 61 6c |turned b|y Gestal|
|000020f0| 74 20 61 6e 64 20 61 20 | 70 61 69 72 20 6f 66 20 |t and a |pair of |
|00002100| 77 6f 72 64 73 20 66 6f | 72 6d 69 6e 67 20 74 68 |words fo|rming th|
|00002110| 65 20 47 65 73 74 61 6c | 74 20 61 6e 73 77 65 72 |e Gestal|t answer|
|00002120| 2e 0d 09 52 65 74 75 72 | 6e 73 3a 09 73 74 72 69 |...Retur|ns:.stri|
|00002130| 6e 67 20 2d 20 74 68 65 | 20 73 74 72 69 6e 67 20 |ng - the| string |
|00002140| 69 73 20 61 20 70 68 72 | 61 73 65 20 64 65 73 63 |is a phr|ase desc|
|00002150| 72 69 62 69 6e 67 20 74 | 68 65 20 72 65 73 75 6c |ribing t|he resul|
|00002160| 74 61 6e 74 20 65 72 72 | 6f 72 20 63 6f 64 65 0d |tant err|or code.|
|00002170| 09 46 75 6e 63 74 69 6f | 6e 3a 09 47 65 73 74 61 |.Functio|n:.Gesta|
|00002180| 6c 74 47 65 74 4c 6f 6e | 67 45 72 72 6f 72 20 72 |ltGetLon|gError r|
|00002190| 65 74 75 72 6e 73 20 61 | 20 73 74 72 69 6e 67 20 |eturns a| string |
|000021a0| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 20 6f |represen|tation o|
|000021b0| 66 20 74 68 65 20 65 72 | 72 6f 72 20 63 6f 64 65 |f the er|ror code|
|000021c0| 20 74 68 61 74 20 69 73 | 20 67 69 76 65 6e 20 61 | that is| given a|
|000021d0| 73 20 61 20 70 61 72 61 | 6d 65 74 65 72 2e 20 49 |s a para|meter. I|
|000021e0| 66 20 74 68 65 20 65 72 | 72 6f 72 20 63 6f 64 65 |f the er|ror code|
|000021f0| 20 69 73 20 6e 6f 74 20 | 72 65 63 6f 67 6e 69 7a | is not |recogniz|
|00002200| 65 64 20 62 79 20 47 65 | 73 74 61 6c 74 47 65 74 |ed by Ge|staltGet|
|00002210| 4c 6f 6e 67 45 72 72 6f | 72 2c 20 74 68 65 6e 20 |LongErro|r, then |
|00002220| 74 68 65 20 70 68 72 61 | 73 65 20 d2 75 6e 6b 6e |the phra|se .unkn|
|00002230| 6f 77 6e 20 65 72 72 6f | 72 20 63 6f 64 65 3a 20 |own erro|r code: |
|00002240| 78 78 78 d3 20 69 73 20 | 72 65 74 75 72 6e 65 64 |xxx. is |returned|
|00002250| 2e 0d 09 45 78 61 6d 70 | 6c 65 3a 09 70 72 69 6e |...Examp|le:.prin|
|00002260| 74 6c 6e 20 47 65 73 74 | 61 6c 74 47 65 74 4c 6f |tln Gest|altGetLo|
|00002270| 6e 67 45 72 72 6f 72 28 | 6b 47 65 73 74 61 6c 74 |ngError(|kGestalt|
|00002280| 55 6e 6b 6f 77 6e 45 72 | 72 29 3b 0d 09 09 09 43 |UnkownEr|r);....C|
|00002290| 6f 75 6c 64 20 6e 6f 74 | 20 6f 62 74 61 69 6e 20 |ould not| obtain |
|000022a0| 72 65 73 70 6f 6e 73 65 | 0d 47 65 73 74 61 6c 74 |response|.Gestalt|
|000022b0| 47 65 74 56 61 6c 75 65 | 0d 09 50 61 72 61 6d 65 |GetValue|..Parame|
|000022c0| 74 65 72 73 3a 09 67 65 | 73 74 61 6c 74 41 6e 73 |ters:.ge|staltAns|
|000022d0| 77 65 72 20 2d 20 47 65 | 73 74 61 6c 74 20 74 61 |wer - Ge|stalt ta|
|000022e0| 73 6b 20 63 61 6c 6c 20 | 72 65 73 70 6f 6e 73 65 |sk call |response|
|000022f0| 20 77 68 69 63 68 20 69 | 73 20 61 20 6c 69 73 74 | which i|s a list|
|00002300| 20 6f 66 20 74 68 65 20 | 65 72 72 6f 72 20 63 6f | of the |error co|
|00002310| 64 65 20 72 65 74 75 72 | 6e 65 64 20 62 79 20 47 |de retur|ned by G|
|00002320| 65 73 74 61 6c 74 20 61 | 6e 64 20 61 20 70 61 69 |estalt a|nd a pai|
|00002330| 72 20 6f 66 20 77 6f 72 | 64 73 20 66 6f 72 6d 69 |r of wor|ds formi|
|00002340| 6e 67 20 74 68 65 20 47 | 65 73 74 61 6c 74 20 61 |ng the G|estalt a|
|00002350| 6e 73 77 65 72 2e 0d 09 | 52 65 74 75 72 6e 73 3a |nswer...|Returns:|
|00002360| 09 6c 69 73 74 20 2d 20 | 61 20 70 61 69 72 20 6f |.list - |a pair o|
|00002370| 66 20 69 6e 74 65 67 65 | 72 73 20 77 68 69 63 68 |f intege|rs which|
|00002380| 20 61 72 65 20 74 68 65 | 20 68 69 67 68 20 61 6e | are the| high an|
|00002390| 64 20 6c 6f 77 20 77 6f | 72 64 73 20 6f 66 20 61 |d low wo|rds of a|
|000023a0| 20 47 65 73 74 61 6c 74 | 20 72 65 73 70 6f 6e 73 | Gestalt| respons|
|000023b0| 65 0d 09 46 75 6e 63 74 | 69 6f 6e 3a 09 47 65 73 |e..Funct|ion:.Ges|
|000023c0| 74 61 6c 74 47 65 74 56 | 61 6c 75 65 20 65 78 74 |taltGetV|alue ext|
|000023d0| 72 61 63 74 73 20 61 6e | 64 20 72 65 74 75 72 6e |racts an|d return|
|000023e0| 73 20 74 68 65 20 61 6e | 73 77 65 72 20 70 6f 72 |s the an|swer por|
|000023f0| 74 69 6f 6e 20 6f 66 20 | 61 20 67 65 73 74 61 6c |tion of |a gestal|
|00002400| 74 20 74 61 73 6b 20 63 | 61 6c 6c 20 72 65 73 70 |t task c|all resp|
|00002410| 6f 6e 73 65 2e 0d 09 45 | 78 61 6d 70 6c 65 3a 09 |onse...E|xample:.|
|00002420| 70 72 69 6e 74 6c 6e 20 | 47 65 73 74 61 6c 74 47 |println |GestaltG|
|00002430| 65 74 56 61 6c 75 65 28 | 67 65 73 74 61 6c 74 28 |etValue(|gestalt(|
|00002440| 6d 79 53 65 6c 65 63 74 | 6f 72 29 29 3b 0d 09 09 |mySelect|or));...|
|00002450| 09 7b 20 32 33 34 2c 20 | 36 35 34 20 7d 0d 47 65 |.{ 234, |654 }.Ge|
|00002460| 73 74 61 6c 74 47 65 74 | 48 69 57 6f 72 64 0d 09 |staltGet|HiWord..|
|00002470| 50 61 72 61 6d 65 74 65 | 72 73 3a 09 67 65 73 74 |Paramete|rs:.gest|
|00002480| 61 6c 74 41 6e 73 77 65 | 72 20 2d 20 47 65 73 74 |altAnswe|r - Gest|
|00002490| 61 6c 74 20 74 61 73 6b | 20 63 61 6c 6c 20 72 65 |alt task| call re|
|000024a0| 73 70 6f 6e 73 65 20 77 | 68 69 63 68 20 69 73 20 |sponse w|hich is |
|000024b0| 61 20 6c 69 73 74 20 6f | 66 20 74 68 65 20 65 72 |a list o|f the er|
|000024c0| 72 6f 72 20 63 6f 64 65 | 20 72 65 74 75 72 6e 65 |ror code| returne|
|000024d0| 64 20 62 79 20 47 65 73 | 74 61 6c 74 20 61 6e 64 |d by Ges|talt and|
|000024e0| 20 61 20 70 61 69 72 20 | 6f 66 20 77 6f 72 64 73 | a pair |of words|
|000024f0| 20 66 6f 72 6d 69 6e 67 | 20 74 68 65 20 47 65 73 | forming| the Ges|
|00002500| 74 61 6c 74 20 61 6e 73 | 77 65 72 2e 0d 09 52 65 |talt ans|wer...Re|
|00002510| 74 75 72 6e 73 3a 09 69 | 6e 74 65 67 65 72 20 2d |turns:.i|nteger -|
|00002520| 20 74 68 65 20 68 69 67 | 68 20 77 6f 72 64 20 70 | the hig|h word p|
|00002530| 6f 72 74 69 6f 6e 20 6f | 66 20 61 20 47 65 73 74 |ortion o|f a Gest|
|00002540| 61 6c 20 72 65 73 70 6f | 6e 73 65 0d 09 46 75 6e |al respo|nse..Fun|
|00002550| 63 74 69 6f 6e 3a 09 47 | 65 73 74 61 6c 74 47 65 |ction:.G|estaltGe|
|00002560| 74 48 69 57 6f 72 64 20 | 72 65 74 75 72 6e 73 20 |tHiWord |returns |
|00002570| 74 68 65 20 68 69 67 68 | 20 77 6f 72 64 20 70 61 |the high| word pa|
|00002580| 72 74 20 6f 66 20 61 20 | 67 65 73 74 61 6c 74 20 |rt of a |gestalt |
|00002590| 74 61 73 6b 20 63 61 6c | 6c 20 72 65 73 70 6f 6e |task cal|l respon|
|000025a0| 73 65 2c 20 67 69 76 65 | 6e 20 74 68 65 20 65 6e |se, give|n the en|
|000025b0| 74 69 72 65 20 67 65 73 | 74 61 6c 74 20 63 61 6c |tire ges|talt cal|
|000025c0| 6c 20 72 65 73 70 6f 6e | 73 65 2e 0d 09 45 78 61 |l respon|se...Exa|
|000025d0| 6d 70 6c 65 3a 09 70 72 | 69 6e 74 6c 6e 20 47 65 |mple:.pr|intln Ge|
|000025e0| 73 74 61 6c 74 47 65 74 | 48 69 57 6f 72 64 28 67 |staltGet|HiWord(g|
|000025f0| 65 73 74 61 6c 74 28 6d | 79 53 65 6c 65 63 74 6f |estalt(m|ySelecto|
|00002600| 72 29 29 3b 0d 09 09 09 | 32 33 34 0d 47 65 73 74 |r));....|234.Gest|
|00002610| 61 6c 74 47 65 74 4c 6f | 57 6f 72 64 0d 09 50 61 |altGetLo|Word..Pa|
|00002620| 72 61 6d 65 74 65 72 73 | 3a 09 67 65 73 74 61 6c |rameters|:.gestal|
|00002630| 74 41 6e 73 77 65 72 20 | 2d 20 47 65 73 74 61 6c |tAnswer |- Gestal|
|00002640| 74 20 74 61 73 6b 20 63 | 61 6c 6c 20 72 65 73 70 |t task c|all resp|
|00002650| 6f 6e 73 65 20 77 68 69 | 63 68 20 69 73 20 61 20 |onse whi|ch is a |
|00002660| 6c 69 73 74 20 6f 66 20 | 74 68 65 20 65 72 72 6f |list of |the erro|
|00002670| 72 20 63 6f 64 65 20 72 | 65 74 75 72 6e 65 64 20 |r code r|eturned |
|00002680| 62 79 20 47 65 73 74 61 | 6c 74 20 61 6e 64 20 61 |by Gesta|lt and a|
|00002690| 20 70 61 69 72 20 6f 66 | 20 77 6f 72 64 73 20 66 | pair of| words f|
|000026a0| 6f 72 6d 69 6e 67 20 74 | 68 65 20 47 65 73 74 61 |orming t|he Gesta|
|000026b0| 6c 74 20 61 6e 73 77 65 | 72 2e 0d 09 52 65 74 75 |lt answe|r...Retu|
|000026c0| 72 6e 73 3a 09 69 6e 74 | 65 67 65 72 20 2d 20 74 |rns:.int|eger - t|
|000026d0| 68 65 20 6c 6f 77 20 77 | 6f 72 64 20 70 6f 72 74 |he low w|ord port|
|000026e0| 69 6f 6e 20 6f 66 20 61 | 20 47 65 73 74 61 6c 20 |ion of a| Gestal |
|000026f0| 72 65 73 70 6f 6e 73 65 | 0d 09 46 75 6e 63 74 69 |response|..Functi|
|00002700| 6f 6e 3a 09 47 65 73 74 | 61 6c 74 47 65 74 48 69 |on:.Gest|altGetHi|
|00002710| 57 6f 72 64 20 72 65 74 | 75 72 6e 73 20 74 68 65 |Word ret|urns the|
|00002720| 20 6c 6f 77 20 77 6f 72 | 64 20 70 61 72 74 20 6f | low wor|d part o|
|00002730| 66 20 61 20 67 65 73 74 | 61 6c 74 20 74 61 73 6b |f a gest|alt task|
|00002740| 20 63 61 6c 6c 20 72 65 | 73 70 6f 6e 73 65 2c 20 | call re|sponse, |
|00002750| 67 69 76 65 6e 20 74 68 | 65 20 65 6e 74 69 72 65 |given th|e entire|
|00002760| 20 67 65 73 74 61 6c 74 | 20 63 61 6c 6c 20 72 65 | gestalt| call re|
|00002770| 73 70 6f 6e 73 65 2e 0d | 09 45 78 61 6d 70 6c 65 |sponse..|.Example|
|00002780| 3a 09 70 72 69 6e 74 6c | 6e 20 47 65 73 74 61 6c |:.printl|n Gestal|
|00002790| 74 47 65 74 48 69 57 6f | 72 64 28 67 65 73 74 61 |tGetHiWo|rd(gesta|
|000027a0| 6c 74 28 6d 79 53 65 6c | 65 63 74 6f 72 29 29 3b |lt(mySel|ector));|
|000027b0| 0d 09 09 09 36 35 34 0d | 47 65 73 74 61 6c 74 53 |....654.|GestaltS|
|000027c0| 65 74 47 6c 6f 62 61 6c | 73 0d 09 50 61 72 61 6d |etGlobal|s..Param|
|000027d0| 65 74 65 72 73 3a 09 6e | 6f 6e 65 0d 09 52 65 74 |eters:.n|one..Ret|
|000027e0| 75 72 6e 73 3a 09 6e 6f | 74 68 69 6e 67 0d 09 46 |urns:.no|thing..F|
|000027f0| 75 6e 63 74 69 6f 6e 3a | 09 47 65 73 74 61 6c 74 |unction:|.Gestalt|
|00002800| 53 65 74 47 6c 6f 62 61 | 6c 73 20 73 65 74 73 20 |SetGloba|ls sets |
|00002810| 67 6c 6f 62 61 6c 20 63 | 6f 6e 73 74 61 6e 74 73 |global c|onstants|
|00002820| 20 77 68 69 63 68 20 63 | 6f 72 72 65 73 70 6f 6e | which c|orrespon|
|00002830| 64 20 74 6f 20 63 6f 6d | 6d 6f 6e 20 47 65 73 74 |d to com|mon Gest|
|00002840| 61 6c 74 20 65 72 72 6f | 72 73 20 74 68 61 74 20 |alt erro|rs that |
|00002850| 6d 61 79 20 62 65 20 72 | 65 74 75 72 6e 65 64 2e |may be r|eturned.|
|00002860| 0d 09 45 78 61 6d 70 6c | 65 3a 09 47 65 73 74 61 |..Exampl|e:.Gesta|
|00002870| 6c 74 53 65 74 47 6c 6f | 62 61 6c 73 28 29 3b 0d |ltSetGlo|bals();.|
|00002880| 09 09 69 66 20 28 67 6c | 6f 62 61 6c 20 6b 47 65 |..if (gl|obal kGe|
|00002890| 73 74 61 6c 74 4e 6f 45 | 72 72 20 3d 20 6d 79 47 |staltNoE|rr = myG|
|000028a0| 65 73 74 61 6c 74 45 72 | 72 6f 72 29 0d 09 09 09 |estaltEr|ror)....|
|000028b0| 70 72 69 6e 74 6c 6e 20 | d2 4a 6f 79 21 d3 3b 0d |println |.Joy!.;.|
|000028c0| 47 65 74 47 65 73 74 61 | 6c 74 41 64 64 72 65 73 |GetGesta|ltAddres|
|000028d0| 73 69 6e 67 4d 6f 64 65 | 41 74 74 72 0d 09 50 61 |singMode|Attr..Pa|
|000028e0| 72 61 6d 65 74 65 72 73 | 3a 09 6e 6f 6e 65 0d 09 |rameters|:.none..|
|000028f0| 52 65 74 75 72 6e 73 3a | 09 73 74 72 69 6e 67 20 |Returns:|.string |
|00002900| 2d 20 61 20 73 74 72 69 | 6e 67 20 72 65 70 72 65 |- a stri|ng repre|
|00002910| 73 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 74 68 65 |sentatio|n of the|
|00002920| 20 47 65 73 74 61 6c 74 | 20 72 65 73 70 6f 6e 73 | Gestalt| respons|
|00002930| 65 0d 09 46 75 6e 63 74 | 69 6f 6e 3a 09 47 65 74 |e..Funct|ion:.Get|
|00002940| 47 65 73 74 61 6c 74 41 | 64 64 72 65 73 73 69 6e |GestaltA|ddressin|
|00002950| 67 4d 6f 64 65 41 74 74 | 72 20 71 75 65 72 69 65 |gModeAtt|r querie|
|00002960| 73 20 74 68 65 20 74 61 | 72 67 65 74 20 74 6f 20 |s the ta|rget to |
|00002970| 64 65 74 65 72 6d 69 6e | 65 20 74 68 65 20 63 75 |determin|e the cu|
|00002980| 72 72 65 6e 74 20 6d 65 | 6d 6f 72 79 20 61 64 64 |rrent me|mory add|
|00002990| 72 65 73 73 69 6e 67 20 | 6d 6f 64 65 2e 20 20 42 |ressing |mode. B|
|000029a0| 65 73 69 64 65 73 20 65 | 72 72 6f 72 20 72 65 73 |esides e|rror res|
|000029b0| 70 6f 6e 73 65 73 20 61 | 6e 64 20 61 6e 20 d2 75 |ponses a|nd an .u|
|000029c0| 6e 6b 6e d3 20 6d 6f 64 | 65 20 72 65 73 70 6f 6e |nkn. mod|e respon|
|000029d0| 73 65 2c 20 20 70 6f 73 | 73 69 62 6c 65 20 72 65 |se, pos|sible re|
|000029e0| 73 70 6f 6e 73 65 73 20 | 69 6e 63 6c 75 64 65 3a |sponses |include:|
|000029f0| 0d 09 09 09 09 33 32 42 | 69 74 41 64 64 72 65 73 |.....32B|itAddres|
|00002a00| 73 69 6e 67 0d 09 09 09 | 09 33 32 42 69 74 53 79 |sing....|.32BitSy|
|00002a10| 73 5a 6f 6e 65 0d 09 09 | 09 09 33 32 42 69 74 43 |sZone...|..32BitC|
|00002a20| 61 70 61 62 6c 65 0d 47 | 65 74 47 65 73 74 61 6c |apable.G|etGestal|
|00002a30| 74 45 61 73 79 41 63 63 | 65 73 73 41 74 74 72 0d |tEasyAcc|essAttr.|
|00002a40| 09 50 61 72 61 6d 65 74 | 65 72 73 3a 09 6e 6f 6e |.Paramet|ers:.non|
|00002a50| 65 0d 09 52 65 74 75 72 | 6e 73 3a 09 73 74 72 69 |e..Retur|ns:.stri|
|00002a60| 6e 67 20 2d 20 61 20 73 | 74 72 69 6e 67 20 72 65 |ng - a s|tring re|
|00002a70| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |presenta|tion of |
|00002a80| 74 68 65 20 47 65 73 74 | 61 6c 74 20 72 65 73 70 |the Gest|alt resp|
|00002a90| 6f 6e 73 65 0d 09 46 75 | 6e 63 74 69 6f 6e 3a 09 |onse..Fu|nction:.|
|00002aa0| 47 65 74 47 65 73 74 61 | 6c 74 45 61 73 79 41 63 |GetGesta|ltEasyAc|
|00002ab0| 63 65 73 73 41 74 74 72 | 20 71 75 65 72 69 65 73 |cessAttr| queries|
|00002ac0| 20 74 68 65 20 74 61 72 | 67 65 74 20 74 6f 20 64 | the tar|get to d|
|00002ad0| 65 74 65 72 6d 69 6e 65 | 20 74 68 65 20 63 75 72 |etermine| the cur|
|00002ae0| 72 65 6e 74 20 61 74 74 | 72 69 62 75 74 65 73 20 |rent att|ributes |
|00002af0| 6f 66 20 74 68 65 20 45 | 61 73 79 20 41 63 63 65 |of the E|asy Acce|
|00002b00| 73 73 20 73 65 74 74 69 | 6e 67 73 2e 20 20 42 65 |ss setti|ngs. Be|
|00002b10| 73 69 64 65 73 20 65 72 | 72 6f 72 20 72 65 73 70 |sides er|ror resp|
|00002b20| 6f 6e 73 65 73 20 61 6e | 64 20 61 6e 20 d2 75 6e |onses an|d an .un|
|00002b30| 6b 6e d3 20 61 74 74 72 | 69 62 75 74 65 20 72 65 |kn. attr|ibute re|
|00002b40| 73 70 6f 6e 73 65 2c 20 | 70 6f 73 73 69 62 6c 65 |sponse, |possible|
|00002b50| 20 72 65 73 70 6f 6e 73 | 65 73 20 69 6e 63 6c 75 | respons|es inclu|
|00002b60| 64 65 3a 0d 09 09 09 09 | 6f 66 66 0d 09 09 09 09 |de:.....|off.....|
|00002b70| 6f 6e 0d 09 09 09 09 73 | 74 69 63 6b 79 0d 09 09 |on.....s|ticky...|
|00002b80| 09 09 6c 6f 63 6b 65 64 | 0d 47 65 74 47 65 73 74 |..locked|.GetGest|
|00002b90| 61 6c 74 46 50 55 54 79 | 70 65 0d 09 50 61 72 61 |altFPUTy|pe..Para|
|00002ba0| 6d 65 74 65 72 73 3a 09 | 6e 6f 6e 65 0d 09 52 65 |meters:.|none..Re|
|00002bb0| 74 75 72 6e 73 3a 09 73 | 74 72 69 6e 67 20 2d 20 |turns:.s|tring - |
|00002bc0| 61 20 73 74 72 69 6e 67 | 20 72 65 70 72 65 73 65 |a string| represe|
|00002bd0| 6e 74 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 47 |ntation |of the G|
|00002be0| 65 73 74 61 6c 74 20 72 | 65 73 70 6f 6e 73 65 0d |estalt r|esponse.|
|00002bf0| 09 46 75 6e 63 74 69 6f | 6e 3a 09 47 65 74 47 65 |.Functio|n:.GetGe|
|00002c00| 73 74 61 6c 74 46 50 55 | 54 79 70 65 20 71 75 65 |staltFPU|Type que|
|00002c10| 72 69 65 73 20 74 68 65 | 20 74 61 72 67 65 74 20 |ries the| target |
|00002c20| 74 6f 20 64 65 74 65 72 | 6d 69 6e 65 20 74 68 65 |to deter|mine the|
|00002c30| 20 63 75 72 72 65 6e 74 | 20 66 6c 6f 61 74 69 6e | current| floatin|
|00002c40| 67 20 70 6f 69 6e 74 20 | 63 6f 70 72 6f 63 65 73 |g point |coproces|
|00002c50| 73 6f 72 20 69 6e 20 75 | 73 65 2e 20 20 42 65 73 |sor in u|se. Bes|
|00002c60| 69 64 65 73 20 65 72 72 | 6f 72 20 72 65 73 70 6f |ides err|or respo|
|00002c70| 6e 73 65 73 20 61 6e 64 | 20 61 6e 20 d2 75 6e 6b |nses and| an .unk|
|00002c80| 6e d3 20 66 70 75 20 72 | 65 73 70 6f 6e 73 65 2c |n. fpu r|esponse,|
|00002c90| 20 70 6f 73 73 69 62 6c | 65 20 72 65 73 70 6f 6e | possibl|e respon|
|00002ca0| 73 65 73 20 69 6e 63 6c | 75 64 65 3a 0d 09 09 09 |ses incl|ude:....|
|00002cb0| 09 4e 6f 46 50 55 0d 09 | 09 09 09 36 38 38 38 31 |.NoFPU..|...68881|
|00002cc0| 0d 09 09 09 09 36 38 38 | 38 32 0d 09 09 09 09 36 |.....688|82.....6|
|00002cd0| 38 30 34 30 46 50 55 0d | 47 65 74 47 65 73 74 61 |8040FPU.|GetGesta|
|00002ce0| 6c 74 4b 65 79 62 6f 61 | 72 64 54 79 70 65 0d 09 |ltKeyboa|rdType..|
|00002cf0| 50 61 72 61 6d 65 74 65 | 72 73 3a 09 6e 6f 6e 65 |Paramete|rs:.none|
|00002d00| 0d 09 52 65 74 75 72 6e | 73 3a 09 73 74 72 69 6e |..Return|s:.strin|
|00002d10| 67 20 2d 20 61 20 73 74 | 72 69 6e 67 20 72 65 70 |g - a st|ring rep|
|00002d20| 72 65 73 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 74 |resentat|ion of t|
|00002d30| 68 65 20 47 65 73 74 61 | 6c 74 20 72 65 73 70 6f |he Gesta|lt respo|
|00002d40| 6e 73 65 0d 09 46 75 6e | 63 74 69 6f 6e 3a 09 47 |nse..Fun|ction:.G|
|00002d50| 65 74 47 65 73 74 61 6c | 74 4b 65 79 62 6f 61 72 |etGestal|tKeyboar|
|00002d60| 64 54 79 70 65 20 71 75 | 65 72 69 65 73 20 74 68 |dType qu|eries th|
|00002d70| 65 20 74 61 72 67 65 74 | 20 74 6f 20 64 65 74 65 |e target| to dete|
|00002d80| 72 6d 69 6e 65 20 74 68 | 65 20 63 75 72 72 65 6e |rmine th|e curren|
|00002d90| 74 20 74 79 70 65 20 6f | 66 20 6b 65 79 62 6f 61 |t type o|f keyboa|
|00002da0| 72 64 20 69 6e 20 75 73 | 65 2e 20 20 42 65 73 69 |rd in us|e. Besi|
|00002db0| 64 65 73 20 65 72 72 6f | 72 20 72 65 73 70 6f 6e |des erro|r respon|
|00002dc0| 73 65 73 20 61 6e 64 20 | 61 6e 20 d2 75 6e 6b 6e |ses and |an .unkn|
|00002dd0| d3 20 6b 65 79 62 6f 61 | 72 64 20 72 65 73 70 6f |. keyboa|rd respo|
|00002de0| 6e 73 65 2c 20 70 6f 73 | 73 69 62 6c 65 20 72 65 |nse, pos|sible re|
|00002df0| 73 70 6f 6e 73 65 73 20 | 69 6e 63 6c 75 64 65 3a |sponses |include:|
|00002e00| 0d 09 09 09 09 4d 61 63 | 4b 62 64 0d 09 09 09 09 |.....Mac|Kbd.....|
|00002e10| 4d 61 63 4b 62 64 41 6e | 64 50 61 64 0d 09 09 09 |MacKbdAn|dPad....|
|00002e20| 09 4d 61 63 50 6c 75 73 | 4b 62 64 0d 09 09 09 09 |.MacPlus|Kbd.....|
|00002e30| 45 78 74 41 44 42 4b 62 | 64 0d 09 09 09 09 53 74 |ExtADBKb|d.....St|
|00002e40| 64 41 44 42 4b 62 64 0d | 09 09 09 09 50 72 74 62 |dADBKbd.|....Prtb|
|00002e50| 6c 41 44 42 4b 62 64 0d | 09 09 09 09 50 72 74 62 |lADBKbd.|....Prtb|
|00002e60| 6c 49 53 4f 4b 62 64 0d | 09 09 09 09 53 74 64 49 |lISOKbd.|....StdI|
|00002e70| 53 4f 41 44 42 4b 62 64 | 0d 09 09 09 09 45 78 74 |SOADBKbd|.....Ext|
|00002e80| 49 53 4f 41 44 42 4b 62 | 64 0d 09 09 09 09 41 44 |ISOADBKb|d.....AD|
|00002e90| 42 4b 62 64 49 49 0d 09 | 09 09 09 41 44 42 49 53 |BKbdII..|...ADBIS|
|00002ea0| 4f 4b 62 64 49 49 0d 47 | 65 74 47 65 73 74 61 6c |OKbdII.G|etGestal|
|00002eb0| 74 4c 6f 67 69 63 61 6c | 52 41 4d 53 69 7a 65 0d |tLogical|RAMSize.|
|00002ec0| 09 50 61 72 61 6d 65 74 | 65 72 73 3a 09 6e 6f 6e |.Paramet|ers:.non|
|00002ed0| 65 0d 09 52 65 74 75 72 | 6e 73 3a 09 69 6e 74 65 |e..Retur|ns:.inte|
|00002ee0| 67 65 72 20 2d 20 72 65 | 70 72 65 73 6e 74 61 74 |ger - re|presntat|
|00002ef0| 69 6f 6e 20 6f 66 20 6d | 65 6d 6f 72 79 20 69 6e |ion of m|emory in|
|00002f00| 20 6d 65 67 61 62 79 74 | 65 73 0d 09 46 75 6e 63 | megabyt|es..Func|
|00002f10| 74 69 6f 6e 3a 09 47 65 | 73 74 61 6c 74 47 65 74 |tion:.Ge|staltGet|
|00002f20| 4c 6f 67 69 63 61 6c 52 | 41 4d 53 69 7a 65 20 77 |LogicalR|AMSize w|
|00002f30| 69 6c 6c 20 72 65 74 75 | 72 6e 20 74 68 65 20 6c |ill retu|rn the l|
|00002f40| 6f 67 69 63 61 6c 20 61 | 6d 6f 75 6e 74 20 6f 66 |ogical a|mount of|
|00002f50| 20 6d 65 6d 6f 72 79 20 | 69 6e 20 74 68 65 20 74 | memory |in the t|
|00002f60| 61 72 67 65 74 20 6d 61 | 63 68 69 6e 65 2e 20 20 |arget ma|chine. |
|00002f70| 54 68 65 20 6c 6f 67 69 | 63 61 6c 20 6d 65 6d 6f |The logi|cal memo|
|00002f80| 72 79 20 69 73 20 61 20 | 63 6f 6d 62 69 6e 61 74 |ry is a |combinat|
|00002f90| 69 6f 6e 20 6f 66 20 74 | 68 65 20 70 68 79 73 69 |ion of t|he physi|
|00002fa0| 63 61 6c 20 61 6d 6f 75 | 6e 74 20 6f 66 20 52 41 |cal amou|nt of RA|
|00002fb0| 4d 20 61 6e 64 20 74 68 | 65 20 63 75 72 72 65 6e |M and th|e curren|
|00002fc0| 74 6c 79 20 61 63 74 69 | 76 65 20 76 69 72 74 75 |tly acti|ve virtu|
|00002fd0| 61 6c 20 6d 65 6d 6f 72 | 79 2e 20 20 54 68 65 20 |al memor|y. The |
|00002fe0| 61 6e 73 77 65 72 20 69 | 73 20 69 6e 20 6d 65 67 |answer i|s in meg|
|00002ff0| 61 62 79 74 65 73 2e 0d | 09 45 78 61 6d 70 6c 65 |abytes..|.Example|
|00003000| 3a 09 70 72 69 6e 74 6c | 6e 20 47 65 73 74 61 6c |:.printl|n Gestal|
|00003010| 74 47 65 74 4c 6f 67 69 | 63 61 6c 52 41 4d 53 69 |tGetLogi|calRAMSi|
|00003020| 7a 65 28 29 3b 0d 09 09 | 09 31 32 0d 47 65 74 47 |ze();...|.12.GetG|
|00003030| 65 73 74 61 6c 74 4d 61 | 63 68 69 6e 65 54 79 70 |estaltMa|chineTyp|
|00003040| 65 0d 09 50 61 72 61 6d | 65 74 65 72 73 3a 09 6e |e..Param|eters:.n|
|00003050| 6f 6e 65 0d 09 52 65 74 | 75 72 6e 73 3a 09 73 74 |one..Ret|urns:.st|
|00003060| 72 69 6e 67 20 2d 20 61 | 20 73 74 72 69 6e 67 20 |ring - a| string |
|00003070| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 20 6f |represen|tation o|
|00003080| 66 20 74 68 65 20 47 65 | 73 74 61 6c 74 20 72 65 |f the Ge|stalt re|
|00003090| 73 70 6f 6e 73 65 0d 09 | 46 75 6e 63 74 69 6f 6e |sponse..|Function|
|000030a0| 3a 09 47 65 73 74 61 6c | 74 47 65 74 4d 61 63 68 |:.Gestal|tGetMach|
|000030b0| 69 6e 65 54 79 70 65 20 | 77 69 6c 6c 20 72 65 74 |ineType |will ret|
|000030c0| 75 72 6e 20 61 20 73 74 | 72 69 6e 67 20 72 65 70 |urn a st|ring rep|
|000030d0| 72 65 73 65 6e 74 69 6e | 67 20 74 68 65 20 74 79 |resentin|g the ty|
|000030e0| 70 65 20 6f 66 20 4d 61 | 63 69 6e 74 6f 73 68 20 |pe of Ma|cintosh |
|000030f0| 74 68 65 20 74 61 72 67 | 65 74 20 6d 61 63 68 69 |the targ|et machi|
|00003100| 6e 65 20 69 73 2e 20 20 | 4e 6f 74 65 20 74 68 61 |ne is. |Note tha|
|00003110| 74 20 74 68 65 20 d2 43 | 6c 61 73 73 69 63 d3 20 |t the .C|lassic. |
|00003120| 72 65 73 70 6f 6e 73 65 | 20 64 6f 65 73 20 6e 6f |response| does no|
|00003130| 74 20 6d 65 61 6e 20 74 | 68 65 20 4d 61 63 69 6e |t mean t|he Macin|
|00003140| 74 6f 73 68 20 43 6c 61 | 73 73 69 63 20 63 6f 6d |tosh Cla|ssic com|
|00003150| 70 75 74 65 72 2c 20 62 | 75 74 20 72 65 66 65 72 |puter, b|ut refer|
|00003160| 73 20 74 6f 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |s to the| origina|
|00003170| 6c 20 4d 61 63 69 6e 74 | 6f 73 68 2e 20 20 42 65 |l Macint|osh. Be|
|00003180| 73 69 64 65 73 20 65 72 | 72 6f 72 20 72 65 73 70 |sides er|ror resp|
|00003190| 6f 6e 73 65 73 20 61 6e | 64 20 61 6e 20 d2 75 6e |onses an|d an .un|
|000031a0| 6b 6e d3 20 6d 61 63 68 | 69 6e 65 20 74 79 70 65 |kn. mach|ine type|
|000031b0| 20 72 65 73 70 6f 6e 73 | 65 2c 20 70 6f 73 73 69 | respons|e, possi|
|000031c0| 62 6c 65 20 72 65 73 70 | 6f 6e 73 65 73 20 69 6e |ble resp|onses in|
|000031d0| 63 6c 75 64 65 3a 0d 09 | 09 09 09 43 6c 61 73 73 |clude:..|...Class|
|000031e0| 69 63 0d 09 09 09 09 4d | 61 63 58 4c 0d 09 09 09 |ic.....M|acXL....|
|000031f0| 09 4d 61 63 35 31 32 4b | 45 0d 09 09 09 09 4d 61 |.Mac512K|E.....Ma|
|00003200| 63 50 6c 75 73 0d 09 09 | 09 09 4d 61 63 53 45 0d |cPlus...|..MacSE.|
|00003210| 09 09 09 09 4d 61 63 49 | 49 0d 09 09 09 09 4d 61 |....MacI|I.....Ma|
|00003220| 63 49 49 78 0d 09 09 09 | 09 4d 61 63 49 49 63 78 |cIIx....|.MacIIcx|
|00003230| 0d 09 09 09 09 4d 61 63 | 53 45 30 33 30 0d 09 09 |.....Mac|SE030...|
|00003240| 09 09 50 6f 72 74 61 62 | 6c 65 0d 09 09 09 09 4d |..Portab|le.....M|
|00003250| 61 63 49 49 63 69 0d 09 | 09 09 09 4d 61 63 49 49 |acIIci..|...MacII|
|00003260| 66 78 0d 09 09 09 09 4d | 61 63 43 6c 61 73 73 69 |fx.....M|acClassi|
|00003270| 63 0d 09 09 09 09 4d 61 | 63 49 49 73 69 0d 09 09 |c.....Ma|cIIsi...|
|00003280| 09 09 4d 61 63 4c 43 0d | 09 09 09 09 51 75 61 64 |..MacLC.|....Quad|
|00003290| 72 61 39 30 30 0d 09 09 | 09 09 50 6f 77 65 72 62 |ra900...|..Powerb|
|000032a0| 6f 6f 6b 31 37 30 0d 09 | 09 09 09 51 75 61 64 72 |ook170..|...Quadr|
|000032b0| 61 37 30 30 0d 2d 2d 09 | 09 09 09 43 6c 61 73 73 |a700.--.|...Class|
|000032c0| 69 63 49 49 0d 09 09 09 | 09 50 6f 77 65 72 42 6f |icII....|.PowerBo|
|000032d0| 6f 6b 31 30 30 0d 09 09 | 09 09 50 6f 77 65 72 42 |ok100...|..PowerB|
|000032e0| 6f 6f 6b 31 34 30 0d 47 | 65 74 47 65 73 74 61 6c |ook140.G|etGestal|
|000032f0| 74 4d 4d 55 54 79 70 65 | 0d 09 50 61 72 61 6d 65 |tMMUType|..Parame|
|00003300| 74 65 72 73 3a 09 6e 6f | 6e 65 0d 09 52 65 74 75 |ters:.no|ne..Retu|
|00003310| 72 6e 73 3a 09 73 74 72 | 69 6e 67 20 2d 20 61 20 |rns:.str|ing - a |
|00003320| 73 74 72 69 6e 67 20 72 | 65 70 72 65 73 65 6e 74 |string r|epresent|
|00003330| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 47 65 73 |ation of| the Ges|
|00003340| 74 61 6c 74 20 72 65 73 | 70 6f 6e 73 65 0d 09 46 |talt res|ponse..F|
|00003350| 75 6e 63 74 69 6f 6e 3a | 09 47 65 73 74 61 6c 74 |unction:|.Gestalt|
|00003360| 47 65 74 4d 4d 55 54 79 | 70 65 20 71 75 65 72 69 |GetMMUTy|pe queri|
|00003370| 65 73 20 74 68 65 20 74 | 61 72 67 65 74 20 74 6f |es the t|arget to|
|00003380| 20 64 65 74 65 72 6d 69 | 6e 65 20 74 68 65 20 63 | determi|ne the c|
|00003390| 75 72 72 65 6e 74 20 6d | 65 6d 6f 72 79 20 6d 61 |urrent m|emory ma|
|000033a0| 6e 61 67 65 6d 65 6e 74 | 20 75 6e 69 74 20 69 6e |nagement| unit in|
|000033b0| 20 75 73 65 2e 20 20 42 | 65 73 69 64 65 73 20 65 | use. B|esides e|
|000033c0| 72 72 6f 72 20 72 65 73 | 70 6f 6e 73 65 73 20 61 |rror res|ponses a|
|000033d0| 6e 64 20 61 6e 20 d2 75 | 6e 6b 6e d3 20 6d 6d 75 |nd an .u|nkn. mmu|
|000033e0| 20 72 65 73 70 6f 6e 73 | 65 2c 20 70 6f 73 73 69 | respons|e, possi|
|000033f0| 62 6c 65 20 72 65 73 70 | 6f 6e 73 65 73 20 69 6e |ble resp|onses in|
|00003400| 63 6c 75 64 65 3a 0d 09 | 09 09 09 4e 6f 4d 4d 55 |clude:..|...NoMMU|
|00003410| 0d 09 09 09 09 41 4d 55 | 0d 09 09 09 09 36 38 38 |.....AMU|.....688|
|00003420| 35 31 0d 09 09 09 09 36 | 38 30 33 30 4d 4d 55 0d |51.....6|8030MMU.|
|00003430| 09 09 09 09 36 38 30 34 | 30 4d 4d 55 0d 47 65 74 |....6804|0MMU.Get|
|00003440| 47 65 73 74 61 6c 74 50 | 68 79 73 69 63 61 6c 52 |GestaltP|hysicalR|
|00003450| 41 4d 53 69 7a 65 0d 09 | 50 61 72 61 6d 65 74 65 |AMSize..|Paramete|
|00003460| 72 73 3a 09 6e 6f 6e 65 | 0d 09 52 65 74 75 72 6e |rs:.none|..Return|
|00003470| 73 3a 09 69 6e 74 65 67 | 65 72 20 2d 20 72 65 70 |s:.integ|er - rep|
|00003480| 72 65 73 6e 74 61 74 69 | 6f 6e 20 6f 66 20 6d 65 |resntati|on of me|
|00003490| 6d 6f 72 79 20 69 6e 20 | 6d 65 67 61 62 79 74 65 |mory in |megabyte|
|000034a0| 73 0d 09 46 75 6e 63 74 | 69 6f 6e 3a 09 47 65 73 |s..Funct|ion:.Ges|
|000034b0| 74 61 6c 74 47 65 74 50 | 68 79 73 69 63 61 6c 52 |taltGetP|hysicalR|
|000034c0| 41 4d 53 69 7a 65 20 77 | 69 6c 6c 20 72 65 74 75 |AMSize w|ill retu|
|000034d0| 72 6e 20 74 68 65 20 70 | 68 79 73 69 63 61 6c 20 |rn the p|hysical |
|000034e0| 61 6d 6f 75 6e 74 20 6f | 66 20 6d 65 6d 6f 72 79 |amount o|f memory|
|000034f0| 20 69 6e 20 74 68 65 20 | 74 61 72 67 65 74 20 6d | in the |target m|
|00003500| 61 63 68 69 6e 65 2e 20 | 20 54 68 65 20 70 68 79 |achine. | The phy|
|00003510| 73 69 63 61 6c 20 6d 65 | 6d 6f 72 79 20 69 73 20 |sical me|mory is |
|00003520| 6d 65 6d 6f 72 79 20 6e | 6f 74 20 63 6f 75 6e 74 |memory n|ot count|
|00003530| 69 6e 67 20 61 6e 79 20 | 63 75 72 72 65 6e 74 6c |ing any |currentl|
|00003540| 79 20 61 63 74 69 76 65 | 20 76 69 72 74 75 61 6c |y active| virtual|
|00003550| 20 6d 65 6d 6f 72 79 2e | 20 20 54 68 65 20 61 6e | memory.| The an|
|00003560| 73 77 65 72 20 69 73 20 | 69 6e 20 6d 65 67 61 62 |swer is |in megab|
|00003570| 79 74 65 73 2e 20 20 0d | 09 45 78 61 6d 70 6c 65 |ytes. .|.Example|
|00003580| 3a 09 70 72 69 6e 74 6c | 6e 20 47 65 73 74 61 6c |:.printl|n Gestal|
|00003590| 74 47 65 74 50 68 79 73 | 69 63 61 6c 52 41 4d 53 |tGetPhys|icalRAMS|
|000035a0| 69 7a 65 28 29 3b 0d 09 | 09 09 35 0d 47 65 74 47 |ize();..|..5.GetG|
|000035b0| 65 73 74 61 6c 74 50 72 | 6f 63 65 73 73 6f 72 54 |estaltPr|ocessorT|
|000035c0| 79 70 65 0d 09 50 61 72 | 61 6d 65 74 65 72 73 3a |ype..Par|ameters:|
|000035d0| 09 6e 6f 6e 65 0d 09 52 | 65 74 75 72 6e 73 3a 09 |.none..R|eturns:.|
|000035e0| 73 74 72 69 6e 67 20 2d | 20 61 20 73 74 72 69 6e |string -| a strin|
|000035f0| 67 20 72 65 70 72 65 73 | 65 6e 74 61 74 69 6f 6e |g repres|entation|
|00003600| 20 6f 66 20 74 68 65 20 | 47 65 73 74 61 6c 74 20 | of the |Gestalt |
|00003610| 72 65 73 70 6f 6e 73 65 | 0d 09 46 75 6e 63 74 69 |response|..Functi|
|00003620| 6f 6e 3a 09 47 65 73 74 | 61 6c 74 47 65 74 50 72 |on:.Gest|altGetPr|
|00003630| 6f 63 65 73 73 6f 72 54 | 79 70 65 20 71 75 65 72 |ocessorT|ype quer|
|00003640| 69 65 73 20 74 68 65 20 | 74 61 72 67 65 74 20 74 |ies the |target t|
|00003650| 6f 20 64 65 74 65 72 6d | 69 6e 65 20 74 68 65 20 |o determ|ine the |
|00003660| 63 75 72 72 65 6e 74 20 | 6d 69 63 72 6f 70 72 6f |current |micropro|
|00003670| 63 65 73 73 6f 72 20 69 | 6e 20 75 73 65 2e 20 20 |cessor i|n use. |
|00003680| 42 65 73 69 64 65 73 20 | 65 72 72 6f 72 20 72 65 |Besides |error re|
|00003690| 73 70 6f 6e 73 65 73 20 | 61 6e 64 20 61 6e 20 d2 |sponses |and an .|
|000036a0| 75 6e 6b 6e d3 20 70 72 | 6f 63 65 73 73 6f 72 20 |unkn. pr|ocessor |
|000036b0| 72 65 73 70 6f 6e 73 65 | 2c 20 70 6f 73 73 69 62 |response|, possib|
|000036c0| 6c 65 20 72 65 73 70 6f | 6e 73 65 73 20 69 6e 63 |le respo|nses inc|
|000036d0| 6c 75 64 65 3a 0d 09 09 | 09 09 36 38 30 30 30 0d |lude:...|..68000.|
|000036e0| 09 09 09 09 36 38 30 31 | 30 0d 09 09 09 09 36 38 |....6801|0.....68|
|000036f0| 30 32 30 0d 09 09 09 09 | 36 38 30 33 30 0d 09 09 |020.....|68030...|
|00003700| 09 09 36 38 30 34 30 0d | 47 65 74 47 65 73 74 61 |..68040.|GetGesta|
|00003710| 6c 74 56 4d 41 74 74 72 | 0d 09 50 61 72 61 6d 65 |ltVMAttr|..Parame|
|00003720| 74 65 72 73 3a 09 6e 6f | 6e 65 0d 09 52 65 74 75 |ters:.no|ne..Retu|
|00003730| 72 6e 73 3a 09 73 74 72 | 69 6e 67 20 2d 20 61 20 |rns:.str|ing - a |
|00003740| 73 74 72 69 6e 67 20 72 | 65 70 65 73 65 6e 74 61 |string r|epesenta|
|00003750| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 47 65 73 74 |tion of |the Gest|
|00003760| 61 6c 74 20 72 65 73 70 | 6f 6e 73 65 0d 09 46 75 |alt resp|onse..Fu|
|00003770| 6e 63 74 69 6f 6e 3a 09 | 47 65 73 74 61 6c 74 47 |nction:.|GestaltG|
|00003780| 65 74 56 4d 41 74 74 72 | 20 71 75 65 72 69 65 73 |etVMAttr| queries|
|00003790| 20 74 68 65 20 74 61 72 | 67 65 74 20 74 6f 20 64 | the tar|get to d|
|000037a0| 65 74 65 72 6d 69 6e 65 | 20 74 68 65 20 63 75 72 |etermine| the cur|
|000037b0| 72 65 6e 74 20 73 74 61 | 74 65 20 6f 74 20 76 69 |rent sta|te ot vi|
|000037c0| 72 74 75 61 6c 20 6d 65 | 6d 6f 72 79 2e 20 20 49 |rtual me|mory. I|
|000037d0| 66 20 76 69 72 74 75 61 | 6c 20 6d 65 6d 6f 72 79 |f virtua|l memory|
|000037e0| 20 69 73 20 70 72 65 73 | 65 6e 74 2c 20 74 68 65 | is pres|ent, the|
|000037f0| 20 72 65 73 70 6f 6e 73 | 65 20 d2 56 4d 50 72 65 | respons|e .VMPre|
|00003800| 73 65 6e 74 d3 20 77 69 | 6c 6c 20 62 65 20 72 65 |sent. wi|ll be re|
|00003810| 74 75 72 6e 65 64 2e 20 | 49 66 20 74 68 65 20 74 |turned. |If the t|
|00003820| 61 72 67 65 74 20 d2 61 | 77 61 72 65 d3 20 6f 66 |arget .a|ware. of|
|00003830| 20 76 69 72 74 75 61 6c | 20 6d 65 6d 6f 72 79 20 | virtual| memory |
|00003840| 62 75 74 20 6e 6f 6e 65 | 20 69 73 20 61 63 74 69 |but none| is acti|
|00003850| 76 65 2c 20 61 6e 64 20 | d2 75 6e 6b 6e d3 20 76 |ve, and |.unkn. v|
|00003860| 69 72 74 75 61 6c 20 6d | 65 6d 6f 72 79 20 72 65 |irtual m|emory re|
|00003870| 73 70 6f 6e 73 65 20 69 | 73 20 72 65 74 75 72 6e |sponse i|s return|
|00003880| 65 64 2e 20 20 4f 74 68 | 65 72 77 69 73 65 2c 20 |ed. Oth|erwise, |
|00003890| 61 6e 20 65 72 72 6f 72 | 20 63 6f 64 65 20 77 69 |an error| code wi|
|000038a0| 6c 6c 20 62 65 20 72 65 | 74 75 72 6e 65 64 2e 0d |ll be re|turned..|
|000038b0| 09 45 78 61 6d 70 6c 65 | 3a 09 70 72 69 6e 74 6c |.Example|:.printl|
|000038c0| 6e 20 47 65 73 74 61 6c | 74 47 65 74 56 4d 41 74 |n Gestal|tGetVMAt|
|000038d0| 74 72 28 29 3b 0d 09 09 | 09 56 4d 50 72 65 73 65 |tr();...|.VMPrese|
|000038e0| 6e 74 0d 49 73 47 65 73 | 74 61 6c 74 4c 6f 6e 67 |nt.IsGes|taltLong|
|000038f0| 45 72 72 6f 72 0d 09 50 | 61 72 61 6d 65 74 65 72 |Error..P|arameter|
|00003900| 73 3a 09 67 65 73 74 61 | 6c 74 4c 6f 6e 67 45 72 |s:.gesta|ltLongEr|
|00003910| 72 6f 72 20 2d 20 74 68 | 65 20 73 74 72 69 6e 67 |ror - th|e string|
|00003920| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | represe|ntation |
|00003930| 6f 66 20 61 20 47 65 73 | 74 61 6c 74 20 72 65 73 |of a Ges|talt res|
|00003940| 70 6f 6e 73 65 0d 09 52 | 65 74 75 72 6e 73 3a 09 |ponse..R|eturns:.|
|00003950| 62 6f 6f 6c 65 61 6e 20 | 2d 20 74 72 75 65 20 69 |boolean |- true i|
|00003960| 66 20 74 68 65 20 73 74 | 72 69 6e 67 20 62 65 67 |f the st|ring beg|
|00003970| 69 6e 73 20 77 69 74 68 | 20 d2 45 72 72 6f 72 2c |ins with| .Error,|
|00003980| d3 20 20 66 61 6c 73 65 | 20 6f 74 68 65 72 77 69 |. false| otherwi|
|00003990| 73 65 2e 0d 09 46 75 6e | 63 74 69 6f 6e 3a 09 49 |se...Fun|ction:.I|
|000039a0| 73 47 65 73 74 61 6c 74 | 4c 6f 6e 67 45 72 72 6f |sGestalt|LongErro|
|000039b0| 72 20 74 61 6b 65 73 20 | 61 20 73 74 72 69 6e 67 |r takes |a string|
|000039c0| 20 77 68 69 63 68 20 73 | 68 6f 75 6c 64 20 62 65 | which s|hould be|
|000039d0| 20 61 20 67 65 73 74 61 | 6c 74 20 6c 6f 6e 67 20 | a gesta|lt long |
|000039e0| 72 65 73 70 6f 6e 73 65 | 2c 20 61 73 20 67 69 76 |response|, as giv|
|000039f0| 65 6e 20 62 79 20 74 68 | 65 20 47 65 74 47 65 73 |en by th|e GetGes|
|00003a00| 74 61 6c 74 58 58 58 20 | 74 61 73 6b 73 20 64 65 |taltXXX |tasks de|
|00003a10| 66 69 6e 65 64 20 65 6c | 73 65 77 68 65 72 65 20 |fined el|sewhere |
|00003a20| 69 6e 20 74 68 69 73 20 | 6c 69 62 72 61 72 79 2e |in this |library.|
|00003a30| 20 20 49 66 20 74 68 65 | 20 73 74 72 69 6e 67 20 | If the| string |
|00003a40| 62 65 67 69 6e 73 20 77 | 69 74 68 20 d2 45 72 72 |begins w|ith .Err|
|00003a50| 6f 72 d3 20 74 68 65 20 | 62 6f 6f 6c 65 61 6e 20 |or. the |boolean |
|00003a60| 74 72 75 65 20 69 73 20 | 72 65 74 75 72 6e 65 64 |true is |returned|
|00003a70| 2c 20 6f 74 68 65 72 77 | 69 73 65 20 61 20 66 61 |, otherw|ise a fa|
|00003a80| 6c 73 65 20 76 61 6c 75 | 65 20 69 73 20 72 65 74 |lse valu|e is ret|
|00003a90| 75 72 6e 65 64 2e 0d 09 | 45 78 61 6d 70 6c 65 3a |urned...|Example:|
|00003aa0| 09 70 72 69 6e 74 6c 6e | 20 49 73 47 65 73 74 61 |.println| IsGesta|
|00003ab0| 6c 74 4c 6f 6e 67 45 72 | 72 6f 72 28 d2 33 32 42 |ltLongEr|ror(.32B|
|00003ac0| 69 74 20 43 61 70 61 62 | 6c 65 d3 29 3b 0d 09 09 |it Capab|le.);...|
|00003ad0| 09 66 61 6c 73 65 0d 09 | 09 70 72 69 6e 74 6c 6e |.false..|.println|
|00003ae0| 20 49 73 47 65 73 74 61 | 6c 74 4c 6f 6e 67 45 72 | IsGesta|ltLongEr|
|00003af0| 72 6f 72 28 d2 45 72 72 | 6f 72 3a 20 75 6e 64 65 |ror(.Err|or: unde|
|00003b00| 66 69 6e 65 64 20 73 65 | 6c 65 63 74 6f 72 d3 29 |fined se|lector.)|
|00003b10| 3b 0d 09 09 09 74 72 75 | 65 0d 51 75 69 63 6b 54 |;....tru|e.QuickT|
|00003b20| 61 73 6b 73 2e 76 75 6c | 69 62 0d 50 72 65 64 65 |asks.vul|ib.Prede|
|00003b30| 66 69 6e 65 64 20 74 61 | 73 6b 73 20 66 6f 72 20 |fined ta|sks for |
|00003b40| 61 6e 79 20 73 63 72 69 | 70 74 2e 0d 4c 69 62 72 |any scri|pt..Libr|
|00003b50| 61 72 69 65 73 20 72 65 | 71 75 69 72 65 64 3a 20 |aries re|quired: |
|00003b60| 54 69 6d 65 2e 76 75 6c | 69 62 0d 42 75 74 74 6f |Time.vul|ib.Butto|
|00003b70| 6e 45 6e 61 62 6c 65 64 | 0d 09 50 61 72 61 6d 65 |nEnabled|..Parame|
|00003b80| 74 65 72 73 3a 09 64 65 | 73 63 72 69 70 74 6f 72 |ters:.de|scriptor|
|00003b90| 54 72 61 69 74 20 2d 20 | 73 70 65 63 69 66 69 65 |Trait - |specifie|
|00003ba0| 64 20 74 68 65 20 64 61 | 74 75 6d 20 74 6f 20 75 |d the da|tum to u|
|00003bb0| 73 65 20 77 68 65 6e 20 | 64 65 74 65 72 6d 69 6e |se when |determin|
|00003bc0| 69 6e 67 20 77 68 69 63 | 68 20 62 75 74 74 6f 6e |ing whic|h button|
|00003bd0| 20 74 6f 20 75 73 65 0d | 09 52 65 74 75 72 6e 73 | to use.|.Returns|
|00003be0| 3a 09 62 6f 6f 6c 65 61 | 6e 20 2d 20 74 72 75 65 |:.boolea|n - true|
|00003bf0| 20 69 66 20 65 6e 61 62 | 6c 65 64 2c 20 66 61 6c | if enab|led, fal|
|00003c00| 73 65 20 6f 74 68 65 72 | 77 69 73 65 0d 09 46 75 |se other|wise..Fu|
|00003c10| 6e 63 74 69 6f 6e 3a 09 | 42 75 74 74 6f 6e 45 6e |nction:.|ButtonEn|
|00003c20| 61 62 6c 65 64 20 63 68 | 65 63 6b 73 20 74 6f 20 |abled ch|ecks to |
|00003c30| 73 65 65 20 69 66 20 74 | 68 65 20 73 70 65 63 69 |see if t|he speci|
|00003c40| 66 69 65 64 20 62 75 74 | 74 6f 6e 20 69 73 20 63 |fied but|ton is c|
|00003c50| 75 72 72 65 6e 74 6c 79 | 20 65 6e 61 62 6c 65 64 |urrently| enabled|
|00003c60| 2e 20 20 54 68 65 20 64 | 65 73 63 72 69 70 74 6f |. The d|escripto|
|00003c70| 72 54 72 61 69 74 20 76 | 61 72 69 61 62 6c 65 20 |rTrait v|ariable |
|00003c80| 63 61 6e 20 62 65 20 65 | 69 74 68 65 72 20 74 68 |can be e|ither th|
|00003c90| 65 20 69 74 65 6d d5 73 | 20 74 69 74 6c 65 20 6f |e item.s| title o|
|00003ca0| 72 20 6f 72 64 69 6e 61 | 6c 69 74 79 2e 20 20 54 |r ordina|lity. T|
|00003cb0| 68 65 20 74 61 73 6b 20 | 77 69 6c 6c 20 64 65 74 |he task |will det|
|00003cc0| 65 72 6d 69 6e 65 20 77 | 68 61 74 20 74 68 65 20 |ermine w|hat the |
|00003cd0| 64 65 73 63 72 69 70 74 | 6f 72 54 72 61 69 74 20 |descript|orTrait |
|00003ce0| 69 73 2c 20 62 61 73 69 | 6e 67 20 74 68 65 20 64 |is, basi|ng the d|
|00003cf0| 65 73 63 69 73 69 6f 6e | 20 6f 6e 20 77 68 65 74 |escision| on whet|
|00003d00| 68 65 72 20 69 74 20 69 | 73 20 61 20 73 74 72 69 |her it i|s a stri|
|00003d10| 6e 67 20 6f 72 20 61 6e | 20 69 6e 74 65 67 65 72 |ng or an| integer|
|00003d20| 2e 20 20 54 68 65 20 65 | 6e 61 62 6c 65 6d 65 6e |. The e|nablemen|
|00003d30| 74 20 73 74 61 74 65 20 | 69 73 20 72 65 74 75 72 |t state |is retur|
|00003d40| 6e 65 64 2e 0d 09 45 78 | 61 6d 70 6c 65 3a 09 70 |ned...Ex|ample:.p|
|00003d50| 72 69 6e 74 6c 6e 20 42 | 75 74 74 6f 6e 45 6e 61 |rintln B|uttonEna|
|00003d60| 62 6c 65 64 28 32 33 29 | 3b 0d 09 09 09 66 61 6c |bled(23)|;....fal|
|00003d70| 73 65 0d 09 09 70 72 69 | 6e 74 6c 6e 20 42 75 74 |se...pri|ntln But|
|00003d80| 74 6f 6e 45 6e 61 62 6c | 65 64 28 d2 6d 79 20 62 |tonEnabl|ed(.my b|
|00003d90| 75 74 74 6f 6e d3 29 3b | 0d 09 09 09 74 72 75 65 |utton.);|....true|
|00003da0| 0d 43 68 65 63 6b 42 6f | 78 43 68 65 63 6b 65 64 |.CheckBo|xChecked|
|00003db0| 0d 09 50 61 72 61 6d 65 | 74 65 72 73 3a 09 64 65 |..Parame|ters:.de|
|00003dc0| 73 63 72 69 70 74 6f 72 | 54 72 61 69 74 20 2d 20 |scriptor|Trait - |
|00003dd0| 73 70 65 63 69 66 69 65 | 64 20 74 68 65 20 64 61 |specifie|d the da|
|00003de0| 74 75 6d 20 74 6f 20 75 | 73 65 20 77 68 65 6e 20 |tum to u|se when |
|00003df0| 64 65 74 65 72 6d 69 6e | 69 6e 67 20 77 68 69 63 |determin|ing whic|
|00003e00| 68 20 63 68 65 63 6b 20 | 62 6f 78 20 74 6f 20 75 |h check |box to u|
|00003e10| 73 65 0d 09 52 65 74 75 | 72 6e 73 3a 09 62 6f 6f |se..Retu|rns:.boo|
|00003e20| 6c 65 61 6e 20 2d 20 74 | 72 75 65 20 69 66 20 63 |lean - t|rue if c|
|00003e30| 68 65 63 6b 65 64 2c 20 | 66 61 6c 73 65 20 6f 74 |hecked, |false ot|
|00003e40| 68 65 72 77 69 73 65 0d | 09 46 75 6e 63 74 69 6f |herwise.|.Functio|
|00003e50| 6e 3a 09 43 68 65 63 6b | 42 6f 78 43 68 65 63 6b |n:.Check|BoxCheck|
|00003e60| 65 64 20 63 68 65 63 6b | 73 20 74 6f 20 73 65 65 |ed check|s to see|
|00003e70| 20 69 66 20 74 68 65 20 | 73 70 65 63 69 66 69 65 | if the |specifie|
|00003e80| 64 20 63 68 65 63 6b 20 | 62 6f 78 20 69 73 20 63 |d check |box is c|
|00003e90| 75 72 72 65 6e 74 6c 79 | 20 63 68 65 63 6b 65 64 |urrently| checked|
|00003ea0| 2e 20 20 54 68 65 20 64 | 65 73 63 72 69 70 74 6f |. The d|escripto|
|00003eb0| 72 54 72 61 69 74 20 76 | 61 72 69 61 62 6c 65 20 |rTrait v|ariable |
|00003ec0| 63 61 6e 20 62 65 20 65 | 69 74 68 65 72 20 74 68 |can be e|ither th|
|00003ed0| 65 20 69 74 65 6d d5 73 | 20 74 69 74 6c 65 20 6f |e item.s| title o|
|00003ee0| 72 20 6f 72 64 69 6e 61 | 6c 69 74 79 2e 20 20 54 |r ordina|lity. T|
|00003ef0| 68 65 20 74 61 73 6b 20 | 77 69 6c 6c 20 64 65 74 |he task |will det|
|00003f00| 65 72 6d 69 6e 65 20 77 | 68 61 74 20 74 68 65 20 |ermine w|hat the |
|00003f10| 64 65 73 63 72 69 70 74 | 6f 72 54 72 61 69 74 20 |descript|orTrait |
|00003f20| 69 73 2c 20 62 61 73 69 | 6e 67 20 74 68 65 20 64 |is, basi|ng the d|
|00003f30| 65 73 63 69 73 69 6f 6e | 20 6f 6e 20 77 68 65 74 |escision| on whet|
|00003f40| 68 65 72 20 69 74 20 69 | 73 20 61 20 73 74 72 69 |her it i|s a stri|
|00003f50| 6e 67 20 6f 72 20 61 6e | 20 69 6e 74 65 67 65 72 |ng or an| integer|
|00003f60| 2e 20 20 41 20 62 6f 6f | 6c 65 61 6e 20 62 61 73 |. A boo|lean bas|
|00003f70| 65 64 20 6f 6e 20 74 68 | 65 20 73 74 79 6c 65 20 |ed on th|e style |
|00003f80| 74 72 61 69 74 20 69 73 | 20 72 65 74 75 72 6e 65 |trait is| returne|
|00003f90| 64 2c 20 74 72 75 65 20 | 66 6f 72 20 63 68 65 63 |d, true |for chec|
|00003fa0| 6b 65 64 2c 20 66 61 6c | 73 65 20 6f 74 68 65 72 |ked, fal|se other|
|00003fb0| 77 69 73 65 2e 0d 09 45 | 78 61 6d 70 6c 65 3a 09 |wise...E|xample:.|
|00003fc0| 70 72 69 6e 74 6c 6e 20 | 43 68 65 63 6b 42 6f 78 |println |CheckBox|
|00003fd0| 43 68 65 63 6b 65 64 28 | d2 67 65 6e 65 72 69 63 |Checked(|.generic|
|00003fe0| 20 62 6f 78 d3 29 3b 0d | 09 09 09 66 61 6c 73 65 | box.);.|...false|
|00003ff0| 0d 09 09 70 72 69 6e 74 | 6c 6e 20 43 68 65 63 6b |...print|ln Check|
|00004000| 42 6f 78 43 68 65 63 6b | 65 64 28 31 39 29 3b 0d |BoxCheck|ed(19);.|
|00004010| 09 09 09 74 72 75 65 0d | 43 68 65 63 6b 42 6f 78 |...true.|CheckBox|
|00004020| 45 6e 61 62 6c 65 64 0d | 09 50 61 72 61 6d 65 74 |Enabled.|.Paramet|
|00004030| 65 72 73 3a 09 64 65 73 | 63 72 69 70 74 6f 72 54 |ers:.des|criptorT|
|00004040| 72 61 69 74 20 2d 20 73 | 70 65 63 69 66 69 65 64 |rait - s|pecified|
|00004050| 20 74 68 65 20 64 61 74 | 75 6d 20 74 6f 20 75 73 | the dat|um to us|
|00004060| 65 20 77 68 65 6e 20 64 | 65 74 65 72 6d 69 6e 69 |e when d|etermini|
|00004070| 6e 67 20 77 68 69 63 68 | 20 63 68 65 63 6b 20 62 |ng which| check b|
|00004080| 6f 78 20 74 6f 20 75 73 | 65 0d 09 52 65 74 75 72 |ox to us|e..Retur|
|00004090| 6e 73 3a 09 62 6f 6f 6c | 65 61 6e 20 2d 20 74 72 |ns:.bool|ean - tr|
|000040a0| 75 65 20 69 66 20 65 6e | 61 62 6c 65 64 2c 20 66 |ue if en|abled, f|
|000040b0| 61 6c 73 65 20 6f 74 68 | 65 72 77 69 73 65 0d 09 |alse oth|erwise..|
|000040c0| 46 75 6e 63 74 69 6f 6e | 3a 09 43 68 65 63 6b 42 |Function|:.CheckB|
|000040d0| 6f 78 45 6e 61 62 6c 65 | 64 20 63 68 65 63 6b 73 |oxEnable|d checks|
|000040e0| 20 74 6f 20 73 65 65 20 | 69 66 20 74 68 65 20 73 | to see |if the s|
|000040f0| 70 65 63 69 66 69 65 64 | 20 63 68 65 63 6b 20 62 |pecified| check b|
|00004100| 6f 78 20 69 73 20 63 75 | 72 72 65 6e 74 6c 79 20 |ox is cu|rrently |
|00004110| 65 6e 61 62 6c 65 64 2e | 20 20 54 68 65 20 64 65 |enabled.| The de|
|00004120| 73 63 72 69 70 74 6f 72 | 54 72 61 69 74 20 76 61 |scriptor|Trait va|
|00004130| 72 69 61 62 6c 65 20 63 | 61 6e 20 62 65 20 65 69 |riable c|an be ei|
|00004140| 74 68 65 72 20 74 68 65 | 20 69 74 65 6d d5 73 20 |ther the| item.s |
|00004150| 74 69 74 6c 65 20 6f 72 | 20 6f 72 64 69 6e 61 6c |title or| ordinal|
|00004160| 69 74 79 2e 20 20 54 68 | 65 20 74 61 73 6b 20 77 |ity. Th|e task w|
|00004170| 69 6c 6c 20 64 65 74 65 | 72 6d 69 6e 65 20 77 68 |ill dete|rmine wh|
|00004180| 61 74 20 74 68 65 20 64 | 65 73 63 72 69 70 74 6f |at the d|escripto|
|00004190| 72 54 72 61 69 74 20 69 | 73 2c 20 62 61 73 69 6e |rTrait i|s, basin|
|000041a0| 67 20 74 68 65 20 64 65 | 73 63 69 73 69 6f 6e 20 |g the de|scision |
|000041b0| 6f 6e 20 77 68 65 74 68 | 65 72 20 69 74 20 69 73 |on wheth|er it is|
|000041c0| 20 61 20 73 74 72 69 6e | 67 20 6f 72 20 61 6e 20 | a strin|g or an |
|000041d0| 69 6e 74 65 67 65 72 2e | 20 20 54 68 65 20 65 6e |integer.| The en|
|000041e0| 61 62 6c 65 6d 65 6e 74 | 20 73 74 61 74 65 20 69 |ablement| state i|
|000041f0| 73 20 72 65 74 75 72 6e | 65 64 2e 0d 09 45 78 61 |s return|ed...Exa|
|00004200| 6d 70 6c 65 3a 09 70 72 | 69 6e 74 6c 6e 20 43 68 |mple:.pr|intln Ch|
|00004210| 65 63 6b 42 6f 78 45 6e | 61 62 6c 65 64 28 33 32 |eckBoxEn|abled(32|
|00004220| 29 3b 0d 09 09 09 74 72 | 75 65 0d 09 09 70 72 69 |);....tr|ue...pri|
|00004230| 6e 74 6c 6e 20 43 68 65 | 63 6b 42 6f 78 45 6e 61 |ntln Che|ckBoxEna|
|00004240| 62 6c 65 64 28 d2 73 61 | 6d 70 6c 65 20 63 68 65 |bled(.sa|mple che|
|00004250| 63 6b 62 6f 78 d3 29 3b | 0d 09 09 09 66 61 6c 73 |ckbox.);|....fals|
|00004260| 65 0d 43 6f 75 6e 74 4d | 65 6e 75 49 74 65 6d 73 |e.CountM|enuItems|
|00004270| 0d 09 50 61 72 61 6d 65 | 74 65 72 73 3a 09 6d 65 |..Parame|ters:.me|
|00004280| 6e 75 4e 61 6d 65 20 2d | 20 73 74 72 69 6e 67 20 |nuName -| string |
|00004290| 6f 66 20 74 68 65 20 74 | 69 74 6c 65 20 6f 66 20 |of the t|itle of |
|000042a0| 74 68 65 20 6d 65 6e 75 | 20 74 6f 20 62 65 20 63 |the menu| to be c|
|000042b0| 6f 75 6e 74 65 64 0d 09 | 52 65 74 75 72 6e 73 3a |ounted..|Returns:|
|000042c0| 09 69 6e 74 65 67 65 72 | 20 2d 20 63 6f 75 6e 74 |.integer| - count|
|000042d0| 20 6f 66 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f | of the |number o|
|000042e0| 66 20 6d 65 6e 75 20 69 | 74 65 6d 73 20 69 6e 20 |f menu i|tems in |
|000042f0| 74 68 65 20 67 69 76 65 | 6e 20 6d 65 6e 75 0d 09 |the give|n menu..|
|00004300| 46 75 6e 63 74 69 6f 6e | 3a 09 43 6f 75 6e 74 4d |Function|:.CountM|
|00004310| 65 6e 75 49 74 65 6d 73 | 20 77 69 6c 6c 20 63 6f |enuItems| will co|
|00004320| 75 6e 74 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |unt the |number o|
|00004330| 66 20 6d 65 6e 75 20 69 | 74 65 6d 73 20 69 6e 20 |f menu i|tems in |
|00004340| 61 20 6d 65 6e 75 20 73 | 70 65 63 69 66 69 65 64 |a menu s|pecified|
|00004350| 20 62 79 20 6e 61 6d 65 | 2e 20 20 49 66 20 6e 6f | by name|. If no|
|00004360| 20 6d 65 6e 75 20 69 73 | 20 73 70 65 63 69 66 69 | menu is| specifi|
|00004370| 65 64 2c 20 74 68 65 20 | 74 6f 74 61 6c 20 6e 75 |ed, the |total nu|
|00004380| 6d 62 65 72 20 6f 66 20 | 6d 65 6e 75 20 69 74 65 |mber of |menu ite|
|00004390| 6d 73 20 69 6e 20 61 6c | 6c 20 6f 66 20 74 68 65 |ms in al|l of the|
|000043a0| 20 6d 65 6e 75 20 69 73 | 20 63 6f 75 6e 74 65 64 | menu is| counted|
|000043b0| 2e 20 20 54 68 65 20 72 | 65 73 75 6c 74 20 69 73 |. The r|esult is|
|000043c0| 20 72 65 74 75 72 6e 65 | 64 20 69 6e 20 74 68 65 | returne|d in the|
|000043d0| 20 66 6f 72 6d 20 6f 66 | 20 61 6e 20 69 6e 74 65 | form of| an inte|
|000043e0| 67 65 72 2e 0d 09 45 78 | 61 6d 70 6c 65 3a 09 70 |ger...Ex|ample:.p|
|000043f0| 72 69 6e 74 6c 6e 20 43 | 6f 75 6e 74 4d 65 6e 75 |rintln C|ountMenu|
|00004400| 49 74 65 6d 73 28 d2 45 | 64 69 74 d3 29 3b 0d 09 |Items(.E|dit.);..|
|00004410| 09 09 31 30 0d 43 6f 75 | 6e 74 4d 65 6e 75 73 0d |..10.Cou|ntMenus.|
|00004420| 09 50 61 72 61 6d 65 74 | 65 72 73 3a 09 6e 6f 6e |.Paramet|ers:.non|
|00004430| 65 0d 09 52 65 74 75 72 | 6e 73 3a 09 69 6e 74 65 |e..Retur|ns:.inte|
|00004440| 67 65 72 20 2d 20 63 6f | 75 6e 74 20 6f 66 20 61 |ger - co|unt of a|
|00004450| 6c 6c 20 74 68 65 20 6d | 65 6e 75 73 20 69 6e 20 |ll the m|enus in |
|00004460| 74 68 65 20 6d 65 6e 75 | 20 62 61 72 0d 09 46 75 |the menu| bar..Fu|
|00004470| 6e 63 74 69 6f 6e 3a 09 | 43 6f 75 6e 74 4d 65 6e |nction:.|CountMen|
|00004480| 75 73 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 74 |us will |return t|
|00004490| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 6d 65 6e |he numbe|r of men|
|000044a0| 75 73 20 69 6e 20 74 68 | 65 20 63 75 72 72 65 6e |us in th|e curren|
|000044b0| 74 20 6d 65 6e 75 20 62 | 61 72 2e 0d 09 45 78 61 |t menu b|ar...Exa|
|000044c0| 6d 70 6c 65 3a 09 70 72 | 69 6e 74 6c 6e 20 43 6f |mple:.pr|intln Co|
|000044d0| 75 6e 74 4d 65 6e 75 73 | 28 29 3b 0d 09 09 09 38 |untMenus|();....8|
|000044e0| 0d 43 6f 75 6e 74 57 69 | 6e 64 6f 77 49 74 65 6d |.CountWi|ndowItem|
|000044f0| 73 0d 09 50 61 72 61 6d | 65 74 65 72 73 3a 09 77 |s..Param|eters:.w|
|00004500| 69 6e 4e 61 6d 65 20 2d | 20 73 74 72 69 6e 67 20 |inName -| string |
|00004510| 6f 66 20 74 68 65 20 74 | 69 74 6c 65 20 6f 66 20 |of the t|itle of |
|00004520| 74 68 65 20 77 69 6e 64 | 6f 77 20 74 6f 20 62 65 |the wind|ow to be|
|00004530| 20 65 78 61 6d 69 6e 65 | 64 0d 09 52 65 74 75 72 | examine|d..Retur|
|00004540| 6e 73 3a 09 69 6e 74 65 | 67 65 72 20 2d 20 74 68 |ns:.inte|ger - th|
|00004550| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 69 74 65 6d |e number| of item|
|00004560| 73 20 69 6e 20 74 68 65 | 20 73 70 65 63 69 66 69 |s in the| specifi|
|00004570| 65 64 20 77 69 6e 64 6f | 77 0d 09 46 75 6e 63 74 |ed windo|w..Funct|
|00004580| 69 6f 6e 3a 09 43 6f 75 | 6e 74 57 69 6e 64 6f 77 |ion:.Cou|ntWindow|
|00004590| 49 74 65 6d 73 20 77 69 | 6c 6c 20 72 65 74 75 72 |Items wi|ll retur|
|000045a0| 6e 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |n the nu|mber of |
|000045b0| 76 69 73 69 62 6c 65 20 | 63 6f 6e 74 65 6e 74 20 |visible |content |
|000045c0| 69 74 65 6d 73 20 69 6e | 20 74 68 65 20 73 70 65 |items in| the spe|
|000045d0| 63 69 66 69 65 64 20 77 | 69 6e 64 6f 77 2e 20 20 |cified w|indow. |
|000045e0| 49 66 20 6e 6f 20 77 69 | 6e 64 6f 77 20 69 73 20 |If no wi|ndow is |
|000045f0| 73 70 65 63 69 66 69 65 | 64 2c 20 74 68 65 6e 20 |specifie|d, then |
|00004600| 74 68 65 20 74 61 73 6b | 20 64 65 66 61 75 6c 74 |the task| default|
|00004610| 73 20 74 6f 20 74 68 65 | 20 74 6f 70 20 77 69 6e |s to the| top win|
|00004620| 64 6f 77 20 28 74 68 65 | 20 77 69 6e 64 6f 77 20 |dow (the| window |
|00004630| 6f 66 20 6f 72 64 69 6e | 61 6c 69 74 79 20 6f 6e |of ordin|ality on|
|00004640| 65 29 2e 0d 09 45 78 61 | 6d 70 6c 65 3a 09 70 72 |e)...Exa|mple:.pr|
|00004650| 69 6e 74 6c 6e 20 43 6f | 75 6e 74 57 69 6e 64 6f |intln Co|untWindo|
|00004660| 77 49 74 65 6d 73 28 29 | 3b 0d 09 09 09 35 32 0d |wItems()|;....52.|
|00004670| 43 6f 75 6e 74 57 69 6e | 64 6f 77 73 0d 09 50 61 |CountWin|dows..Pa|
|00004680| 72 61 6d 65 74 65 72 73 | 3a 09 6e 6f 6e 65 0d 09 |rameters|:.none..|
|00004690| 52 65 74 75 72 6e 73 3a | 09 69 6e 74 65 67 65 72 |Returns:|.integer|
|000046a0| 20 2d 20 63 6f 75 6e 74 | 20 6f 66 20 61 6c 6c 20 | - count| of all |
|000046b0| 74 68 65 20 76 69 73 61 | 62 6c 65 20 77 69 6e 64 |the visa|ble wind|
|000046c0| 6f 77 73 0d 09 46 75 6e | 63 74 69 6f 6e 3a 09 43 |ows..Fun|ction:.C|
|000046d0| 6f 75 6e 74 57 69 6e 64 | 6f 77 73 20 77 69 6c 6c |ountWind|ows will|
|000046e0| 20 72 65 74 75 72 6e 20 | 74 68 65 20 6e 75 6d 62 | return |the numb|
|000046f0| 65 72 20 6f 66 20 63 75 | 72 72 65 6e 74 6c 79 20 |er of cu|rrently |
|00004700| 76 69 73 61 62 6c 65 20 | 77 69 6e 64 6f 77 73 2e |visable |windows.|
|00004710| 0d 09 45 78 61 6d 70 6c | 65 3a 09 70 72 69 6e 74 |..Exampl|e:.print|
|00004720| 6c 6e 20 43 6f 75 6e 74 | 57 69 6e 64 6f 77 73 28 |ln Count|Windows(|
|00004730| 29 3b 0d 09 09 09 31 0d | 44 6f 43 68 65 63 6b 42 |);....1.|DoCheckB|
|00004740| 6f 78 0d 09 50 61 72 61 | 6d 65 74 65 72 73 3a 09 |ox..Para|meters:.|
|00004750| 64 65 73 63 72 69 70 74 | 6f 72 54 72 61 69 74 20 |descript|orTrait |
|00004760| 2d 20 73 70 65 63 69 66 | 69 65 73 20 74 68 65 20 |- specif|ies the |
|00004770| 64 61 74 75 6d 20 74 6f | 20 75 73 65 20 77 68 65 |datum to| use whe|
|00004780| 6e 20 64 65 74 65 72 6d | 69 6e 69 6e 67 20 77 68 |n determ|ining wh|
|00004790| 69 63 68 20 63 68 65 63 | 6b 20 62 6f 78 20 74 6f |ich chec|k box to|
|000047a0| 20 63 68 65 63 6b 0d 09 | 52 65 74 75 72 6e 73 3a | check..|Returns:|
|000047b0| 09 6e 6f 74 68 69 6e 67 | 0d 09 46 75 6e 63 74 69 |.nothing|..Functi|
|000047c0| 6f 6e 3a 09 44 6f 43 68 | 65 63 6b 42 6f 78 20 77 |on:.DoCh|eckBox w|
|000047d0| 69 6c 6c 20 65 6e 73 75 | 72 65 20 74 68 61 74 20 |ill ensu|re that |
|000047e0| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 63 68 |the spec|ified ch|
|000047f0| 65 63 6b 20 62 6f 78 20 | 69 73 20 63 68 65 63 6b |eck box |is check|
|00004800| 65 64 2e 20 20 49 66 20 | 74 68 65 20 63 68 65 63 |ed. If |the chec|
|00004810| 6b 20 62 6f 78 20 69 73 | 20 75 6e 63 68 65 63 6b |k box is| uncheck|
|00004820| 65 64 2c 20 74 68 65 20 | 74 61 73 6b 20 77 69 6c |ed, the |task wil|
|00004830| 6c 20 73 65 6c 65 63 74 | 20 69 74 2e 20 20 49 66 |l select| it. If|
|00004840| 20 74 68 65 20 63 68 65 | 63 6b 20 62 6f 78 20 69 | the che|ck box i|
|00004850| 73 20 61 6c 72 65 61 64 | 79 20 63 68 65 63 6b 65 |s alread|y checke|
|00004860| 64 2c 20 74 68 65 20 74 | 61 73 6b 20 77 69 6c 6c |d, the t|ask will|
|00004870| 20 6c 65 61 76 65 20 69 | 74 20 61 6c 6f 6e 65 2e | leave i|t alone.|
|00004880| 20 20 54 68 65 20 74 61 | 73 6b 20 77 69 6c 6c 20 | The ta|sk will |
|00004890| 64 65 74 65 72 6d 69 6e | 65 20 77 68 61 74 20 74 |determin|e what t|
|000048a0| 68 65 20 64 65 73 63 72 | 69 70 74 6f 72 54 72 61 |he descr|iptorTra|
|000048b0| 69 74 20 69 73 2c 20 62 | 61 73 69 6e 67 20 74 68 |it is, b|asing th|
|000048c0| 65 20 64 65 73 63 69 73 | 69 6f 6e 20 6f 6e 20 77 |e descis|ion on w|
|000048d0| 68 65 74 68 65 72 20 69 | 74 20 69 73 20 61 20 73 |hether i|t is a s|
|000048e0| 74 72 69 6e 67 20 6f 72 | 20 61 6e 20 69 6e 74 65 |tring or| an inte|
|000048f0| 67 65 72 2e 20 20 0d 09 | 45 78 61 6d 70 6c 65 3a |ger. ..|Example:|
|00004900| 09 44 6f 43 68 65 63 6b | 42 6f 78 28 d2 45 72 72 |.DoCheck|Box(.Err|
|00004910| 6f 72 20 43 68 65 63 6b | 69 6e 67 20 4f 6e d3 29 |or Check|ing On.)|
|00004920| 3b 0d 09 0d 44 6f 53 65 | 6c 65 63 74 52 61 64 69 |;...DoSe|lectRadi|
|00004930| 6f 42 75 74 74 6f 6e 0d | 09 50 61 72 61 6d 65 74 |oButton.|.Paramet|
|00004940| 65 72 73 3a 09 64 65 73 | 63 72 69 70 74 6f 72 54 |ers:.des|criptorT|
|00004950| 72 61 69 74 20 2d 20 73 | 70 65 63 69 66 69 65 73 |rait - s|pecifies|
|00004960| 20 74 68 65 20 64 61 74 | 75 6d 20 74 6f 20 75 73 | the dat|um to us|
|00004970| 65 20 77 68 65 6e 20 64 | 65 74 65 72 6d 69 6e 69 |e when d|etermini|
|00004980| 6e 67 20 77 68 69 63 68 | 20 63 68 65 63 6b 20 62 |ng which| check b|
|00004990| 6f 78 20 74 6f 20 63 68 | 65 63 6b 0d 09 52 65 74 |ox to ch|eck..Ret|
|000049a0| 75 72 6e 73 3a 09 6e 6f | 74 68 69 6e 67 0d 09 46 |urns:.no|thing..F|
|000049b0| 75 6e 63 74 69 6f 6e 3a | 09 44 6f 53 65 6c 65 63 |unction:|.DoSelec|
|000049c0| 74 52 61 64 69 6f 42 75 | 74 74 6f 6e 20 77 69 6c |tRadioBu|tton wil|
|000049d0| 6c 20 65 6e 73 75 72 65 | 20 74 68 61 74 20 74 68 |l ensure| that th|
|000049e0| 65 20 73 70 65 63 69 66 | 69 65 64 20 72 61 64 69 |e specif|ied radi|
|000049f0| 6f 20 62 75 74 74 6f 6e | 20 69 73 20 73 65 6c 65 |o button| is sele|
|00004a00| 63 74 65 64 2e 20 20 49 | 66 20 74 68 65 20 72 61 |cted. I|f the ra|
|00004a10| 64 69 6f 20 62 75 74 74 | 6f 6e 20 69 73 20 6e 6f |dio butt|on is no|
|00004a20| 74 20 73 65 6c 65 63 74 | 65 64 2c 20 74 68 65 20 |t select|ed, the |
|00004a30| 74 61 73 6b 20 77 69 6c | 6c 20 73 65 6c 65 63 74 |task wil|l select|
|00004a40| 20 69 74 2e 20 20 49 66 | 20 74 68 65 20 72 61 64 | it. If| the rad|
|00004a50| 69 6f 20 62 75 74 74 6f | 6e 20 69 73 20 61 6c 72 |io butto|n is alr|
|00004a60| 65 61 64 79 20 73 65 6c | 65 63 74 65 64 2c 20 74 |eady sel|ected, t|
|00004a70| 68 65 20 74 61 73 6b 20 | 77 69 6c 6c 20 6c 65 61 |he task |will lea|
|00004a80| 76 65 20 69 74 20 61 6c | 6f 6e 65 2e 20 20 54 68 |ve it al|one. Th|
|00004a90| 65 20 74 61 73 6b 20 77 | 69 6c 6c 20 64 65 74 65 |e task w|ill dete|
|00004aa0| 72 6d 69 6e 65 20 77 68 | 61 74 20 74 68 65 20 64 |rmine wh|at the d|
|00004ab0| 65 73 63 72 69 70 74 6f | 72 54 72 61 69 74 20 69 |escripto|rTrait i|
|00004ac0| 73 2c 20 62 61 73 69 6e | 67 20 74 68 65 20 64 65 |s, basin|g the de|
|00004ad0| 73 63 69 73 69 6f 6e 20 | 6f 6e 20 77 68 65 74 68 |scision |on wheth|
|00004ae0| 65 72 20 69 74 20 69 73 | 20 61 20 73 74 72 69 6e |er it is| a strin|
|00004af0| 67 20 6f 72 20 61 6e 20 | 69 6e 74 65 67 65 72 2e |g or an |integer.|
|00004b00| 20 20 0d 09 45 78 61 6d | 70 6c 65 3a 09 44 6f 53 | ..Exam|ple:.DoS|
|00004b10| 65 6c 65 63 74 52 61 64 | 69 6f 42 75 74 74 6f 6e |electRad|ioButton|
|00004b20| 28 d2 45 72 72 6f 72 20 | 43 68 65 63 6b 20 4f 6e |(.Error |Check On|
|00004b30| 63 65 d3 29 3b 0d 09 09 | 44 6f 53 65 6c 65 63 74 |ce.);...|DoSelect|
|00004b40| 52 61 64 69 6f 42 75 74 | 74 6f 6e 28 31 38 29 3b |RadioBut|ton(18);|
|00004b50| 0d 47 65 74 4d 65 6e 75 | 49 74 65 6d 54 69 74 6c |.GetMenu|ItemTitl|
|00004b60| 65 0d 09 50 61 72 61 6d | 65 74 65 72 73 3a 09 6d |e..Param|eters:.m|
|00004b70| 65 6e 75 49 74 65 6d 4f | 72 64 65 72 20 2d 20 69 |enuItemO|rder - i|
|00004b80| 6e 74 65 67 65 72 20 73 | 70 65 63 69 66 79 69 6e |nteger s|pecifyin|
|00004b90| 67 20 74 68 65 20 6f 72 | 64 69 6e 61 6c 69 74 79 |g the or|dinality|
|00004ba0| 20 6f 66 20 74 68 65 20 | 6d 65 6e 75 20 69 74 65 | of the |menu ite|
|00004bb0| 6d 20 74 6f 20 62 65 20 | 75 73 65 64 2c 20 64 65 |m to be |used, de|
|00004bc0| 66 61 75 6c 74 73 20 74 | 6f 20 31 0d 09 09 6d 65 |faults t|o 1...me|
|00004bd0| 6e 75 50 61 72 61 6d 65 | 74 65 72 20 2d 20 73 74 |nuParame|ter - st|
|00004be0| 72 69 6e 67 20 73 70 65 | 63 69 66 69 79 69 6e 67 |ring spe|cifiying|
|00004bf0| 20 77 68 69 63 68 20 6d | 65 6e 75 20 74 6f 20 67 | which m|enu to g|
|00004c00| 65 74 20 74 68 65 20 6d | 65 6e 75 20 69 74 65 6d |et the m|enu item|
|00004c10| 20 66 72 6f 6d 3b 20 64 | 65 66 61 75 6c 74 73 20 | from; d|efaults |
|00004c20| 74 6f 20 31 0d 09 52 65 | 74 75 72 6e 73 3a 09 73 |to 1..Re|turns:.s|
|00004c30| 74 72 69 6e 67 20 2d 20 | 74 69 74 6c 65 20 6f 66 |tring - |title of|
|00004c40| 20 74 68 65 20 72 65 71 | 75 65 73 74 65 64 20 6d | the req|uested m|
|00004c50| 65 6e 75 20 69 74 65 6d | 0d 09 46 75 6e 63 74 69 |enu item|..Functi|
|00004c60| 6f 6e 3a 09 47 65 74 4d | 65 6e 75 49 74 65 6d 54 |on:.GetM|enuItemT|
|00004c70| 69 74 6c 65 20 74 61 6b | 65 73 20 61 6e 20 69 6e |itle tak|es an in|
|00004c80| 74 65 67 65 72 20 6d 65 | 6e 75 49 74 65 6d 4f 72 |teger me|nuItemOr|
|00004c90| 64 65 72 20 61 73 20 74 | 68 65 20 6f 72 64 69 6e |der as t|he ordin|
|00004ca0| 61 6c 69 74 79 20 6f 66 | 20 74 68 65 20 6d 65 6e |ality of| the men|
|00004cb0| 75 20 69 74 65 6d 20 74 | 6f 20 67 65 74 20 74 68 |u item t|o get th|
|00004cc0| 65 20 74 69 74 6c 65 20 | 6f 66 2e 20 20 55 73 69 |e title |of. Usi|
|00004cd0| 6e 67 20 74 68 65 20 6d | 65 6e 75 50 61 72 61 6d |ng the m|enuParam|
|00004ce0| 65 74 65 72 20 70 61 72 | 61 6d 65 74 65 72 2c 20 |eter par|ameter, |
|00004cf0| 74 68 65 20 74 61 73 6b | 20 77 69 6c 6c 20 72 65 |the task| will re|
|00004d00| 74 75 72 6e 20 74 68 65 | 20 64 65 73 69 72 65 64 |turn the| desired|
|00004d10| 20 6d 65 6e 75 20 69 74 | 65 6d d5 73 20 74 69 74 | menu it|em.s tit|
|00004d20| 6c 65 20 77 68 65 6e 20 | 65 69 74 68 65 72 20 74 |le when |either t|
|00004d30| 68 65 20 74 69 74 6c 65 | 20 6f 72 20 6f 72 64 69 |he title| or ordi|
|00004d40| 6e 61 6c 69 74 79 20 6f | 66 20 74 68 65 20 70 61 |nality o|f the pa|
|00004d50| 72 65 6e 74 20 6d 65 6e | 75 20 69 73 20 73 70 65 |rent men|u is spe|
|00004d60| 63 69 66 69 65 64 20 69 | 6e 20 74 68 65 20 6d 65 |cified i|n the me|
|00004d70| 6e 75 50 61 72 61 6d 65 | 74 65 72 2e 20 20 54 68 |nuParame|ter. Th|
|00004d80| 65 20 74 61 73 6b 20 77 | 69 6c 6c 20 69 6e 74 65 |e task w|ill inte|
|00004d90| 6c 6c 69 67 65 6e 74 6c | 79 20 77 68 65 74 68 65 |lligentl|y whethe|
|00004da0| 72 20 74 68 65 20 74 69 | 74 6c 65 20 6f 72 20 6f |r the ti|tle or o|
|00004db0| 72 64 69 6e 61 6c 69 74 | 79 20 69 73 20 67 69 76 |rdinalit|y is giv|
|00004dc0| 65 6e 20 62 61 73 65 64 | 20 6f 6e 20 74 68 65 20 |en based| on the |
|00004dd0| 6d 65 6e 75 50 61 72 61 | 6d 65 74 65 72 d5 73 20 |menuPara|meter.s |
|00004de0| 74 79 70 65 3a 20 20 73 | 74 72 69 6e 67 20 66 6f |type: s|tring fo|
|00004df0| 72 20 74 69 74 6c 65 20 | 6f 72 20 69 6e 74 65 67 |r title |or integ|
|00004e00| 65 72 20 66 6f 72 20 6f | 72 64 69 6e 61 6c 69 74 |er for o|rdinalit|
|00004e10| 79 2e 0d 09 45 78 61 6d | 70 6c 65 3a 09 70 72 69 |y...Exam|ple:.pri|
|00004e20| 6e 74 6c 6e 20 47 65 74 | 4d 65 6e 75 49 74 65 6d |ntln Get|MenuItem|
|00004e30| 54 69 74 6c 65 28 34 2c | 20 d2 45 64 69 74 d3 2c |Title(4,| .Edit.,|
|00004e40| 20 d2 74 d3 29 3b 0d 09 | 09 09 43 6f 70 79 0d 09 | .t.);..|..Copy..|
|00004e50| 09 70 72 69 6e 74 6c 6e | 20 47 65 74 4d 65 6e 75 |.println| GetMenu|
|00004e60| 49 74 65 6d 54 69 74 6c | 65 28 35 2c 20 33 2c 20 |ItemTitl|e(5, 3, |
|00004e70| d2 6f d3 29 3b 0d 09 09 | 09 50 61 73 74 65 0d 47 |.o.);...|.Paste.G|
|00004e80| 65 74 4d 65 6e 75 54 69 | 74 6c 65 0d 09 50 61 72 |etMenuTi|tle..Par|
|00004e90| 61 6d 65 74 65 72 73 3a | 09 6d 65 6e 75 4f 72 64 |ameters:|.menuOrd|
|00004ea0| 65 72 20 2d 20 69 6e 74 | 65 67 65 72 20 6f 66 20 |er - int|eger of |
|00004eb0| 6d 65 6e 75 20 6f 72 64 | 69 6e 61 6c 69 74 79 3b |menu ord|inality;|
|00004ec0| 20 64 65 66 61 75 6c 74 | 73 20 74 6f 20 31 0d 09 | default|s to 1..|
|00004ed0| 52 65 74 75 72 6e 73 3a | 09 73 74 72 69 6e 67 20 |Returns:|.string |
|00004ee0| 2d 20 74 69 74 6c 65 20 | 6f 66 20 74 68 65 20 73 |- title |of the s|
|00004ef0| 70 65 63 69 66 69 65 64 | 20 6d 65 6e 75 0d 09 46 |pecified| menu..F|
|00004f00| 75 6e 63 74 69 6f 6e 3a | 09 47 65 74 4d 65 6e 75 |unction:|.GetMenu|
|00004f10| 54 69 74 6c 65 20 77 69 | 6c 6c 20 72 65 74 75 72 |Title wi|ll retur|
|00004f20| 6e 20 74 68 65 20 74 69 | 74 6c 65 20 6f 66 20 61 |n the ti|tle of a|
|00004f30| 20 6d 65 6e 75 20 77 68 | 6f 73 65 20 6f 72 64 69 | menu wh|ose ordi|
|00004f40| 6e 61 6c 69 74 79 20 69 | 73 20 73 70 65 63 69 66 |nality i|s specif|
|00004f50| 69 65 64 20 62 79 20 6d | 65 6e 75 4f 72 64 65 72 |ied by m|enuOrder|
|00004f60| 2e 20 20 54 68 65 20 64 | 65 66 61 75 6c 74 20 76 |. The d|efault v|
|00004f70| 61 6c 75 65 20 77 69 6c | 6c 20 72 65 74 75 72 6e |alue wil|l return|
|00004f80| 20 74 68 65 20 41 70 70 | 6c 65 20 4c 6f 67 6f 20 | the App|le Logo |
|00004f90| 63 68 61 72 61 63 74 65 | 72 2e 0d 09 45 78 61 6d |characte|r...Exam|
|00004fa0| 70 6c 65 3a 09 70 72 69 | 6e 74 6c 6e 20 47 65 74 |ple:.pri|ntln Get|
|00004fb0| 4d 65 6e 75 54 69 74 6c | 65 28 29 3b 0d 09 09 09 |MenuTitl|e();....|
|00004fc0| f0 0d 09 09 70 72 69 6e | 74 6c 6e 20 47 65 74 4d |....prin|tln GetM|
|00004fd0| 65 6e 75 54 69 74 6c 65 | 28 33 29 3b 0d 09 09 09 |enuTitle|(3);....|
|00004fe0| 45 64 69 74 0d 47 65 74 | 54 6f 70 57 69 6e 64 6f |Edit.Get|TopWindo|
|00004ff0| 77 0d 09 50 61 72 61 6d | 65 74 65 72 73 3a 09 6e |w..Param|eters:.n|
|00005000| 6f 6e 65 0d 09 52 65 74 | 75 72 6e 73 3a 09 73 74 |one..Ret|urns:.st|
|00005010| 72 69 6e 67 20 2d 20 20 | 74 69 74 6c 65 20 6f 66 |ring - |title of|
|00005020| 20 74 68 65 20 74 6f 70 | 20 77 69 6e 64 6f 77 0d | the top| window.|
|00005030| 09 46 75 6e 63 74 69 6f | 6e 3a 09 47 65 74 54 6f |.Functio|n:.GetTo|
|00005040| 70 57 69 6e 64 6f 77 20 | 72 65 74 75 72 6e 73 20 |pWindow |returns |
|00005050| 74 68 65 20 74 69 74 6c | 65 20 6f 66 20 74 68 65 |the titl|e of the|
|00005060| 20 74 6f 70 20 77 69 6e | 64 6f 77 2c 20 74 68 61 | top win|dow, tha|
|00005070| 74 20 69 73 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |t is the| window |
|00005080| 77 69 74 68 20 6f 72 64 | 69 6e 61 6c 69 74 79 20 |with ord|inality |
|00005090| 6f 6e 65 2e 0d 09 45 78 | 61 6d 70 6c 65 3a 09 70 |one...Ex|ample:.p|
|000050a0| 72 69 6e 74 6c 6e 20 47 | 65 74 54 6f 70 57 69 6e |rintln G|etTopWin|
|000050b0| 64 6f 77 28 29 3b 0d 09 | 09 09 55 6e 74 69 74 6c |dow();..|..Untitl|
|000050c0| 65 64 20 2d 20 33 0d 47 | 65 74 57 69 6e 64 6f 77 |ed - 3.G|etWindow|
|000050d0| 54 69 74 6c 65 0d 09 50 | 61 72 61 6d 65 74 65 72 |Title..P|arameter|
|000050e0| 73 3a 09 77 69 6e 4f 72 | 64 65 72 20 2d 20 69 6e |s:.winOr|der - in|
|000050f0| 74 65 67 65 72 20 6f 66 | 20 74 68 65 20 64 65 73 |teger of| the des|
|00005100| 69 72 65 64 20 77 69 6e | 64 6f 77 d5 73 20 6f 72 |ired win|dow.s or|
|00005110| 64 69 6e 61 6c 69 74 79 | 3b 20 64 65 66 61 75 6c |dinality|; defaul|
|00005120| 74 20 69 73 20 31 0d 09 | 52 65 74 75 72 6e 73 3a |t is 1..|Returns:|
|00005130| 20 09 73 74 72 69 6e 67 | 20 2d 74 69 74 6c 65 20 | .string| -title |
|00005140| 6f 66 20 74 68 65 20 64 | 65 73 69 72 65 64 20 77 |of the d|esired w|
|00005150| 69 6e 64 6f 77 0d 09 46 | 75 6e 63 74 69 6f 6e 3a |indow..F|unction:|
|00005160| 09 47 65 74 57 69 6e 64 | 6f 77 54 69 74 6c 65 20 |.GetWind|owTitle |
|00005170| 72 65 74 75 72 6e 73 20 | 74 68 65 20 74 69 74 6c |returns |the titl|
|00005180| 65 20 6f 66 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |e of the| window |
|00005190| 77 68 6f 73 65 20 6f 72 | 64 69 6e 61 6c 69 74 79 |whose or|dinality|
|000051a0| 20 69 73 20 73 70 65 63 | 69 66 69 65 64 20 77 69 | is spec|ified wi|
|000051b0| 74 68 20 74 68 65 20 77 | 69 6e 4f 72 64 65 72 20 |th the w|inOrder |
|000051c0| 70 61 72 61 6d 65 74 65 | 72 2e 20 20 54 68 65 20 |paramete|r. The |
|000051d0| 64 65 66 61 75 6c 74 20 | 77 69 6e 64 6f 77 20 69 |default |window i|
|000051e0| 73 20 74 68 65 20 74 6f | 70 20 6f 6e 65 2c 20 74 |s the to|p one, t|
|000051f0| 68 61 74 20 77 68 69 63 | 68 20 68 61 73 20 6f 72 |hat whic|h has or|
|00005200| 64 69 6e 61 6c 69 74 79 | 20 31 2e 0d 09 45 78 61 |dinality| 1...Exa|
|00005210| 6d 70 6c 65 3a 09 70 72 | 69 6e 74 6c 6e 20 47 65 |mple:.pr|intln Ge|
|00005220| 74 57 69 6e 64 6f 77 54 | 69 74 6c 65 28 32 29 3b |tWindowT|itle(2);|
|00005230| 0d 09 09 09 55 6e 74 69 | 74 6c 65 64 20 2d 20 32 |....Unti|tled - 2|
|00005240| 0d 49 73 44 65 73 63 72 | 69 70 74 6f 72 0d 09 50 |.IsDescr|iptor..P|
|00005250| 61 72 61 6d 65 74 65 72 | 73 3a 09 65 78 70 72 20 |arameter|s:.expr |
|00005260| 2d 20 61 6e 79 20 76 61 | 6c 69 64 20 65 78 70 72 |- any va|lid expr|
|00005270| 65 73 73 69 6f 6e 0d 09 | 52 65 74 75 72 6e 73 3a |ession..|Returns:|
|00005280| 09 62 6f 6f 6c 65 61 6e | 0d 09 46 75 6e 63 74 69 |.boolean|..Functi|
|00005290| 6f 6e 3a 09 49 73 44 65 | 73 63 69 70 74 6f 72 20 |on:.IsDe|sciptor |
|000052a0| 72 65 74 75 72 6e 73 20 | 74 72 75 65 20 69 66 20 |returns |true if |
|000052b0| 74 68 65 20 65 78 70 72 | 65 73 73 69 6f 6e 20 70 |the expr|ession p|
|000052c0| 72 6f 76 69 64 65 64 20 | 69 73 20 61 20 64 65 73 |rovided |is a des|
|000052d0| 63 72 69 70 74 6f 72 20 | 61 6e 64 20 72 65 74 75 |criptor |and retu|
|000052e0| 72 6e 73 20 66 61 6c 73 | 65 20 6f 74 68 65 72 77 |rns fals|e otherw|
|000052f0| 69 73 65 2e 0d 09 45 78 | 61 6d 70 6c 65 3a 09 70 |ise...Ex|ample:.p|
|00005300| 72 69 6e 74 6c 6e 20 49 | 73 44 65 73 63 72 69 70 |rintln I|sDescrip|
|00005310| 74 6f 72 28 5b 77 69 6e | 64 6f 77 20 73 3a 64 69 |tor([win|dow s:di|
|00005320| 61 6c 6f 67 5d 29 3b 0d | 09 09 09 74 72 75 65 0d |alog]);.|...true.|
|00005330| 09 09 70 72 69 6e 74 6c | 6e 20 49 73 44 65 73 63 |..printl|n IsDesc|
|00005340| 72 69 70 74 6f 72 28 d2 | 68 65 6c 6c 6f d3 29 3b |riptor(.|hello.);|
|00005350| 0d 09 09 09 66 61 6c 73 | 65 0d 49 73 49 6e 74 65 |....fals|e.IsInte|
|00005360| 67 65 72 0d 09 50 61 72 | 61 6d 65 74 65 72 73 3a |ger..Par|ameters:|
|00005370| 09 65 78 70 72 20 2d 20 | 61 6e 79 20 76 61 6c 69 |.expr - |any vali|
|00005380| 64 20 65 78 70 72 65 73 | 73 69 6f 6e 0d 09 52 65 |d expres|sion..Re|
|00005390| 74 75 72 6e 73 3a 09 62 | 6f 6f 6c 65 61 6e 0d 09 |turns:.b|oolean..|
|000053a0| 46 75 6e 63 74 69 6f 6e | 3a 09 49 73 49 6e 74 65 |Function|:.IsInte|
|000053b0| 67 65 72 20 72 65 74 75 | 72 6e 73 20 74 72 75 65 |ger retu|rns true|
|000053c0| 20 69 66 20 74 68 65 20 | 65 78 70 72 65 73 73 69 | if the |expressi|
|000053d0| 6f 6e 20 70 72 6f 76 69 | 64 65 64 20 69 73 20 61 |on provi|ded is a|
|000053e0| 6e 20 69 6e 74 65 67 65 | 72 20 61 6e 64 20 72 65 |n intege|r and re|
|000053f0| 74 75 72 6e 73 20 66 61 | 6c 73 65 20 6f 74 68 65 |turns fa|lse othe|
|00005400| 72 77 69 73 65 2e 0d 09 | 45 78 61 6d 70 6c 65 3a |rwise...|Example:|
|00005410| 09 70 72 69 6e 74 6c 6e | 20 49 73 49 6e 74 65 67 |.println| IsInteg|
|00005420| 65 72 28 32 33 38 38 38 | 29 3b 0d 09 09 09 74 72 |er(23888|);....tr|
|00005430| 75 65 0d 09 09 70 72 69 | 6e 74 6c 6e 20 49 73 49 |ue...pri|ntln IsI|
|00005440| 6e 74 65 67 65 72 28 d2 | 68 65 6c 6c 6f d3 29 3b |nteger(.|hello.);|
|00005450| 0d 09 09 09 66 61 6c 73 | 65 0d 49 73 4c 69 73 74 |....fals|e.IsList|
|00005460| 0d 09 50 61 72 61 6d 65 | 74 65 72 73 3a 09 65 78 |..Parame|ters:.ex|
|00005470| 70 72 20 2d 20 61 6e 79 | 20 76 61 6c 69 64 20 65 |pr - any| valid e|
|00005480| 78 70 72 65 73 73 69 6f | 6e 0d 09 52 65 74 75 72 |xpressio|n..Retur|
|00005490| 6e 73 3a 09 62 6f 6f 6c | 65 61 6e 0d 09 46 75 6e |ns:.bool|ean..Fun|
|000054a0| 63 74 69 6f 6e 3a 09 49 | 73 4c 69 73 74 20 72 65 |ction:.I|sList re|
|000054b0| 74 75 72 6e 73 20 74 72 | 75 65 20 69 66 20 74 68 |turns tr|ue if th|
|000054c0| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 20 70 72 6f |e expres|sion pro|
|000054d0| 76 69 64 65 64 20 69 73 | 20 61 20 6c 69 73 74 20 |vided is| a list |
|000054e0| 61 6e 64 20 72 65 74 75 | 72 6e 73 20 66 61 6c 73 |and retu|rns fals|
|000054f0| 65 20 6f 74 68 65 72 77 | 69 73 65 2e 0d 09 45 78 |e otherw|ise...Ex|
|00005500| 61 6d 70 6c 65 3a 09 70 | 72 69 6e 74 6c 6e 20 49 |ample:.p|rintln I|
|00005510| 73 4c 69 73 74 28 7b 31 | 2c 20 d2 68 65 6c 6c 6f |sList({1|, .hello|
|00005520| d3 2c 20 77 69 6e 64 6f | 77 20 7d 29 3b 0d 09 09 |., windo|w });...|
|00005530| 09 74 72 75 65 0d 09 09 | 70 72 69 6e 74 6c 6e 20 |.true...|println |
|00005540| 49 73 4c 69 73 74 28 32 | 33 34 35 29 3b 0d 09 09 |IsList(2|345);...|
|00005550| 09 66 61 6c 73 65 0d 49 | 73 52 65 67 45 78 70 72 |.false.I|sRegExpr|
|00005560| 0d 09 50 61 72 61 6d 65 | 74 65 72 73 3a 09 65 78 |..Parame|ters:.ex|
|00005570| 70 72 20 2d 20 61 6e 79 | 20 76 61 6c 69 64 20 65 |pr - any| valid e|
|00005580| 78 70 72 65 73 73 69 6f | 6e 0d 09 52 65 74 75 72 |xpressio|n..Retur|
|00005590| 6e 73 3a 09 62 6f 6f 6c | 65 61 6e 0d 09 46 75 6e |ns:.bool|ean..Fun|
|000055a0| 63 74 69 6f 6e 3a 09 49 | 73 52 65 67 45 78 70 72 |ction:.I|sRegExpr|
|000055b0| 20 72 65 74 75 72 6e 73 | 20 74 72 75 65 20 69 66 | returns| true if|
|000055c0| 20 74 68 65 20 65 78 70 | 72 65 73 73 69 6f 6e 20 | the exp|ression |
|000055d0| 70 72 6f 76 69 64 65 64 | 20 69 73 20 61 20 72 65 |provided| is a re|
|000055e0| 67 75 6c 61 72 20 65 78 | 70 72 65 73 73 69 6f 6e |gular ex|pression|
|000055f0| 20 61 6e 64 20 72 65 74 | 75 72 6e 73 20 66 61 6c | and ret|urns fal|
|00005600| 73 65 20 6f 74 68 65 72 | 77 69 73 65 2e 0d 09 45 |se other|wise...E|
|00005610| 78 61 6d 70 6c 65 3a 09 | 70 72 69 6e 74 6c 6e 20 |xample:.|println |
|00005620| 49 73 52 65 67 45 78 70 | 72 28 2f 68 69 20 74 68 |IsRegExp|r(/hi th|
|00005630| 65 72 65 c5 2f 29 3b 0d | 09 09 09 74 72 75 65 0d |ere./);.|...true.|
|00005640| 09 09 70 72 69 6e 74 6c | 6e 20 49 73 52 65 67 45 |..printl|n IsRegE|
|00005650| 78 70 72 28 d4 68 6f 6c | 61 20 61 6d 69 67 6f d5 |xpr(.hol|a amigo.|
|00005660| 29 3b 0d 09 09 09 74 72 | 75 65 0d 09 09 70 72 69 |);....tr|ue...pri|
|00005670| 6e 74 6c 6e 20 49 73 52 | 65 67 45 78 70 72 28 32 |ntln IsR|egExpr(2|
|00005680| 33 34 35 29 3b 0d 09 09 | 09 66 61 6c 73 65 0d 49 |345);...|.false.I|
|00005690| 73 53 74 72 69 6e 67 0d | 09 50 61 72 61 6d 65 74 |sString.|.Paramet|
|000056a0| 65 72 73 3a 09 65 78 70 | 72 20 2d 20 61 6e 79 20 |ers:.exp|r - any |
|000056b0| 76 61 6c 69 64 20 65 78 | 70 72 65 73 73 69 6f 6e |valid ex|pression|
|000056c0| 0d 09 52 65 74 75 72 6e | 73 3a 09 62 6f 6f 6c 65 |..Return|s:.boole|
|000056d0| 61 6e 0d 09 46 75 6e 63 | 74 69 6f 6e 3a 09 49 73 |an..Func|tion:.Is|
|000056e0| 53 74 72 69 6e 67 20 72 | 65 74 75 72 6e 73 20 74 |String r|eturns t|
|000056f0| 72 75 65 20 69 66 20 74 | 68 65 20 65 78 70 72 65 |rue if t|he expre|
|00005700| 73 73 69 6f 6e 20 70 72 | 6f 76 69 64 65 64 20 69 |ssion pr|ovided i|
|00005710| 73 20 61 20 73 74 72 69 | 6e 67 20 61 6e 64 20 72 |s a stri|ng and r|
|00005720| 65 74 75 72 6e 73 20 66 | 61 6c 73 65 20 6f 74 68 |eturns f|alse oth|
|00005730| 65 72 77 69 73 65 2e 0d | 09 45 78 61 6d 70 6c 65 |erwise..|.Example|
|00005740| 3a 09 70 72 69 6e 74 6c | 6e 20 49 73 53 74 72 69 |:.printl|n IsStri|
|00005750| 6e 67 28 d4 68 6f 6c 61 | 20 61 6d 69 67 6f d5 29 |ng(.hola| amigo.)|
|00005760| 3b 0d 09 09 09 74 72 75 | 65 0d 09 09 70 72 69 6e |;....tru|e...prin|
|00005770| 74 6c 6e 20 49 73 53 74 | 72 69 6e 67 28 32 33 34 |tln IsSt|ring(234|
|00005780| 35 29 3b 0d 09 09 09 66 | 61 6c 73 65 0d 49 73 53 |5);....f|alse.IsS|
|00005790| 79 6d 62 6f 6c 0d 09 50 | 61 72 61 6d 65 74 65 72 |ymbol..P|arameter|
|000057a0| 73 3a 09 65 78 70 72 20 | 2d 20 61 6e 79 20 76 61 |s:.expr |- any va|
|000057b0| 6c 69 64 20 65 78 70 72 | 65 73 73 69 6f 6e 0d 09 |lid expr|ession..|
|000057c0| 52 65 74 75 72 6e 73 3a | 09 62 6f 6f 6c 65 61 6e |Returns:|.boolean|
|000057d0| 0d 09 46 75 6e 63 74 69 | 6f 6e 3a 09 49 73 53 79 |..Functi|on:.IsSy|
|000057e0| 6d 62 6f 6c 20 72 65 74 | 75 72 6e 73 20 74 72 75 |mbol ret|urns tru|
|000057f0| 65 20 69 66 20 74 68 65 | 20 65 78 70 72 65 73 73 |e if the| express|
|00005800| 69 6f 6e 20 70 72 6f 76 | 69 64 65 64 20 69 73 20 |ion prov|ided is |
|00005810| 61 20 73 79 6d 62 6f 6c | 20 61 6e 64 20 72 65 74 |a symbol| and ret|
|00005820| 75 72 6e 73 20 66 61 6c | 73 65 20 6f 74 68 65 72 |urns fal|se other|
|00005830| 77 69 73 65 2e 0d 09 45 | 78 61 6d 70 6c 65 3a 09 |wise...E|xample:.|
|00005840| 70 72 69 6e 74 6c 6e 20 | 49 73 53 79 6d 62 6f 6c |println |IsSymbol|
|00005850| 28 77 69 6e 64 6f 77 29 | 3b 0d 09 09 09 74 72 75 |(window)|;....tru|
|00005860| 65 0d 09 09 70 72 69 6e | 74 6c 6e 20 49 73 53 79 |e...prin|tln IsSy|
|00005870| 6d 62 6f 6c 28 32 33 34 | 35 29 3b 0d 09 09 09 66 |mbol(234|5);....f|
|00005880| 61 6c 73 65 0d 4c 6f 67 | 45 72 72 6f 72 0d 09 50 |alse.Log|Error..P|
|00005890| 61 72 61 6d 65 74 65 72 | 73 3a 09 65 72 72 6f 72 |arameter|s:.error|
|000058a0| 53 74 72 69 6e 67 20 2d | 20 73 74 72 69 6e 67 0d |String -| string.|
|000058b0| 09 09 70 72 69 6e 74 54 | 69 6d 65 20 2d 20 62 6f |..printT|ime - bo|
|000058c0| 6f 6c 65 61 6e 20 74 6f | 20 65 6e 61 62 6c 65 20 |olean to| enable |
|000058d0| 70 72 69 6e 74 69 6e 67 | 20 74 68 65 20 74 69 6d |printing| the tim|
|000058e0| 65 2c 20 64 65 66 61 75 | 6c 74 73 20 74 6f 20 74 |e, defau|lts to t|
|000058f0| 72 75 65 0d 09 52 65 74 | 75 72 6e 73 3a 09 6e 6f |rue..Ret|urns:.no|
|00005900| 74 68 69 6e 67 0d 09 46 | 75 6e 63 74 69 6f 6e 3a |thing..F|unction:|
|00005910| 09 4c 6f 67 45 72 72 6f | 72 20 77 69 6c 6c 20 70 |.LogErro|r will p|
|00005920| 72 69 6e 74 6c 6e 20 74 | 68 65 20 67 69 76 65 6e |rintln t|he given|
|00005930| 20 65 72 72 6f 72 53 74 | 72 69 6e 67 20 61 73 20 | errorSt|ring as |
|00005940| 61 20 63 6f 6d 6d 65 6e | 74 20 69 6e 20 74 68 65 |a commen|t in the|
|00005950| 20 6e 6f 74 65 62 6f 6f | 6b 20 77 69 74 68 20 61 | noteboo|k with a|
|00005960| 20 6d 65 73 73 61 67 65 | 20 74 68 61 74 20 61 6e | message| that an|
|00005970| 20 65 72 72 6f 72 20 68 | 61 73 20 6f 63 63 75 72 | error h|as occur|
|00005980| 72 65 64 2e 20 20 57 68 | 65 6e 20 74 68 65 20 70 |red. Wh|en the p|
|00005990| 72 69 6e 74 54 69 6d 65 | 20 76 61 72 69 61 62 6c |rintTime| variabl|
|000059a0| 65 20 69 73 20 73 65 74 | 20 74 6f 20 74 72 75 65 |e is set| to true|
|000059b0| 2c 20 61 20 63 6f 6d 6d | 65 6e 74 65 64 20 6c 69 |, a comm|ented li|
|000059c0| 6e 65 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 74 68 |ne conta|ining th|
|000059d0| 65 20 63 75 72 72 65 6e | 74 20 74 69 6d 65 20 77 |e curren|t time w|
|000059e0| 69 6c 6c 20 61 6c 73 6f | 20 62 65 20 70 72 69 6e |ill also| be prin|
|000059f0| 74 65 64 2e 0d 09 45 78 | 61 6d 70 6c 65 3a 09 4c |ted...Ex|ample:.L|
|00005a00| 6f 67 45 72 72 6f 72 28 | d2 63 72 69 74 69 63 61 |ogError(|.critica|
|00005a10| 6c 20 66 61 69 6c 75 72 | 65 2e 2e 2e 20 68 61 6c |l failur|e... hal|
|00005a20| 74 69 6e 67 21 d3 29 3b | 0d 09 09 09 23 23 23 20 |ting!.);|....### |
|00005a30| 45 72 72 6f 72 20 61 74 | 20 74 69 6d 65 3a 20 31 |Error at| time: 1|
|00005a40| 3a 35 34 3a 32 32 20 50 | 4d 20 23 23 23 20 45 72 |:54:22 P|M ### Er|
|00005a50| 72 6f 72 3a 20 63 72 69 | 74 69 63 61 6c 20 66 61 |ror: cri|tical fa|
|00005a60| 69 6c 75 72 65 2e 2e 2e | 20 68 61 6c 74 69 6e 67 |ilure...| halting|
|00005a70| 21 0d 4c 6f 67 4e 6f 72 | 6d 61 6c 0d 09 50 61 72 |!.LogNor|mal..Par|
|00005a80| 61 6d 65 74 65 72 73 3a | 09 6f 75 74 70 75 74 53 |ameters:|.outputS|
|00005a90| 74 72 69 6e 67 20 2d 20 | 73 74 72 69 6e 67 0d 09 |tring - |string..|
|00005aa0| 09 70 72 69 6e 74 54 69 | 6d 65 20 2d 20 62 6f 6f |.printTi|me - boo|
|00005ab0| 6c 65 61 6e 20 74 6f 20 | 65 6e 61 62 6c 65 20 70 |lean to |enable p|
|00005ac0| 72 69 6e 74 69 6e 67 20 | 74 68 65 20 74 69 6d 65 |rinting |the time|
|00005ad0| 2c 20 64 65 66 61 75 6c | 74 73 20 74 6f 20 66 61 |, defaul|ts to fa|
|00005ae0| 6c 73 65 0d 09 52 65 74 | 75 72 6e 73 3a 09 6e 6f |lse..Ret|urns:.no|
|00005af0| 74 68 69 6e 67 0d 09 46 | 75 6e 63 74 69 6f 6e 3a |thing..F|unction:|
|00005b00| 09 4c 6f 67 4e 6f 72 6d | 61 6c 20 77 69 6c 6c 20 |.LogNorm|al will |
|00005b10| 70 72 69 6e 74 6c 6e 20 | 61 20 74 68 65 20 67 69 |println |a the gi|
|00005b20| 76 65 6e 20 6f 75 74 70 | 75 74 53 74 72 69 6e 67 |ven outp|utString|
|00005b30| 20 61 73 20 61 20 63 6f | 6d 6d 65 6e 74 20 69 6e | as a co|mment in|
|00005b40| 20 74 68 65 20 6e 6f 74 | 65 62 6f 6f 6b 2e 20 20 | the not|ebook. |
|00005b50| 57 68 65 6e 20 74 68 65 | 20 70 72 69 6e 74 54 69 |When the| printTi|
|00005b60| 6d 65 20 76 61 72 69 61 | 62 6c 65 20 69 73 20 73 |me varia|ble is s|
|00005b70| 65 74 20 74 6f 20 74 72 | 75 65 2c 20 61 20 63 6f |et to tr|ue, a co|
|00005b80| 6d 6d 65 6e 74 65 64 20 | 6c 69 6e 65 20 63 6f 6e |mmented |line con|
|00005b90| 74 61 69 6e 74 69 6e 67 | 20 74 68 65 20 63 75 72 |tainting| the cur|
|00005ba0| 72 65 6e 74 20 74 69 6d | 65 20 77 69 6c 6c 20 61 |rent tim|e will a|
|00005bb0| 6c 73 6f 20 62 65 20 70 | 72 69 6e 74 65 64 2e 20 |lso be p|rinted. |
|00005bc0| 20 0d 09 45 78 61 6d 70 | 6c 65 3a 09 4c 6f 67 4e | ..Examp|le:.LogN|
|00005bd0| 6f 72 6d 61 6c 28 d2 6d | 79 20 74 65 73 74 20 69 |ormal(.m|y test i|
|00005be0| 73 20 73 74 61 72 74 69 | 6e 67 d3 2c 20 74 72 75 |s starti|ng., tru|
|00005bf0| 65 29 3b 0d 09 09 09 23 | 23 23 20 41 74 3a 20 31 |e);....#|## At: 1|
|00005c00| 3a 35 32 3a 33 34 20 50 | 4d 20 23 23 23 20 6d 79 |:52:34 P|M ### my|
|00005c10| 20 74 65 73 74 20 69 73 | 20 73 74 61 72 74 69 6e | test is| startin|
|00005c20| 67 0d 4c 6f 67 54 69 6d | 65 0d 09 50 61 72 61 6d |g.LogTim|e..Param|
|00005c30| 65 74 65 72 73 3a 09 6e | 6f 6e 65 0d 09 52 65 74 |eters:.n|one..Ret|
|00005c40| 75 72 6e 73 3a 09 6e 6f | 74 68 69 6e 67 0d 09 46 |urns:.no|thing..F|
|00005c50| 75 6e 63 74 69 6f 6e 3a | 09 4c 6f 67 54 69 6d 65 |unction:|.LogTime|
|00005c60| 20 77 69 6c 6c 20 70 72 | 69 6e 74 20 61 20 63 6f | will pr|int a co|
|00005c70| 6d 6d 65 6e 74 65 64 20 | 74 69 6d 65 20 6d 61 72 |mmented |time mar|
|00005c80| 6b 20 69 6e 20 74 68 65 | 20 6e 6f 74 65 62 6f 6f |k in the| noteboo|
|00005c90| 6b 2e 0d 09 45 78 61 6d | 70 6c 65 3a 09 4c 6f 67 |k...Exam|ple:.Log|
|00005ca0| 54 69 6d 65 28 29 3b 0d | 09 09 09 23 23 23 20 54 |Time();.|...### T|
|00005cb0| 69 6d 65 20 6d 61 72 6b | 3a 20 20 32 3a 33 32 3a |ime mark|: 2:32:|
|00005cc0| 30 31 20 41 4d 0d 4d 65 | 6e 75 45 6e 61 62 6c 65 |01 AM.Me|nuEnable|
|00005cd0| 64 0d 09 50 61 72 61 6d | 65 74 65 72 73 3a 09 64 |d..Param|eters:.d|
|00005ce0| 65 73 63 72 69 70 74 6f | 72 54 72 61 69 74 20 2d |escripto|rTrait -|
|00005cf0| 20 73 70 65 63 69 66 69 | 65 64 20 74 68 65 20 64 | specifi|ed the d|
|00005d00| 61 74 75 6d 20 74 6f 20 | 75 73 65 20 77 68 65 6e |atum to |use when|
|00005d10| 20 64 65 74 65 72 6d 69 | 6e 69 6e 67 20 77 68 69 | determi|ning whi|
|00005d20| 63 68 20 6d 65 6e 75 20 | 74 6f 20 75 73 65 0d 09 |ch menu |to use..|
|00005d30| 52 65 74 75 72 6e 73 3a | 09 62 6f 6f 6c 65 61 6e |Returns:|.boolean|
|00005d40| 20 2d 20 74 72 75 65 20 | 69 66 20 65 6e 61 62 6c | - true |if enabl|
|00005d50| 65 64 2c 20 66 61 6c 73 | 65 20 6f 74 68 65 72 77 |ed, fals|e otherw|
|00005d60| 69 73 65 0d 09 46 75 6e | 63 74 69 6f 6e 3a 09 4d |ise..Fun|ction:.M|
|00005d70| 65 6e 75 45 6e 61 62 6c | 65 64 20 63 68 65 63 6b |enuEnabl|ed check|
|00005d80| 73 20 74 6f 20 73 65 65 | 20 69 66 20 74 68 65 20 |s to see| if the |
|00005d90| 73 70 65 63 69 66 69 65 | 64 20 6d 65 6e 75 20 69 |specifie|d menu i|
|00005da0| 73 20 63 75 72 72 65 6e | 74 6c 79 20 65 6e 61 62 |s curren|tly enab|
|00005db0| 6c 65 64 2e 20 20 54 68 | 65 20 64 65 73 63 72 69 |led. Th|e descri|
|00005dc0| 70 74 6f 72 54 72 61 69 | 74 20 76 61 72 69 61 62 |ptorTrai|t variab|
|00005dd0| 6c 65 20 63 61 6e 20 62 | 65 20 65 69 74 68 65 72 |le can b|e either|
|00005de0| 20 74 68 65 20 69 74 65 | 6d d5 73 20 74 69 74 6c | the ite|m.s titl|
|00005df0| 65 20 6f 72 20 6f 72 64 | 69 6e 61 6c 69 74 79 2e |e or ord|inality.|
|00005e00| 20 20 ca 54 68 65 20 74 | 61 73 6b 20 77 69 6c 6c | .The t|ask will|
|00005e10| 20 64 65 74 65 72 6d 69 | 6e 65 20 77 68 61 74 20 | determi|ne what |
|00005e20| 74 68 65 20 64 65 73 63 | 72 69 70 74 6f 72 54 72 |the desc|riptorTr|
|00005e30| 61 69 74 20 69 73 2c 20 | 62 61 73 69 6e 67 20 74 |ait is, |basing t|
|00005e40| 68 65 20 64 65 73 63 69 | 73 69 6f 6e 20 6f 6e 20 |he desci|sion on |
|00005e50| 77 68 65 74 68 65 72 20 | 69 74 20 69 73 20 61 20 |whether |it is a |
|00005e60| 73 74 72 69 6e 67 20 6f | 72 20 61 6e 20 69 6e 74 |string o|r an int|
|00005e70| 65 67 65 72 2e 20 20 20 | 20 20 54 68 65 20 65 6e |eger. | The en|
|00005e80| 61 62 6c 65 6d 65 6e 74 | 20 73 74 61 74 65 20 69 |ablement| state i|
|00005e90| 73 20 72 65 74 75 72 6e | 65 64 2e 0d 09 45 78 61 |s return|ed...Exa|
|00005ea0| 6d 70 6c 65 3a 09 70 72 | 69 6e 74 6c 6e 20 4d 65 |mple:.pr|intln Me|
|00005eb0| 6e 75 45 6e 61 62 6c 65 | 64 28 d2 67 65 6e 65 72 |nuEnable|d(.gener|
|00005ec0| 69 63 20 6d 65 6e 75 d3 | 29 3b 0d 09 09 09 66 61 |ic menu.|);....fa|
|00005ed0| 6c 73 65 0d 09 09 70 72 | 69 6e 74 6c 6e 20 4d 65 |lse...pr|intln Me|
|00005ee0| 6e 75 45 6e 61 62 6c 65 | 64 28 32 29 3b 0d 09 09 |nuEnable|d(2);...|
|00005ef0| 09 74 72 75 65 0d 4d 65 | 6e 75 49 74 65 6d 45 6e |.true.Me|nuItemEn|
|00005f00| 61 62 6c 65 64 0d 09 50 | 61 72 61 6d 65 74 65 72 |abled..P|arameter|
|00005f10| 73 3a 09 64 65 73 63 72 | 69 70 74 6f 72 54 72 61 |s:.descr|iptorTra|
|00005f20| 69 74 20 2d 20 73 70 65 | 63 69 66 69 65 64 20 74 |it - spe|cified t|
|00005f30| 68 65 20 64 61 74 75 6d | 20 74 6f 20 75 73 65 20 |he datum| to use |
|00005f40| 77 68 65 6e 20 64 65 74 | 65 72 6d 69 6e 69 6e 67 |when det|ermining|
|00005f50| 20 77 68 69 63 68 20 6d | 65 6e 75 20 69 74 65 6d | which m|enu item|
|00005f60| 20 74 6f 20 75 73 65 0d | 09 52 65 74 75 72 6e 73 | to use.|.Returns|
|00005f70| 3a 09 62 6f 6f 6c 65 61 | 6e 20 2d 20 74 72 75 65 |:.boolea|n - true|
|00005f80| 20 69 66 20 65 6e 61 62 | 6c 65 64 2c 20 66 61 6c | if enab|led, fal|
|00005f90| 73 65 20 6f 74 68 65 72 | 77 69 73 65 0d 09 46 75 |se other|wise..Fu|
|00005fa0| 6e 63 74 69 6f 6e 3a 09 | 4d 65 6e 75 49 74 65 6d |nction:.|MenuItem|
|00005fb0| 45 6e 61 62 6c 65 64 20 | 63 68 65 63 6b 73 20 74 |Enabled |checks t|
|00005fc0| 6f 20 73 65 65 20 69 66 | 20 74 68 65 20 73 70 65 |o see if| the spe|
|00005fd0| 63 69 66 69 65 64 20 6d | 65 6e 75 20 69 74 65 6d |cified m|enu item|
|00005fe0| 20 69 73 20 63 75 72 72 | 65 6e 74 6c 79 20 65 6e | is curr|ently en|
|00005ff0| 61 62 6c 65 64 2e 20 20 | 54 68 65 20 64 65 73 63 |abled. |The desc|
|00006000| 72 69 70 74 6f 72 54 72 | 61 69 74 20 76 61 72 69 |riptorTr|ait vari|
|00006010| 61 62 6c 65 20 63 61 6e | 20 62 65 20 65 69 74 68 |able can| be eith|
|00006020| 65 72 20 74 68 65 20 69 | 74 65 6d d5 73 20 74 69 |er the i|tem.s ti|
|00006030| 74 6c 65 20 6f 72 20 6f | 72 64 69 6e 61 6c 69 74 |tle or o|rdinalit|
|00006040| 79 2e 20 20 54 68 65 20 | 74 61 73 6b 20 77 69 6c |y. The |task wil|
|00006050| 6c 20 64 65 74 65 72 6d | 69 6e 65 20 77 68 61 74 |l determ|ine what|
|00006060| 20 74 68 65 20 64 65 73 | 63 72 69 70 74 6f 72 54 | the des|criptorT|
|00006070| 72 61 69 74 20 69 73 2c | 20 62 61 73 69 6e 67 20 |rait is,| basing |
|00006080| 74 68 65 20 64 65 73 63 | 69 73 69 6f 6e 20 6f 6e |the desc|ision on|
|00006090| 20 77 68 65 74 68 65 72 | 20 69 74 20 69 73 20 61 | whether| it is a|
|000060a0| 20 73 74 72 69 6e 67 20 | 6f 72 20 61 6e 20 69 6e | string |or an in|
|000060b0| 74 65 67 65 72 2e 20 20 | 54 68 65 20 65 6e 61 62 |teger. |The enab|
|000060c0| 6c 65 6d 65 6e 74 20 73 | 74 61 74 65 20 69 73 20 |lement s|tate is |
|000060d0| 72 65 74 75 72 6e 65 64 | 2e 0d 09 45 78 61 6d 70 |returned|...Examp|
|000060e0| 6c 65 3a 09 70 72 69 6e | 74 6c 6e 20 4d 65 6e 75 |le:.prin|tln Menu|
|000060f0| 49 74 65 6d 45 6e 61 62 | 6c 65 64 28 d2 67 65 6e |ItemEnab|led(.gen|
|00006100| 65 72 69 63 20 6d 65 6e | 75 20 69 74 65 6d d3 29 |eric men|u item.)|
|00006110| 3b 0d 09 09 09 74 72 75 | 65 0d 09 09 70 72 69 6e |;....tru|e...prin|
|00006120| 74 6c 6e 20 4d 65 6e 75 | 49 74 65 6d 45 6e 61 62 |tln Menu|ItemEnab|
|00006130| 6c 65 64 28 31 36 29 3b | 0d 09 09 09 74 72 75 65 |led(16);|....true|
|00006140| 0d 52 61 64 69 6f 42 75 | 74 74 6f 6e 53 65 6c 65 |.RadioBu|ttonSele|
|00006150| 63 74 65 64 0d 09 50 61 | 72 61 6d 65 74 65 72 73 |cted..Pa|rameters|
|00006160| 3a 09 64 65 73 63 72 69 | 70 74 6f 72 54 72 61 69 |:.descri|ptorTrai|
|00006170| 74 20 2d 20 73 70 65 63 | 69 66 69 65 64 20 74 68 |t - spec|ified th|
|00006180| 65 20 64 61 74 75 6d 20 | 74 6f 20 75 73 65 20 77 |e datum |to use w|
|00006190| 68 65 6e 20 64 65 74 65 | 72 6d 69 6e 69 6e 67 20 |hen dete|rmining |
|000061a0| 77 68 69 63 68 20 72 61 | 64 69 6f 20 62 75 74 74 |which ra|dio butt|
|000061b0| 6f 6e 20 74 6f 20 75 73 | 65 0d 09 52 65 74 75 72 |on to us|e..Retur|
|000061c0| 6e 73 3a 09 62 6f 6f 6c | 65 61 6e 20 2d 20 74 72 |ns:.bool|ean - tr|
|000061d0| 75 65 20 69 66 20 73 65 | 6c 65 63 74 65 64 2c 20 |ue if se|lected, |
|000061e0| 66 61 6c 73 65 20 6f 74 | 68 65 72 77 69 73 65 0d |false ot|herwise.|
|000061f0| 09 46 75 6e 63 74 69 6f | 6e 3a 09 52 61 64 69 6f |.Functio|n:.Radio|
|00006200| 42 75 74 74 6f 6e 53 65 | 6c 65 63 74 65 64 20 63 |ButtonSe|lected c|
|00006210| 68 65 63 6b 73 20 74 6f | 20 73 65 65 20 69 66 20 |hecks to| see if |
|00006220| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 72 61 |the spec|ified ra|
|00006230| 64 69 6f 20 62 75 74 74 | 6f 6e 20 69 73 20 63 75 |dio butt|on is cu|
|00006240| 72 72 65 6e 74 6c 79 20 | 73 65 6c 65 63 74 65 64 |rrently |selected|
|00006250| 2e 20 20 54 68 65 20 64 | 65 73 63 72 69 70 74 6f |. The d|escripto|
|00006260| 72 54 72 61 69 74 20 76 | 61 72 69 61 62 6c 65 20 |rTrait v|ariable |
|00006270| 63 61 6e 20 62 65 20 65 | 69 74 68 65 72 20 74 68 |can be e|ither th|
|00006280| 65 20 69 74 65 6d d5 73 | 20 74 69 74 6c 65 20 6f |e item.s| title o|
|00006290| 72 20 6f 72 64 69 6e 61 | 6c 69 74 79 2e 20 20 54 |r ordina|lity. T|
|000062a0| 68 65 20 74 61 73 6b 20 | 77 69 6c 6c 20 64 65 74 |he task |will det|
|000062b0| 65 72 6d 69 6e 65 20 77 | 68 61 74 20 74 68 65 20 |ermine w|hat the |
|000062c0| 64 65 73 63 72 69 70 74 | 6f 72 54 72 61 69 74 20 |descript|orTrait |
|000062d0| 69 73 2c 20 62 61 73 69 | 6e 67 20 74 68 65 20 64 |is, basi|ng the d|
|000062e0| 65 73 63 69 73 69 6f 6e | 20 6f 6e 20 77 68 65 74 |escision| on whet|
|000062f0| 68 65 72 20 69 74 20 69 | 73 20 61 20 73 74 72 69 |her it i|s a stri|
|00006300| 6e 67 20 6f 72 20 61 6e | 20 69 6e 74 65 67 65 72 |ng or an| integer|
|00006310| 2e 20 20 41 20 62 6f 6f | 6c 65 61 6e 20 62 61 73 |. A boo|lean bas|
|00006320| 65 64 20 6f 6e 20 74 68 | 65 20 73 74 79 6c 65 20 |ed on th|e style |
|00006330| 74 72 61 69 74 20 69 73 | 20 72 65 74 75 72 6e 65 |trait is| returne|
|00006340| 64 2c 20 74 72 75 65 20 | 66 6f 72 20 73 65 6c 65 |d, true |for sele|
|00006350| 63 74 65 64 2c 20 66 61 | 6c 73 65 20 6f 74 68 65 |cted, fa|lse othe|
|00006360| 72 77 69 73 65 2e 0d 09 | 45 78 61 6d 70 6c 65 3a |rwise...|Example:|
|00006370| 09 70 72 69 6e 74 6c 6e | 20 52 61 64 69 6f 42 75 |.println| RadioBu|
|00006380| 74 74 6f 6e 53 65 6c 65 | 63 74 65 64 28 d2 67 65 |ttonSele|cted(.ge|
|00006390| 6e 65 72 69 63 20 62 75 | 74 74 6f 6e d3 29 3b 0d |neric bu|tton.);.|
|000063a0| 09 09 09 74 72 75 65 0d | 09 09 70 72 69 6e 74 6c |...true.|..printl|
|000063b0| 6e 20 52 61 64 69 6f 42 | 75 74 74 6f 6e 53 65 6c |n RadioB|uttonSel|
|000063c0| 65 63 74 65 64 28 34 29 | 3b 0d 09 09 09 66 61 6c |ected(4)|;....fal|
|000063d0| 73 65 0d 53 65 6c 65 63 | 74 52 65 63 74 61 6e 67 |se.Selec|tRectang|
|000063e0| 6c 65 0d 09 50 61 72 61 | 6d 65 74 65 72 73 3a 09 |le..Para|meters:.|
|000063f0| 74 68 65 52 65 63 74 61 | 6e 67 6c 65 20 2d 20 6c |theRecta|ngle - l|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.