home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1997 September / Macworld (1997-09).dmg / Serious Software / Cherwell Scientific Demos / pro Fit / pro Fit 5.0 demo (fpu).sea / pro Fit 5.0 demo (fpu) / External Modules / External modules sources / Pascal / proFit_interface.p < prev    next >
MacBinary  |  1996-05-19  |  124.6 KB  |  [TEXT/PJMM]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: proFit_interface.p

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun May 19 14:55:12 1996, modified Sun May 19 14:55:12 1996, creator Think Pascal, type ASCII, 126895 bytes "proFit_interface.p" , at 0x1f02f 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[PJMM]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 12 70 72 6f 46 69 74 | 5f 69 6e 74 65 72 66 61 |..proFit|_interfa|
|00000010| 63 65 2e 70 00 00 00 00 | 00 00 00 00 00 00 00 00 |ce.p....|........|
|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 54 45 58 54 50 4a 4d | 4d 00 00 00 00 00 00 00 |.TEXTPJM|M.......|
|00000050| 00 00 00 00 01 ef af 00 | 00 01 9a ad c5 1f 10 ad |........|........|
|00000060| c5 1f 10 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 96 df 00 00 |........|........|
|00000080| 7b 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |{*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 20 |********|******* |
|000000d0| 7d 0d 7b 20 20 70 72 6f | 46 69 74 5f 69 6e 74 65 |}.{ pro|Fit_inte|
|000000e0| 72 66 61 63 65 2e 70 20 | 20 20 09 09 09 09 09 09 |rface.p | ......|
|000000f0| 09 09 09 09 09 09 7d 0d | 7b 2a 2a 2a 2a 2a 2a 2a |......}.|{*******|
|00000100| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000110| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000120| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000130| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000140| 2a 2a 2a 2a 2a 2a 2a 2a | 7d 0d 7b 20 48 69 73 74 |********|}.{ Hist|
|00000150| 6f 72 79 3a 09 09 09 09 | 09 09 09 09 09 09 09 09 |ory:....|........|
|00000160| 09 09 09 09 09 7d 0d 7b | 20 20 32 34 2e 30 33 2e |.....}.{| 24.03.|
|00000170| 39 36 3a 09 61 64 64 65 | 64 20 53 65 74 54 65 78 |96:.adde|d SetTex|
|00000180| 74 46 69 6c 65 46 6f 72 | 6d 61 74 2c 20 63 68 61 |tFileFor|mat, cha|
|00000190| 6e 67 65 64 20 53 61 76 | 65 44 61 74 61 41 73 54 |nged Sav|eDataAsT|
|000001a0| 65 78 74 20 7d 0d 7b 20 | 20 31 37 2e 30 33 2e 39 |ext }.{ | 17.03.9|
|000001b0| 36 3a 09 61 64 64 65 64 | 20 47 65 74 41 6e 64 53 |6:.added| GetAndS|
|000001c0| 65 74 53 74 61 74 75 73 | 20 7d 0d 7b 20 20 31 35 |etStatus| }.{ 15|
|000001d0| 2e 30 33 2e 39 36 3a 09 | 61 64 64 65 64 20 4e 75 |.03.96:.|added Nu|
|000001e0| 6d 62 65 72 54 6f 53 74 | 72 32 35 35 2c 20 53 74 |mberToSt|r255, St|
|000001f0| 72 32 35 35 54 6f 4e 75 | 6d 62 65 72 20 7d 0d 7b |r255ToNu|mber }.{|
|00000200| 20 20 31 30 2e 30 33 2e | 39 36 3a 09 61 64 64 65 | 10.03.|96:.adde|
|00000210| 64 20 47 65 74 46 75 6e | 63 74 69 6f 6e 50 61 72 |d GetFun|ctionPar|
|00000220| 61 6d 4e 61 6d 65 2c 20 | 43 61 6e 63 65 6c 45 76 |amName, |CancelEv|
|00000230| 65 6e 74 20 7d 0d 7b 20 | 20 30 36 2e 30 33 2e 39 |ent }.{ | 06.03.9|
|00000240| 36 3a 09 66 69 78 65 64 | 20 61 20 62 75 67 20 77 |6:.fixed| a bug w|
|00000250| 68 65 72 65 20 74 68 65 | 20 77 72 6f 6e 67 20 73 |here the| wrong s|
|00000260| 65 6c 65 63 74 6f 72 20 | 66 6f 72 20 53 74 6f 70 |elector |for Stop|
|00000270| 45 78 65 63 75 74 69 6f | 6e 20 77 61 73 20 75 73 |Executio|n was us|
|00000280| 65 64 20 7d 0d 7b 20 20 | 32 39 2e 30 32 2e 39 35 |ed }.{ |29.02.95|
|00000290| 3a 09 61 64 64 65 64 20 | 57 72 69 74 65 54 65 78 |:.added |WriteTex|
|000002a0| 74 2c 20 42 35 20 61 6e | 64 20 6c 61 74 65 72 20 |t, B5 an|d later |
|000002b0| 20 09 09 09 09 09 09 09 | 09 7d 0d 7b 20 20 32 31 | .......|.}.{ 21|
|000002c0| 2e 30 32 2e 39 35 3a 09 | 61 64 64 65 64 20 53 65 |.02.95:.|added Se|
|000002d0| 74 57 69 6e 64 6f 77 49 | 6e 66 6f 2c 20 53 65 74 |tWindowI|nfo, Set|
|000002e0| 42 6f 78 54 69 74 6c 65 | 20 61 6e 64 20 49 6e 70 |BoxTitle| and Inp|
|000002f0| 75 74 42 6f 78 20 66 6f | 72 20 73 74 72 69 6e 67 |utBox fo|r string|
|00000300| 73 2c 20 42 35 20 61 6e | 64 20 6c 61 74 65 72 7d |s, B5 an|d later}|
|00000310| 0d 7b 20 20 33 30 2e 31 | 32 2e 39 35 3a 09 63 6f |.{ 30.1|2.95:.co|
|00000320| 6d 70 61 74 69 62 69 6c | 69 74 79 20 77 69 74 68 |mpatibil|ity with|
|00000330| 20 4d 57 65 72 6b 73 20 | 37 20 28 36 38 6b 2b 50 | MWerks |7 (68k+P|
|00000340| 50 43 29 20 61 6e 64 20 | 54 68 69 6e 6b 50 61 73 |PC) and |ThinkPas|
|00000350| 63 61 6c 20 7d 0d 7b 20 | 20 31 35 2e 31 32 2e 39 |cal }.{ | 15.12.9|
|00000360| 35 3a 09 35 2e 30 20 72 | 65 6c 65 61 73 65 09 09 |5:.5.0 r|elease..|
|00000370| 09 09 09 09 09 09 09 09 | 09 7d 0d 7b 20 20 32 37 |........|.}.{ 27|
|00000380| 2e 30 31 2e 39 35 3a 09 | 61 64 64 65 64 20 63 6f |.01.95:.|added co|
|00000390| 6e 64 69 74 69 6f 6e 61 | 6c 73 20 66 6f 72 20 63 |nditiona|ls for c|
|000003a0| 6f 6d 70 61 74 69 62 69 | 6c 69 74 79 20 77 69 74 |ompatibi|lity wit|
|000003b0| 68 20 09 09 09 09 09 7d | 0d 7b 09 09 09 4d 65 74 |h .....}|.{...Met|
|000003c0| 72 6f 77 65 72 6b 73 20 | 50 61 73 63 61 6c 20 36 |rowerks |Pascal 6|
|000003d0| 38 6b 2f 50 50 43 20 61 | 6e 64 20 75 6e 69 76 65 |8k/PPC a|nd unive|
|000003e0| 72 73 61 6c 20 68 65 61 | 64 65 72 73 20 32 2e 30 |rsal hea|ders 2.0|
|000003f0| 61 33 09 09 09 7d 0d 7b | 20 20 32 36 2e 30 39 2e |a3...}.{| 26.09.|
|00000400| 39 34 3a 09 34 2e 32 2e | 30 20 72 65 6c 65 61 73 |94:.4.2.|0 releas|
|00000410| 65 09 20 20 20 20 20 20 | 20 09 09 09 09 09 09 09 |e. | .......|
|00000420| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 7d |........|.......}|
|00000430| 0d 7b 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.{******|********|
|00000440| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000460| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000470| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000480| 2a 7d 0d 0d 0d 0d 0d 7b | 20 57 65 6c 63 6f 6d 65 |*}.....{| Welcome|
|00000490| 20 74 6f 20 74 68 65 20 | 70 72 6f 20 46 69 74 20 | to the |pro Fit |
|000004a0| 65 78 74 65 72 6e 61 6c | 20 6d 6f 64 75 6c 65 73 |external| modules|
|000004b0| 21 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |!.......|........|
|000004c0| 09 09 09 7d 0d 7b 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |...}.{ -|--------|
|000004d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 09 09 |--------|------..|
|000004f0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 7d |........|.......}|
|00000500| 0d 0d 7b 20 45 78 74 65 | 72 6e 61 6c 20 6d 6f 64 |..{ Exte|rnal mod|
|00000510| 75 6c 65 73 20 61 72 65 | 20 70 69 65 63 65 73 20 |ules are| pieces |
|00000520| 6f 66 20 63 6f 64 65 20 | 74 68 61 74 20 79 6f 75 |of code |that you|
|00000530| 20 70 72 6f 64 75 63 65 | 20 77 69 74 68 20 79 6f | produce| with yo|
|00000540| 75 72 20 66 61 76 6f 72 | 69 74 65 20 63 6f 6d 70 |ur favor|ite comp|
|00000550| 69 6c 65 72 20 61 6e 64 | 20 74 68 61 74 09 09 09 |iler and| that...|
|00000560| 09 7d 0d 7b 20 79 6f 75 | 20 63 61 6e 20 62 75 69 |.}.{ you| can bui|
|00000570| 6c 64 20 69 6e 74 6f 20 | 70 72 6f 20 46 69 74 20 |ld into |pro Fit |
|00000580| 61 73 20 66 75 6e 63 74 | 69 6f 6e 73 20 6f 72 20 |as funct|ions or |
|00000590| 22 75 73 65 72 22 20 70 | 72 6f 67 72 61 6d 73 2e |"user" p|rograms.|
|000005a0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 7d 0d 0d |........|.....}..|
|000005b0| 7b 20 49 66 20 69 74 20 | 69 73 20 74 68 65 20 66 |{ If it |is the f|
|000005c0| 69 72 73 74 20 74 69 6d | 65 20 79 6f 75 20 64 6f |irst tim|e you do|
|000005d0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 77 69 74 68 20 | somethi|ng with |
|000005e0| 65 78 74 65 72 6e 61 6c | 20 6d 6f 64 75 6c 65 73 |external| modules|
|000005f0| 20 61 6e 64 20 79 6f 75 | 20 77 61 6e 74 20 74 6f | and you| want to|
|00000600| 20 73 65 65 20 77 68 61 | 74 20 69 73 09 09 09 09 | see wha|t is....|
|00000610| 7d 0d 7b 20 6e 65 65 64 | 65 64 20 74 6f 20 69 6d |}.{ need|ed to im|
|00000620| 70 6c 65 6d 65 6e 74 20 | 74 68 65 6d 2c 20 6a 75 |plement |them, ju|
|00000630| 73 74 20 74 61 6b 65 20 | 61 20 6c 6f 6f 6b 20 61 |st take |a look a|
|00000640| 74 20 74 68 65 20 65 78 | 61 6d 70 6c 65 20 66 69 |t the ex|ample fi|
|00000650| 6c 65 73 2e 09 09 09 09 | 09 09 09 09 09 09 09 7d |les.....|.......}|
|00000660| 0d 0d 7b 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 20 |..{ For |example |
|00000670| 79 6f 75 20 6d 69 67 68 | 74 20 77 61 6e 74 20 74 |you migh|t want t|
|00000680| 6f 20 73 74 75 64 79 20 | 74 68 65 20 66 69 6c 65 |o study |the file|
|00000690| 20 45 72 72 6f 72 46 75 | 6e 63 2e 70 20 61 6e 64 | ErrorFu|nc.p and|
|000006a0| 20 6c 6f 6f 6b 20 61 74 | 20 74 68 65 20 66 75 6e | look at| the fun|
|000006b0| 63 74 69 6f 6e 73 20 74 | 68 61 74 20 61 72 65 09 |ctions t|hat are.|
|000006c0| 09 09 7d 0d 7b 20 64 65 | 66 69 6e 65 64 20 74 68 |..}.{ de|fined th|
|000006d0| 65 72 65 2e 09 09 09 09 | 09 09 09 09 09 09 09 09 |ere.....|........|
|000006e0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 7d 0d 0d |........|.....}..|
|000006f0| 7b 20 4d 6f 73 74 20 66 | 75 6e 63 74 69 6f 6e 20 |{ Most f|unction |
|00000700| 6e 61 6d 65 73 20 61 72 | 65 20 74 68 65 20 73 61 |names ar|e the sa|
|00000710| 6d 65 20 6f 6e 65 73 20 | 75 73 65 64 20 66 6f 72 |me ones |used for|
|00000720| 20 64 65 66 69 6e 69 6e | 67 20 66 75 6e 63 74 69 | definin|g functi|
|00000730| 6f 6e 73 20 61 6e 64 20 | 70 72 6f 67 72 61 6d 73 |ons and |programs|
|00000740| 09 09 09 09 09 09 7d 0d | 7b 20 77 69 74 68 69 6e |......}.|{ within|
|00000750| 20 70 72 6f 20 46 69 74 | 2e 09 09 09 09 09 09 09 | pro Fit|........|
|00000760| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00000770| 09 09 7d 0d 7b 20 54 6f | 20 64 65 66 69 6e 65 20 |..}.{ To| define |
|00000780| 79 6f 75 72 20 6f 77 6e | 20 65 78 74 65 72 6e 61 |your own| externa|
|00000790| 6c 20 6d 6f 64 75 6c 65 | 2c 20 73 69 6d 70 6c 79 |l module|, simply|
|000007a0| 20 66 69 6c 6c 20 69 6e | 20 74 68 65 73 65 20 66 | fill in| these f|
|000007b0| 75 6e 63 74 69 6f 6e 73 | 20 77 69 74 68 20 79 6f |unctions| with yo|
|000007c0| 75 72 20 63 6f 64 65 2e | 09 09 09 09 09 09 7d 0d |ur code.|......}.|
|000007d0| 0d 7b 20 48 61 76 65 20 | 61 20 6c 6f 6f 6b 20 61 |.{ Have |a look a|
|000007e0| 74 20 74 68 65 20 70 72 | 6f 20 46 69 74 20 75 73 |t the pr|o Fit us|
|000007f0| 65 72 20 6d 61 6e 75 61 | 6c 20 66 6f 72 20 64 65 |er manua|l for de|
|00000800| 74 61 69 6c 73 20 6f 6e | 20 74 68 65 20 70 61 72 |tails on| the par|
|00000810| 61 6d 65 74 65 72 20 6c | 69 73 74 73 20 6f 66 20 |ameter l|ists of |
|00000820| 74 68 65 73 65 09 09 09 | 09 09 09 7d 0d 7b 20 66 |these...|...}.{ f|
|00000830| 75 6e 63 74 69 6f 6e 73 | 2e 09 09 09 09 09 09 09 |unctions|........|
|00000840| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00000850| 09 09 09 7d 0d 0d 7b 20 | 49 6e 20 6f 72 64 65 72 |...}..{ |In order|
|00000860| 20 74 6f 20 62 75 69 6c | 64 20 61 6e 20 65 78 74 | to buil|d an ext|
|00000870| 65 72 6e 61 6c 20 66 75 | 6e 63 74 69 6f 6e 20 6f |ernal fu|nction o|
|00000880| 72 20 70 72 6f 67 72 61 | 6d 2c 20 79 6f 75 20 6d |r progra|m, you m|
|00000890| 75 73 74 20 63 6f 6d 70 | 69 6c 65 20 61 6e 64 20 |ust comp|ile and |
|000008a0| 6c 69 6e 6b 20 74 68 65 | 09 09 09 09 09 09 09 7d |link the|.......}|
|000008b0| 0d 7b 20 66 6f 6c 6c 6f | 77 69 6e 67 20 66 69 6c |.{ follo|wing fil|
|000008c0| 65 73 3a 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |es:.....|........|
|000008d0| 09 09 09 09 09 09 09 09 | 09 09 09 09 7d 0d 0d 7b |........|....}..{|
|000008e0| 20 20 09 70 72 6f 46 69 | 74 5f 69 6e 74 65 72 66 | .proFi|t_interf|
|000008f0| 61 63 65 2e 70 09 09 09 | 28 22 67 6c 75 65 22 20 |ace.p...|("glue" |
|00000900| 63 6f 64 65 20 73 74 61 | 6e 64 69 6e 67 20 62 65 |code sta|nding be|
|00000910| 74 77 65 65 6e 20 70 72 | 6f 20 46 69 74 20 61 6e |tween pr|o Fit an|
|00000920| 64 20 79 6f 75 72 20 70 | 72 6f 63 65 64 75 72 65 |d your p|rocedure|
|00000930| 73 29 09 09 09 09 7d 0d | 7b 20 20 09 58 58 58 58 |s)....}.|{ .XXXX|
|00000940| 58 58 2e 70 09 09 09 09 | 09 09 28 79 6f 75 72 20 |XX.p....|..(your |
|00000950| 70 72 6f 63 65 64 75 72 | 65 73 2c 20 77 68 65 72 |procedur|es, wher|
|00000960| 65 20 58 58 58 58 58 58 | 20 69 73 20 61 20 6e 61 |e XXXXXX| is a na|
|00000970| 6d 65 20 79 6f 75 20 64 | 65 66 69 6e 65 29 09 09 |me you d|efine)..|
|00000980| 09 09 09 7d 0d 0d 7b 20 | 4f 66 20 63 6f 75 72 73 |...}..{ |Of cours|
|00000990| 65 20 79 6f 75 20 63 61 | 6e 20 61 64 64 20 6f 74 |e you ca|n add ot|
|000009a0| 68 65 72 20 66 69 6c 65 | 73 20 69 66 20 79 6f 75 |her file|s if you|
|000009b0| 20 6e 65 65 64 20 74 68 | 65 6d 20 28 73 75 63 68 | need th|em (such|
|000009c0| 20 61 73 20 74 68 65 20 | 53 41 4e 45 20 6c 69 62 | as the |SANE lib|
|000009d0| 72 61 72 79 20 61 6e 64 | 20 69 6e 74 65 72 66 61 |rary and| interfa|
|000009e0| 63 65 29 2e 09 09 09 7d | 0d 7b 20 41 6c 73 6f 2c |ce)....}|.{ Also,|
|000009f0| 20 64 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 74 68 | dependi|ng on th|
|00000a00| 65 20 63 6f 6d 70 69 6c | 65 72 20 79 6f 75 20 75 |e compil|er you u|
|00000a10| 73 65 2c 20 79 6f 75 20 | 6d 61 79 20 68 61 76 65 |se, you |may have|
|00000a20| 20 74 6f 20 61 64 64 20 | 61 64 64 69 74 69 6f 6e | to add |addition|
|00000a30| 61 6c 09 09 09 09 09 09 | 09 09 09 7d 0d 7b 20 6d |al......|...}.{ m|
|00000a40| 6f 64 75 6c 65 73 20 63 | 6f 6e 74 61 69 6e 69 6e |odules c|ontainin|
|00000a50| 67 20 63 61 6c 6c 20 67 | 6c 75 65 73 20 66 6f 72 |g call g|lues for|
|00000a60| 20 73 79 73 74 65 6d 20 | 74 72 61 70 73 20 28 66 | system |traps (f|
|00000a70| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 69 6e 20 54 |or examp|le, in T|
|00000a80| 68 69 6e 6b 20 50 61 73 | 63 61 6c 20 79 6f 75 20 |hink Pas|cal you |
|00000a90| 6d 75 73 74 20 61 64 64 | 20 09 09 09 7d 0d 7b 20 |must add| ...}.{ |
|00000aa0| 49 6e 74 65 72 66 61 63 | 65 2e 6c 69 62 20 61 6e |Interfac|e.lib an|
|00000ab0| 64 20 44 52 56 52 52 75 | 6e 74 69 6d 65 2e 6c 69 |d DRVRRu|ntime.li|
|00000ac0| 62 20 74 6f 20 79 6f 75 | 72 20 70 72 6f 6a 65 63 |b to you|r projec|
|00000ad0| 74 29 2e 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |t)......|........|
|00000ae0| 09 09 7d 0d 0d 7b 20 57 | 68 65 6e 20 63 6f 6d 70 |..}..{ W|hen comp|
|00000af0| 69 6c 69 6e 67 20 74 68 | 69 73 20 66 69 6c 65 20 |iling th|is file |
|00000b00| 75 6e 64 65 72 20 4d 65 | 74 72 6f 77 65 72 6b 73 |under Me|trowerks|
|00000b10| 20 50 61 73 63 61 6c 2c | 20 79 6f 75 20 6e 65 65 | Pascal,| you nee|
|00000b20| 64 20 43 6f 64 65 57 61 | 72 72 69 6f 72 20 35 20 |d CodeWa|rrior 5 |
|00000b30| 6f 72 20 6c 61 74 65 72 | 09 09 09 09 09 7d 0d 7b |or later|.....}.{|
|00000b40| 20 77 69 74 68 20 74 68 | 65 20 75 6e 69 76 65 72 | with th|e univer|
|00000b50| 73 61 6c 20 69 6e 74 65 | 72 66 61 63 65 73 20 76 |sal inte|rfaces v|
|00000b60| 65 72 73 69 6f 6e 20 32 | 2e 30 09 09 09 09 09 09 |ersion 2|.0......|
|00000b70| 09 09 09 09 09 09 09 09 | 09 09 09 7d 0d 0d 7b 20 |........|...}..{ |
|00000b80| 43 6f 6d 70 69 6c 69 6e | 67 20 69 6e 73 74 72 75 |Compilin|g instru|
|00000b90| 63 74 69 6f 6e 73 20 66 | 6f 72 20 50 6f 77 65 72 |ctions f|or Power|
|00000ba0| 20 4d 61 63 69 6e 74 6f | 73 68 20 28 50 6f 77 65 | Macinto|sh (Powe|
|00000bb0| 72 50 43 29 3a 09 09 09 | 09 09 09 09 09 09 09 09 |rPC):...|........|
|00000bc0| 7d 0d 7b 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.{ ----|--------|
|00000bd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000be0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 09 09 09 09 09 09 09 |--------|-.......|
|00000c00| 09 09 09 7d 0d 0d 7b 20 | 43 6f 6d 70 69 6c 65 20 |...}..{ |Compile |
|00000c10| 79 6f 75 72 20 66 69 6c | 65 73 20 61 73 20 61 20 |your fil|es as a |
|00000c20| 22 73 68 61 72 65 64 20 | 6c 69 62 61 72 79 22 20 |"shared |libary" |
|00000c30| 6f 72 2c 20 6d 6f 72 65 | 20 61 63 63 75 72 61 74 |or, more| accurat|
|00000c40| 65 6c 79 2c 20 61 73 20 | 61 6e 20 22 61 70 70 6c |ely, as |an "appl|
|00000c50| 69 63 61 74 69 6f 6e 09 | 09 09 09 09 09 7d 0d 7b |ication.|.....}.{|
|00000c60| 20 65 78 74 65 6e 73 69 | 6f 6e 22 2e 20 54 68 65 | extensi|on". The|
|00000c70| 20 63 6f 64 65 20 73 68 | 6f 75 6c 64 20 72 65 73 | code sh|ould res|
|00000c80| 69 64 65 20 69 6e 20 74 | 68 65 20 64 61 74 61 20 |ide in t|he data |
|00000c90| 66 6f 72 6b 20 28 6e 6f | 74 20 61 20 72 65 73 6f |fork (no|t a reso|
|00000ca0| 75 72 63 65 29 20 61 6e | 64 20 69 74 20 73 68 6f |urce) an|d it sho|
|00000cb0| 75 6c 64 09 09 09 09 09 | 09 7d 0d 7b 20 65 78 70 |uld.....|.}.{ exp|
|00000cc0| 6f 72 74 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |ort the |function|
|00000cd0| 20 6d 61 69 6e 28 29 20 | 61 73 20 69 74 20 69 73 | main() |as it is|
|00000ce0| 20 64 65 66 69 6e 65 64 | 20 69 6e 20 74 68 65 20 | defined| in the |
|00000cf0| 74 65 6d 70 6c 61 74 65 | 20 66 69 6c 65 73 20 70 |template| files p|
|00000d00| 72 6f 76 69 64 65 64 2e | 09 09 09 09 09 09 09 7d |rovided.|.......}|
|00000d10| 0d 7b 20 54 68 65 20 74 | 79 70 65 20 6f 66 20 74 |.{ The t|ype of t|
|00000d20| 68 65 20 66 69 6c 65 20 | 79 6f 75 20 63 72 65 61 |he file |you crea|
|00000d30| 74 65 20 6d 75 73 74 20 | 62 65 20 27 66 74 43 44 |te must |be 'ftCD|
|00000d40| 27 2c 20 69 74 73 20 63 | 72 65 61 74 6f 72 20 6d |', its c|reator m|
|00000d50| 75 73 74 20 62 65 20 27 | 4e 4c 66 74 27 2e 09 09 |ust be '|NLft'...|
|00000d60| 09 09 09 09 7d 0d 0d 0d | 7b 20 43 6f 6d 70 69 6c |....}...|{ Compil|
|00000d70| 69 6e 67 20 69 6e 73 74 | 72 75 63 74 69 6f 6e 73 |ing inst|ructions|
|00000d80| 20 66 6f 72 20 36 38 58 | 58 58 3a 09 09 09 09 09 | for 68X|XX:.....|
|00000d90| 09 09 09 09 09 09 09 09 | 09 09 7d 0d 7b 20 2d 2d |........|..}.{ --|
|00000da0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000db0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 09 |--------|-------.|
|00000dc0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 7d 0d |........|......}.|
|00000dd0| 0d 7b 20 43 6f 6d 70 69 | 6c 65 20 79 6f 75 72 20 |.{ Compi|le your |
|00000de0| 66 69 6c 65 73 20 61 6e | 64 20 6c 69 6e 6b 20 74 |files an|d link t|
|00000df0| 68 65 6d 20 69 6e 20 61 | 20 73 69 6e 67 6c 65 20 |hem in a| single |
|00000e00| 72 65 73 6f 75 72 63 65 | 20 6f 66 20 74 79 70 65 |resource| of type|
|00000e10| 20 27 4e 4c 66 74 27 20 | 28 74 68 65 20 49 44 20 | 'NLft' |(the ID |
|00000e20| 6e 75 6d 62 65 72 09 09 | 09 09 09 09 7d 0d 7b 20 |number..|....}.{ |
|00000e30| 63 61 6e 20 62 65 20 61 | 6e 79 20 6e 75 6d 62 65 |can be a|ny numbe|
|00000e40| 72 20 3e 31 32 38 20 79 | 6f 75 20 6c 69 6b 65 29 |r >128 y|ou like)|
|00000e50| 2e 20 4d 61 6b 65 20 73 | 75 72 65 20 74 68 61 74 |. Make s|ure that|
|00000e60| 20 79 6f 75 72 20 63 6f | 64 65 20 63 6f 6e 73 69 | your co|de consi|
|00000e70| 73 74 73 20 6f 66 20 61 | 20 73 69 6e 67 6c 65 20 |sts of a| single |
|00000e80| 73 65 67 6d 65 6e 74 2e | 09 09 09 09 09 09 7d 0d |segment.|......}.|
|00000e90| 7b 20 52 65 66 65 72 20 | 74 6f 20 79 6f 75 72 20 |{ Refer |to your |
|00000ea0| 63 6f 6d 70 69 6c 65 72 | 27 73 20 6d 61 6e 75 61 |compiler|'s manua|
|00000eb0| 6c 20 69 66 20 79 6f 75 | 20 64 6f 6e 27 74 20 6b |l if you| don't k|
|00000ec0| 6e 6f 77 20 68 6f 77 20 | 74 6f 20 63 6f 6d 70 69 |now how |to compi|
|00000ed0| 6c 65 20 63 6f 64 65 20 | 66 6f 72 20 61 20 72 65 |le code |for a re|
|00000ee0| 73 6f 75 72 63 65 2e 09 | 09 09 09 09 09 7d 0d 7b |source..|.....}.{|
|00000ef0| 20 50 75 74 20 79 6f 75 | 72 20 72 65 73 6f 75 72 | Put you|r resour|
|00000f00| 63 65 20 69 6e 74 6f 20 | 61 20 66 69 6c 65 20 68 |ce into |a file h|
|00000f10| 61 76 69 6e 67 20 74 68 | 65 20 74 79 70 65 20 27 |aving th|e type '|
|00000f20| 66 74 43 44 27 20 61 6e | 64 20 74 68 65 20 63 72 |ftCD' an|d the cr|
|00000f30| 65 61 74 6f 72 20 27 4e | 4c 66 74 27 2e 09 09 09 |eator 'N|Lft'....|
|00000f40| 09 09 09 7d 0d 0d 7b 20 | 42 65 66 6f 72 65 20 63 |...}..{ |Before c|
|00000f50| 6f 6d 70 69 6c 69 6e 67 | 2c 20 6d 61 6b 65 20 73 |ompiling|, make s|
|00000f60| 75 72 65 20 74 68 61 74 | 20 79 6f 75 20 63 68 6f |ure that| you cho|
|00000f70| 6f 73 65 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 |ose the |compiler|
|00000f80| 20 6f 70 74 69 6f 6e 73 | 20 74 68 61 74 20 61 72 | options| that ar|
|00000f90| 65 20 63 6f 6d 70 61 74 | 69 62 6c 65 09 09 09 09 |e compat|ible....|
|00000fa0| 09 09 7d 0d 7b 20 77 69 | 74 68 20 74 68 65 20 76 |..}.{ wi|th the v|
|00000fb0| 65 72 73 69 6f 6e 20 6f | 66 20 70 72 6f 20 46 69 |ersion o|f pro Fi|
|00000fc0| 74 20 79 6f 75 20 75 73 | 65 3a 09 09 09 09 09 09 |t you us|e:......|
|00000fd0| 7d 0d 0d 7b 20 49 66 20 | 79 6f 75 20 75 73 65 20 |}..{ If |you use |
|00000fe0| 74 68 65 20 46 50 55 20 | 76 65 72 73 69 6f 6e 20 |the FPU |version |
|00000ff0| 6f 66 20 70 72 6f 20 46 | 69 74 2c 20 6d 61 6b 65 |of pro F|it, make|
|00001000| 20 73 75 72 65 20 74 68 | 61 74 20 79 6f 75 72 20 | sure th|at your |
|00001010| 65 78 74 65 6e 64 65 64 | 20 76 61 72 69 61 62 6c |extended| variabl|
|00001020| 65 73 20 61 72 65 20 31 | 32 09 09 09 09 09 09 7d |es are 1|2......}|
|00001030| 0d 7b 20 62 79 74 65 73 | 20 6c 6f 6e 67 69 6e 74 |.{ bytes| longint|
|00001040| 2e 20 49 6e 20 54 68 69 | 6e 6b 20 50 61 73 63 61 |. In Thi|nk Pasca|
|00001050| 6c 2c 20 63 68 65 63 6b | 20 22 36 38 30 32 30 2f |l, check| "68020/|
|00001060| 36 38 30 33 30 22 20 61 | 6e 64 20 22 36 38 38 38 |68030" a|nd "6888|
|00001070| 31 2f 36 38 38 38 32 22 | 20 09 09 09 09 09 09 09 |1/68882"| .......|
|00001080| 09 7d 0d 7b 20 75 6e 64 | 65 72 20 43 6f 6d 70 69 |.}.{ und|er Compi|
|00001090| 6c 65 20 4f 70 74 69 6f | 6e 73 2e 09 09 09 09 09 |le Optio|ns......|
|000010a0| 09 09 09 09 09 09 09 09 | 09 09 09 09 7d 0d 0d 7b |........|....}..{|
|000010b0| 20 49 66 20 79 6f 75 20 | 75 73 65 20 74 68 65 20 | If you |use the |
|000010c0| 6e 6f 6e 2d 46 50 55 20 | 76 65 72 73 69 6f 6e 20 |non-FPU |version |
|000010d0| 6f 66 20 70 72 6f 20 46 | 69 74 2c 20 6d 61 6b 65 |of pro F|it, make|
|000010e0| 20 73 75 72 65 20 74 68 | 61 74 20 79 6f 75 72 20 | sure th|at your |
|000010f0| 65 78 74 65 6e 64 65 64 | 20 76 61 72 69 61 62 6c |extended| variabl|
|00001100| 65 73 20 61 72 65 09 09 | 09 09 09 09 7d 0d 7b 20 |es are..|....}.{ |
|00001110| 31 30 20 62 79 74 65 73 | 20 6c 6f 6e 67 69 6e 74 |10 bytes| longint|
|00001120| 2e 20 49 6e 20 54 68 69 | 6e 6b 20 50 61 73 63 61 |. In Thi|nk Pasca|
|00001130| 6c 2c 20 75 6e 63 68 65 | 63 6b 20 20 22 36 38 30 |l, unche|ck "680|
|00001140| 32 30 2f 36 38 30 33 30 | 22 20 61 6e 64 20 22 36 |20/68030|" and "6|
|00001150| 38 38 38 31 2f 36 38 38 | 38 32 22 09 09 09 09 09 |8881/688|82".....|
|00001160| 09 7d 0d 7b 20 75 6e 64 | 65 72 20 43 6f 6d 70 69 |.}.{ und|er Compi|
|00001170| 6c 65 20 4f 70 74 69 6f | 6e 73 2e 09 09 09 09 09 |le Optio|ns......|
|00001180| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 7d 0d 0d |........|.....}..|
|00001190| 7b 20 54 68 65 20 65 78 | 74 65 72 6e 61 6c 20 6d |{ The ex|ternal m|
|000011a0| 6f 64 75 6c 65 20 69 73 | 20 61 20 63 6f 6d 70 69 |odule is| a compi|
|000011b0| 6c 65 64 20 63 6f 64 65 | 20 72 65 73 6f 75 72 63 |led code| resourc|
|000011c0| 65 20 74 68 61 74 20 70 | 72 6f 76 69 64 65 73 20 |e that p|rovides |
|000011d0| 61 20 70 72 6f 63 65 64 | 75 72 65 20 63 61 6c 6c |a proced|ure call|
|000011e0| 65 64 20 27 6d 61 69 6e | 27 2e 09 09 09 09 09 09 |ed 'main|'.......|
|000011f0| 7d 0d 7b 20 59 6f 75 20 | 6d 75 73 74 20 6d 61 6b |}.{ You |must mak|
|00001200| 65 20 73 75 72 65 20 74 | 68 61 74 20 6d 61 69 6e |e sure t|hat main|
|00001210| 20 69 73 20 61 74 20 74 | 68 65 20 62 65 67 69 6e | is at t|he begin|
|00001220| 6e 69 6e 67 20 6f 66 20 | 79 6f 75 72 20 63 6f 64 |ning of |your cod|
|00001230| 65 2e 20 55 6e 64 65 72 | 20 53 79 6d 61 6e 74 65 |e. Under| Symante|
|00001240| 63 27 73 09 09 09 09 09 | 09 7d 0d 7b 20 63 6f 6d |c's.....|.}.{ com|
|00001250| 70 69 6c 65 72 73 2c 20 | 74 68 69 73 20 69 73 20 |pilers, |this is |
|00001260| 64 6f 6e 65 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |done aut|omatical|
|00001270| 6c 79 2e 20 55 6e 64 65 | 72 20 4d 50 57 2c 20 79 |ly. Unde|r MPW, y|
|00001280| 6f 75 20 6d 75 73 74 20 | 6d 61 6b 65 20 73 75 72 |ou must |make sur|
|00001290| 65 20 74 68 61 74 20 6d | 61 69 6e 28 29 09 09 09 |e that m|ain()...|
|000012a0| 09 09 09 7d 0d 7b 20 69 | 73 20 74 68 65 20 66 69 |...}.{ i|s the fi|
|000012b0| 72 73 74 20 72 6f 75 74 | 69 6e 65 20 74 68 61 74 |rst rout|ine that|
|000012c0| 20 69 73 20 63 6f 6d 70 | 69 6c 65 64 20 61 6e 64 | is comp|iled and|
|000012d0| 20 6c 69 6e 6b 65 64 2e | 09 09 09 09 09 09 09 09 | linked.|........|
|000012e0| 09 09 09 7d 0d 0d 7b 20 | 2a 2a 2a 2a 2a 2a 2a 2a |...}..{ |********|
|000012f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001300| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001310| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001320| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001330| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 09 |********|*******.|
|00001340| 09 09 7d 0d 0d 0d 75 6e | 69 74 20 70 72 6f 46 69 |..}...un|it proFi|
|00001350| 74 5f 69 6e 74 65 72 66 | 61 63 65 3b 0d 0d 69 6e |t_interf|ace;..in|
|00001360| 74 65 72 66 61 63 65 0d | 0d 0d 7b 20 09 2a 2a 2a |terface.|..{ .***|
|00001370| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001380| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001390| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000013a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000013b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000013c0| 2a 2a 2a 2a 2a 09 09 09 | 09 09 09 7d 0d 0d 7b 20 |*****...|...}..{ |
|000013d0| 09 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 61 |.The fol|lowing a|
|000013e0| 72 65 20 74 68 65 20 74 | 79 70 65 20 64 65 66 69 |re the t|ype defi|
|000013f0| 6e 69 74 69 6f 6e 73 20 | 74 68 61 74 20 73 65 72 |nitions |that ser|
|00001400| 76 65 20 61 73 20 61 6e | 20 69 6e 74 65 72 66 61 |ve as an| interfa|
|00001410| 63 65 20 62 65 74 77 65 | 65 6e 20 74 68 65 09 09 |ce betwe|en the..|
|00001420| 09 09 09 09 7d 0d 7b 20 | 09 65 78 74 65 72 6e 61 |....}.{ |.externa|
|00001430| 6c 20 6d 6f 64 75 6c 65 | 20 61 6e 64 20 70 72 6f |l module| and pro|
|00001440| 20 46 69 74 2e 20 54 68 | 65 73 65 20 64 65 63 6c | Fit. Th|ese decl|
|00001450| 61 72 61 74 69 6f 6e 73 | 20 64 65 73 63 72 69 62 |arations| describ|
|00001460| 65 20 65 78 61 63 74 6c | 79 20 68 6f 77 20 70 72 |e exactl|y how pr|
|00001470| 6f 20 46 69 74 09 09 09 | 09 09 09 7d 0d 7b 20 09 |o Fit...|...}.{ .|
|00001480| 65 78 70 65 63 74 73 20 | 74 68 65 20 65 78 74 65 |expects |the exte|
|00001490| 72 6e 61 6c 20 6d 6f 64 | 75 6c 65 20 74 6f 20 61 |rnal mod|ule to a|
|000014a0| 72 72 61 6e 67 65 20 74 | 68 65 20 69 6e 66 6f 72 |rrange t|he infor|
|000014b0| 6d 61 74 69 6f 6e 20 69 | 74 20 70 72 6f 76 69 64 |mation i|t provid|
|000014c0| 65 73 2c 20 61 6e 64 20 | 68 6f 77 20 74 68 65 09 |es, and |how the.|
|000014d0| 09 09 09 09 09 7d 0d 7b | 20 09 69 6e 66 6f 72 6d |.....}.{| .inform|
|000014e0| 61 74 69 6f 6e 20 70 72 | 6f 76 69 64 65 64 20 62 |ation pr|ovided b|
|000014f0| 79 20 70 72 6f 20 46 69 | 74 20 69 73 20 61 72 72 |y pro Fi|t is arr|
|00001500| 61 6e 67 65 64 2e 09 09 | 09 09 09 09 09 09 09 09 |anged...|........|
|00001510| 09 09 09 7d 0d 7b 20 09 | 44 6f 6e 27 74 20 65 76 |...}.{ .|Don't ev|
|00001520| 65 6e 20 74 68 69 6e 6b | 20 6f 66 20 63 68 61 6e |en think| of chan|
|00001530| 67 69 6e 67 20 73 6f 6d | 65 74 68 69 6e 67 20 69 |ging som|ething i|
|00001540| 6e 20 74 68 69 73 20 66 | 69 6c 65 2e 20 54 68 65 |n this f|ile. The|
|00001550| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 73 20 69 74 | informa|tions it|
|00001560| 20 63 6f 6e 74 61 69 6e | 73 09 09 09 09 09 09 7d | contain|s......}|
|00001570| 0d 7b 20 09 61 72 65 20 | 76 69 74 61 6c 20 74 6f |.{ .are |vital to|
|00001580| 20 74 68 65 20 65 78 74 | 65 72 6e 61 6c 20 6d 6f | the ext|ernal mo|
|00001590| 64 75 6c 65 20 69 6e 20 | 74 68 65 69 72 20 70 72 |dule in |their pr|
|000015a0| 65 73 65 6e 74 2c 20 6f | 72 69 67 69 6e 61 6c 20 |esent, o|riginal |
|000015b0| 66 6f 72 6d 2e 20 54 68 | 65 79 20 61 72 65 20 64 |form. Th|ey are d|
|000015c0| 65 61 64 6c 79 20 69 66 | 09 09 09 09 09 09 7d 0d |eadly if|......}.|
|000015d0| 7b 20 09 79 6f 75 20 6d | 6f 64 69 66 79 20 74 68 |{ .you m|odify th|
|000015e0| 65 6d 2e 09 09 09 09 09 | 09 7d 0d 7b 20 09 41 4e |em......|.}.{ .AN|
|000015f0| 59 20 63 68 61 6e 67 65 | 20 69 6e 20 61 20 74 79 |Y change| in a ty|
|00001600| 70 65 20 64 65 66 69 6e | 69 74 69 6f 6e 20 28 65 |pe defin|ition (e|
|00001610| 2e 67 2e 20 63 68 61 6e | 67 69 6e 67 20 74 68 65 |.g. chan|ging the|
|00001620| 20 72 61 6e 67 65 73 20 | 6f 66 20 61 6e 20 61 72 | ranges |of an ar|
|00001630| 72 61 79 20 6f 72 20 74 | 68 65 09 09 09 09 09 09 |ray or t|he......|
|00001640| 09 7d 0d 7b 20 09 6f 72 | 64 65 72 20 6f 66 20 74 |.}.{ .or|der of t|
|00001650| 68 65 20 66 69 65 6c 64 | 73 20 69 6e 20 61 20 72 |he field|s in a r|
|00001660| 65 63 6f 72 64 29 20 69 | 73 20 67 75 61 72 61 6e |ecord) i|s guaran|
|00001670| 74 65 65 64 20 74 6f 20 | 63 61 75 73 65 20 76 65 |teed to |cause ve|
|00001680| 72 79 20 75 67 6c 79 20 | 63 6f 6e 73 65 71 75 65 |ry ugly |conseque|
|00001690| 6e 63 65 73 2e 09 09 09 | 09 09 09 7d 0d 7b 20 09 |nces....|...}.{ .|
|000016a0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|000016b0| 09 09 09 09 7d 0d 7b 20 | 09 46 6f 72 20 61 20 64 |....}.{ |.For a d|
|000016c0| 65 74 61 69 6c 65 64 20 | 64 65 73 63 72 69 70 74 |etailed |descript|
|000016d0| 69 6f 6e 20 6f 66 20 74 | 68 65 73 65 20 64 65 63 |ion of t|hese dec|
|000016e0| 6c 61 72 61 74 69 6f 6e | 73 20 61 6e 64 20 74 68 |laration|s and th|
|000016f0| 65 69 72 20 75 73 65 2c | 20 73 65 65 20 74 68 65 |eir use,| see the|
|00001700| 09 09 09 09 09 09 7d 0d | 7b 20 09 70 72 6f 20 46 |......}.|{ .pro F|
|00001710| 69 74 20 75 73 65 72 20 | 6d 61 6e 75 61 6c 2e 09 |it user |manual..|
|00001720| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 7d |........|.......}|
|00001730| 0d 7b 20 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |.{ .....|........|
|00001740| 09 09 09 09 09 09 09 09 | 7d 0d 0d 0d 7b 24 49 46 |........|}...{$IF|
|00001750| 43 20 55 4e 44 45 46 49 | 4e 45 44 20 50 4f 57 45 |C UNDEFI|NED POWE|
|00001760| 52 50 43 7d 0d 09 7b 20 | 69 66 20 74 68 69 73 20 |RPC}..{ |if this |
|00001770| 69 73 20 6e 6f 74 20 64 | 65 66 69 6e 65 64 2c 20 |is not d|efined, |
|00001780| 77 65 20 61 73 73 75 6d | 65 20 74 68 61 74 20 74 |we assum|e that t|
|00001790| 68 69 73 20 69 73 20 61 | 20 36 38 6b 20 63 6f 6d |his is a| 68k com|
|000017a0| 70 69 6c 65 72 20 09 09 | 09 7d 0d 09 7b 24 53 45 |piler ..|.}..{$SE|
|000017b0| 54 43 20 50 4f 57 45 52 | 50 43 20 3a 3d 20 66 61 |TC POWER|PC := fa|
|000017c0| 6c 73 65 09 09 09 7d 0d | 7b 24 45 4e 44 43 7d 0d |lse...}.|{$ENDC}.|
|000017d0| 0d 7b 24 49 46 43 20 55 | 4e 44 45 46 49 4e 45 44 |.{$IFC U|NDEFINED|
|000017e0| 20 54 48 49 4e 4b 5f 50 | 41 53 43 41 4c 20 7d 0d | THINK_P|ASCAL }.|
|000017f0| 09 7b 20 69 66 20 74 68 | 69 73 20 69 73 20 74 68 |.{ if th|is is th|
|00001800| 65 20 74 68 69 6e 6b 20 | 70 61 73 63 61 6c 20 63 |e think |pascal c|
|00001810| 6f 6d 70 69 6c 65 72 7d | 0d 09 7b 20 74 68 65 6e |ompiler}|..{ then|
|00001820| 20 77 65 20 64 6f 6e 27 | 74 20 6e 65 65 64 20 61 | we don'|t need a|
|00001830| 6e 79 20 22 75 73 65 73 | 22 20 61 74 20 61 6c 6c |ny "uses|" at all|
|00001840| 7d 0d 09 7b 24 49 46 43 | 20 55 4e 44 45 46 49 4e |}..{$IFC| UNDEFIN|
|00001850| 45 44 20 55 73 69 6e 67 | 49 6e 63 6c 75 64 65 73 |ED Using|Includes|
|00001860| 7d 0d 09 09 7b 24 53 45 | 54 43 20 55 73 69 6e 67 |}...{$SE|TC Using|
|00001870| 49 6e 63 6c 75 64 65 73 | 20 3a 3d 20 30 7d 0d 09 |Includes| := 0}..|
|00001880| 7b 24 45 4e 44 43 7d 0d | 0d 09 09 7b 24 49 46 43 |{$ENDC}.|...{$IFC|
|00001890| 20 4e 4f 54 20 50 4f 57 | 45 52 50 43 7d 0d 09 75 | NOT POW|ERPC}..u|
|000018a0| 73 65 73 0d 09 09 54 79 | 70 65 73 2c 20 54 65 78 |ses...Ty|pes, Tex|
|000018b0| 74 55 74 69 6c 73 2c 20 | 46 69 6c 65 73 2c 20 46 |tUtils, |Files, F|
|000018c0| 69 6c 65 73 2c 51 75 69 | 63 6b 44 72 61 77 2c 20 |iles,Qui|ckDraw, |
|000018d0| 45 76 65 6e 74 73 3b 0d | 09 09 7b 24 45 4c 53 45 |Events;.|..{$ELSE|
|000018e0| 43 7d 0d 09 75 73 65 73 | 0d 09 09 54 79 70 65 73 |C}..uses|...Types|
|000018f0| 2c 20 54 65 78 74 55 74 | 69 6c 73 2c 20 4d 69 78 |, TextUt|ils, Mix|
|00001900| 65 64 4d 6f 64 65 2c 20 | 46 69 6c 65 73 2c 20 51 |edMode, |Files, Q|
|00001910| 75 69 63 6b 64 72 61 77 | 2c 20 45 76 65 6e 74 73 |uickdraw|, Events|
|00001920| 3b 0d 09 09 7b 24 45 4e | 44 43 7d 0d 0d 7b 24 45 |;...{$EN|DC}..{$E|
|00001930| 4e 44 43 7d 0d 0d 7b 24 | 49 46 43 20 55 4e 44 45 |NDC}..{$|IFC UNDE|
|00001940| 46 49 4e 45 44 20 5f 5f | 43 4f 4e 44 49 54 49 4f |FINED __|CONDITIO|
|00001950| 4e 41 4c 4d 41 43 52 4f | 53 5f 5f 7d 0d 09 7b 20 |NALMACRO|S__}..{ |
|00001960| 5f 5f 43 4f 4e 44 49 54 | 49 4f 4e 41 4c 4d 41 43 |__CONDIT|IONALMAC|
|00001970| 52 4f 53 5f 5f 20 77 6f | 75 6c 64 20 62 65 20 64 |ROS__ wo|uld be d|
|00001980| 65 66 69 6e 65 64 20 69 | 6e 20 43 6f 6e 64 69 74 |efined i|n Condit|
|00001990| 69 6f 6e 61 6c 4d 61 63 | 72 6f 73 2e 70 20 6f 66 |ionalMac|ros.p of|
|000019a0| 20 74 68 65 20 75 6e 69 | 76 65 72 73 61 6c 20 68 | the uni|versal h|
|000019b0| 65 61 64 65 72 73 20 76 | 65 72 73 69 6f 6e 20 32 |eaders v|ersion 2|
|000019c0| 20 6f 72 20 6c 61 74 65 | 72 2e 20 7d 0d 09 7b 20 | or late|r. }..{ |
|000019d0| 69 66 20 69 74 20 69 73 | 20 6e 6f 74 20 64 65 66 |if it is| not def|
|000019e0| 69 6e 65 64 2c 20 77 65 | 20 61 73 73 75 6d 65 20 |ined, we| assume |
|000019f0| 74 68 61 74 20 74 68 69 | 73 20 69 73 20 61 20 36 |that thi|s is a 6|
|00001a00| 38 6b 20 63 6f 6d 70 69 | 6c 65 72 3a 20 7d 0d 09 |8k compi|ler: }..|
|00001a10| 7b 24 53 45 54 43 20 47 | 45 4e 45 52 41 54 49 4e |{$SETC G|ENERATIN|
|00001a20| 47 50 4f 57 45 52 50 43 | 20 3a 3d 20 66 61 6c 73 |GPOWERPC| := fals|
|00001a30| 65 7d 0d 09 7b 24 53 45 | 54 43 20 47 45 4e 45 52 |e}..{$SE|TC GENER|
|00001a40| 41 54 49 4e 47 36 38 4b | 20 3a 3d 20 74 72 75 65 |ATING68K| := true|
|00001a50| 7d 0d 7b 24 45 4e 44 43 | 7d 0d 0d 7b 24 49 46 43 |}.{$ENDC|}..{$IFC|
|00001a60| 20 4e 4f 54 20 55 4e 44 | 45 46 49 4e 45 44 20 4d | NOT UND|EFINED M|
|00001a70| 57 45 52 4b 53 20 41 4e | 44 20 47 45 4e 45 52 41 |WERKS AN|D GENERA|
|00001a80| 54 49 4e 47 36 38 4b 7d | 0d 09 66 75 6e 63 74 69 |TING68K}|..functi|
|00001a90| 6f 6e 20 53 65 74 43 75 | 72 72 65 6e 74 41 34 3a |on SetCu|rrentA4:|
|00001aa0| 20 6c 6f 6e 67 69 6e 74 | 3b 0d 09 09 43 3b 0d 09 | longint|;...C;..|
|00001ab0| 65 78 74 65 72 6e 61 6c | 3b 0d 09 66 75 6e 63 74 |external|;..funct|
|00001ac0| 69 6f 6e 20 53 65 74 41 | 34 20 28 6e 65 77 41 34 |ion SetA|4 (newA4|
|00001ad0| 3a 20 6c 6f 6e 67 69 6e | 74 29 3a 20 6c 6f 6e 67 |: longin|t): long|
|00001ae0| 69 6e 74 3b 0d 09 65 78 | 74 65 72 6e 61 6c 3b 0d |int;..ex|ternal;.|
|00001af0| 09 7b 24 53 45 54 43 20 | 53 45 54 5f 41 34 20 3a |.{$SETC |SET_A4 :|
|00001b00| 3d 20 74 72 75 65 7d 0d | 7b 24 45 4e 44 43 7d 0d |= true}.|{$ENDC}.|
|00001b10| 0d 0d 0d 09 63 6f 6e 73 | 74 0d 09 09 76 65 72 73 |....cons|t...vers|
|00001b20| 69 6f 6e 4e 75 6d 62 65 | 72 20 3d 20 31 3b 09 09 |ionNumbe|r = 1;..|
|00001b30| 09 7b 20 74 68 65 20 76 | 65 72 73 69 6f 6e 20 6e |.{ the v|ersion n|
|00001b40| 75 6d 62 65 72 20 6f 66 | 20 74 68 69 73 20 69 6d |umber of| this im|
|00001b50| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 09 09 09 |plementa|tion ...|
|00001b60| 7d 0d 0d 0d 09 09 69 73 | 46 75 6e 63 74 69 6f 6e |}.....is|Function|
|00001b70| 20 3d 20 31 3b 09 09 09 | 09 7b 20 63 6f 6e 73 74 | = 1;...|.{ const|
|00001b80| 61 6e 74 73 20 75 73 65 | 64 20 69 6e 20 74 68 65 |ants use|d in the|
|00001b90| 20 70 72 6f 63 65 64 75 | 72 65 20 53 65 74 75 70 | procedu|re Setup|
|00001ba0| 20 74 6f 20 73 65 74 20 | 74 68 65 20 70 61 72 61 | to set |the para|
|00001bb0| 6d 65 74 65 72 20 6d 6f | 64 75 6c 65 4b 69 6e 64 |meter mo|duleKind|
|00001bc0| 09 09 09 7d 0d 09 09 69 | 73 50 72 6f 67 72 61 6d |...}...i|sProgram|
|00001bd0| 20 3d 20 32 3b 0d 09 09 | 69 73 4d 61 63 72 6f 20 | = 2;...|isMacro |
|00001be0| 3d 20 33 3b 0d 0d 09 09 | 64 72 61 77 69 6e 67 54 |= 3;....|drawingT|
|00001bf0| 79 70 65 20 3d 20 27 66 | 74 47 46 27 3b 20 20 20 |ype = 'f|tGF'; |
|00001c00| 20 09 09 7b 20 77 69 6e | 64 6f 77 20 74 79 70 65 | ..{ win|dow type|
|00001c10| 73 2c 20 75 73 65 64 20 | 62 79 20 44 6f 4e 65 77 |s, used |by DoNew|
|00001c20| 57 69 6e 64 6f 77 2c 20 | 65 74 63 2e 20 7d 0d 09 |Window, |etc. }..|
|00001c30| 09 64 61 74 61 54 79 70 | 65 20 3d 20 27 66 74 4c |.dataTyp|e = 'ftL|
|00001c40| 53 27 3b 0d 09 09 74 65 | 78 74 54 79 70 65 20 3d |S';...te|xtType =|
|00001c50| 20 27 66 74 46 43 27 3b | 0d 09 09 64 65 66 61 75 | 'ftFC';|...defau|
|00001c60| 6c 74 54 79 70 65 20 3d | 20 27 2a 2a 2a 2a 27 3b |ltType =| '****';|
|00001c70| 0d 0d 09 09 67 61 75 73 | 73 44 69 73 74 72 20 3d |....gaus|sDistr =|
|00001c80| 20 31 3b 09 09 09 09 7b | 20 65 72 72 6f 72 20 64 | 1;....{| error d|
|00001c90| 69 73 74 72 69 62 75 74 | 69 6f 6e 73 2c 20 75 73 |istribut|ions, us|
|00001ca0| 65 64 20 66 6f 72 20 73 | 65 74 74 69 6e 67 20 74 |ed for s|etting t|
|00001cb0| 68 65 20 70 61 72 61 6d | 65 74 65 72 73 20 6f 66 |he param|eters of|
|00001cc0| 20 74 68 65 20 53 65 74 | 46 69 74 44 65 66 61 75 | the Set|FitDefau|
|00001cd0| 6c 74 73 20 72 6f 75 74 | 69 6e 65 20 20 7d 0d 09 |lts rout|ine }..|
|00001ce0| 09 64 6f 75 62 6c 65 45 | 78 70 44 69 73 74 72 20 |.doubleE|xpDistr |
|00001cf0| 3d 20 32 3b 0d 09 09 6c | 6f 72 65 6e 74 7a 44 69 |= 2;...l|orentzDi|
|00001d00| 73 74 72 20 3d 20 33 3b | 0d 09 09 61 6e 64 72 65 |str = 3;|...andre|
|00001d10| 77 44 69 73 74 72 20 3d | 20 34 3b 0d 09 09 74 75 |wDistr =| 4;...tu|
|00001d20| 6b 65 79 44 69 73 74 72 | 20 3d 20 35 3b 0d 0d 09 |keyDistr| = 5;...|
|00001d30| 09 64 65 66 61 75 6c 74 | 46 6f 72 6d 61 74 20 3d |.default|Format =|
|00001d40| 20 30 3b 09 09 09 7b 20 | 44 72 61 77 69 6e 67 20 | 0;...{ |Drawing |
|00001d50| 77 69 6e 64 6f 77 20 66 | 69 6c 65 20 66 6f 72 6d |window f|ile form|
|00001d60| 61 74 73 20 7d 0d 09 09 | 70 69 63 74 46 6f 72 6d |ats }...|pictForm|
|00001d70| 61 74 20 3d 20 31 3b 0d | 09 09 65 70 73 46 6f 72 |at = 1;.|..epsFor|
|00001d80| 6d 61 74 20 3d 20 32 3b | 0d 0d 09 09 66 6c 6f 61 |mat = 2;|....floa|
|00001d90| 74 43 6f 6c 75 6d 6e 20 | 3d 20 30 3b 09 09 09 7b |tColumn |= 0;...{|
|00001da0| 20 64 61 74 61 20 63 6f | 6c 75 6d 6e 20 74 79 70 | data co|lumn typ|
|00001db0| 65 73 20 09 09 7d 0d 09 | 09 64 6f 75 62 6c 65 43 |es ..}..|.doubleC|
|00001dc0| 6f 6c 75 6d 6e 20 3d 20 | 31 3b 0d 09 09 74 65 78 |olumn = |1;...tex|
|00001dd0| 74 43 6f 6c 75 6d 6e 20 | 3d 20 31 32 38 3b 0d 0d |tColumn |= 128;..|
|00001de0| 09 09 6e 6f 45 72 72 6f | 72 73 20 3d 20 30 3b 09 |..noErro|rs = 0;.|
|00001df0| 7b 65 72 72 6f 72 20 62 | 61 72 20 74 79 70 65 73 |{error b|ar types|
|00001e00| 2c 20 75 73 65 64 20 66 | 6f 72 20 73 65 74 74 69 |, used f|or setti|
|00001e10| 6e 67 20 74 68 65 20 22 | 65 72 72 6f 72 73 22 20 |ng the "|errors" |
|00001e20| 70 61 72 61 6d 65 74 65 | 72 20 69 6e 20 74 68 65 |paramete|r in the|
|00001e30| 20 4f 70 65 6e 44 61 74 | 61 53 65 74 20 72 6f 75 | OpenDat|aSet rou|
|00001e40| 74 69 6e 65 7d 0d 09 09 | 65 42 61 72 59 20 3d 20 |tine}...|eBarY = |
|00001e50| 31 3b 0d 09 09 65 42 61 | 72 58 20 3d 20 32 3b 0d |1;...eBa|rX = 2;.|
|00001e60| 09 09 61 73 79 6d 6d 45 | 42 61 72 59 20 3d 20 34 |..asymmE|BarY = 4|
|00001e70| 3b 0d 09 09 61 73 79 6d | 6d 45 42 61 72 58 20 3d |;...asym|mEBarX =|
|00001e80| 20 38 3b 0d 0d 09 09 78 | 41 78 69 73 20 3d 20 30 | 8;....x|Axis = 0|
|00001e90| 3b 09 7b 20 63 6f 6e 73 | 74 61 6e 74 73 20 75 73 |;.{ cons|tants us|
|00001ea0| 65 64 20 66 6f 72 20 74 | 68 65 20 72 6f 75 74 69 |ed for t|he routi|
|00001eb0| 6e 65 73 20 61 63 63 65 | 73 73 69 6e 67 20 74 68 |nes acce|ssing th|
|00001ec0| 65 20 63 75 72 72 65 6e | 74 20 78 20 6f 72 20 79 |e curren|t x or y|
|00001ed0| 20 61 78 69 73 2c 20 73 | 75 63 68 20 61 73 20 22 | axis, s|uch as "|
|00001ee0| 53 65 74 52 61 6e 67 65 | 22 7d 0d 09 09 79 41 78 |SetRange|"}...yAx|
|00001ef0| 69 73 20 3d 20 31 3b 20 | 7b 20 75 73 65 64 20 74 |is = 1; |{ used t|
|00001f00| 6f 20 64 69 73 74 69 6e | 67 75 69 73 68 20 62 65 |o distin|guish be|
|00001f10| 74 77 65 65 6e 20 59 20 | 61 6e 64 20 58 20 61 78 |tween Y |and X ax|
|00001f20| 65 73 2e 09 09 09 09 7d | 0d 0d 09 09 65 71 75 61 |es.....}|....equa|
|00001f30| 6c 54 6f 4d 61 69 6e 20 | 3d 20 31 3b 09 7b 20 63 |lToMain |= 1;.{ c|
|00001f40| 6f 6e 73 74 61 6e 74 73 | 20 75 73 65 64 20 66 6f |onstants| used fo|
|00001f50| 72 20 73 65 74 74 69 6e | 67 20 74 68 65 20 22 66 |r settin|g the "f|
|00001f60| 6c 61 67 73 22 20 66 69 | 65 6c 64 20 6f 66 20 74 |lags" fi|eld of t|
|00001f70| 68 65 20 53 65 74 41 78 | 69 73 41 74 74 72 69 62 |he SetAx|isAttrib|
|00001f80| 75 74 65 73 20 72 6f 75 | 74 69 6e 65 09 09 7d 0d |utes rou|tine..}.|
|00001f90| 09 09 64 72 61 77 41 78 | 69 73 4c 69 6e 65 20 3d |..drawAx|isLine =|
|00001fa0| 20 32 3b 0d 09 09 64 72 | 61 77 54 69 63 6b 73 20 | 2;...dr|awTicks |
|00001fb0| 3d 20 34 3b 0d 09 09 64 | 72 61 77 4d 61 6a 6f 72 |= 4;...d|rawMajor|
|00001fc0| 54 69 63 6b 4c 61 62 65 | 6c 73 20 3d 20 38 3b 0d |TickLabe|ls = 8;.|
|00001fd0| 09 09 64 72 61 77 4d 69 | 6e 6f 72 54 69 63 6b 4c |..drawMi|norTickL|
|00001fe0| 61 62 65 6c 73 20 3d 20 | 24 30 30 30 30 30 30 31 |abels = |$0000001|
|00001ff0| 30 3b 0d 09 09 70 6c 75 | 73 53 69 64 65 54 69 63 |0;...plu|sSideTic|
|00002000| 6b 73 20 3d 20 24 30 30 | 30 30 30 30 32 30 3b 0d |ks = $00|000020;.|
|00002010| 09 09 6d 69 6e 75 73 53 | 69 64 65 54 69 63 6b 73 |..minusS|ideTicks|
|00002020| 20 3d 20 24 30 30 30 30 | 30 30 34 30 3b 0d 09 09 | = $0000|0040;...|
|00002030| 70 6c 75 73 53 69 64 65 | 4c 61 62 65 6c 73 20 3d |plusSide|Labels =|
|00002040| 20 24 30 30 30 30 30 30 | 38 30 3b 0d 09 09 6c 61 | $000000|80;...la|
|00002050| 62 65 6c 73 4f 75 74 73 | 69 64 65 46 72 61 6d 65 |belsOuts|ideFrame|
|00002060| 20 3d 20 24 30 30 30 30 | 30 31 30 30 3b 0d 0d 09 | = $0000|0100;...|
|00002070| 09 64 72 61 77 46 72 61 | 6d 65 20 3d 20 32 3b 09 |.drawFra|me = 2;.|
|00002080| 7b 20 63 6f 6e 73 74 61 | 6e 74 73 20 75 73 65 64 |{ consta|nts used|
|00002090| 20 66 6f 72 20 73 65 74 | 74 69 6e 67 20 74 68 65 | for set|ting the|
|000020a0| 20 22 66 6c 61 67 73 22 | 20 66 69 65 6c 64 20 69 | "flags"| field i|
|000020b0| 6e 20 63 61 6c 6c 73 20 | 74 6f 20 74 68 65 20 53 |n calls |to the S|
|000020c0| 65 74 47 72 61 70 68 41 | 74 74 72 69 62 75 74 65 |etGraphA|ttribute|
|000020d0| 73 20 72 6f 75 74 69 6e | 65 20 09 09 09 7d 0d 09 |s routin|e ...}..|
|000020e0| 09 64 72 61 77 4d 61 6a | 6f 72 47 72 69 64 58 20 |.drawMaj|orGridX |
|000020f0| 3d 20 34 3b 0d 09 09 64 | 72 61 77 4d 69 6e 6f 72 |= 4;...d|rawMinor|
|00002100| 47 72 69 64 58 20 3d 20 | 38 3b 0d 09 09 64 72 61 |GridX = |8;...dra|
|00002110| 77 4d 61 6a 6f 72 47 72 | 69 64 59 20 3d 20 24 30 |wMajorGr|idY = $0|
|00002120| 30 30 30 30 30 31 30 3b | 0d 09 09 64 72 61 77 4d |0000010;|...drawM|
|00002130| 69 6e 6f 72 47 72 69 64 | 59 20 3d 20 24 30 30 30 |inorGrid|Y = $000|
|00002140| 30 30 30 32 30 3b 0d 09 | 09 70 6c 6f 74 42 65 68 |00020;..|.plotBeh|
|00002150| 69 6e 64 41 78 65 73 20 | 3d 20 24 30 30 30 30 30 |indAxes |= $00000|
|00002160| 30 34 30 3b 0d 09 09 67 | 72 69 64 49 6e 46 72 6f |040;...g|ridInFro|
|00002170| 6e 74 20 3d 20 24 30 30 | 30 30 30 30 38 30 3b 0d |nt = $00|000080;.|
|00002180| 09 09 67 72 69 64 49 6e | 4d 69 64 64 6c 65 20 3d |..gridIn|Middle =|
|00002190| 20 24 30 30 30 30 30 31 | 30 30 3b 0d 0d 09 09 6d | $000001|00;....m|
|000021a0| 61 78 4e 72 50 61 72 61 | 6d 73 20 3d 20 36 34 3b |axNrPara|ms = 64;|
|000021b0| 09 09 09 7b 20 74 68 65 | 20 6d 61 78 69 6d 75 6d |...{ the| maximum|
|000021c0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 61 72 61 6d | number |of param|
|000021d0| 65 74 65 72 73 20 75 73 | 65 64 20 62 79 20 61 20 |eters us|ed by a |
|000021e0| 66 75 6e 63 74 69 6f 6e | 20 7d 0d 09 09 6d 61 78 |function| }...max|
|000021f0| 50 61 72 61 6d 4e 61 6d | 65 4c 65 6e 67 74 68 20 |ParamNam|eLength |
|00002200| 3d 20 33 31 3b 09 09 7b | 20 74 68 65 20 6d 61 78 |= 31;..{| the max|
|00002210| 69 6d 75 6d 20 6c 65 6e | 67 74 68 20 6f 66 20 61 |imum len|gth of a|
|00002220| 20 70 61 72 61 6d 65 74 | 65 72 20 6e 61 6d 65 20 | paramet|er name |
|00002230| 7d 0d 0d 09 09 6d 61 78 | 4e 72 49 6e 70 75 74 56 |}....max|NrInputV|
|00002240| 61 6c 75 65 73 20 3d 20 | 36 3b 09 09 7b 20 74 68 |alues = |6;..{ th|
|00002250| 65 20 6d 61 78 69 75 6d | 75 6d 20 6e 75 6d 62 65 |e maxium|um numbe|
|00002260| 72 20 6f 66 20 69 6e 70 | 75 74 20 76 61 6c 75 65 |r of inp|ut value|
|00002270| 73 20 69 6e 20 74 68 65 | 20 69 6e 70 75 74 20 64 |s in the| input d|
|00002280| 69 61 6c 6f 67 20 62 6f | 78 20 09 09 09 7d 0d 0d |ialog bo|x ...}..|
|00002290| 09 74 79 70 65 0d 0d 7b | 24 41 4c 49 47 4e 20 4d |.type..{|$ALIGN M|
|000022a0| 41 43 36 38 4b 7d 0d 7b | 20 2a 2a 2a 2a 2a 2a 2a |AC68K}.{| *******|
|000022b0| 2a 2a 2a 2a 2a 54 79 70 | 65 20 64 65 66 69 6e 69 |*****Typ|e defini|
|000022c0| 74 69 6f 6e 20 66 6f 72 | 20 74 68 65 20 22 49 6e |tion for| the "In|
|000022d0| 70 75 74 42 6f 78 22 20 | 2a 2a 2a 2a 2a 2a 2a 2a |putBox" |********|
|000022e0| 2a 2a 2a 2a 20 7d 0d 09 | 09 45 78 74 65 6e 64 65 |**** }..|.Extende|
|000022f0| 64 50 74 72 20 3d 20 5e | 65 78 74 65 6e 64 65 64 |dPtr = ^|extended|
|00002300| 3b 0d 09 09 69 6e 70 75 | 74 52 65 63 20 3d 20 70 |;...inpu|tRec = p|
|00002310| 61 63 6b 65 64 20 61 72 | 72 61 79 5b 31 2e 2e 6d |acked ar|ray[1..m|
|00002320| 61 78 4e 72 49 6e 70 75 | 74 56 61 6c 75 65 73 5d |axNrInpu|tValues]|
|00002330| 20 6f 66 20 72 65 63 6f | 72 64 09 7b 20 69 6e 66 | of reco|rd.{ inf|
|00002340| 6f 72 6d 61 74 69 6f 6e | 20 74 79 70 65 20 66 6f |ormation| type fo|
|00002350| 72 20 74 68 65 20 69 6e | 70 75 74 20 64 69 61 6c |r the in|put dial|
|00002360| 6f 67 20 62 6f 78 20 09 | 09 09 7d 0d 09 09 09 09 |og box .|..}.....|
|00002370| 78 3a 20 45 78 74 65 6e | 64 65 64 50 74 72 3b 0d |x: Exten|dedPtr;.|
|00002380| 09 09 09 09 73 3a 20 5e | 73 74 72 32 35 35 3b 0d |....s: ^|str255;.|
|00002390| 09 09 09 65 6e 64 3b 0d | 0d 0d 7b 20 2a 2a 2a 2a |...end;.|..{ ****|
|000023a0| 2a 2a 2a 2a 2a 2a 2a 2a | 20 74 79 70 65 20 64 65 |********| type de|
|000023b0| 66 69 6e 69 74 69 6f 6e | 73 20 66 6f 72 20 22 47 |finition|s for "G|
|000023c0| 65 74 44 65 66 61 75 6c | 74 44 61 74 61 22 20 2a |etDefaul|tData" *|
|000023d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 20 7d 0d |********|***** }.|
|000023e0| 0d 09 09 44 61 74 61 49 | 6e 66 6f 20 3d 20 72 65 |...DataI|nfo = re|
|000023f0| 63 6f 72 64 20 20 09 09 | 7b 20 74 68 69 73 20 64 |cord ..|{ this d|
|00002400| 61 74 61 20 73 74 72 75 | 63 74 75 72 65 20 63 61 |ata stru|cture ca|
|00002410| 6e 20 62 65 20 75 73 65 | 64 20 77 68 65 6e 20 63 |n be use|d when c|
|00002420| 61 6c 6c 69 6e 67 20 47 | 65 74 44 65 66 61 75 6c |alling G|etDefaul|
|00002430| 74 44 61 74 61 2e 09 09 | 09 09 7d 0d 0d 09 09 09 |tData...|..}.....|
|00002440| 09 78 4d 69 6e 2c 20 78 | 4d 61 78 2c 20 78 50 6f |.xMin, x|Max, xPo|
|00002450| 73 4d 69 6e 2c 20 78 4e | 65 67 4d 61 78 3a 20 65 |sMin, xN|egMax: e|
|00002460| 78 74 65 6e 64 65 64 3b | 09 7b 20 73 65 74 20 69 |xtended;|.{ set i|
|00002470| 66 20 74 68 65 20 22 78 | 22 20 61 72 72 61 79 20 |f the "x|" array |
|00002480| 77 61 73 20 63 61 6c 63 | 75 6c 61 74 65 64 09 09 |was calc|ulated..|
|00002490| 09 09 09 7d 0d 09 09 09 | 09 79 4d 69 6e 2c 20 79 |...}....|.yMin, y|
|000024a0| 4d 61 78 2c 20 79 50 6f | 73 4d 69 6e 2c 20 79 4e |Max, yPo|sMin, yN|
|000024b0| 65 67 4d 61 78 3a 20 65 | 78 74 65 6e 64 65 64 3b |egMax: e|xtended;|
|000024c0| 09 7b 20 73 65 74 20 69 | 66 20 74 68 65 20 22 79 |.{ set i|f the "y|
|000024d0| 22 20 61 72 72 61 79 20 | 77 61 73 20 63 61 6c 63 |" array |was calc|
|000024e0| 75 6c 61 74 65 64 09 09 | 09 09 09 7d 0d 0d 09 09 |ulated..|...}....|
|000024f0| 09 09 6f 72 64 65 72 65 | 64 2c 09 09 09 09 7b 20 |..ordere|d,....{ |
|00002500| 74 72 75 65 20 69 66 20 | 74 68 65 20 78 2d 61 72 |true if |the x-ar|
|00002510| 72 61 79 20 69 73 20 6f | 72 64 65 72 65 64 20 73 |ray is o|rdered s|
|00002520| 75 63 68 20 74 68 61 74 | 20 78 5b 69 2b 31 5d 3e |uch that| x[i+1]>|
|00002530| 3d 78 5b 69 5d 2c 20 66 | 6f 72 20 61 6c 6c 20 69 |=x[i], f|or all i|
|00002540| 2e 09 09 09 09 09 7d 0d | 0d 09 09 09 09 7a 65 72 |......}.|.....zer|
|00002550| 6f 59 45 72 72 6f 72 73 | 2c 09 09 09 7b 20 74 72 |oYErrors|,...{ tr|
|00002560| 75 65 20 69 66 20 61 74 | 20 6c 65 61 73 74 20 6f |ue if at| least o|
|00002570| 6e 65 20 79 2d 65 72 72 | 6f 72 20 69 73 20 30 09 |ne y-err|or is 0.|
|00002580| 09 09 09 09 7d 0d 09 09 | 09 09 69 6e 76 61 6c 69 |....}...|..invali|
|00002590| 64 59 45 72 72 6f 72 73 | 2c 09 09 09 7b 20 74 72 |dYErrors|,...{ tr|
|000025a0| 75 65 20 69 66 20 61 74 | 20 6c 65 61 73 74 20 6f |ue if at| least o|
|000025b0| 6e 65 20 79 2d 65 72 72 | 6f 72 20 69 73 20 69 6e |ne y-err|or is in|
|000025c0| 76 61 6c 69 64 20 6f 72 | 20 30 09 09 09 09 09 7d |valid or| 0.....}|
|000025d0| 0d 09 09 09 09 7a 65 72 | 6f 58 45 72 72 6f 72 73 |.....zer|oXErrors|
|000025e0| 2c 09 09 09 7b 20 74 72 | 75 65 20 69 66 20 61 74 |,...{ tr|ue if at|
|000025f0| 20 6c 65 61 73 74 20 6f | 6e 65 20 78 2d 65 72 72 | least o|ne x-err|
|00002600| 6f 72 20 69 73 20 30 09 | 09 09 09 09 7d 0d 09 09 |or is 0.|....}...|
|00002610| 09 09 69 6e 76 61 6c 69 | 64 58 45 72 72 6f 72 73 |..invali|dXErrors|
|00002620| 3a 20 62 6f 6f 6c 65 61 | 6e 3b 09 7b 20 74 72 75 |: boolea|n;.{ tru|
|00002630| 65 20 69 66 20 61 74 20 | 6c 65 61 73 74 20 6f 6e |e if at |least on|
|00002640| 65 20 78 2d 65 72 72 6f | 72 20 69 73 20 69 6e 76 |e x-erro|r is inv|
|00002650| 61 6c 69 64 20 6f 72 20 | 30 09 09 09 09 09 7d 0d |alid or |0.....}.|
|00002660| 09 09 09 65 6e 64 3b 0d | 09 09 44 61 74 61 49 6e |...end;.|..DataIn|
|00002670| 66 6f 50 74 72 20 3d 20 | 5e 44 61 74 61 49 6e 66 |foPtr = |^DataInf|
|00002680| 6f 3b 0d 0d 09 09 45 78 | 74 65 6e 64 65 64 41 72 |o;....Ex|tendedAr|
|00002690| 72 61 79 20 3d 20 61 72 | 72 61 79 5b 30 2e 2e 30 |ray = ar|ray[0..0|
|000026a0| 5d 20 6f 66 20 65 78 74 | 65 6e 64 65 64 3b 20 7b |] of ext|ended; {|
|000026b0| 20 56 61 72 69 61 62 6c | 65 20 73 69 7a 65 20 61 | Variabl|e size a|
|000026c0| 72 72 61 79 20 6f 66 20 | 6e 61 74 69 76 65 20 64 |rray of |native d|
|000026d0| 6f 75 62 6c 65 20 6e 75 | 6d 62 65 72 73 2e 20 7d |ouble nu|mbers. }|
|000026e0| 0d 09 09 45 78 74 65 6e | 64 65 64 41 72 72 61 79 |...Exten|dedArray|
|000026f0| 50 74 72 20 3d 20 5e 45 | 78 74 65 6e 64 65 64 41 |Ptr = ^E|xtendedA|
|00002700| 72 72 61 79 3b 09 09 20 | 7b 20 47 65 74 44 65 66 |rray;.. |{ GetDef|
|00002710| 61 75 6c 74 44 61 74 61 | 3a 20 49 6e 64 65 78 20 |aultData|: Index |
|00002720| 5b 30 5d 20 69 73 20 72 | 65 73 65 72 76 65 64 2e |[0] is r|eserved.|
|00002730| 20 46 69 72 73 74 20 76 | 61 6c 69 64 20 69 6e 64 | First v|alid ind|
|00002740| 65 78 20 69 73 20 5b 31 | 5d 2e 7d 0d 09 09 45 78 |ex is [1|].}...Ex|
|00002750| 74 65 6e 64 65 64 41 72 | 72 61 79 48 61 6e 64 6c |tendedAr|rayHandl|
|00002760| 65 20 3d 20 5e 45 78 74 | 65 6e 64 65 64 41 72 72 |e = ^Ext|endedArr|
|00002770| 61 79 50 74 72 3b 20 20 | 7b 20 48 61 6e 64 6c 65 |ayPtr; |{ Handle|
|00002780| 20 74 6f 20 61 6e 20 61 | 72 72 61 79 20 6f 66 20 | to an a|rray of |
|00002790| 6e 61 74 69 76 65 20 65 | 78 74 65 6e 64 65 64 20 |native e|xtended |
|000027a0| 6e 75 6d 62 65 72 73 20 | 7d 0d 09 09 45 78 74 65 |numbers |}...Exte|
|000027b0| 6e 64 65 64 41 72 72 61 | 79 48 61 6e 64 6c 65 50 |ndedArra|yHandleP|
|000027c0| 74 72 20 3d 20 5e 45 78 | 74 65 6e 64 65 64 41 72 |tr = ^Ex|tendedAr|
|000027d0| 72 61 79 48 61 6e 64 6c | 65 3b 0d 0d 09 09 4c 6f |rayHandl|e;....Lo|
|000027e0| 6e 67 41 72 72 61 79 20 | 3d 20 61 72 72 61 79 5b |ngArray |= array[|
|000027f0| 30 2e 2e 30 5d 20 6f 66 | 20 6c 6f 6e 67 69 6e 74 |0..0] of| longint|
|00002800| 3b 09 7b 20 76 61 72 69 | 61 62 6c 65 20 73 69 7a |;.{ vari|able siz|
|00002810| 65 20 61 72 72 61 79 20 | 6f 66 20 6c 6f 6e 67 69 |e array |of longi|
|00002820| 6e 74 20 6e 75 6d 62 65 | 72 73 7d 0d 09 09 4c 6f |nt numbe|rs}...Lo|
|00002830| 6e 67 41 72 72 61 79 50 | 74 72 20 3d 20 5e 4c 6f |ngArrayP|tr = ^Lo|
|00002840| 6e 67 41 72 72 61 79 3b | 09 09 09 7b 20 47 65 74 |ngArray;|...{ Get|
|00002850| 44 65 66 61 75 6c 74 44 | 61 74 61 3a 20 49 6e 64 |DefaultD|ata: Ind|
|00002860| 65 78 20 5b 30 5d 20 69 | 73 20 72 65 73 65 72 76 |ex [0] i|s reserv|
|00002870| 65 64 2e 20 46 69 72 73 | 74 20 76 61 6c 69 64 20 |ed. Firs|t valid |
|00002880| 69 6e 64 65 78 20 69 73 | 20 5b 31 5d 2e 7d 0d 09 |index is| [1].}..|
|00002890| 09 4c 6f 6e 67 41 72 72 | 61 79 48 61 6e 64 6c 65 |.LongArr|ayHandle|
|000028a0| 20 3d 20 5e 4c 6f 6e 67 | 41 72 72 61 79 50 74 72 | = ^Long|ArrayPtr|
|000028b0| 3b 09 09 7b 20 48 61 6e | 64 6c 65 20 74 6f 20 61 |;..{ Han|dle to a|
|000028c0| 6e 20 61 72 72 61 79 20 | 6f 66 20 6c 6f 6e 67 69 |n array |of longi|
|000028d0| 6e 74 20 6e 75 6d 62 65 | 72 73 20 7d 0d 09 09 4c |nt numbe|rs }...L|
|000028e0| 6f 6e 67 41 72 72 61 79 | 48 61 6e 64 6c 65 50 74 |ongArray|HandlePt|
|000028f0| 72 20 3d 20 5e 4c 6f 6e | 67 41 72 72 61 79 48 61 |r = ^Lon|gArrayHa|
|00002900| 6e 64 6c 65 3b 0d 0d 0d | 7b 20 2a 2a 2a 2a 2a 2a |ndle;...|{ ******|
|00002910| 2a 2a 2a 2a 2a 2a 20 74 | 79 70 65 20 64 65 66 69 |****** t|ype defi|
|00002920| 6e 69 74 69 6f 6e 73 20 | 66 6f 72 20 22 47 65 74 |nitions |for "Get|
|00002930| 43 6f 6c 48 61 6e 64 6c | 65 2f 53 65 74 43 6f 6c |ColHandl|e/SetCol|
|00002940| 48 61 6e 64 6c 65 22 20 | 2a 2a 2a 2a 2a 2a 2a 2a |Handle" |********|
|00002950| 2a 2a 2a 2a 2a 2a 20 7d | 0d 09 09 53 74 72 69 6e |****** }|...Strin|
|00002960| 67 44 61 74 61 20 3d 20 | 72 65 63 6f 72 64 09 09 |gData = |record..|
|00002970| 09 09 7b 20 74 68 65 20 | 64 61 74 61 20 73 74 72 |..{ the |data str|
|00002980| 75 63 74 75 72 65 20 6f | 66 20 61 20 63 6f 6c 75 |ucture o|f a colu|
|00002990| 6d 6e 20 6f 66 20 73 74 | 72 69 6e 67 73 2e 20 57 |mn of st|rings. W|
|000029a0| 61 72 6e 69 6e 67 3a 20 | 74 68 69 73 20 64 61 74 |arning: |this dat|
|000029b0| 61 20 73 74 72 75 63 74 | 75 72 65 20 6d 61 79 20 |a struct|ure may |
|000029c0| 63 68 61 6e 67 65 20 69 | 6e 20 66 75 74 75 72 65 |change i|n future|
|000029d0| 20 72 65 6c 65 61 73 65 | 73 20 6f 66 20 70 72 6f | release|s of pro|
|000029e0| 20 46 69 74 09 7d 0d 09 | 09 09 09 73 69 7a 65 3a | Fit.}..|...size:|
|000029f0| 20 6c 6f 6e 67 69 6e 74 | 3b 09 09 09 09 7b 20 74 | longint|;....{ t|
|00002a00| 68 65 20 73 69 7a 65 20 | 6f 66 20 76 61 6c 69 64 |he size |of valid|
|00002a10| 20 64 61 74 61 20 69 6e | 20 74 68 69 73 20 68 61 | data in| this ha|
|00002a20| 6e 64 6c 65 20 09 7d 0d | 09 09 09 09 6e 72 52 6f |ndle .}.|....nrRo|
|00002a30| 77 73 3a 20 6c 6f 6e 67 | 69 6e 74 3b 09 09 09 09 |ws: long|int;....|
|00002a40| 7b 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |{ the nu|mber of |
|00002a50| 72 6f 77 73 20 69 6e 20 | 74 68 69 73 20 68 61 6e |rows in |this han|
|00002a60| 64 6c 65 20 09 7d 0d 09 | 09 09 09 66 69 72 73 74 |dle .}..|...first|
|00002a70| 4f 66 66 73 65 74 3a 20 | 6c 6f 6e 67 69 6e 74 3b |Offset: |longint;|
|00002a80| 09 09 09 7b 20 72 65 73 | 65 72 76 65 64 20 09 7d |...{ res|erved .}|
|00002a90| 0d 09 09 09 09 66 69 72 | 73 74 52 6f 77 3a 20 69 |.....fir|stRow: i|
|00002aa0| 6e 74 65 67 65 72 3b 09 | 09 09 7b 20 72 65 73 65 |nteger;.|..{ rese|
|00002ab0| 72 76 65 64 20 09 7d 0d | 09 09 09 09 64 61 74 61 |rved .}.|....data|
|00002ac0| 3a 20 53 74 72 32 35 35 | 3b 09 09 09 09 7b 20 68 |: Str255|;....{ h|
|00002ad0| 65 72 65 20 66 6f 6c 6c | 6f 77 20 74 68 65 20 73 |ere foll|ow the s|
|00002ae0| 74 72 69 6e 67 73 2c 20 | 70 61 63 6b 65 64 2c 20 |trings, |packed, |
|00002af0| 6f 6e 65 20 61 66 74 65 | 72 20 61 6e 6f 74 68 65 |one afte|r anothe|
|00002b00| 72 20 7d 0d 09 09 09 65 | 6e 64 3b 0d 0d 0d 0d 0d |r }....e|nd;.....|
|00002b10| 09 09 63 68 65 63 6b 50 | 41 6e 73 77 65 72 20 3d |..checkP|Answer =|
|00002b20| 20 28 75 70 64 61 74 65 | 2c 20 67 6f 6f 64 2c 20 | (update|, good, |
|00002b30| 62 61 64 29 3b 09 09 09 | 09 7b 20 74 68 65 20 70 |bad);...|.{ the p|
|00002b40| 6f 73 73 69 62 6c 65 20 | 72 65 74 75 72 6e 20 76 |ossible |return v|
|00002b50| 61 6c 75 65 73 20 6f 66 | 20 74 68 65 20 27 63 68 |alues of| the 'ch|
|00002b60| 65 63 6b 27 20 66 75 6e | 63 74 69 6f 6e 2c 20 6f |eck' fun|ction, o|
|00002b70| 6e 6c 79 20 75 73 65 64 | 20 77 68 65 6e 20 74 68 |nly used| when th|
|00002b80| 65 20 65 78 74 65 72 6e | 61 6c 20 6d 6f 64 75 6c |e extern|al modul|
|00002b90| 65 20 69 73 20 61 20 66 | 75 6e 63 74 69 6f 6e 20 |e is a f|unction |
|00002ba0| 09 09 09 7d 0d 0d 09 09 | 4d 6f 64 65 54 79 70 65 |...}....|ModeType|
|00002bb0| 20 3d 20 28 61 63 74 69 | 76 65 2c 20 69 6e 61 63 | = (acti|ve, inac|
|00002bc0| 74 69 76 65 2c 20 63 6f | 6e 73 74 61 6e 74 29 3b |tive, co|nstant);|
|00002bd0| 09 09 09 7b 20 74 68 65 | 20 66 69 74 74 69 6e 67 |...{ the| fitting|
|00002be0| 20 73 74 61 74 65 20 6f | 66 20 61 20 70 61 72 61 | state o|f a para|
|00002bf0| 6d 65 74 65 72 2c 20 75 | 73 65 64 20 74 6f 20 73 |meter, u|sed to s|
|00002c00| 65 74 20 76 61 72 69 61 | 62 6c 65 73 20 6f 66 20 |et varia|bles of |
|00002c10| 74 79 70 65 20 50 61 72 | 61 6d 4d 6f 64 65 09 09 |type Par|amMode..|
|00002c20| 09 7d 0d 09 09 50 61 72 | 61 6d 4e 61 6d 65 20 3d |.}...Par|amName =|
|00002c30| 20 73 74 72 69 6e 67 5b | 6d 61 78 50 61 72 61 6d | string[|maxParam|
|00002c40| 4e 61 6d 65 4c 65 6e 67 | 74 68 5d 3b 0d 0d 09 09 |NameLeng|th];....|
|00002c50| 50 61 72 61 6d 41 72 72 | 61 79 20 3d 20 61 72 72 |ParamArr|ay = arr|
|00002c60| 61 79 5b 31 2e 2e 6d 61 | 78 4e 72 50 61 72 61 6d |ay[1..ma|xNrParam|
|00002c70| 73 5d 20 6f 66 20 65 78 | 74 65 6e 64 65 64 3b 09 |s] of ex|tended;.|
|00002c80| 09 7b 20 74 68 65 20 6e | 75 6d 65 72 69 63 61 6c |.{ the n|umerical|
|00002c90| 20 76 61 6c 75 65 73 20 | 6f 66 20 74 68 65 20 70 | values |of the p|
|00002ca0| 61 72 61 6d 65 74 65 72 | 73 20 09 09 09 7d 0d 09 |arameter|s ...}..|
|00002cb0| 09 50 61 72 61 6d 4e 61 | 6d 65 41 72 72 61 79 20 |.ParamNa|meArray |
|00002cc0| 3d 20 61 72 72 61 79 5b | 31 2e 2e 6d 61 78 4e 72 |= array[|1..maxNr|
|00002cd0| 50 61 72 61 6d 73 5d 20 | 6f 66 20 50 61 72 61 6d |Params] |of Param|
|00002ce0| 4e 61 6d 65 3b 09 7b 20 | 74 68 65 20 6e 61 6d 65 |Name;.{ |the name|
|00002cf0| 73 20 6f 66 20 74 68 65 | 20 70 61 72 61 6d 65 74 |s of the| paramet|
|00002d00| 65 72 73 20 7d 0d 09 09 | 50 61 72 61 6d 4d 6f 64 |ers }...|ParamMod|
|00002d10| 65 41 72 72 61 79 20 3d | 20 61 72 72 61 79 5b 31 |eArray =| array[1|
|00002d20| 2e 2e 6d 61 78 4e 72 50 | 61 72 61 6d 73 5d 20 6f |..maxNrP|arams] o|
|00002d30| 66 20 4d 6f 64 65 54 79 | 70 65 3b 09 7b 20 74 68 |f ModeTy|pe;.{ th|
|00002d40| 65 20 66 69 74 74 69 6e | 67 20 6d 6f 64 65 73 20 |e fittin|g modes |
|00002d50| 6f 66 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |of the p|arameter|
|00002d60| 73 2c 20 7b 61 63 74 69 | 76 65 2c 20 69 6e 61 63 |s, {acti|ve, inac|
|00002d70| 74 69 76 65 2c 20 63 6f | 6e 73 74 61 6e 74 29 20 |tive, co|nstant) |
|00002d80| 20 7d 0d 0d 0d 09 09 44 | 65 66 61 75 6c 74 50 61 | }.....D|efaultPa|
|00002d90| 72 61 6d 49 6e 66 6f 20 | 3d 20 72 65 63 6f 72 64 |ramInfo |= record|
|00002da0| 0d 09 09 09 09 76 61 6c | 75 65 3a 20 5e 50 61 72 |.....val|ue: ^Par|
|00002db0| 61 6d 41 72 72 61 79 3b | 09 09 09 09 7b 20 74 68 |amArray;|....{ th|
|00002dc0| 65 20 64 65 66 61 75 6c | 74 20 76 61 6c 75 65 20 |e defaul|t value |
|00002dd0| 6f 66 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |of the p|arameter|
|00002de0| 73 20 61 73 20 74 68 65 | 79 20 61 70 70 65 61 72 |s as the|y appear|
|00002df0| 20 69 6e 20 70 61 72 61 | 6d 73 20 77 69 6e 64 6f | in para|ms windo|
|00002e00| 77 20 09 09 09 7d 0d 09 | 09 09 09 6c 6f 77 65 73 |w ...}..|...lowes|
|00002e10| 74 3a 20 5e 50 61 72 61 | 6d 41 72 72 61 79 3b 09 |t: ^Para|mArray;.|
|00002e20| 09 09 09 7b 20 74 68 65 | 20 6c 6f 77 65 73 74 20 |...{ the| lowest |
|00002e30| 61 6c 6c 6f 77 65 64 20 | 76 61 6c 75 65 20 28 66 |allowed |value (f|
|00002e40| 6f 72 20 66 69 74 74 69 | 6e 67 29 20 09 09 09 7d |or fitti|ng) ...}|
|00002e50| 0d 09 09 09 09 68 69 67 | 68 65 73 74 3a 20 5e 50 |.....hig|hest: ^P|
|00002e60| 61 72 61 6d 41 72 72 61 | 79 3b 09 09 09 09 7b 20 |aramArra|y;....{ |
|00002e70| 74 68 65 20 68 69 67 68 | 65 73 74 20 61 6c 6c 6f |the high|est allo|
|00002e80| 77 65 64 20 76 61 6c 75 | 65 20 28 66 6f 72 20 66 |wed valu|e (for f|
|00002e90| 69 74 74 69 6e 67 29 20 | 09 09 09 7d 0d 09 09 09 |itting) |...}....|
|00002ea0| 09 6d 6f 64 65 3a 20 5e | 50 61 72 61 6d 4d 6f 64 |.mode: ^|ParamMod|
|00002eb0| 65 41 72 72 61 79 3b 09 | 09 09 7b 20 74 68 65 20 |eArray;.|..{ the |
|00002ec0| 66 69 74 74 69 6e 67 20 | 6d 6f 64 65 20 6f 66 20 |fitting |mode of |
|00002ed0| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 73 20 09 |the para|meters .|
|00002ee0| 09 09 7d 0d 09 09 09 09 | 6e 61 6d 65 3a 20 5e 50 |..}.....|name: ^P|
|00002ef0| 61 72 61 6d 4e 61 6d 65 | 41 72 72 61 79 3b 09 09 |aramName|Array;..|
|00002f00| 09 7b 20 74 68 65 20 6e | 61 6d 65 73 20 09 09 09 |.{ the n|ames ...|
|00002f10| 7d 0d 09 09 09 65 6e 64 | 3b 0d 0d 09 09 44 65 66 |}....end|;....Def|
|00002f20| 61 75 6c 74 50 61 72 61 | 6d 49 6e 66 6f 50 74 72 |aultPara|mInfoPtr|
|00002f30| 20 3d 20 5e 44 65 66 61 | 75 6c 74 50 61 72 61 6d | = ^Defa|ultParam|
|00002f40| 49 6e 66 6f 3b 0d 0d 09 | 09 47 6c 6f 62 61 6c 41 |Info;...|.GlobalA|
|00002f50| 72 72 61 79 54 79 70 65 | 20 3d 20 61 72 72 61 79 |rrayType| = array|
|00002f60| 5b 30 2e 2e 39 39 5d 20 | 6f 66 20 65 78 74 65 6e |[0..99] |of exten|
|00002f70| 64 65 64 3b 0d 09 09 47 | 6c 6f 62 61 6c 41 72 72 |ded;...G|lobalArr|
|00002f80| 61 79 50 74 72 20 3d 20 | 5e 47 6c 6f 62 61 6c 41 |ayPtr = |^GlobalA|
|00002f90| 72 72 61 79 54 79 70 65 | 3b 0d 09 09 47 6c 6f 62 |rrayType|;...Glob|
|00002fa0| 61 6c 41 72 72 61 79 48 | 61 6e 64 6c 65 20 3d 20 |alArrayH|andle = |
|00002fb0| 5e 47 6c 6f 62 61 6c 41 | 72 72 61 79 50 74 72 3b |^GlobalA|rrayPtr;|
|00002fc0| 0d 0d 09 09 47 6c 6f 62 | 61 6c 53 63 72 61 74 63 |....Glob|alScratc|
|00002fd0| 68 20 3d 20 72 65 63 6f | 72 64 0d 09 09 09 09 67 |h = reco|rd.....g|
|00002fe0| 6c 6f 62 61 6c 53 63 72 | 61 74 63 68 31 3a 20 6c |lobalScr|atch1: l|
|00002ff0| 6f 6e 67 69 6e 74 3b 09 | 09 09 09 7b 20 66 72 65 |ongint;.|...{ fre|
|00003000| 65 20 66 6f 72 20 75 73 | 65 20 69 6e 20 65 78 74 |e for us|e in ext|
|00003010| 65 72 6e 61 6c 20 6d 6f | 64 75 6c 65 73 20 09 09 |ernal mo|dules ..|
|00003020| 09 7d 0d 09 09 09 09 67 | 6c 6f 62 61 6c 53 63 72 |.}.....g|lobalScr|
|00003030| 61 74 63 68 32 3a 20 6c | 6f 6e 67 69 6e 74 3b 09 |atch2: l|ongint;.|
|00003040| 09 09 09 7b 20 66 72 65 | 65 20 66 6f 72 20 75 73 |...{ fre|e for us|
|00003050| 65 20 69 6e 20 65 78 74 | 65 72 6e 61 6c 20 6d 6f |e in ext|ernal mo|
|00003060| 64 75 6c 65 73 20 09 09 | 09 7d 0d 09 09 09 09 67 |dules ..|.}.....g|
|00003070| 6c 6f 62 61 6c 44 61 74 | 61 53 69 7a 65 3a 20 6c |lobalDat|aSize: l|
|00003080| 6f 6e 67 69 6e 74 3b 09 | 09 09 09 7b 20 74 68 65 |ongint;.|...{ the|
|00003090| 20 6e 75 6d 62 65 72 20 | 6f 66 20 65 6e 74 72 69 | number |of entri|
|000030a0| 65 73 20 69 6e 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |es in th|e follow|
|000030b0| 69 6e 67 20 61 72 72 61 | 79 20 09 09 09 7d 0d 09 |ing arra|y ...}..|
|000030c0| 09 09 09 67 6c 6f 62 61 | 6c 44 61 74 61 3a 20 47 |...globa|lData: G|
|000030d0| 6c 6f 62 61 6c 41 72 72 | 61 79 48 61 6e 64 6c 65 |lobalArr|ayHandle|
|000030e0| 3b 09 09 09 7b 20 61 72 | 72 61 79 20 6f 66 20 65 |;...{ ar|ray of e|
|000030f0| 78 74 65 6e 64 65 64 73 | 20 74 6f 20 62 65 20 61 |xtendeds| to be a|
|00003100| 63 63 65 73 73 65 64 20 | 62 79 20 65 78 74 65 72 |ccessed |by exter|
|00003110| 6e 61 6c 20 61 6e 64 20 | 69 6e 74 65 72 61 6c 20 |nal and |interal |
|00003120| 70 72 6f 67 72 61 6d 73 | 20 09 09 09 7d 0d 09 09 |programs| ...}...|
|00003130| 09 65 6e 64 3b 0d 0d 09 | 09 47 6c 6f 62 61 6c 53 |.end;...|.GlobalS|
|00003140| 63 72 61 74 63 68 50 74 | 72 20 3d 20 5e 47 6c 6f |cratchPt|r = ^Glo|
|00003150| 62 61 6c 53 63 72 61 74 | 63 68 3b 0d 0d 7b 24 41 |balScrat|ch;..{$A|
|00003160| 4c 49 47 4e 20 52 45 53 | 45 54 7d 0d 0d 0d 7b 20 |LIGN RES|ET}...{ |
|00003170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000031a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000031b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000031c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 20 7d 0d 7b 20 |********|*** }.{ |
|000031d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000031e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 20 70 61 72 61 6d 65 |********|* parame|
|000031f0| 74 65 72 20 62 6c 6f 63 | 6b 20 66 6f 72 20 65 78 |ter bloc|k for ex|
|00003200| 74 65 72 6e 61 6c 20 6d | 6f 64 75 6c 65 73 20 2a |ternal m|odules *|
|00003210| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003220| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 20 7d 0d 0d 7b |********|*** }..{|
|00003230| 20 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 69 | The fol|lowing i|
|00003240| 73 20 69 6e 74 65 72 66 | 61 63 65 20 69 6e 66 6f |s interf|ace info|
|00003250| 72 6d 61 74 69 6f 6e 20 | 74 68 61 74 20 64 65 66 |rmation |that def|
|00003260| 69 6e 65 73 20 74 68 65 | 20 63 6f 6d 6d 75 6e 69 |ines the| communi|
|00003270| 63 61 74 69 6f 6e 20 62 | 65 74 77 65 65 6e 09 09 |cation b|etween..|
|00003280| 09 09 09 09 09 7d 0d 7b | 20 61 6e 20 45 78 74 65 |.....}.{| an Exte|
|00003290| 72 6e 61 6c 20 4d 6f 64 | 75 6c 65 20 61 6e 64 20 |rnal Mod|ule and |
|000032a0| 70 72 6f 20 46 69 74 2e | 20 54 68 69 73 20 69 6e |pro Fit.| This in|
|000032b0| 66 6f 72 6d 61 74 69 6f | 6e 20 69 73 20 75 73 65 |formatio|n is use|
|000032c0| 64 20 69 6e 20 74 68 65 | 20 69 6d 70 6c 65 6d 65 |d in the| impleme|
|000032d0| 6e 74 61 74 69 6f 6e 20 | 70 61 72 74 09 09 09 09 |ntation |part....|
|000032e0| 09 09 09 7d 0d 7b 20 74 | 6f 20 70 72 6f 76 69 64 |...}.{ t|o provid|
|000032f0| 65 20 74 68 65 20 63 6f | 64 65 20 74 68 61 74 20 |e the co|de that |
|00003300| 69 6d 70 6c 65 6d 65 6e | 74 73 20 61 6c 6c 20 6f |implemen|ts all o|
|00003310| 66 20 74 68 65 20 70 72 | 65 64 69 66 69 6e 65 64 |f the pr|edifined|
|00003320| 20 72 6f 75 74 69 6e 65 | 73 20 6d 61 64 65 09 09 | routine|s made..|
|00003330| 09 09 09 09 09 7d 0d 7b | 20 61 76 61 69 6c 61 62 |.....}.{| availab|
|00003340| 6c 65 20 62 79 20 70 72 | 6f 20 46 69 74 2e 09 09 |le by pr|o Fit...|
|00003350| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 7d |........|.......}|
|00003360| 0d 0d 7b 20 4e 6f 72 6d | 61 6c 6c 79 2c 20 79 6f |..{ Norm|ally, yo|
|00003370| 75 20 77 69 6c 6c 20 6a | 75 73 74 20 77 61 6e 74 |u will j|ust want|
|00003380| 20 74 6f 20 6c 65 61 76 | 65 20 74 68 69 73 20 69 | to leav|e this i|
|00003390| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 75 6e 74 6f 75 |nformati|on untou|
|000033a0| 63 68 65 64 20 69 6e 20 | 69 74 73 20 70 72 65 73 |ched in |its pres|
|000033b0| 65 6e 74 20 66 6f 72 6d | 09 7d 0d 7b 20 61 6e 64 |ent form|.}.{ and|
|000033c0| 20 74 6f 20 6e 65 76 65 | 72 20 68 61 76 65 20 61 | to neve|r have a|
|000033d0| 20 6c 6f 6f 6b 20 61 74 | 20 69 74 2e 09 09 09 09 | look at| it.....|
|000033e0| 09 09 09 09 09 09 09 09 | 7d 0d 0d 0d 7b 20 09 09 |........|}...{ ..|
|000033f0| 09 09 09 09 09 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.....***|********|
|00003400| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 09 09 09 |********|*****...|
|00003410| 09 09 09 09 7d 0d 0d 0d | 7b 20 59 6f 75 20 6e 65 |....}...|{ You ne|
|00003420| 65 64 20 74 68 65 20 66 | 6f 6c 6c 6f 69 6e 67 20 |ed the f|olloing |
|00003430| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 69 66 20 79 |informat|ion if y|
|00003440| 6f 75 20 77 61 6e 74 20 | 74 6f 20 70 72 6f 67 72 |ou want |to progr|
|00003450| 61 6d 20 61 20 76 65 72 | 79 20 61 64 76 61 6e 63 |am a ver|y advanc|
|00003460| 65 64 09 09 09 09 09 09 | 09 7d 0d 7b 20 65 78 74 |ed......|.}.{ ext|
|00003470| 65 72 6e 61 6c 20 6d 6f | 64 75 6c 65 2c 20 61 6e |ernal mo|dule, an|
|00003480| 64 20 69 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |d if you| want to|
|00003490| 20 64 6f 20 6d 6f 72 65 | 20 65 78 6f 74 69 63 20 | do more| exotic |
|000034a0| 74 68 69 6e 67 73 2e 09 | 09 09 09 09 09 09 09 09 |things..|........|
|000034b0| 7d 0d 0d 7b 20 41 6c 6c | 20 74 68 65 20 69 6e 74 |}..{ All| the int|
|000034c0| 65 72 61 63 74 69 6f 6e | 20 62 65 74 77 65 65 6e |eraction| between|
|000034d0| 20 70 72 6f 20 46 69 74 | 20 61 6e 64 20 74 68 65 | pro Fit| and the|
|000034e0| 20 65 78 74 65 72 6e 61 | 6c 20 6d 6f 64 75 6c 65 | externa|l module|
|000034f0| 20 74 61 6b 65 73 20 70 | 6c 61 63 65 20 74 68 72 | takes p|lace thr|
|00003500| 6f 75 67 68 20 74 68 65 | 20 70 72 6f 63 65 64 75 |ough the| procedu|
|00003510| 72 65 20 6d 61 69 6e 2e | 09 09 09 09 09 09 09 7d |re main.|.......}|
|00003520| 0d 7b 20 70 72 6f 20 46 | 69 74 20 63 61 6c 6c 73 |.{ pro F|it calls|
|00003530| 20 69 74 20 77 69 74 68 | 20 64 69 66 66 65 72 65 | it with| differe|
|00003540| 6e 74 20 76 61 6c 75 65 | 73 20 6f 66 20 69 74 73 |nt value|s of its|
|00003550| 20 70 61 72 61 6d 65 74 | 65 72 20 27 73 65 6c 65 | paramet|er 'sele|
|00003560| 63 74 6f 72 27 20 61 6e | 64 20 74 68 65 09 09 09 |ctor' an|d the...|
|00003570| 09 09 09 09 7d 0d 7b 20 | 66 75 6e 63 74 69 6f 6e |....}.{ |function|
|00003580| 20 6d 61 69 6e 20 6d 75 | 73 74 20 72 65 74 75 72 | main mu|st retur|
|00003590| 6e 20 74 68 65 20 69 6e | 66 6f 72 6d 61 74 69 6f |n the in|formatio|
|000035a0| 6e 20 72 65 71 75 65 73 | 74 65 64 20 62 79 20 73 |n reques|ted by s|
|000035b0| 65 74 74 69 6e 67 20 74 | 68 65 20 6e 65 63 65 73 |etting t|he neces|
|000035c0| 73 61 72 79 20 66 69 65 | 6c 64 73 09 09 09 09 09 |sary fie|lds.....|
|000035d0| 09 09 7d 0d 7b 20 69 6e | 73 69 64 65 20 61 20 70 |..}.{ in|side a p|
|000035e0| 61 72 61 6d 65 74 65 72 | 42 6c 6f 63 6b 2e 09 09 |arameter|Block...|
|000035f0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 7d 0d |........|......}.|
|00003600| 0d 7b 20 57 68 65 6e 20 | 69 74 20 66 69 72 73 74 |.{ When |it first|
|00003610| 20 6f 70 65 6e 73 20 74 | 68 65 20 65 78 74 65 72 | opens t|he exter|
|00003620| 6e 61 6c 20 6d 6f 64 75 | 6c 65 2c 20 70 72 6f 20 |nal modu|le, pro |
|00003630| 46 69 74 20 63 61 6c 6c | 73 20 6d 61 69 6e 20 77 |Fit call|s main w|
|00003640| 69 74 68 20 74 68 65 20 | 73 65 6c 65 63 74 6f 72 |ith the |selector|
|00003650| 20 65 71 75 61 6c 20 74 | 6f 20 7a 65 72 6f 2c 20 | equal t|o zero, |
|00003660| 61 6e 64 09 09 09 09 09 | 09 09 7d 0d 7b 20 6d 61 |and.....|..}.{ ma|
|00003670| 69 6e 20 6d 75 73 74 20 | 70 72 6f 76 69 64 65 20 |in must |provide |
|00003680| 74 68 65 20 73 70 65 63 | 69 66 69 63 61 74 69 6f |the spec|ificatio|
|00003690| 6e 73 20 6f 66 20 74 68 | 65 20 63 6f 64 65 20 73 |ns of th|e code s|
|000036a0| 75 70 70 6c 69 65 64 2c | 20 73 75 63 68 20 61 73 |upplied,| such as|
|000036b0| 20 74 68 65 20 73 65 74 | 74 69 6e 67 73 09 09 09 | the set|tings...|
|000036c0| 09 09 09 09 7d 0d 7b 20 | 77 69 74 68 20 77 68 69 |....}.{ |with whi|
|000036d0| 63 68 20 74 68 65 20 63 | 6f 64 65 20 77 61 73 20 |ch the c|ode was |
|000036e0| 63 6f 6d 70 69 6c 65 64 | 2c 20 69 66 20 74 68 65 |compiled|, if the|
|000036f0| 20 63 6f 64 65 20 69 73 | 20 61 20 66 75 6e 63 74 | code is| a funct|
|00003700| 69 6f 6e 20 6f 72 20 61 | 20 70 72 6f 67 72 61 6d |ion or a| program|
|00003710| 2c 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |, the na|me of th|
|00003720| 65 09 09 09 09 09 09 09 | 7d 0d 7b 20 65 78 74 65 |e.......|}.{ exte|
|00003730| 72 6e 61 6c 20 6d 6f 64 | 75 6c 65 2c 20 65 74 63 |rnal mod|ule, etc|
|00003740| 2e 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00003750| 09 09 09 7d 0d 0d 7b 20 | 44 65 70 65 6e 64 69 6e |...}..{ |Dependin|
|00003760| 67 20 6f 6e 20 74 68 65 | 20 72 65 73 70 6f 6e 73 |g on the| respons|
|00003770| 65 20 69 74 20 6f 62 74 | 61 69 6e 73 20 61 66 74 |e it obt|ains aft|
|00003780| 65 72 20 63 61 6c 6c 69 | 6e 67 20 74 68 65 20 65 |er calli|ng the e|
|00003790| 78 74 65 72 6e 61 6c 20 | 6d 6f 64 75 6c 65 20 77 |xternal |module w|
|000037a0| 69 74 68 20 73 65 6c 65 | 63 74 6f 72 20 30 2c 20 |ith sele|ctor 0, |
|000037b0| 70 72 6f 20 46 69 74 09 | 09 09 09 09 09 09 7d 0d |pro Fit.|......}.|
|000037c0| 7b 20 74 68 65 6e 20 63 | 61 6c 6c 73 20 69 74 20 |{ then c|alls it |
|000037d0| 77 69 74 68 20 74 68 65 | 20 73 65 6c 65 63 74 6f |with the| selecto|
|000037e0| 72 20 74 68 61 74 20 74 | 65 6c 6c 73 20 74 68 65 |r that t|ells the|
|000037f0| 20 6d 6f 64 75 6c 65 20 | 74 6f 20 69 6e 69 74 69 | module |to initi|
|00003800| 61 6c 69 7a 65 20 73 6f | 6d 65 20 70 61 72 61 6d |alize so|me param|
|00003810| 65 74 65 72 73 2e 20 54 | 68 69 73 20 69 73 09 09 |eters. T|his is..|
|00003820| 09 09 09 09 09 7d 0d 7b | 20 76 65 72 79 20 73 69 |.....}.{| very si|
|00003830| 6d 70 6c 65 20 66 6f 72 | 20 70 72 6f 67 72 61 6d |mple for| program|
|00003840| 73 2c 20 62 75 74 20 74 | 68 65 72 65 20 61 72 65 |s, but t|here are|
|00003850| 20 61 20 66 65 77 20 6d | 6f 72 65 20 74 68 69 6e | a few m|ore thin|
|00003860| 67 73 20 74 6f 20 62 65 | 20 73 65 74 20 66 6f 72 |gs to be| set for|
|00003870| 20 66 75 6e 63 74 69 6f | 6e 73 2e 09 09 09 09 09 | functio|ns......|
|00003880| 09 09 7d 0d 0d 7b 20 41 | 66 74 65 72 20 74 68 65 |..}..{ A|fter the|
|00003890| 20 6d 6f 64 75 6c 65 20 | 69 73 20 61 64 64 65 64 | module |is added|
|000038a0| 20 74 6f 20 70 72 6f 20 | 46 69 74 27 73 20 6d 65 | to pro |Fit's me|
|000038b0| 6e 75 73 20 70 72 6f 20 | 46 69 74 20 63 61 6c 6c |nus pro |Fit call|
|000038c0| 73 20 69 74 20 77 69 74 | 68 20 74 68 65 20 73 65 |s it wit|h the se|
|000038d0| 6c 65 63 74 6f 72 09 09 | 09 09 09 09 09 7d 0d 7b |lector..|.....}.{|
|000038e0| 20 69 64 65 6e 74 69 66 | 79 69 6e 67 20 74 68 65 | identif|ying the|
|000038f0| 20 61 63 74 69 6f 6e 20 | 6e 65 65 64 65 64 20 61 | action |needed a|
|00003900| 6e 64 20 70 72 6f 20 46 | 69 74 20 77 69 6c 6c 20 |nd pro F|it will |
|00003910| 65 78 70 65 63 74 20 74 | 68 65 20 65 78 74 65 72 |expect t|he exter|
|00003920| 6e 61 6c 20 6d 6f 64 75 | 6c 65 20 74 6f 20 72 65 |nal modu|le to re|
|00003930| 61 63 74 20 61 63 63 6f | 72 64 69 6e 67 6c 79 2e |act acco|rdingly.|
|00003940| 09 09 09 09 09 09 09 7d | 0d 7b 20 46 6f 72 20 70 |.......}|.{ For p|
|00003950| 72 6f 67 72 61 6d 73 2c | 20 70 72 6f 20 46 69 74 |rograms,| pro Fit|
|00003960| 20 63 61 6c 6c 73 20 74 | 68 65 20 65 78 74 65 72 | calls t|he exter|
|00003970| 6e 61 6c 20 6d 6f 64 75 | 6c 65 20 77 69 74 68 20 |nal modu|le with |
|00003980| 6f 6e 6c 79 20 6f 6e 65 | 20 73 65 6c 65 63 74 6f |only one| selecto|
|00003990| 72 2c 20 74 68 65 20 6f | 6e 65 20 69 64 65 6e 74 |r, the o|ne ident|
|000039a0| 69 66 79 69 6e 67 09 09 | 09 09 09 09 09 7d 0d 7b |ifying..|.....}.{|
|000039b0| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 72 75 | the fun|ction ru|
|000039c0| 6e 28 29 2e 09 09 09 09 | 09 09 09 09 09 09 09 09 |n().....|........|
|000039d0| 09 09 09 09 09 09 7d 0d | 7b 20 46 6f 72 20 66 75 |......}.|{ For fu|
|000039e0| 6e 63 74 69 6f 6e 73 2c | 20 70 72 6f 20 46 69 74 |nctions,| pro Fit|
|000039f0| 20 63 61 6c 6c 73 20 74 | 68 65 20 65 78 74 65 72 | calls t|he exter|
|00003a00| 6e 61 6c 20 6d 6f 64 75 | 6c 65 20 77 69 74 68 20 |nal modu|le with |
|00003a10| 61 20 72 61 6e 67 65 20 | 6f 66 20 73 65 6c 65 63 |a range |of selec|
|00003a20| 74 6f 72 73 2c 20 69 64 | 65 6e 74 69 66 79 69 6e |tors, id|entifyin|
|00003a30| 67 20 74 68 65 09 09 09 | 09 09 09 09 7d 0d 7b 20 |g the...|....}.{ |
|00003a40| 66 75 6e 63 74 69 6f 6e | 73 20 63 68 65 63 6b 2c |function|s check,|
|00003a50| 20 66 69 72 73 74 2c 20 | 6c 61 73 74 2c 20 61 6e | first, |last, an|
|00003a60| 64 20 73 6f 20 6f 6e 2e | 20 49 66 20 79 6f 75 20 |d so on.| If you |
|00003a70| 64 6f 20 6e 6f 74 20 77 | 61 6e 74 20 74 6f 20 64 |do not w|ant to d|
|00003a80| 65 66 69 6e 65 20 73 75 | 63 68 20 66 75 6e 63 74 |efine su|ch funct|
|00003a90| 69 6f 6e 61 6c 69 74 79 | 2c 20 73 69 6d 70 6c 79 |ionality|, simply|
|00003aa0| 09 09 09 09 09 09 09 7d | 0d 7b 20 6c 65 61 76 65 |.......}|.{ leave|
|00003ab0| 20 74 68 65 73 65 20 66 | 75 6e 63 74 69 6f 6e 20 | these f|unction |
|00003ac0| 65 6d 70 74 79 2e 09 09 | 09 09 09 09 09 09 09 09 |empty...|........|
|00003ad0| 09 09 09 09 09 09 09 09 | 7d 0d 0d 7b 20 53 65 65 |........|}..{ See|
|00003ae0| 20 74 68 65 20 66 69 6c | 65 73 20 46 75 6e 63 74 | the fil|es Funct|
|00003af0| 69 6f 6e 54 65 6d 70 6c | 61 74 65 2e 70 20 61 6e |ionTempl|ate.p an|
|00003b00| 64 20 50 72 6f 67 72 61 | 6d 54 65 6d 70 6c 61 74 |d Progra|mTemplat|
|00003b10| 65 2e 70 09 09 09 09 09 | 09 09 09 09 7d 0d 7b 09 |e.p.....|....}.{.|
|00003b20| 09 09 09 09 09 09 09 09 | 09 7d 0d 7b 20 2a 2a 2a |........|.}.{ ***|
|00003b30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003b40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003b50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003b60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003b70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003b80| 2a 2a 2a 2a 2a 2a 09 09 | 09 09 09 09 09 7d 0d 0d |******..|.....}..|
|00003b90| 0d 0d 7b 20 09 54 68 65 | 20 66 6f 6c 6c 6f 77 69 |..{ .The| followi|
|00003ba0| 6e 67 20 72 65 63 6f 72 | 64 20 69 73 20 75 73 65 |ng recor|d is use|
|00003bb0| 64 20 61 73 20 61 20 70 | 61 72 61 6d 65 74 65 72 |d as a p|arameter|
|00003bc0| 42 6c 6f 63 6b 20 77 68 | 65 6e 20 70 72 6f 20 46 |Block wh|en pro F|
|00003bd0| 69 74 20 63 61 6c 6c 73 | 20 61 6e 20 65 78 74 65 |it calls| an exte|
|00003be0| 72 6e 61 6c 20 6d 6f 64 | 75 6c 65 2e 09 09 09 09 |rnal mod|ule.....|
|00003bf0| 09 09 09 7d 0d 7b 20 09 | 54 68 65 20 65 78 74 65 |...}.{ .|The exte|
|00003c00| 72 6e 61 6c 20 6d 6f 64 | 75 6c 65 20 6d 75 73 74 |rnal mod|ule must|
|00003c10| 20 70 72 6f 76 69 64 65 | 20 61 20 66 75 6e 63 74 | provide| a funct|
|00003c20| 69 6f 6e 20 6d 61 69 6e | 28 73 65 6c 65 63 74 6f |ion main|(selecto|
|00003c30| 72 3a 69 6e 74 65 67 65 | 72 3b 20 70 62 3a 20 45 |r:intege|r; pb: E|
|00003c40| 78 74 4d 6f 64 75 6c 65 | 73 50 61 72 61 6d 42 6c |xtModule|sParamBl|
|00003c50| 6f 63 6b 50 74 72 29 2e | 09 09 09 09 09 09 09 7d |ockPtr).|.......}|
|00003c60| 0d 7b 20 09 57 68 65 6e | 20 70 72 6f 20 46 69 74 |.{ .When| pro Fit|
|00003c70| 20 69 6e 74 65 72 61 63 | 74 73 20 77 69 74 68 20 | interac|ts with |
|00003c80| 74 68 65 20 65 78 74 65 | 72 6e 61 6c 20 6d 6f 64 |the exte|rnal mod|
|00003c90| 75 6c 65 2c 20 69 74 20 | 63 61 6c 6c 73 20 6d 61 |ule, it |calls ma|
|00003ca0| 69 6e 20 77 69 74 68 20 | 76 61 72 69 6f 75 73 20 |in with |various |
|00003cb0| 76 61 6c 75 65 73 20 6f | 66 20 74 68 65 20 09 09 |values o|f the ..|
|00003cc0| 09 09 09 09 09 7d 0d 7b | 20 09 66 69 72 73 74 20 |.....}.{| .first |
|00003cd0| 70 61 72 61 6d 65 74 65 | 72 2e 20 44 65 70 65 6e |paramete|r. Depen|
|00003ce0| 64 69 6e 67 20 6f 6e 20 | 74 68 65 20 76 61 6c 75 |ding on |the valu|
|00003cf0| 65 20 6f 66 20 73 65 6c | 65 63 74 6f 72 20 74 68 |e of sel|ector th|
|00003d00| 65 20 66 75 6e 63 74 69 | 6f 6e 20 6d 61 69 6e 20 |e functi|on main |
|00003d10| 6d 75 73 74 20 67 69 76 | 65 20 74 68 65 09 09 09 |must giv|e the...|
|00003d20| 09 09 09 09 7d 0d 7b 20 | 09 72 69 67 68 74 20 72 |....}.{ |.right r|
|00003d30| 65 73 70 6f 6e 73 65 2c | 20 69 2e 65 20 61 63 74 |esponse,| i.e act|
|00003d40| 20 61 73 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e | as the |function|
|00003d50| 20 66 69 72 73 74 2c 20 | 6f 72 20 63 61 6c 63 75 | first, |or calcu|
|00003d60| 6c 61 74 65 20 74 68 65 | 20 79 2d 76 61 6c 75 65 |late the| y-value|
|00003d70| 20 6f 72 20 79 6f 75 72 | 09 09 09 09 09 09 09 7d | or your|.......}|
|00003d80| 0d 7b 20 09 66 75 6e 63 | 74 69 6f 6e 73 2c 20 61 |.{ .func|tions, a|
|00003d90| 6e 64 20 73 6f 20 6f 6e | 2e 20 54 68 65 20 70 61 |nd so on|. The pa|
|00003da0| 72 61 6d 65 74 65 72 62 | 6c 6f 63 6b 20 63 6f 6e |rameterb|lock con|
|00003db0| 74 61 69 6e 73 20 61 6c | 6c 20 74 68 65 20 69 6e |tains al|l the in|
|00003dc0| 66 6f 72 6d 61 74 69 6f | 6e 20 79 6f 75 20 77 69 |formatio|n you wi|
|00003dd0| 6c 6c 20 65 76 65 72 20 | 6e 65 65 64 09 09 09 09 |ll ever |need....|
|00003de0| 09 09 09 7d 0d 7b 20 09 | 74 6f 20 64 6f 20 74 68 |...}.{ .|to do th|
|00003df0| 69 73 2e 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |is......|........|
|00003e00| 09 09 09 09 09 09 7d 0d | 0d 7b 20 09 54 68 65 20 |......}.|.{ .The |
|00003e10| 74 65 6d 70 6c 61 74 65 | 20 66 69 6c 65 73 20 66 |template| files f|
|00003e20| 6f 72 20 66 75 6e 63 74 | 69 6f 6e 73 20 61 6e 64 |or funct|ions and|
|00003e30| 20 70 72 6f 67 72 61 6d | 73 20 70 72 6f 76 69 64 | program|s provid|
|00003e40| 65 20 61 20 70 72 65 64 | 69 66 69 6e 65 64 20 66 |e a pred|ifined f|
|00003e50| 75 6e 63 74 69 6f 6e 20 | 6d 61 69 6e 20 74 68 61 |unction |main tha|
|00003e60| 74 20 09 09 09 09 7d 0d | 7b 09 70 65 72 66 6f 72 |t ....}.|{.perfor|
|00003e70| 6d 65 73 20 61 6c 6c 20 | 74 68 65 20 6e 65 63 65 |mes all |the nece|
|00003e80| 73 73 61 72 79 20 63 61 | 6c 6c 73 2c 20 77 69 74 |ssary ca|lls, wit|
|00003e90| 68 20 74 68 65 20 72 69 | 67 68 74 20 70 61 72 61 |h the ri|ght para|
|00003ea0| 6d 65 74 65 72 73 2c 20 | 74 6f 20 61 20 73 65 74 |meters, |to a set|
|00003eb0| 20 6f 66 20 66 75 6e 63 | 74 69 6f 6e 73 20 09 09 | of func|tions ..|
|00003ec0| 09 09 09 7d 0d 7b 09 63 | 61 6c 6c 65 64 2c 20 61 |...}.{.c|alled, a|
|00003ed0| 73 20 79 6f 75 20 6d 69 | 67 68 74 20 65 78 70 65 |s you mi|ght expe|
|00003ee0| 63 74 2c 20 66 69 72 73 | 74 2c 20 63 68 65 63 6b |ct, firs|t, check|
|00003ef0| 2c 20 64 65 72 69 76 61 | 74 69 76 65 73 2c 20 72 |, deriva|tives, r|
|00003f00| 75 6e 2c 20 65 74 63 2e | 20 09 09 09 09 09 09 09 |un, etc.| .......|
|00003f10| 09 7d 0d 7b 09 54 68 65 | 73 65 20 66 75 6e 63 74 |.}.{.The|se funct|
|00003f20| 69 6f 6e 73 20 63 6f 72 | 72 65 73 70 6f 6e 64 20 |ions cor|respond |
|00003f30| 65 78 61 63 74 6c 79 20 | 74 6f 20 74 68 65 20 66 |exactly |to the f|
|00003f40| 75 6e 63 74 69 6f 6e 73 | 20 79 6f 75 09 09 09 09 |unctions| you....|
|00003f50| 09 09 09 09 09 09 7d 0d | 7b 20 09 64 65 66 69 6e |......}.|{ .defin|
|00003f60| 65 20 77 68 65 6e 20 64 | 65 66 69 6e 69 6e 67 20 |e when d|efining |
|00003f70| 66 75 6e 63 74 69 6f 6e | 73 20 61 6e 64 20 70 72 |function|s and pr|
|00003f80| 6f 67 72 61 6d 73 20 77 | 69 74 68 69 6e 20 70 72 |ograms w|ithin pr|
|00003f90| 6f 20 46 69 74 2e 09 09 | 09 09 09 09 09 09 09 09 |o Fit...|........|
|00003fa0| 7d 0d 0d 7b 20 09 41 6c | 6c 20 79 6f 75 20 6e 65 |}..{ .Al|l you ne|
|00003fb0| 65 64 20 74 6f 20 64 6f | 20 69 73 20 66 69 6c 6c |ed to do| is fill|
|00003fc0| 20 74 68 65 6d 20 69 6e | 20 61 63 63 6f 72 64 69 | them in| accordi|
|00003fd0| 6e 67 20 74 6f 20 79 6f | 75 72 20 6e 65 65 64 65 |ng to yo|ur neede|
|00003fe0| 73 2e 09 09 09 09 09 09 | 09 7d 0d 0d 7b 20 09 55 |s.......|.}..{ .U|
|00003ff0| 6e 6c 65 73 73 20 79 6f | 75 20 77 61 6e 74 20 74 |nless yo|u want t|
|00004000| 6f 20 70 72 6f 64 75 63 | 65 20 73 6f 6d 65 20 61 |o produc|e some a|
|00004010| 64 76 61 6e 63 65 64 2c | 20 65 78 6f 74 69 63 20 |dvanced,| exotic |
|00004020| 66 75 6e 63 74 69 6f 6e | 61 6c 69 74 79 20 69 6e |function|ality in|
|00004030| 20 79 6f 75 72 20 65 78 | 74 65 72 6e 61 6c 20 6d | your ex|ternal m|
|00004040| 6f 64 75 6c 65 2c 20 79 | 6f 75 09 09 09 09 09 09 |odule, y|ou......|
|00004050| 09 7d 0d 7b 20 09 64 6f | 20 6e 6f 74 20 6e 65 65 |.}.{ .do| not nee|
|00004060| 64 20 74 6f 20 61 63 63 | 65 73 73 20 74 68 65 20 |d to acc|ess the |
|00004070| 70 61 72 61 6d 65 74 65 | 72 20 62 6c 6f 63 6b 20 |paramete|r block |
|00004080| 64 69 72 65 63 74 6c 79 | 2e 09 09 09 09 09 09 09 |directly|........|
|00004090| 09 09 09 09 7d 0d 7b 20 | 09 57 41 52 4e 49 4e 47 |....}.{ |.WARNING|
|000040a0| 3a 20 74 68 65 20 64 65 | 66 69 6e 69 74 69 6f 6e |: the de|finition|
|000040b0| 20 6f 66 20 45 78 74 4d | 6f 64 75 6c 65 73 50 61 | of ExtM|odulesPa|
|000040c0| 72 61 6d 42 6c 6f 63 6b | 20 6d 61 79 20 63 68 61 |ramBlock| may cha|
|000040d0| 6e 67 65 20 69 6e 20 66 | 75 74 75 72 65 20 76 65 |nge in f|uture ve|
|000040e0| 72 73 69 6f 6e 73 20 09 | 09 09 09 09 09 09 7d 0d |rsions .|......}.|
|000040f0| 7b 20 09 6f 66 20 70 72 | 6f 20 46 69 74 2e 20 55 |{ .of pr|o Fit. U|
|00004100| 73 69 6e 67 20 69 74 20 | 66 72 6f 6d 20 77 69 74 |sing it |from wit|
|00004110| 68 69 6e 20 79 6f 75 72 | 20 66 75 6e 63 74 69 6f |hin your| functio|
|00004120| 6e 20 6d 61 79 20 63 61 | 75 73 65 20 63 6f 6d 70 |n may ca|use comp|
|00004130| 61 74 69 62 69 6c 69 74 | 79 20 70 72 6f 62 6c 65 |atibilit|y proble|
|00004140| 6d 73 20 09 09 09 09 09 | 09 09 7d 0d 7b 20 09 77 |ms .....|..}.{ .w|
|00004150| 69 74 68 20 74 68 6f 73 | 65 20 66 75 74 75 72 65 |ith thos|e future|
|00004160| 20 76 65 72 73 69 6f 6e | 73 2e 09 09 09 09 09 09 | version|s.......|
|00004170| 09 7d 0d 0d 09 63 6f 6e | 73 74 0d 7b 63 6f 6e 73 |.}...con|st.{cons|
|00004180| 74 61 6e 74 73 20 75 73 | 65 64 20 74 6f 20 73 65 |tants us|ed to se|
|00004190| 74 20 74 68 65 20 66 69 | 65 6c 64 73 20 69 6e 20 |t the fi|elds in |
|000041a0| 74 68 65 20 45 78 74 4d | 6f 64 75 6c 65 73 50 61 |the ExtM|odulesPa|
|000041b0| 72 61 6d 42 6c 6f 63 6b | 20 64 65 66 69 6e 65 64 |ramBlock| defined|
|000041c0| 20 62 65 6c 6f 77 20 09 | 09 09 7d 0d 09 09 43 50 | below .|..}...CP|
|000041d0| 55 36 38 6e 6f 46 50 55 | 20 3d 20 31 3b 09 09 09 |U68noFPU| = 1;...|
|000041e0| 09 7b 63 6f 6e 73 74 61 | 6e 74 73 20 66 6f 72 20 |.{consta|nts for |
|000041f0| 63 6f 64 65 54 79 70 65 | 09 09 09 7d 0d 09 09 43 |codeType|...}...C|
|00004200| 50 55 36 38 46 50 55 20 | 3d 20 32 3b 0d 09 09 43 |PU68FPU |= 2;...C|
|00004210| 50 55 50 6f 77 65 72 50 | 43 20 3d 20 33 3b 0d 0d |PUPowerP|C = 3;..|
|00004220| 09 09 6b 53 65 74 75 70 | 20 3d 20 30 3b 09 09 09 |..kSetup| = 0;...|
|00004230| 09 09 7b 63 6f 6e 73 74 | 61 6e 74 73 20 66 6f 72 |..{const|ants for|
|00004240| 20 73 65 6c 65 63 74 6f | 72 09 09 09 7d 0d 09 09 | selecto|r...}...|
|00004250| 70 72 6f 67 49 6e 69 74 | 69 61 6c 69 7a 65 20 3d |progInit|ialize =|
|00004260| 20 31 31 3b 0d 09 09 70 | 72 6f 67 52 75 6e 20 3d | 11;...p|rogRun =|
|00004270| 20 31 32 3b 0d 09 09 66 | 75 6e 63 49 6e 69 74 69 | 12;...f|uncIniti|
|00004280| 61 6c 69 7a 65 20 3d 20 | 32 31 3b 0d 09 09 66 75 |alize = |21;...fu|
|00004290| 6e 63 43 68 65 63 6b 20 | 3d 20 32 32 3b 0d 09 09 |ncCheck |= 22;...|
|000042a0| 66 75 6e 63 46 69 72 73 | 74 20 3d 20 32 33 3b 0d |funcFirs|t = 23;.|
|000042b0| 09 09 66 75 6e 63 46 75 | 6e 63 20 3d 20 32 34 3b |..funcFu|nc = 24;|
|000042c0| 0d 09 09 66 75 6e 63 44 | 65 72 69 76 61 74 69 76 |...funcD|erivativ|
|000042d0| 65 73 20 3d 20 32 35 3b | 0d 09 09 66 75 6e 63 4c |es = 25;|...funcL|
|000042e0| 61 73 74 20 3d 20 32 36 | 3b 0d 09 09 6b 43 6c 65 |ast = 26|;...kCle|
|000042f0| 61 6e 55 70 20 3d 20 33 | 31 3b 0d 0d 09 74 79 70 |anUp = 3|1;...typ|
|00004300| 65 0d 0d 7b 24 41 4c 49 | 47 4e 20 4d 41 43 36 38 |e..{$ALI|GN MAC68|
|00004310| 4b 7d 0d 09 09 45 78 74 | 4d 6f 64 75 6c 65 73 50 |K}...Ext|ModulesP|
|00004320| 61 72 61 6d 42 6c 6f 63 | 6b 20 3d 20 72 65 63 6f |aramBloc|k = reco|
|00004330| 72 64 20 20 7b 70 61 72 | 61 6d 65 74 65 72 20 62 |rd {par|ameter b|
|00004340| 6c 6f 63 6b 20 75 73 65 | 64 20 66 6f 72 20 74 68 |lock use|d for th|
|00004350| 65 20 63 6f 6d 6d 75 6e | 69 63 61 74 69 6f 6e 20 |e commun|ication |
|00004360| 74 6f 20 61 6e 64 20 66 | 72 6f 6d 20 70 72 6f 46 |to and f|rom proF|
|00004370| 69 74 09 09 09 7d 0d 0d | 09 09 09 09 52 75 6e 54 |it...}..|....RunT|
|00004380| 69 6d 65 50 72 6f 63 50 | 74 72 3a 20 50 74 72 3b |imeProcP|tr: Ptr;|
|00004390| 09 7b 09 63 61 6c 6c 20 | 62 61 63 6b 20 72 6f 75 |.{.call |back rou|
|000043a0| 74 69 6e 65 20 66 6f 72 | 20 70 72 6f 46 69 74 09 |tine for| proFit.|
|000043b0| 09 09 7d 0d 09 09 09 09 | 09 09 7b 09 74 68 65 20 |..}.....|..{.the |
|000043c0| 65 78 74 65 72 6e 61 6c | 20 6d 6f 64 75 6c 65 20 |external| module |
|000043d0| 75 73 65 73 20 74 68 69 | 73 20 62 6f 74 74 6c 65 |uses thi|s bottle|
|000043e0| 6e 65 63 6b 20 74 6f 20 | 63 61 6c 6c 20 61 6c 6c |neck to |call all|
|000043f0| 20 72 6f 75 74 69 6e 65 | 73 20 09 09 09 7d 0d 09 | routine|s ...}..|
|00004400| 09 09 09 09 09 7b 09 70 | 72 6f 76 69 64 65 64 20 |.....{.p|rovided |
|00004410| 62 79 20 70 72 6f 46 69 | 74 20 09 09 09 7d 0d 09 |by proFi|t ...}..|
|00004420| 09 09 09 67 6c 6f 62 61 | 6c 73 3a 20 50 74 72 3b |...globa|ls: Ptr;|
|00004430| 09 09 7b 20 09 67 6c 6f | 62 61 6c 20 76 61 72 69 |..{ .glo|bal vari|
|00004440| 61 62 6c 65 20 73 70 61 | 63 65 20 28 64 65 66 69 |able spa|ce (defi|
|00004450| 6e 65 64 20 69 66 20 73 | 65 6c 65 63 74 6f 72 3e |ned if s|elector>|
|00004460| 30 29 20 61 6e 64 20 69 | 66 20 72 65 71 75 69 72 |0) and i|f requir|
|00004470| 65 64 47 6c 6f 62 61 6c | 73 20 77 61 73 20 73 65 |edGlobal|s was se|
|00004480| 74 20 3e 30 20 69 6e 20 | 53 65 74 55 70 2e 20 7d |t >0 in |SetUp. }|
|00004490| 0d 0d 09 7b 20 70 61 72 | 61 6d 65 74 65 72 73 20 |...{ par|ameters |
|000044a0| 74 6f 20 62 65 20 73 65 | 74 20 77 68 65 6e 20 73 |to be se|t when s|
|000044b0| 65 6c 65 63 74 6f 72 3d | 6b 73 65 74 75 70 20 09 |elector=|ksetup .|
|000044c0| 09 09 7d 0d 09 09 09 09 | 76 65 72 73 69 6f 6e 4e |..}.....|versionN|
|000044d0| 75 6d 62 65 72 3a 20 69 | 6e 74 65 67 65 72 3b 09 |umber: i|nteger;.|
|000044e0| 09 7b 20 74 68 65 20 70 | 72 65 73 65 6e 74 20 69 |.{ the p|resent i|
|000044f0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 09 09 |mplement|ation ..|
|00004500| 09 7d 0d 09 09 09 09 6d | 6f 64 75 6c 65 4b 69 6e |.}.....m|oduleKin|
|00004510| 64 3a 20 69 6e 74 65 67 | 65 72 3b 09 09 09 7b 20 |d: integ|er;...{ |
|00004520| 69 73 46 75 6e 63 74 69 | 6f 6e 2c 20 69 73 50 72 |isFuncti|on, isPr|
|00004530| 6f 67 72 61 6d 2c 20 69 | 73 4d 61 63 72 6f 20 09 |ogram, i|sMacro .|
|00004540| 09 09 7d 0d 09 09 09 09 | 63 6f 64 65 54 79 70 65 |..}.....|codeType|
|00004550| 3a 20 69 6e 74 65 67 65 | 72 3b 09 09 09 7b 20 43 |: intege|r;...{ C|
|00004560| 50 55 36 38 6e 6f 46 50 | 55 3d 31 2c 20 43 50 55 |PU68noFP|U=1, CPU|
|00004570| 36 38 46 50 55 2c 20 43 | 50 55 50 6f 77 65 72 50 |68FPU, C|PUPowerP|
|00004580| 43 20 09 09 09 7d 0d 09 | 09 09 09 6e 61 6d 65 3a |C ...}..|...name:|
|00004590| 20 53 74 72 32 35 35 3b | 09 09 09 09 7b 20 74 68 | Str255;|....{ th|
|000045a0| 65 20 6e 61 6d 65 20 6f | 66 20 79 6f 75 72 20 65 |e name o|f your e|
|000045b0| 78 74 65 72 6e 61 6c 20 | 6d 6f 64 75 6c 65 20 09 |xternal |module .|
|000045c0| 09 09 7d 0d 09 09 09 09 | 72 65 71 75 69 72 65 64 |..}.....|required|
|000045d0| 47 6c 6f 62 61 6c 73 3a | 20 6c 6f 6e 67 69 6e 74 |Globals:| longint|
|000045e0| 3b 09 09 7b 20 67 6c 6f | 62 61 6c 20 6d 65 6d 6f |;..{ glo|bal memo|
|000045f0| 72 79 20 72 65 71 75 69 | 72 65 64 2e 20 49 66 20 |ry requi|red. If |
|00004600| 74 68 69 73 20 69 73 20 | 3e 30 20 70 72 6f 46 69 |this is |>0 proFi|
|00004610| 74 20 77 69 6c 6c 20 61 | 6c 6c 6f 63 61 74 65 20 |t will a|llocate |
|00004620| 74 68 65 20 09 09 09 7d | 0d 09 09 09 09 09 09 09 |the ...}|........|
|00004630| 09 7b 20 72 65 71 75 69 | 72 65 64 20 6d 65 6d 6f |.{ requi|red memo|
|00004640| 72 79 20 66 6f 72 20 79 | 6f 75 20 61 6e 64 20 72 |ry for y|ou and r|
|00004650| 65 74 75 72 6e 20 61 20 | 70 6f 69 6e 74 65 72 20 |eturn a |pointer |
|00004660| 74 6f 20 69 74 20 69 6e | 20 74 68 65 20 70 6f 69 |to it in| the poi|
|00004670| 6e 74 65 72 20 09 09 09 | 7d 0d 09 09 09 09 09 09 |nter ...|}.......|
|00004680| 09 09 7b 20 67 6c 6f 62 | 61 6c 73 2e 20 44 6f 20 |..{ glob|als. Do |
|00004690| 6e 6f 74 20 74 6f 75 63 | 68 20 74 68 65 20 70 6f |not touc|h the po|
|000046a0| 69 6e 74 65 72 20 76 61 | 6c 75 65 2e 20 70 72 6f |inter va|lue. pro|
|000046b0| 46 69 74 20 69 73 20 72 | 65 73 70 6f 6e 73 69 62 |Fit is r|esponsib|
|000046c0| 6c 65 20 09 09 09 7d 0d | 09 09 09 09 09 09 09 09 |le ...}.|........|
|000046d0| 7b 20 66 6f 72 20 61 6c | 6c 6f 63 61 74 69 6e 67 |{ for al|locating|
|000046e0| 20 41 4e 44 20 64 65 61 | 6c 6c 6f 63 61 74 69 6e | AND dea|llocatin|
|000046f0| 67 20 69 74 2e 20 09 09 | 09 7d 0d 0d 0d 09 7b 20 |g it. ..|.}....{ |
|00004700| 67 65 6e 65 72 61 6c 20 | 69 6e 66 6f 20 70 72 6f |general |info pro|
|00004710| 76 69 64 65 64 20 62 79 | 20 70 72 6f 46 69 74 20 |vided by| proFit |
|00004720| 09 09 09 7d 0d 09 09 09 | 09 76 3a 20 61 72 72 61 |...}....|.v: arra|
|00004730| 79 5b 31 2e 2e 33 30 5d | 20 6f 66 20 65 78 74 65 |y[1..30]| of exte|
|00004740| 6e 64 65 64 3b 09 7b 20 | 61 6e 20 61 72 72 61 79 |nded;.{ |an array|
|00004750| 20 66 6f 72 20 67 65 6e | 65 72 61 6c 20 70 75 72 | for gen|eral pur|
|00004760| 70 6f 73 65 20 79 6f 75 | 72 20 75 73 65 20 69 6e |pose you|r use in|
|00004770| 20 74 68 65 20 65 78 74 | 65 72 6e 61 6c 20 6d 6f | the ext|ernal mo|
|00004780| 64 75 6c 65 20 09 09 09 | 7d 0d 0d 7b 20 74 68 65 |dule ...|}..{ the|
|00004790| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 65 6e 74 72 69 | followi|ng entri|
|000047a0| 65 73 20 63 61 6e 20 6f | 6e 6c 79 20 62 65 20 75 |es can o|nly be u|
|000047b0| 73 65 64 20 62 79 20 77 | 68 65 6e 20 74 68 65 20 |sed by w|hen the |
|000047c0| 65 78 74 65 72 6e 61 6c | 20 6d 6f 64 75 6c 65 20 |external| module |
|000047d0| 69 73 20 61 20 66 75 6e | 63 74 69 6f 6e 2e 20 09 |is a fun|ction. .|
|000047e0| 09 09 7d 0d 7b 20 74 68 | 65 79 20 63 61 6e 20 62 |..}.{ th|ey can b|
|000047f0| 65 20 61 63 63 65 73 73 | 65 64 20 6f 6e 6c 79 20 |e access|ed only |
|00004800| 77 68 65 6e 20 73 65 6c | 65 63 74 6f 72 3e 30 20 |when sel|ector>0 |
|00004810| 61 6e 64 20 77 68 65 6e | 20 09 09 09 7d 0d 7b 20 |and when| ...}.{ |
|00004820| 6d 6f 64 75 6c 65 4b 69 | 6e 64 3d 3d 69 73 46 75 |moduleKi|nd==isFu|
|00004830| 6e 63 74 69 6f 6e 2e 20 | 6d 6f 64 75 6c 65 4b 69 |nction. |moduleKi|
|00004840| 6e 64 20 6d 75 73 74 20 | 62 65 20 73 65 74 20 77 |nd must |be set w|
|00004850| 68 65 6e 20 74 68 65 20 | 65 78 74 65 72 6e 61 6c |hen the |external|
|00004860| 20 6d 6f 64 75 6c 65 20 | 09 09 09 7d 0d 7b 20 69 | module |...}.{ i|
|00004870| 73 20 63 61 6c 6c 65 64 | 20 66 6f 72 20 74 68 65 |s called| for the|
|00004880| 20 66 69 72 73 74 20 74 | 69 6d 65 20 28 77 69 74 | first t|ime (wit|
|00004890| 68 20 73 65 6c 65 63 74 | 6f 72 3d 3d 30 29 20 09 |h select|or==0) .|
|000048a0| 09 09 7d 0d 0d 09 7b 20 | 70 61 72 61 6d 65 74 65 |..}...{ |paramete|
|000048b0| 72 73 20 74 6f 20 62 65 | 20 73 65 74 20 62 79 20 |rs to be| set by |
|000048c0| 66 75 6e 63 49 6e 69 74 | 69 61 6c 69 7a 65 20 09 |funcInit|ialize .|
|000048d0| 09 09 7d 0d 09 09 09 09 | 64 75 6d 6d 79 3a 20 42 |..}.....|dummy: B|
|000048e0| 6f 6f 6c 65 61 6e 3b 20 | 09 09 09 09 7b 20 75 6e |oolean; |....{ un|
|000048f0| 75 73 65 64 20 09 09 09 | 7d 0d 09 09 09 09 68 61 |used ...|}.....ha|
|00004900| 73 44 65 72 69 76 61 74 | 69 76 65 73 3a 20 42 6f |sDerivat|ives: Bo|
|00004910| 6f 6c 65 61 6e 3b 09 09 | 7b 20 74 72 75 65 20 69 |olean;..|{ true i|
|00004920| 66 20 70 72 6f 46 69 74 | 20 6d 75 73 74 20 63 61 |f proFit| must ca|
|00004930| 6c 6c 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |ll the f|unction |
|00004940| 22 44 65 72 69 76 61 74 | 69 76 65 73 22 20 64 65 |"Derivat|ives" de|
|00004950| 66 69 6e 65 64 20 69 6e | 20 79 6f 75 72 20 6d 6f |fined in| your mo|
|00004960| 64 75 6c 65 20 7d 0d 09 | 09 09 09 09 09 09 09 7b |dule }..|.......{|
|00004970| 20 59 6f 75 20 63 61 6e | 20 73 65 74 20 74 68 69 | You can| set thi|
|00004980| 73 20 70 61 72 61 6d 74 | 65 72 20 74 6f 20 74 72 |s paramt|er to tr|
|00004990| 75 65 2c 20 61 6e 64 20 | 6f 6e 6c 79 20 63 61 6c |ue, and |only cal|
|000049a0| 63 75 6c 61 74 65 20 61 | 20 66 65 77 20 64 65 72 |culate a| few der|
|000049b0| 69 76 61 74 69 76 65 73 | 20 28 64 79 64 61 5b 5d |ivatives| (dyda[]|
|000049c0| 20 76 61 6c 75 65 73 29 | 20 7d 0d 09 09 09 09 09 | values)| }......|
|000049d0| 09 09 09 7b 20 69 6e 20 | 79 6f 75 72 20 22 44 65 |...{ in |your "De|
|000049e0| 72 69 76 61 74 69 76 65 | 73 22 20 66 75 6e 63 74 |rivative|s" funct|
|000049f0| 69 6f 6e 2e 20 70 72 6f | 20 46 69 74 20 77 69 6c |ion. pro| Fit wil|
|00004a00| 6c 20 74 61 6b 65 20 63 | 61 72 65 20 6f 66 20 63 |l take c|are of c|
|00004a10| 61 6c 63 75 6c 61 74 69 | 6e 67 20 74 68 65 20 72 |alculati|ng the r|
|00004a20| 65 73 74 20 6e 75 6d 65 | 72 69 63 61 6c 6c 79 2e |est nume|rically.|
|00004a30| 20 7d 0d 09 09 09 09 09 | 09 09 09 7b 20 49 66 20 | }......|...{ If |
|00004a40| 79 6f 75 20 73 65 74 20 | 74 68 69 73 20 68 61 73 |you set |this has|
|00004a50| 44 65 72 69 76 61 74 69 | 76 65 73 20 74 6f 20 74 |Derivati|ves to t|
|00004a60| 72 75 65 20 61 6e 64 20 | 6c 65 61 76 65 20 79 6f |rue and |leave yo|
|00004a70| 75 72 20 64 65 66 69 6e | 69 74 69 6f 6e 20 6f 66 |ur defin|ition of|
|00004a80| 20 22 44 65 72 69 76 61 | 74 69 76 65 73 22 20 65 | "Deriva|tives" e|
|00004a90| 6d 70 74 79 2c 20 74 68 | 65 6e 20 7d 0d 09 09 09 |mpty, th|en }....|
|00004aa0| 09 09 09 09 09 7b 20 79 | 6f 75 20 68 61 76 65 20 |.....{ y|ou have |
|00004ab0| 74 68 65 20 73 61 6d 65 | 20 72 65 73 75 6c 74 20 |the same| result |
|00004ac0| 6f 62 74 61 69 6e 65 64 | 20 77 68 65 6e 20 73 65 |obtained| when se|
|00004ad0| 74 74 69 6e 67 20 68 61 | 73 44 65 72 69 76 61 74 |tting ha|sDerivat|
|00004ae0| 69 76 65 73 20 74 6f 20 | 66 61 6c 73 65 3a 20 70 |ives to |false: p|
|00004af0| 72 6f 46 69 74 20 63 61 | 6c 63 75 6c 61 74 65 73 |roFit ca|lculates|
|00004b00| 20 61 6c 6c 20 7d 0d 09 | 09 09 09 09 09 09 09 7b | all }..|.......{|
|00004b10| 20 64 65 72 69 76 61 74 | 69 76 65 73 20 6e 75 6d | derivat|ives num|
|00004b20| 65 72 69 63 61 6c 6c 79 | 2e 20 7d 0d 09 09 09 09 |erically|. }.....|
|00004b30| 64 65 73 63 72 31 2c 20 | 64 65 73 63 72 32 3a 20 |descr1, |descr2: |
|00004b40| 53 74 72 32 35 35 3b 09 | 09 7b 20 64 65 73 63 72 |Str255;.|.{ descr|
|00004b50| 69 70 74 69 6f 6e 20 74 | 6f 20 61 70 70 65 61 72 |iption t|o appear|
|00004b60| 20 69 6e 20 70 61 72 61 | 6d 65 74 65 72 73 20 77 | in para|meters w|
|00004b70| 69 6e 64 6f 77 20 09 09 | 09 7d 0d 09 09 09 09 6e |indow ..|.}.....n|
|00004b80| 75 6d 62 65 72 4f 66 50 | 61 72 61 6d 73 3a 20 69 |umberOfP|arams: i|
|00004b90| 6e 74 65 67 65 72 3b 09 | 09 7b 20 6e 75 6d 62 65 |nteger;.|.{ numbe|
|00004ba0| 72 20 6f 66 20 70 61 72 | 61 6d 65 74 65 72 73 20 |r of par|ameters |
|00004bb0| 75 73 65 64 20 62 79 20 | 74 68 65 20 66 75 6e 63 |used by |the func|
|00004bc0| 74 69 6f 6e 20 09 09 09 | 7d 0d 09 09 09 09 61 30 |tion ...|}.....a0|
|00004bd0| 3a 20 44 65 66 61 75 6c | 74 50 61 72 61 6d 49 6e |: Defaul|tParamIn|
|00004be0| 66 6f 3b 09 09 09 7b 20 | 61 6c 6c 20 70 61 72 61 |fo;...{ |all para|
|00004bf0| 6d 65 74 65 72 20 64 65 | 66 61 75 6c 74 20 73 65 |meter de|fault se|
|00004c00| 74 74 69 6e 67 73 20 09 | 09 09 7d 0d 0d 09 7b 20 |ttings .|..}...{ |
|00004c10| 70 61 72 61 6d 65 74 65 | 72 73 20 75 73 65 64 20 |paramete|rs used |
|00004c20| 69 6e 20 63 68 65 63 6b | 3a 20 09 09 09 7d 0d 09 |in check|: ...}..|
|00004c30| 09 09 09 70 61 72 61 6d | 4e 6f 3a 20 69 6e 74 65 |...param|No: inte|
|00004c40| 67 65 72 3b 09 09 09 7b | 20 63 75 72 72 65 6e 74 |ger;...{| current|
|00004c50| 20 70 61 72 6d 20 6e 75 | 6d 62 65 72 2c 20 66 6f | parm nu|mber, fo|
|00004c60| 72 20 63 68 65 63 6b 20 | 28 30 2e 2e 6d 61 78 4e |r check |(0..maxN|
|00004c70| 72 50 61 72 61 6d 73 2d | 31 29 20 09 7d 0d 09 09 |rParams-|1) .}...|
|00004c80| 09 09 61 6e 73 77 65 72 | 3a 20 69 6e 74 65 67 65 |..answer|: intege|
|00004c90| 72 3b 09 09 09 09 7b 20 | 72 65 74 75 72 6e 20 76 |r;....{ |return v|
|00004ca0| 61 6c 75 65 20 6f 66 20 | 63 68 65 63 6b 2c 20 74 |alue of |check, t|
|00004cb0| 79 70 65 20 43 68 65 63 | 6b 50 41 6e 73 77 65 72 |ype Chec|kPAnswer|
|00004cc0| 20 09 09 09 7d 0d 0d 09 | 7b 20 70 61 72 61 6d 65 | ...}...|{ parame|
|00004cd0| 74 65 72 73 20 75 73 65 | 64 20 69 6e 20 66 75 6e |ters use|d in fun|
|00004ce0| 63 20 61 6e 64 20 69 6e | 20 64 65 72 69 76 61 74 |c and in| derivat|
|00004cf0| 69 76 65 73 20 09 09 09 | 7d 0d 09 09 09 09 78 2c |ives ...|}.....x,|
|00004d00| 20 79 3a 20 5e 65 78 74 | 65 6e 64 65 64 3b 09 09 | y: ^ext|ended;..|
|00004d10| 09 09 09 7b 20 78 2d 20 | 61 6e 64 20 79 2d 76 61 |...{ x- |and y-va|
|00004d20| 6c 75 65 20 09 09 09 7d | 0d 09 09 09 09 61 3a 20 |lue ...}|.....a: |
|00004d30| 5e 50 61 72 61 6d 41 72 | 72 61 79 3b 09 09 09 09 |^ParamAr|ray;....|
|00004d40| 09 7b 20 70 61 72 61 6d | 65 74 65 72 20 76 61 6c |.{ param|eter val|
|00004d50| 75 65 73 2c 20 73 65 74 | 20 74 6f 20 61 30 2e 76 |ues, set| to a0.v|
|00004d60| 61 6c 75 65 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |alue bef|ore call|
|00004d70| 69 6e 67 20 66 69 72 73 | 74 20 09 09 09 7d 0d 09 |ing firs|t ...}..|
|00004d80| 09 09 09 64 79 64 61 3a | 20 5e 50 61 72 61 6d 41 |...dyda:| ^ParamA|
|00004d90| 72 72 61 79 3b 09 09 09 | 09 7b 20 75 73 65 64 20 |rray;...|.{ used |
|00004da0| 62 79 20 64 65 72 69 76 | 61 74 69 76 65 73 2c 20 |by deriv|atives, |
|00004db0| 73 65 74 20 74 6f 20 74 | 68 65 20 64 65 72 69 76 |set to t|he deriv|
|00004dc0| 61 74 69 76 65 73 20 6f | 66 20 74 68 65 20 66 75 |atives o|f the fu|
|00004dd0| 6e 63 74 69 6f 6e 20 77 | 69 74 68 20 72 65 73 70 |nction w|ith resp|
|00004de0| 65 63 74 20 74 6f 20 69 | 74 73 20 70 61 72 61 6d |ect to i|ts param|
|00004df0| 65 74 65 72 73 2e 7d 0d | 09 09 09 09 09 09 09 09 |eters.}.|........|
|00004e00| 09 7b 20 49 66 20 61 20 | 64 79 64 61 5b 5d 20 76 |.{ If a |dyda[] v|
|00004e10| 61 6c 75 65 20 69 73 20 | 6e 6f 74 20 73 65 74 2c |alue is |not set,|
|00004e20| 20 70 72 6f 20 46 69 74 | 20 63 61 6c 63 75 6c 61 | pro Fit| calcula|
|00004e30| 74 65 73 20 74 68 61 74 | 20 64 65 72 69 76 61 74 |tes that| derivat|
|00004e40| 69 76 65 20 6e 75 6d 65 | 72 69 63 61 6c 6c 79 2e |ive nume|rically.|
|00004e50| 7d 0d 09 09 09 09 67 6c | 6f 62 61 6c 53 63 72 61 |}.....gl|obalScra|
|00004e60| 74 63 68 3a 20 47 6c 6f | 62 61 6c 53 63 72 61 74 |tch: Glo|balScrat|
|00004e70| 63 68 50 74 72 3b 09 7b | 20 67 6c 6f 62 61 6c 20 |chPtr;.{| global |
|00004e80| 64 61 74 61 20 74 6f 20 | 62 65 20 61 63 65 73 73 |data to |be acess|
|00004e90| 65 64 20 62 79 20 61 6c | 6c 20 6d 6f 64 75 6c 65 |ed by al|l module|
|00004ea0| 73 20 09 09 09 7d 0d 09 | 09 09 09 6d 6f 64 75 6c |s ...}..|...modul|
|00004eb0| 65 46 69 6c 65 3a 20 46 | 53 53 70 65 63 3b 09 09 |eFile: F|SSpec;..|
|00004ec0| 09 09 7b 20 74 68 65 20 | 66 69 6c 65 20 77 68 65 |..{ the |file whe|
|00004ed0| 72 65 20 74 68 69 73 20 | 65 78 74 65 72 6e 61 6c |re this |external|
|00004ee0| 20 6d 6f 64 75 6c 65 20 | 69 73 20 69 6e 20 09 09 | module |is in ..|
|00004ef0| 09 7d 0d 09 09 09 65 6e | 64 3b 0d 0d 09 09 45 78 |.}....en|d;....Ex|
|00004f00| 74 4d 6f 64 75 6c 65 73 | 50 61 72 61 6d 42 6c 6f |tModules|ParamBlo|
|00004f10| 63 6b 50 74 72 20 3d 20 | 5e 45 78 74 4d 6f 64 75 |ckPtr = |^ExtModu|
|00004f20| 6c 65 73 50 61 72 61 6d | 42 6c 6f 63 6b 3b 0d 09 |lesParam|Block;..|
|00004f30| 09 45 78 74 4d 6f 64 75 | 6c 65 73 50 61 72 61 6d |.ExtModu|lesParam|
|00004f40| 42 6c 6f 63 6b 48 20 3d | 20 5e 45 78 74 4d 6f 64 |BlockH =| ^ExtMod|
|00004f50| 75 6c 65 73 50 61 72 61 | 6d 42 6c 6f 63 6b 50 74 |ulesPara|mBlockPt|
|00004f60| 72 3b 0d 0d 0d 7b 24 41 | 4c 49 47 4e 20 52 45 53 |r;...{$A|LIGN RES|
|00004f70| 45 54 7d 0d 0d 0d 0d 7b | 2a 2a 2a 2a 2a 2a 2a 2a |ET}....{|********|
|00004f80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004f90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004fa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004fb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004fc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004fd0| 2a 09 09 09 7d 0d 7b 2a | 2a 2a 2a 2a 2a 2a 2a 2a |*...}.{*|********|
|00004fe0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004ff0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005000| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005010| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005020| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005030| 09 09 09 7d 0d 7b 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |...}.{**|********|
|00005040| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005050| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005060| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005070| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005080| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 09 |********|*******.|
|00005090| 09 09 7d 0d 0d 7b 09 09 | 09 20 20 44 65 63 6c 61 |..}..{..|. Decla|
|000050a0| 72 61 74 69 6f 6e 73 20 | 6f 66 20 61 6c 6c 20 72 |rations |of all r|
|000050b0| 6f 75 74 69 6e 65 73 20 | 70 72 6f 76 69 64 65 64 |outines |provided|
|000050c0| 20 62 79 20 70 72 6f 20 | 46 69 74 2e 09 09 09 09 | by pro |Fit.....|
|000050d0| 09 09 09 09 7d 0d 7b 20 | 09 09 09 09 09 09 09 09 |....}.{ |........|
|000050e0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 7d 0d 7b |........|.....}.{|
|000050f0| 20 46 6f 72 20 61 6e 20 | 65 78 70 6c 61 69 6e 61 | For an |explaina|
|00005100| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 6d 65 61 6e |tion of |the mean|
|00005110| 69 6e 67 20 6f 66 20 74 | 68 65 20 76 61 72 69 6f |ing of t|he vario|
|00005120| 75 73 20 70 61 72 61 6d | 65 74 65 72 73 20 61 6e |us param|eters an|
|00005130| 64 20 74 68 65 20 72 65 | 74 75 72 6e 20 76 61 6c |d the re|turn val|
|00005140| 75 65 73 20 73 65 65 20 | 09 09 09 09 7d 0d 7b 20 |ues see |....}.{ |
|00005150| 74 68 65 20 70 72 6f 20 | 46 69 74 20 75 73 65 72 |the pro |Fit user|
|00005160| 20 6d 61 6e 75 61 6c 20 | 2e 20 09 09 09 09 09 09 | manual |. ......|
|00005170| 09 09 09 09 09 09 09 09 | 09 09 7d 0d 0d 0d 0d 7b |........|..}....{|
|00005180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000051a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000051b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000051c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 09 09 |********|******..|
|000051d0| 09 7d 0d 7b 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.}.{****|********|
|000051e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000051f0| 2a 2a 2a 2a 2a 20 69 6e | 70 75 74 2f 6f 75 74 70 |***** in|put/outp|
|00005200| 75 74 20 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ut *****|********|
|00005210| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005220| 2a 2a 09 09 09 7d 0d 0d | 09 66 75 6e 63 74 69 6f |**...}..|.functio|
|00005230| 6e 20 49 6e 70 75 74 42 | 6f 78 20 28 6e 72 41 72 |n InputB|ox (nrAr|
|00005240| 67 73 3a 20 69 6e 74 65 | 67 65 72 3b 20 76 61 72 |gs: inte|ger; var|
|00005250| 20 72 3a 20 69 6e 70 75 | 74 52 65 63 29 3a 20 62 | r: inpu|tRec): b|
|00005260| 6f 6f 6c 65 61 6e 3b 0d | 7b 20 53 68 6f 77 73 20 |oolean;.|{ Shows |
|00005270| 61 20 64 69 61 6c 6f 67 | 20 62 6f 78 20 77 69 74 |a dialog| box wit|
|00005280| 68 20 6e 72 41 72 67 73 | 20 28 62 65 74 77 65 65 |h nrArgs| (betwee|
|00005290| 6e 20 31 20 61 6e 64 20 | 36 3d 6d 61 78 4e 72 49 |n 1 and |6=maxNrI|
|000052a0| 6e 70 75 74 56 61 6c 75 | 65 73 29 20 69 6e 70 75 |nputValu|es) inpu|
|000052b0| 74 20 76 61 6c 75 65 73 | 20 7d 0d 7b 20 72 20 63 |t values| }.{ r c|
|000052c0| 6f 6e 74 61 69 6e 73 20 | 61 20 74 69 74 6c 65 20 |ontains |a title |
|000052d0| 61 6e 64 20 61 20 6e 75 | 6d 65 72 69 63 20 66 69 |and a nu|meric fi|
|000052e0| 65 6c 64 20 66 6f 72 20 | 65 76 65 72 79 20 61 72 |eld for |every ar|
|000052f0| 67 75 6d 65 6e 74 20 7d | 0d 7b 20 54 68 65 20 64 |gument }|.{ The d|
|00005300| 65 66 61 75 6c 74 20 77 | 61 79 20 74 6f 20 64 69 |efault w|ay to di|
|00005310| 73 70 6c 61 79 20 61 6e | 20 69 6e 70 75 74 20 76 |splay an| input v|
|00005320| 61 6c 75 65 20 69 73 20 | 61 6e 20 6e 75 6d 62 65 |alue is |an numbe|
|00005330| 72 69 63 20 65 64 69 74 | 20 66 69 65 6c 64 20 77 |ric edit| field w|
|00005340| 69 74 68 20 61 20 74 69 | 74 6c 65 20 7d 0d 7b 20 |ith a ti|tle }.{ |
|00005350| 49 66 20 74 68 65 20 74 | 69 74 6c 65 20 27 74 74 |If the t|itle 'tt|
|00005360| 74 27 20 73 74 61 72 74 | 73 20 77 69 74 68 20 61 |t' start|s with a|
|00005370| 20 27 24 27 20 6f 74 68 | 65 72 20 69 6e 74 65 72 | '$' oth|er inter|
|00005380| 66 61 63 65 20 65 6c 65 | 6d 65 6e 74 73 20 61 72 |face ele|ments ar|
|00005390| 65 20 64 69 73 70 6c 61 | 79 65 64 3a 20 7d 0d 7b |e displa|yed: }.{|
|000053a0| 20 2d 20 27 24 57 74 74 | 74 27 20 73 68 6f 77 73 | - '$Wtt|t' shows|
|000053b0| 20 61 20 70 6f 70 75 70 | 20 6d 65 6e 75 20 74 6f | a popup| menu to|
|000053c0| 20 73 65 6c 65 63 74 20 | 61 20 64 61 74 61 20 77 | select |a data w|
|000053d0| 69 6e 64 6f 77 20 7d 0d | 7b 20 2d 20 27 24 43 74 |indow }.|{ - '$Ct|
|000053e0| 74 74 27 20 73 68 6f 77 | 73 20 61 20 70 6f 70 75 |tt' show|s a popu|
|000053f0| 70 20 6d 65 6e 75 20 74 | 6f 20 73 65 6c 65 63 74 |p menu t|o select|
|00005400| 20 61 20 63 6f 6c 75 6d | 6e 20 7d 0d 7b 20 2d 20 | a colum|n }.{ - |
|00005410| 27 24 50 6d 6d 6d 24 74 | 74 74 27 20 73 68 6f 77 |'$Pmmm$t|tt' show|
|00005420| 73 20 61 20 75 73 65 72 | 20 64 65 66 69 6e 65 64 |s a user| defined|
|00005430| 20 70 6f 70 75 70 20 6d | 65 6e 75 20 27 6d 6d 6d | popup m|enu 'mmm|
|00005440| 27 20 28 65 61 63 68 20 | 65 6e 74 72 79 20 73 65 |' (each |entry se|
|00005450| 70 61 72 61 74 65 64 20 | 62 79 20 61 20 27 3b 27 |parated |by a ';'|
|00005460| 29 20 7d 0d 7b 20 2d 20 | 27 24 58 74 74 74 27 20 |) }.{ - |'$Xttt' |
|00005470| 73 68 6f 77 73 20 61 20 | 63 68 65 63 6b 20 62 6f |shows a |check bo|
|00005480| 78 20 7d 0d 7b 20 2d 20 | 27 24 53 74 74 74 27 20 |x }.{ - |'$Sttt' |
|00005490| 73 68 6f 77 73 20 61 6e | 20 65 64 69 74 20 66 69 |shows an| edit fi|
|000054a0| 65 6c 64 20 74 6f 20 69 | 6e 70 75 74 20 61 20 73 |eld to i|nput a s|
|000054b0| 74 72 69 6e 67 20 7d 0d | 7b 20 72 65 74 75 72 6e |tring }.|{ return|
|000054c0| 73 20 74 72 75 65 20 69 | 66 20 73 74 6f 70 2c 20 |s true i|f stop, |
|000054d0| 66 61 6c 73 65 20 6f 74 | 68 65 72 77 69 73 65 20 |false ot|herwise |
|000054e0| 7d 0d 0d 09 66 75 6e 63 | 74 69 6f 6e 20 41 6c 65 |}...func|tion Ale|
|000054f0| 72 74 42 6f 78 20 28 73 | 3a 20 73 74 72 32 35 35 |rtBox (s|: str255|
|00005500| 29 3a 20 62 6f 6f 6c 65 | 61 6e 3b 0d 7b 20 73 68 |): boole|an;.{ sh|
|00005510| 6f 77 73 20 61 6e 20 61 | 6c 65 72 74 20 62 6f 78 |ows an a|lert box|
|00005520| 20 77 69 74 68 20 6d 65 | 73 73 61 67 65 20 73 20 | with me|ssage s |
|00005530| 61 6e 64 20 74 77 6f 20 | 62 75 74 74 6f 6e 73 20 |and two |buttons |
|00005540| 28 4f 4b 2c 20 20 53 54 | 4f 50 29 20 09 09 09 7d |(OK, ST|OP) ...}|
|00005550| 0d 7b 20 72 65 74 75 72 | 6e 73 20 74 72 75 65 20 |.{ retur|ns true |
|00005560| 69 66 20 73 74 6f 70 2c | 20 66 61 6c 73 65 20 69 |if stop,| false i|
|00005570| 66 20 6f 6b 20 09 09 09 | 7d 0d 0d 09 70 72 6f 63 |f ok ...|}...proc|
|00005580| 65 64 75 72 65 20 53 65 | 74 42 6f 78 54 69 74 6c |edure Se|tBoxTitl|
|00005590| 65 28 74 69 74 6c 65 3a | 20 53 74 72 32 35 35 29 |e(title:| Str255)|
|000055a0| 3b 0d 7b 20 53 65 74 73 | 20 74 68 65 20 74 69 74 |;.{ Sets| the tit|
|000055b0| 6c 65 20 6f 66 20 74 68 | 65 20 64 69 61 6c 6f 67 |le of th|e dialog|
|000055c0| 20 62 6f 78 20 69 6e 20 | 74 68 65 20 6e 65 78 74 | box in |the next|
|000055d0| 20 63 61 6c 6c 20 74 6f | 20 49 6e 70 75 74 42 6f | call to| InputBo|
|000055e0| 78 2e 20 7d 0d 7b 20 42 | 79 20 64 65 66 61 75 6c |x. }.{ B|y defaul|
|000055f0| 74 2c 20 74 68 69 73 20 | 62 6f 78 20 64 6f 65 73 |t, this |box does|
|00005600| 20 6e 6f 74 20 68 61 76 | 65 20 61 20 74 69 74 6c | not hav|e a titl|
|00005610| 65 2e 20 7d 0d 0d 09 66 | 75 6e 63 74 69 6f 6e 20 |e. }...f|unction |
|00005620| 41 73 6b 42 6f 78 20 28 | 76 61 72 20 61 6e 73 77 |AskBox (|var answ|
|00005630| 65 72 3a 20 69 6e 74 65 | 67 65 72 3b 20 73 3a 20 |er: inte|ger; s: |
|00005640| 73 74 72 32 35 35 29 3a | 20 62 6f 6f 6c 65 61 6e |str255):| boolean|
|00005650| 3b 0d 7b 20 73 68 6f 77 | 73 20 61 6c 65 72 74 20 |;.{ show|s alert |
|00005660| 62 6f 78 20 77 69 74 68 | 20 6d 65 73 73 61 67 65 |box with| message|
|00005670| 20 73 20 61 6e 64 20 74 | 68 72 65 65 20 62 75 74 | s and t|hree but|
|00005680| 74 6f 6e 73 20 28 59 45 | 53 2c 20 4e 4f 2c 20 53 |tons (YE|S, NO, S|
|00005690| 54 4f 50 29 20 09 09 09 | 7d 0d 7b 20 72 65 74 75 |TOP) ...|}.{ retu|
|000056a0| 72 6e 73 20 74 72 75 65 | 20 69 66 20 73 74 6f 70 |rns true| if stop|
|000056b0| 2c 20 65 6c 73 65 20 66 | 61 6c 73 65 20 09 09 09 |, else f|alse ...|
|000056c0| 7d 0d 7b 20 69 66 20 6e | 6f 74 20 73 74 6f 70 2c |}.{ if n|ot stop,|
|000056d0| 20 61 6e 73 77 65 72 20 | 3d 20 30 20 66 6f 72 20 | answer |= 0 for |
|000056e0| 6e 6f 20 61 6e 64 20 31 | 20 66 6f 72 20 79 65 73 |no and 1| for yes|
|000056f0| 20 09 09 09 7d 0d 0d 09 | 70 72 6f 63 65 64 75 72 | ...}...|procedur|
|00005700| 65 20 57 72 69 74 65 53 | 74 72 69 6e 67 20 28 73 |e WriteS|tring (s|
|00005710| 3a 20 53 74 72 32 35 35 | 29 3b 0d 7b 20 77 72 69 |: Str255|);.{ wri|
|00005720| 74 65 73 20 73 20 69 6e | 74 6f 20 74 68 65 20 72 |tes s in|to the r|
|00005730| 65 73 75 6c 74 73 20 77 | 69 6e 64 6f 77 20 09 09 |esults w|indow ..|
|00005740| 09 7d 0d 0d 09 70 72 6f | 63 65 64 75 72 65 20 57 |.}...pro|cedure W|
|00005750| 72 69 74 65 6c 6e 53 74 | 72 69 6e 67 20 28 73 3a |ritelnSt|ring (s:|
|00005760| 20 53 74 72 32 35 35 29 | 3b 0d 7b 20 77 72 69 74 | Str255)|;.{ writ|
|00005770| 65 73 20 73 20 69 6e 74 | 6f 20 74 68 65 20 72 65 |es s int|o the re|
|00005780| 73 75 6c 74 73 20 77 69 | 6e 64 6f 77 20 61 6e 64 |sults wi|ndow and|
|00005790| 20 67 6f 65 73 20 74 6f | 20 61 20 6e 65 77 20 6c | goes to| a new l|
|000057a0| 69 6e 65 20 09 09 09 7d | 0d 0d 09 70 72 6f 63 65 |ine ...}|...proce|
|000057b0| 64 75 72 65 20 57 72 69 | 74 65 54 65 78 74 20 28 |dure Wri|teText (|
|000057c0| 6c 65 6e 67 74 68 3a 20 | 6c 6f 6e 67 69 6e 74 3b |length: |longint;|
|000057d0| 20 74 68 65 54 65 78 74 | 3a 20 50 74 72 29 3b 0d | theText|: Ptr);.|
|000057e0| 7b 20 77 72 69 74 65 73 | 20 61 20 74 65 78 74 20 |{ writes| a text |
|000057f0| 74 6f 20 74 68 65 20 72 | 65 73 75 6c 74 73 20 77 |to the r|esults w|
|00005800| 69 6e 64 6f 77 2e 20 74 | 68 65 20 70 6f 69 6e 74 |indow. t|he point|
|00005810| 65 72 20 74 68 65 54 65 | 78 74 20 70 6f 69 6e 74 |er theTe|xt point|
|00005820| 73 20 74 6f 20 74 68 65 | 20 66 69 72 73 74 20 7d |s to the| first }|
|00005830| 0d 7b 20 63 68 61 72 61 | 63 74 65 72 20 6f 66 20 |.{ chara|cter of |
|00005840| 74 68 65 20 74 65 78 74 | 2e 20 22 6c 65 6e 67 74 |the text|. "lengt|
|00005850| 68 22 20 6d 75 73 74 20 | 67 69 76 65 20 74 68 65 |h" must |give the|
|00005860| 20 6c 65 6e 67 74 68 20 | 6f 66 20 74 68 65 20 74 | length |of the t|
|00005870| 65 78 74 09 09 09 7d 0d | 0d 09 70 72 6f 63 65 64 |ext...}.|..proced|
|00005880| 75 72 65 20 57 72 69 74 | 65 49 6e 74 20 28 69 3a |ure Writ|eInt (i:|
|00005890| 20 6c 6f 6e 67 69 6e 74 | 29 3b 0d 7b 20 77 72 69 | longint|);.{ wri|
|000058a0| 74 65 73 20 61 6e 20 69 | 6e 74 65 67 65 72 20 76 |tes an i|nteger v|
|000058b0| 61 6c 75 65 20 74 6f 20 | 74 68 65 20 72 65 73 75 |alue to |the resu|
|000058c0| 6c 74 73 20 77 69 6e 64 | 6f 77 20 09 09 09 7d 0d |lts wind|ow ...}.|
|000058d0| 0d 09 70 72 6f 63 65 64 | 75 72 65 20 57 72 69 74 |..proced|ure Writ|
|000058e0| 65 4e 75 6d 62 65 72 20 | 28 64 3a 20 65 78 74 65 |eNumber |(d: exte|
|000058f0| 6e 64 65 64 29 3b 0d 7b | 20 77 72 69 74 65 73 20 |nded);.{| writes |
|00005900| 61 20 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |a floati|ng point|
|00005910| 20 76 61 6c 75 65 20 74 | 6f 20 74 68 65 20 72 65 | value t|o the re|
|00005920| 73 75 6c 74 73 20 77 69 | 6e 64 6f 77 20 09 09 09 |sults wi|ndow ...|
|00005930| 7d 0d 0d 09 70 72 6f 63 | 65 64 75 72 65 20 4e 75 |}...proc|edure Nu|
|00005940| 6d 62 65 72 54 6f 53 74 | 72 32 35 35 28 78 3a 20 |mberToSt|r255(x: |
|00005950| 65 78 74 65 6e 64 65 64 | 3b 20 76 61 72 20 73 3a |extended|; var s:|
|00005960| 20 53 74 72 32 35 35 3b | 20 66 6f 72 6d 61 74 2c | Str255;| format,|
|00005970| 20 64 69 67 69 74 73 3a | 69 6e 74 65 67 65 72 29 | digits:|integer)|
|00005980| 3b 0d 7b 20 63 6f 6e 76 | 65 72 74 73 20 74 68 65 |;.{ conv|erts the|
|00005990| 20 6e 75 6d 62 65 72 20 | 78 20 69 6e 74 6f 20 61 | number |x into a|
|000059a0| 20 73 74 72 69 6e 67 20 | 7d 0d 7b 20 66 6f 72 6d | string |}.{ form|
|000059b0| 61 74 2f 64 69 67 69 74 | 73 3a 20 63 6f 6e 74 72 |at/digit|s: contr|
|000059c0| 6f 6c 73 20 74 68 65 20 | 63 6f 6e 76 65 72 73 69 |ols the |conversi|
|000059d0| 6f 6e 20 70 72 6f 63 65 | 73 73 2e 20 7d 0d 7b 09 |on proce|ss. }.{.|
|000059e0| 66 6f 72 6d 61 74 20 3d | 20 30 3a 09 20 09 6e 6f |format =| 0:. .no|
|000059f0| 72 6d 61 6c 20 63 6f 6e | 76 65 72 73 69 6f 6e 20 |rmal con|version |
|00005a00| 7d 0d 7b 09 09 09 09 09 | 69 66 20 64 69 67 69 74 |}.{.....|if digit|
|00005a10| 73 3e 30 3a 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |s>0: the| number |
|00005a20| 6f 66 20 64 69 67 69 74 | 73 20 61 66 74 65 72 20 |of digit|s after |
|00005a30| 74 68 65 20 27 2e 27 2c | 20 7d 0d 7b 09 09 09 09 |the '.',| }.{....|
|00005a40| 09 69 66 20 64 69 67 69 | 74 73 3c 30 3a 20 74 68 |.if digi|ts<0: th|
|00005a50| 65 20 74 6f 74 61 6c 20 | 6e 75 6d 62 65 72 20 6f |e total |number o|
|00005a60| 66 20 64 69 67 69 74 73 | 20 28 61 70 70 72 6f 78 |f digits| (approx|
|00005a70| 2e 29 20 7d 0d 7b 20 20 | 66 6f 72 6d 61 74 20 3d |.) }.{ |format =|
|00005a80| 20 31 3a 09 09 6f 70 74 | 69 6d 69 7a 65 64 20 63 | 1:..opt|imized c|
|00005a90| 6f 6e 76 65 72 73 69 6f | 6e 2c 20 72 65 6d 6f 76 |onversio|n, remov|
|00005aa0| 65 73 20 75 6e 6e 65 63 | 65 73 73 61 72 79 20 74 |es unnec|essary t|
|00005ab0| 72 61 69 6c 69 6e 67 20 | 7a 65 72 6f 73 20 61 66 |railing |zeros af|
|00005ac0| 74 65 72 20 7d 0d 7b 09 | 09 09 09 09 74 68 65 20 |ter }.{.|....the |
|00005ad0| 64 65 63 69 6d 61 6c 20 | 70 6f 69 6e 74 2c 20 6c |decimal |point, l|
|00005ae0| 65 61 64 69 6e 67 20 73 | 70 61 63 65 73 2c 20 75 |eading s|paces, u|
|00005af0| 6e 65 63 65 73 73 61 72 | 79 20 27 2b 27 2d 73 69 |necessar|y '+'-si|
|00005b00| 67 6e 73 2c 20 65 74 63 | 20 7d 0d 7b 09 09 09 09 |gns, etc| }.{....|
|00005b10| 09 64 69 67 69 74 73 3a | 20 74 68 65 20 6e 75 6d |.digits:| the num|
|00005b20| 62 65 72 20 6f 66 20 64 | 69 67 69 74 73 20 7d 0d |ber of d|igits }.|
|00005b30| 0d 09 66 75 6e 63 74 69 | 6f 6e 20 53 74 72 32 35 |..functi|on Str25|
|00005b40| 35 54 6f 4e 75 6d 62 65 | 72 28 73 3a 20 53 74 72 |5ToNumbe|r(s: Str|
|00005b50| 32 35 35 3b 20 76 61 72 | 20 78 3a 20 65 78 74 65 |255; var| x: exte|
|00005b60| 6e 64 65 64 29 3a 69 6e | 74 65 67 65 72 3b 0d 7b |nded):in|teger;.{|
|00005b70| 20 63 6f 6e 76 65 72 74 | 73 20 73 74 72 69 6e 67 | convert|s string|
|00005b80| 20 73 20 74 6f 20 61 20 | 6e 75 6d 62 65 72 20 78 | s to a |number x|
|00005b90| 2e 20 73 20 63 61 6e 20 | 62 65 20 61 20 6e 75 6d |. s can |be a num|
|00005ba0| 65 72 69 63 20 73 74 72 | 69 6e 67 20 6f 72 20 61 |eric str|ing or a|
|00005bb0| 6e 20 65 78 70 72 65 73 | 73 69 6f 6e 20 7d 0d 7b |n expres|sion }.{|
|00005bc0| 20 72 65 74 75 72 6e 20 | 76 61 6c 75 65 73 3a 20 | return |values: |
|00005bd0| 7d 0d 7b 09 30 3a 09 09 | 63 6f 6e 76 65 72 73 69 |}.{.0:..|conversi|
|00005be0| 6f 6e 20 73 75 63 63 65 | 73 73 66 75 6c 20 7d 0d |on succe|ssful }.|
|00005bf0| 7b 09 31 3a 09 09 78 20 | 69 73 20 69 6e 66 69 6e |{.1:..x |is infin|
|00005c00| 69 74 65 20 7d 0d 7b 09 | 32 3a 09 09 73 20 69 73 |ite }.{.|2:..s is|
|00005c10| 20 65 6d 70 74 79 20 7d | 0d 7b 09 33 3a 09 09 78 | empty }|.{.3:..x|
|00005c20| 20 69 73 20 61 6e 20 4e | 41 4e 20 28 69 6e 76 61 | is an N|AN (inva|
|00005c30| 6c 69 64 20 6e 75 6d 62 | 65 72 29 20 7d 0d 7b 09 |lid numb|er) }.{.|
|00005c40| 34 3a 09 09 75 73 65 72 | 20 61 62 6f 72 74 65 64 |4:..user| aborted|
|00005c50| 20 63 61 6c 63 75 6c 61 | 74 69 6f 6e 20 7d 0d 7b | calcula|tion }.{|
|00005c60| 09 35 3a 09 09 72 75 6e | 20 74 69 6d 65 20 65 72 |.5:..run| time er|
|00005c70| 72 6f 72 20 7d 0d 0d 0d | 7b 2a 2a 2a 2a 2a 2a 2a |ror }...|{*******|
|00005c80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005c90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005ca0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005cb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005cc0| 2a 2a 2a 2a 2a 2a 2a 09 | 09 09 7d 0d 7b 2a 2a 2a |*******.|..}.{***|
|00005cd0| 2a 2a 2a 2a 2a 2a 20 20 | 20 72 65 64 69 72 65 63 |****** | redirec|
|00005ce0| 74 69 6e 67 20 74 65 78 | 74 20 74 6f 20 74 68 65 |ting tex|t to the|
|00005cf0| 20 72 65 73 75 6c 74 73 | 20 77 69 6e 64 6f 77 20 | results| window |
|00005d00| 6f 72 20 74 6f 20 74 65 | 78 74 20 66 69 6c 65 73 |or to te|xt files|
|00005d10| 20 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 09 09 09 7d 0d | *******|***...}.|
|00005d20| 0d 0d 09 66 75 6e 63 74 | 69 6f 6e 20 43 72 65 61 |...funct|ion Crea|
|00005d30| 74 65 54 65 78 74 46 69 | 6c 65 20 28 66 69 6c 65 |teTextFi|le (file|
|00005d40| 4e 61 6d 65 3a 20 53 74 | 72 32 35 35 29 3a 20 6c |Name: St|r255): l|
|00005d50| 6f 6e 67 69 6e 74 3b 0d | 0d 7b 09 09 63 72 65 61 |ongint;.|.{..crea|
|00005d60| 74 65 73 20 61 20 74 65 | 78 74 20 66 69 6c 65 20 |tes a te|xt file |
|00005d70| 77 69 74 68 20 74 68 65 | 20 67 69 76 65 6e 20 6e |with the| given n|
|00005d80| 61 6d 65 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |ame and |returns |
|00005d90| 61 09 09 09 09 09 09 09 | 09 09 7d 0d 7b 09 09 72 |a.......|..}.{..r|
|00005da0| 65 66 65 72 65 6e 63 65 | 20 6e 75 6d 62 65 72 20 |eference| number |
|00005db0| 75 73 65 64 20 74 6f 20 | 69 64 65 6e 74 69 66 79 |used to |identify|
|00005dc0| 20 74 68 69 73 20 66 69 | 6c 65 2e 09 09 09 09 09 | this fi|le......|
|00005dd0| 09 7d 0d 7b 09 09 43 61 | 6c 6c 20 74 68 65 20 72 |.}.{..Ca|ll the r|
|00005de0| 6f 75 74 69 6e 65 20 57 | 72 69 74 65 54 6f 54 65 |outine W|riteToTe|
|00005df0| 78 74 46 69 6c 65 28 29 | 20 74 6f 20 72 65 64 69 |xtFile()| to redi|
|00005e00| 72 65 63 74 20 74 68 65 | 09 09 09 09 09 09 7d 0d |rect the|......}.|
|00005e10| 7b 09 09 6f 75 74 70 75 | 74 20 66 72 6f 6d 20 63 |{..outpu|t from c|
|00005e20| 61 6c 6c 73 20 74 6f 20 | 77 72 69 74 65 2f 77 72 |alls to |write/wr|
|00005e30| 69 74 6c 6e 2f 77 72 69 | 74 65 6e 75 6d 62 65 72 |itln/wri|tenumber|
|00005e40| 20 69 6e 74 6f 20 74 68 | 69 73 20 66 69 6c 65 2e | into th|is file.|
|00005e50| 09 09 09 09 09 09 7d 0d | 0d 0d 09 70 72 6f 63 65 |......}.|...proce|
|00005e60| 64 75 72 65 20 43 6c 6f | 73 65 54 65 78 74 46 69 |dure Clo|seTextFi|
|00005e70| 6c 65 20 28 66 69 6c 65 | 52 65 66 4e 75 6d 62 65 |le (file|RefNumbe|
|00005e80| 72 3a 20 6c 6f 6e 67 69 | 6e 74 29 3b 0d 0d 7b 09 |r: longi|nt);..{.|
|00005e90| 09 43 6c 6f 73 65 73 20 | 74 68 65 20 74 65 78 74 |.Closes |the text|
|00005ea0| 20 66 69 6c 65 20 77 69 | 74 68 20 74 68 65 20 67 | file wi|th the g|
|00005eb0| 69 76 65 6e 20 72 65 66 | 65 72 65 6e 63 65 20 6e |iven ref|erence n|
|00005ec0| 75 6d 62 65 72 2e 20 09 | 09 09 09 09 09 7d 0d 7b |umber. .|.....}.{|
|00005ed0| 09 09 54 68 65 20 63 61 | 6c 6c 73 20 74 6f 20 77 |..The ca|lls to w|
|00005ee0| 72 69 74 65 2f 77 72 69 | 74 6c 6e 2f 77 72 69 74 |rite/wri|tln/writ|
|00005ef0| 65 6e 75 6d 62 65 72 20 | 69 73 20 72 65 64 69 72 |enumber |is redir|
|00005f00| 65 63 74 65 64 20 62 61 | 63 6b 20 74 6f 09 09 09 |ected ba|ck to...|
|00005f10| 09 09 09 7d 0d 7b 09 09 | 74 68 65 20 72 65 73 75 |...}.{..|the resu|
|00005f20| 6c 74 73 20 77 69 6e 64 | 6f 77 2e 09 09 09 09 09 |lts wind|ow......|
|00005f30| 09 7d 0d 0d 0d 09 70 72 | 6f 63 65 64 75 72 65 20 |.}....pr|ocedure |
|00005f40| 57 72 69 74 65 54 6f 54 | 65 78 74 46 69 6c 65 20 |WriteToT|extFile |
|00005f50| 28 66 69 6c 65 52 65 66 | 4e 75 6d 62 65 72 3a 20 |(fileRef|Number: |
|00005f60| 6c 6f 6e 67 69 6e 74 29 | 3b 0d 0d 7b 09 09 72 65 |longint)|;..{..re|
|00005f70| 64 69 72 65 63 74 73 20 | 74 68 65 20 6f 75 74 70 |directs |the outp|
|00005f80| 75 74 20 6f 66 20 74 68 | 65 20 70 72 6f 20 46 69 |ut of th|e pro Fi|
|00005f90| 74 20 22 77 72 69 74 65 | 2f 77 72 69 74 65 6c 6e |t "write|/writeln|
|00005fa0| 2f 77 72 69 74 65 6e 75 | 6d 62 65 72 22 09 09 09 |/writenu|mber"...|
|00005fb0| 09 09 09 7d 0d 7b 09 09 | 72 6f 75 74 69 6e 65 73 |...}.{..|routines|
|00005fc0| 20 74 6f 20 74 68 65 20 | 67 69 76 65 6e 20 74 65 | to the |given te|
|00005fd0| 78 74 20 66 69 6c 65 2e | 09 09 09 09 09 09 7d 0d |xt file.|......}.|
|00005fe0| 7b 09 09 20 09 09 09 09 | 09 09 7d 0d 7b 09 09 63 |{.. ....|..}.{..c|
|00005ff0| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00006000| 20 77 69 74 68 20 66 69 | 6c 65 52 65 66 4e 75 6d | with fi|leRefNum|
|00006010| 62 65 72 3d 3d 30 20 74 | 6f 20 64 69 72 65 63 74 |ber==0 t|o direct|
|00006020| 20 74 68 65 20 74 65 78 | 74 09 09 09 09 09 09 7d | the tex|t......}|
|00006030| 0d 7b 09 09 77 72 69 74 | 69 6e 67 20 72 6f 75 74 |.{..writ|ing rout|
|00006040| 69 6e 65 73 20 62 61 63 | 6b 20 74 6f 20 74 68 65 |ines bac|k to the|
|00006050| 20 72 65 73 75 6c 74 73 | 20 77 69 6e 64 6f 77 2e | results| window.|
|00006060| 09 09 09 09 09 09 7d 0d | 0d 0d 0d 0d 7b 2a 2a 2a |......}.|....{***|
|00006070| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00006080| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00006090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000060a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000060b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 09 09 09 09 09 |********|***.....|
|000060c0| 09 7d 0d 7b 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.}.{****|********|
|000060d0| 2a 2a 2a 20 77 69 6e 64 | 6f 77 20 61 6e 64 20 64 |*** wind|ow and d|
|000060e0| 6f 63 75 6d 65 6e 74 20 | 6d 61 6e 61 67 65 6d 65 |ocument |manageme|
|000060f0| 6e 74 20 72 6f 75 74 69 | 6e 65 73 20 2a 2a 2a 2a |nt routi|nes ****|
|00006100| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00006110| 2a 2a 09 09 09 09 09 09 | 7d 0d 0d 09 66 75 6e 63 |**......|}...func|
|00006120| 74 69 6f 6e 20 47 65 74 | 46 72 6f 6e 74 57 69 6e |tion Get|FrontWin|
|00006130| 64 6f 77 3a 20 6c 6f 6e | 67 69 6e 74 3b 0d 0d 7b |dow: lon|gint;..{|
|00006140| 09 09 52 65 74 75 72 6e | 73 20 74 68 65 20 69 64 |..Return|s the id|
|00006150| 65 6e 74 69 66 69 63 61 | 74 69 6f 6e 20 6e 75 6d |entifica|tion num|
|00006160| 62 65 72 20 6f 66 20 74 | 68 65 20 66 72 6f 6e 74 |ber of t|he front|
|00006170| 6d 6f 73 74 20 77 69 6e | 64 6f 77 09 09 09 09 09 |most win|dow.....|
|00006180| 09 7d 0d 0d 0d 09 70 72 | 6f 63 65 64 75 72 65 20 |.}....pr|ocedure |
|00006190| 44 6f 4e 65 77 57 69 6e | 64 6f 77 20 28 77 69 6e |DoNewWin|dow (win|
|000061a0| 64 6f 77 54 79 70 65 3a | 20 4f 53 54 79 70 65 29 |dowType:| OSType)|
|000061b0| 3b 0d 0d 7b 09 09 63 72 | 65 61 74 65 73 20 61 20 |;..{..cr|eates a |
|000061c0| 6e 65 77 20 77 69 6e 64 | 6f 77 2e 20 77 69 6e 64 |new wind|ow. wind|
|000061d0| 6f 77 54 79 70 65 20 63 | 61 6e 20 74 61 6b 65 20 |owType c|an take |
|000061e0| 6f 6e 65 20 6f 66 20 74 | 68 65 20 66 6f 6c 6c 6f |one of t|he follo|
|000061f0| 77 69 6e 67 20 76 61 6c | 75 65 73 3a 09 09 09 09 |wing val|ues:....|
|00006200| 09 09 7d 0d 7b 09 09 09 | 64 72 61 77 69 6e 67 54 |..}.{...|drawingT|
|00006210| 79 70 65 3a 09 63 72 65 | 61 74 65 20 61 20 64 72 |ype:.cre|ate a dr|
|00006220| 61 77 69 6e 67 20 77 69 | 6e 64 6f 77 09 09 09 09 |awing wi|ndow....|
|00006230| 09 09 7d 0d 7b 09 09 09 | 64 61 74 61 54 79 70 65 |..}.{...|dataType|
|00006240| 3a 09 09 63 72 65 61 74 | 65 20 61 20 64 61 74 61 |:..creat|e a data|
|00006250| 20 77 69 6e 64 6f 77 09 | 09 09 09 09 09 7d 0d 7b | window.|.....}.{|
|00006260| 09 09 09 74 65 78 74 54 | 79 70 65 09 09 63 72 65 |...textT|ype..cre|
|00006270| 61 74 65 20 61 20 74 65 | 78 74 20 77 69 6e 64 6f |ate a te|xt windo|
|00006280| 77 09 09 09 09 09 09 7d | 0d 0d 0d 09 70 72 6f 63 |w......}|....proc|
|00006290| 65 64 75 72 65 20 53 65 | 74 43 75 72 72 65 6e 74 |edure Se|tCurrent|
|000062a0| 57 69 6e 64 6f 77 20 28 | 77 69 6e 64 6f 77 49 44 |Window (|windowID|
|000062b0| 3a 20 6c 6f 6e 67 69 6e | 74 29 3b 0d 0d 7b 09 09 |: longin|t);..{..|
|000062c0| 6d 61 6b 65 73 20 74 68 | 65 20 77 69 6e 64 6f 77 |makes th|e window|
|000062d0| 20 77 69 74 68 20 74 68 | 65 20 67 69 76 65 6e 20 | with th|e given |
|000062e0| 49 44 20 6e 75 6d 62 65 | 72 20 74 68 65 20 63 75 |ID numbe|r the cu|
|000062f0| 72 72 65 6e 74 20 77 69 | 6e 64 6f 77 20 74 6f 09 |rrent wi|ndow to.|
|00006300| 09 09 09 09 09 7d 0d 7b | 09 09 62 65 20 75 73 65 |.....}.{|..be use|
|00006310| 64 20 66 6f 72 20 64 61 | 74 61 2c 20 70 6c 6f 74 |d for da|ta, plot|
|00006320| 74 69 6e 67 2c 20 77 72 | 69 74 69 6e 67 2c 20 65 |ting, wr|iting, e|
|00006330| 74 63 2c 20 64 65 70 65 | 6e 64 69 6e 67 20 6f 6e |tc, depe|nding on|
|00006340| 20 69 74 73 20 74 79 70 | 65 2e 09 09 09 09 09 09 | its typ|e.......|
|00006350| 7d 0d 0d 0d 09 66 75 6e | 63 74 69 6f 6e 20 47 65 |}....fun|ction Ge|
|00006360| 74 43 75 72 72 65 6e 74 | 57 69 6e 64 6f 77 20 28 |tCurrent|Window (|
|00006370| 77 69 6e 64 6f 77 54 79 | 70 65 3a 20 4f 53 54 79 |windowTy|pe: OSTy|
|00006380| 70 65 29 3a 20 6c 6f 6e | 67 69 6e 74 3b 0d 0d 7b |pe): lon|gint;..{|
|00006390| 09 09 72 65 74 75 72 6e | 73 20 74 68 65 20 49 44 |..return|s the ID|
|000063a0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 68 65 20 63 | number |of the c|
|000063b0| 75 72 72 65 6e 74 20 77 | 69 6e 64 6f 77 20 6f 66 |urrent w|indow of|
|000063c0| 20 74 68 65 20 67 69 76 | 65 6e 20 74 79 70 65 09 | the giv|en type.|
|000063d0| 09 09 09 09 09 7d 0d 7b | 09 09 77 69 6e 64 6f 77 |.....}.{|..window|
|000063e0| 54 79 70 65 20 63 61 6e | 20 74 61 6b 65 20 6f 6e |Type can| take on|
|000063f0| 65 20 6f 66 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |e of the| followi|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.