home *** CD-ROM | disk | FTP | other *** search
/ Internet File Formats / InternetFileFormatsCD.bin / text / latex / mac / alpha.6.0.sit / Tcl / UserCode / number.tcl < prev    next >
MacBinary  |  1994-03-08  |  4.0 KB  |  [TEXT/ALFA]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Mar 8 16:46:38 1994, modified Tue Mar 8 16:46:38 1994, creator Alpha editor, type ASCII, 3484 bytes "number.tcl" , at 0xe1c 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ALFA]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 6e 75 6d 62 65 72 | 2e 74 63 6c 00 00 00 00 |..number|.tcl....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|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 41 4c 46 | 41 00 00 00 00 00 00 00 |.TEXTALF|A.......|
|00000050| 00 00 00 00 00 0d 9c 00 | 00 01 7e a9 a2 a2 be a9 |........|..~.....|
|00000060| a2 a2 be 00 00 04 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ca 73 00 00 |........|.....s..|
|00000080| 23 20 46 49 4c 45 3a 20 | 6e 75 6d 62 65 72 2e 74 |# FILE: |number.t|
|00000090| 63 6c 0d 23 0d 23 20 4c | 41 53 54 20 55 50 44 41 |cl.#.# L|AST UPDA|
|000000a0| 54 45 3a 20 30 31 2f 30 | 36 2f 39 33 20 34 3a 32 |TE: 01/0|6/93 4:2|
|000000b0| 37 3a 35 36 20 41 4d 0d | 23 0d 23 20 54 68 69 73 |7:56 AM.|#.# This|
|000000c0| 20 66 69 6c 65 20 63 6f | 6e 74 61 69 6e 73 20 74 | file co|ntains t|
|000000d0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 54 43 4c |he follo|wing TCL|
|000000e0| 20 70 72 6f 63 65 64 75 | 72 65 28 73 29 3a 0d 23 | procedu|re(s):.#|
|000000f0| 0d 23 09 6e 75 6d 62 65 | 72 20 2d 2d 20 52 65 74 |.#.numbe|r -- Ret|
|00000100| 75 72 6e 73 20 52 6f 6d | 61 6e 20 6f 72 20 61 6c |urns Rom|an or al|
|00000110| 70 68 61 62 65 74 69 63 | 20 65 71 75 69 76 61 6c |phabetic| equival|
|00000120| 65 6e 74 20 6e 75 6d 65 | 72 61 6c 73 0d 23 0d 23 |ent nume|rals.#.#|
|00000130| 20 09 54 68 69 73 20 70 | 72 6f 63 20 69 73 20 75 | .This p|roc is u|
|00000140| 73 65 66 75 6c 20 77 69 | 74 68 20 65 6c 65 63 74 |seful wi|th elect|
|00000150| 72 69 63 41 6c 69 61 73 | 20 64 65 66 69 6e 69 74 |ricAlias| definit|
|00000160| 69 6f 6e 73 20 61 73 20 | 66 6f 6c 6c 6f 77 73 3a |ions as |follows:|
|00000170| 0d 23 0d 23 20 09 65 6c | 65 63 74 72 69 63 41 6c |.#.# .el|ectricAl|
|00000180| 69 61 73 20 64 65 66 20 | a5 54 65 78 74 20 a5 69 |ias def |.Text .i|
|00000190| 20 20 22 a4 c7 73 65 74 | 20 69 74 65 6d 20 31 3b | "..set| item 1;|
|000001a0| 20 6e 75 6d 62 65 72 20 | 5c 24 69 74 65 6d 20 69 | number |\$item i|
|000001b0| c8 2e 22 0d 23 20 09 65 | 6c 65 63 74 72 69 63 41 |..".# .e|lectricA|
|000001c0| 6c 69 61 73 20 64 65 66 | 20 a5 54 65 78 74 20 a5 |lias def| .Text .|
|000001d0| 69 69 20 22 a4 c7 69 6e | 63 72 20 69 74 65 6d 3b |ii "..in|cr item;|
|000001e0| 20 6e 75 6d 62 65 72 20 | 5c 24 69 74 65 6d 20 69 | number |\$item i|
|000001f0| c8 2e 20 22 0d 23 20 09 | 65 6c 65 63 74 72 69 63 |.. ".# .|electric|
|00000200| 41 6c 69 61 73 20 64 65 | 66 20 a5 54 65 78 74 20 |Alias de|f .Text |
|00000210| a5 49 20 20 22 a4 c7 73 | 65 74 20 69 74 65 6d 20 |.I "..s|et item |
|00000220| 31 3b 20 6e 75 6d 62 65 | 72 20 5c 24 69 74 65 6d |1; numbe|r \$item|
|00000230| 20 49 c8 2e 22 0d 23 20 | 09 65 6c 65 63 74 72 69 | I..".# |.electri|
|00000240| 63 41 6c 69 61 73 20 64 | 65 66 20 a5 54 65 78 74 |cAlias d|ef .Text|
|00000250| 20 a5 49 49 20 22 a4 c7 | 69 6e 63 72 20 69 74 65 | .II "..|incr ite|
|00000260| 6d 3b 20 6e 75 6d 62 65 | 72 20 5c 24 69 74 65 6d |m; numbe|r \$item|
|00000270| 20 49 c8 2e 20 22 0d 23 | 20 20 09 65 6c 65 63 74 | I.. ".#| .elect|
|00000280| 72 69 63 41 6c 69 61 73 | 20 64 65 66 20 a5 54 65 |ricAlias| def .Te|
|00000290| 78 74 20 a5 61 20 20 22 | a4 c7 73 65 74 20 69 74 |xt .a "|..set it|
|000002a0| 65 6d 20 31 3b 20 6e 75 | 6d 62 65 72 20 5c 24 69 |em 1; nu|mber \$i|
|000002b0| 74 65 6d 20 61 c8 2e 22 | 0d 23 20 09 65 6c 65 63 |tem a.."|.# .elec|
|000002c0| 74 72 69 63 41 6c 69 61 | 73 20 64 65 66 20 a5 54 |tricAlia|s def .T|
|000002d0| 65 78 74 20 a5 61 61 20 | 22 a4 c7 69 6e 63 72 20 |ext .aa |"..incr |
|000002e0| 69 74 65 6d 3b 20 6e 75 | 6d 62 65 72 20 5c 24 69 |item; nu|mber \$i|
|000002f0| 74 65 6d 20 61 c8 2e 20 | 22 0d 23 20 20 09 65 6c |tem a.. |".# .el|
|00000300| 65 63 74 72 69 63 41 6c | 69 61 73 20 64 65 66 20 |ectricAl|ias def |
|00000310| a5 54 65 78 74 20 a5 41 | 20 20 22 a4 c7 73 65 74 |.Text .A| "..set|
|00000320| 20 69 74 65 6d 20 31 3b | 20 6e 75 6d 62 65 72 20 | item 1;| number |
|00000330| 5c 24 69 74 65 6d 20 41 | c8 2e 22 0d 23 20 09 65 |\$item A|..".# .e|
|00000340| 6c 65 63 74 72 69 63 41 | 6c 69 61 73 20 64 65 66 |lectricA|lias def|
|00000350| 20 a5 54 65 78 74 20 a5 | 41 41 20 22 a4 c7 69 6e | .Text .|AA "..in|
|00000360| 63 72 20 69 74 65 6d 3b | 20 6e 75 6d 62 65 72 20 |cr item;| number |
|00000370| 5c 24 69 74 65 6d 20 41 | c8 2e 20 22 0d 23 0d 23 |\$item A|.. ".#.#|
|00000380| 20 55 53 41 47 45 3a 0d | 23 0d 23 09 6e 75 6d 62 | USAGE:.|#.#.numb|
|00000390| 65 72 20 56 41 4c 55 45 | 20 53 54 59 4c 45 0d 23 |er VALUE| STYLE.#|
|000003a0| 0d 23 20 57 48 45 52 45 | 3a 0d 23 0d 23 09 56 41 |.# WHERE|:.#.#.VA|
|000003b0| 4c 55 45 20 3d 20 70 6f | 73 69 74 69 76 65 20 77 |LUE = po|sitive w|
|000003c0| 68 6f 6c 65 20 6e 75 6d | 62 65 72 20 31 2e 2e 20 |hole num|ber 1.. |
|000003d0| 28 52 6f 6d 61 6e 20 6c | 69 6d 69 74 65 64 20 74 |(Roman l|imited t|
|000003e0| 6f 20 39 39 39 39 29 0d | 23 09 53 54 59 4c 45 20 |o 9999).|#.STYLE |
|000003f0| 3d 20 61 7c 61 6c 70 68 | 61 7c 61 6c 70 68 61 62 |= a|alph|a|alphab|
|00000400| 65 74 69 63 7c 69 7c 72 | 6f 6d 61 6e 7c 41 7c 41 |etic|i|r|oman|A|A|
|00000410| 4c 50 48 41 7c 41 4c 50 | 48 41 42 45 54 49 43 7c |LPHA|ALP|HABETIC||
|00000420| 49 7c 52 4f 4d 41 4e 0d | 23 0d 23 20 45 58 41 4d |I|ROMAN.|#.# EXAM|
|00000430| 50 4c 45 3a 0d 23 0d 23 | 09 5b 6e 75 6d 62 65 72 |PLE:.#.#|.[number|
|00000440| 20 31 39 39 32 20 52 4f | 4d 41 4e 5d 20 72 65 74 | 1992 RO|MAN] ret|
|00000450| 75 72 6e 73 20 22 4d 43 | 4d 58 43 49 49 22 0d 23 |urns "MC|MXCII".#|
|00000460| 0d 23 09 54 6f 20 75 73 | 65 2c 20 73 69 6d 70 6c |.#.To us|e, simpl|
|00000470| 79 20 73 6f 75 72 63 65 | 20 74 68 69 73 20 66 69 |y source| this fi|
|00000480| 6c 65 20 70 6c 61 63 65 | 20 69 74 20 69 6e 20 74 |le place| it in t|
|00000490| 68 65 20 61 20 66 6f 6c | 64 65 72 20 77 69 74 68 |he a fol|der with|
|000004a0| 20 74 68 65 0d 23 09 6e | 61 6d 65 20 24 48 4f 4d | the.#.n|ame $HOM|
|000004b0| 45 3a 54 63 6c 3a 55 73 | 65 72 63 6f 64 65 3a 20 |E:Tcl:Us|ercode: |
|000004c0| 61 6e 64 20 69 6e 76 6f | 6b 65 20 69 74 20 69 6d |and invo|ke it im|
|000004d0| 70 6c 69 63 69 74 6c 79 | 20 76 69 61 20 74 68 65 |plicitly| via the|
|000004e0| 20 22 75 6e 6b 6e 6f 77 | 6e 20 70 72 6f 63 22 2e | "unknow|n proc".|
|000004f0| 0d 23 0d 23 20 53 45 45 | 20 41 4c 53 4f 20 75 6e |.#.# SEE| ALSO un|
|00000500| 6b 6e 6f 77 6e 2e 74 63 | 6c 2c 20 65 6c 65 63 74 |known.tc|l, elect|
|00000510| 72 69 63 41 6c 69 61 73 | 2e 74 63 6c 0d 0d 23 20 |ricAlias|.tcl..# |
|00000520| 43 4f 50 59 52 49 47 48 | 54 3a 0d 23 0d 23 09 43 |COPYRIGH|T:.#.#.C|
|00000530| 6f 70 79 72 69 67 68 74 | 20 a9 20 31 39 39 32 2c |opyright| . 1992,|
|00000540| 31 39 39 33 20 62 79 20 | 44 61 76 69 64 20 43 2e |1993 by |David C.|
|00000550| 20 42 6c 61 63 6b 0d 23 | 09 41 6c 6c 20 72 69 67 | Black.#|.All rig|
|00000560| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 0d 23 0d |hts rese|rved..#.|
|00000570| 23 09 52 65 64 69 73 74 | 72 69 62 75 74 69 6f 6e |#.Redist|ribution|
|00000580| 20 61 6e 64 20 75 73 65 | 20 69 6e 20 73 6f 75 72 | and use| in sour|
|00000590| 63 65 20 61 6e 64 20 62 | 69 6e 61 72 79 20 66 6f |ce and b|inary fo|
|000005a0| 72 6d 73 20 61 72 65 20 | 70 65 72 6d 69 74 74 65 |rms are |permitte|
|000005b0| 64 0d 23 09 70 72 6f 76 | 69 64 65 64 20 74 68 61 |d.#.prov|ided tha|
|000005c0| 74 20 74 68 65 20 61 62 | 6f 76 65 20 63 6f 70 79 |t the ab|ove copy|
|000005d0| 72 69 67 68 74 20 6e 6f | 74 69 63 65 20 61 6e 64 |right no|tice and|
|000005e0| 20 74 68 69 73 20 70 61 | 72 61 67 72 61 70 68 20 | this pa|ragraph |
|000005f0| 61 72 65 0d 23 09 64 75 | 70 6c 69 63 61 74 65 64 |are.#.du|plicated|
|00000600| 20 69 6e 20 61 6c 6c 20 | 73 75 63 68 20 66 6f 72 | in all |such for|
|00000610| 6d 73 20 61 6e 64 20 74 | 68 61 74 20 61 6e 79 20 |ms and t|hat any |
|00000620| 64 6f 63 75 6d 65 6e 74 | 61 74 69 6f 6e 2c 0d 23 |document|ation,.#|
|00000630| 09 61 64 76 65 72 74 69 | 73 69 6e 67 20 6d 61 74 |.adverti|sing mat|
|00000640| 65 72 69 61 6c 73 2c 20 | 61 6e 64 20 6f 74 68 65 |erials, |and othe|
|00000650| 72 20 6d 61 74 65 72 69 | 61 6c 73 20 72 65 6c 61 |r materi|als rela|
|00000660| 74 65 64 20 74 6f 20 73 | 75 63 68 0d 23 09 64 69 |ted to s|uch.#.di|
|00000670| 73 74 72 69 62 75 74 69 | 6f 6e 20 61 6e 64 20 75 |stributi|on and u|
|00000680| 73 65 20 61 63 6b 6e 6f | 77 6c 65 64 67 65 20 74 |se ackno|wledge t|
|00000690| 68 61 74 20 74 68 65 20 | 73 6f 66 74 77 61 72 65 |hat the |software|
|000006a0| 20 77 61 73 20 64 65 76 | 65 6c 6f 70 65 64 0d 23 | was dev|eloped.#|
|000006b0| 09 62 79 20 44 61 76 69 | 64 20 43 2e 20 42 6c 61 |.by Davi|d C. Bla|
|000006c0| 63 6b 2e 0d 23 0d 23 09 | 54 48 49 53 20 53 4f 46 |ck..#.#.|THIS SOF|
|000006d0| 54 57 41 52 45 20 49 53 | 20 50 52 4f 56 49 44 45 |TWARE IS| PROVIDE|
|000006e0| 44 20 22 41 53 20 49 53 | 22 20 41 4e 44 20 57 49 |D "AS IS|" AND WI|
|000006f0| 54 48 4f 55 54 20 41 4e | 59 20 45 58 50 52 45 53 |THOUT AN|Y EXPRES|
|00000700| 53 20 4f 52 0d 23 09 49 | 4d 50 4c 49 45 44 20 57 |S OR.#.I|MPLIED W|
|00000710| 41 52 52 41 4e 54 49 45 | 53 2c 20 49 4e 43 4c 55 |ARRANTIE|S, INCLU|
|00000720| 44 49 4e 47 2c 20 57 49 | 54 48 4f 55 54 20 4c 49 |DING, WI|THOUT LI|
|00000730| 4d 49 54 41 54 49 4f 4e | 2c 20 54 48 45 20 49 4d |MITATION|, THE IM|
|00000740| 50 4c 49 45 44 0d 23 09 | 57 41 52 52 41 4e 54 49 |PLIED.#.|WARRANTI|
|00000750| 45 53 20 4f 46 20 4d 45 | 52 43 48 41 4e 54 41 42 |ES OF ME|RCHANTAB|
|00000760| 49 4c 49 54 59 20 41 4e | 44 20 46 49 54 4e 45 53 |ILITY AN|D FITNES|
|00000770| 53 20 46 4f 52 20 41 20 | 50 41 52 54 49 43 55 4c |S FOR A |PARTICUL|
|00000780| 41 52 20 50 55 52 50 4f | 53 45 2e 0d 23 0d 23 23 |AR PURPO|SE..#.##|
|00000790| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000007a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000007b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000007c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000007d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 0d 0d |########|######..|
|000007e0| 23 20 41 55 54 48 4f 52 | 0d 23 0d 23 09 44 61 76 |# AUTHOR|.#.#.Dav|
|000007f0| 69 64 20 43 2e 20 42 6c | 61 63 6b 0d 23 09 49 6e |id C. Bl|ack.#.In|
|00000800| 74 65 72 6e 65 74 3a 20 | 62 6c 61 63 6b 40 6d 70 |ternet: |black@mp|
|00000810| 64 2e 74 61 6e 64 65 6d | 2e 63 6f 6d 20 28 70 72 |d.tandem|.com (pr|
|00000820| 65 66 65 72 72 65 64 29 | 0d 23 09 47 45 6e 69 65 |eferred)|.#.GEnie|
|00000830| 3a 20 20 20 20 44 2e 43 | 2e 42 6c 61 63 6b 0d 23 |: D.C|.Black.#|
|00000840| 09 55 53 6e 61 69 6c 3a | 20 20 20 36 32 31 37 20 |.USnail:| 6217 |
|00000850| 4a 6f 68 6e 20 43 68 69 | 73 75 6d 20 4c 61 6e 65 |John Chi|sum Lane|
|00000860| 2c 20 41 75 73 74 69 6e | 2c 20 54 58 20 37 38 37 |, Austin|, TX 787|
|00000870| 34 39 0d 23 0d 23 23 23 | 23 23 23 23 23 23 23 23 |49.#.###|########|
|00000880| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000890| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000008a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000008b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000008c0| 23 23 23 23 23 0d 0d 23 | 20 48 49 53 54 4f 52 59 |#####..#| HISTORY|
|000008d0| 0d 23 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.# | |
|000008e0| 20 20 20 20 0d 23 20 6d | 6f 64 69 66 69 65 64 20 | .# m|odified |
|000008f0| 77 68 6f 20 72 65 76 20 | 72 65 61 73 6f 6e 0d 23 |who rev |reason.#|
|00000900| 20 2d 2d 2d 2d 2d 2d 2d | 2d 20 2d 2d 2d 20 2d 2d | -------|- --- --|
|00000910| 2d 20 2d 2d 2d 2d 2d 2d | 0d 23 20 30 31 2f 30 36 |- ------|.# 01/06|
|00000920| 2f 39 33 20 44 43 42 20 | 31 2e 30 20 4f 72 69 67 |/93 DCB |1.0 Orig|
|00000930| 69 6e 61 6c 0d 0d 70 72 | 6f 63 20 6e 75 6d 62 65 |inal..pr|oc numbe|
|00000940| 72 20 7b 76 61 6c 75 65 | 20 7b 73 74 79 6c 65 20 |r {value| {style |
|00000950| 49 7d 7d 20 7b 0d 09 69 | 66 20 7b 24 76 61 6c 75 |I}} {..i|f {$valu|
|00000960| 65 20 3c 3d 20 30 7d 20 | 7b 0d 09 09 65 72 72 6f |e <= 0} |{...erro|
|00000970| 72 20 22 4d 75 73 74 20 | 62 65 20 61 20 63 6f 75 |r "Must |be a cou|
|00000980| 6e 74 69 6e 67 20 6e 75 | 6d 62 65 72 22 0d 09 7d |nting nu|mber"..}|
|00000990| 0d 09 69 66 20 7b 5b 73 | 74 72 69 6e 67 20 66 69 |..if {[s|tring fi|
|000009a0| 72 73 74 20 22 2e 22 20 | 24 76 61 6c 75 65 5d 20 |rst "." |$value] |
|000009b0| 3e 3d 20 30 7d 20 7b 0d | 09 09 65 72 72 6f 72 20 |>= 0} {.|..error |
|000009c0| 22 4d 75 73 74 20 62 65 | 20 61 6e 20 69 6e 74 65 |"Must be| an inte|
|000009d0| 67 72 61 6c 20 76 61 6c | 75 65 22 0d 09 7d 0d 09 |gral val|ue"..}..|
|000009e0| 63 61 73 65 20 24 73 74 | 79 6c 65 20 7b 0d 09 09 |case $st|yle {...|
|000009f0| 7b 61 20 61 6c 70 68 61 | 20 61 6c 70 68 61 62 65 |{a alpha| alphabe|
|00000a00| 74 69 63 20 41 20 41 4c | 50 48 41 20 41 4c 50 48 |tic A AL|PHA ALPH|
|00000a10| 41 42 45 54 49 43 7d 20 | 7b 0d 09 09 09 69 6e 63 |ABETIC} |{....inc|
|00000a20| 72 20 76 61 6c 75 65 20 | 2d 31 0d 09 09 09 73 65 |r value |-1....se|
|00000a30| 74 20 72 65 73 75 6c 74 | 20 5b 66 6f 72 6d 61 74 |t result| [format|
|00000a40| 20 22 25 63 22 20 5b 65 | 78 70 72 20 7b 24 76 61 | "%c" [e|xpr {$va|
|00000a50| 6c 75 65 20 25 20 32 36 | 20 2b 20 30 78 34 31 7d |lue % 26| + 0x41}|
|00000a60| 5d 5d 0d 09 09 09 73 65 | 74 20 76 61 6c 75 65 20 |]]....se|t value |
|00000a70| 5b 65 78 70 72 20 7b 24 | 76 61 6c 75 65 20 2f 20 |[expr {$|value / |
|00000a80| 32 36 7d 5d 0d 09 09 09 | 77 68 69 6c 65 20 7b 24 |26}]....|while {$|
|00000a90| 76 61 6c 75 65 20 3e 20 | 30 7d 20 7b 0d 09 09 09 |value > |0} {....|
|00000aa0| 09 73 65 74 20 64 69 67 | 69 74 20 5b 65 78 70 72 |.set dig|it [expr|
|00000ab0| 20 7b 24 76 61 6c 75 65 | 20 25 20 32 36 20 2b 20 | {$value| % 26 + |
|00000ac0| 30 78 34 30 7d 5d 0d 09 | 09 09 09 73 65 74 20 76 |0x40}]..|...set v|
|00000ad0| 61 6c 75 65 20 5b 65 78 | 70 72 20 7b 24 76 61 6c |alue [ex|pr {$val|
|00000ae0| 75 65 20 2f 20 32 36 7d | 5d 0d 09 09 09 09 73 65 |ue / 26}|].....se|
|00000af0| 74 20 72 65 73 75 6c 74 | 20 5b 66 6f 72 6d 61 74 |t result| [format|
|00000b00| 20 22 25 63 25 73 22 20 | 24 64 69 67 69 74 20 24 | "%c%s" |$digit $|
|00000b10| 72 65 73 75 6c 74 5d 0d | 09 09 09 7d 0d 09 09 7d |result].|...}...}|
|00000b20| 0d 09 09 7b 69 20 72 6f | 6d 61 6e 20 49 20 52 4f |...{i ro|man I RO|
|00000b30| 4d 41 4e 7d 20 7b 0d 09 | 09 09 69 66 20 7b 24 76 |MAN} {..|..if {$v|
|00000b40| 61 6c 75 65 20 3e 20 39 | 39 39 39 7d 20 7b 0d 09 |alue > 9|999} {..|
|00000b50| 09 09 09 22 52 6f 6d 61 | 6e 20 6e 75 6d 65 72 61 |..."Roma|n numera|
|00000b60| 6c 20 74 6f 6f 20 62 69 | 67 22 0d 09 09 09 7d 0d |l too bi|g"....}.|
|00000b70| 09 09 09 73 65 74 20 72 | 6c 69 73 74 20 7b 0d 09 |...set r|list {..|
|00000b80| 09 09 09 7b 22 22 20 49 | 20 49 49 20 49 49 49 20 |...{"" I| II III |
|00000b90| 49 56 20 56 20 56 49 20 | 56 49 49 20 56 49 49 49 |IV V VI |VII VIII|
|00000ba0| 20 49 58 7d 0d 09 09 09 | 09 7b 22 22 20 58 20 58 | IX}....|.{"" X X|
|00000bb0| 58 20 58 58 58 20 58 4c | 20 4c 20 4c 58 20 4c 58 |X XXX XL| L LX LX|
|00000bc0| 58 20 4c 58 58 58 20 58 | 43 7d 0d 09 09 09 09 7b |X LXXX X|C}.....{|
|00000bd0| 22 22 20 43 20 43 43 20 | 43 43 43 20 43 44 20 44 |"" C CC |CCC CD D|
|00000be0| 20 44 43 20 44 43 43 20 | 44 43 43 43 20 43 4d 7d | DC DCC |DCCC CM}|
|00000bf0| 0d 09 09 09 09 7b 22 22 | 20 4d 20 4d 4d 20 4d 4d |.....{""| M MM MM|
|00000c00| 4d 20 4d 56 5f 20 56 5f | 20 56 4d 5f 20 56 4d 4d |M MV_ V_| VM_ VMM|
|00000c10| 5f 20 56 4d 4d 4d 5f 20 | 4d 58 5f 7d 0d 09 09 09 |_ VMMM_ |MX_}....|
|00000c20| 7d 0d 09 09 09 73 65 74 | 20 72 65 73 75 6c 74 20 |}....set| result |
|00000c30| 22 22 0d 09 09 09 73 65 | 74 20 74 65 6e 20 30 0d |""....se|t ten 0.|
|00000c40| 09 09 09 77 68 69 6c 65 | 20 7b 24 76 61 6c 75 65 |...while| {$value|
|00000c50| 20 3e 20 30 7d 20 7b 0d | 09 09 09 09 73 65 74 20 | > 0} {.|....set |
|00000c60| 64 69 67 69 74 20 5b 6c | 69 6e 64 65 78 20 5b 6c |digit [l|index [l|
|00000c70| 69 6e 64 65 78 20 24 72 | 6c 69 73 74 20 24 74 65 |index $r|list $te|
|00000c80| 6e 5d 20 5b 65 78 70 72 | 20 7b 24 76 61 6c 75 65 |n] [expr| {$value|
|00000c90| 20 25 20 31 30 7d 5d 5d | 0d 09 09 09 09 73 65 74 | % 10}]]|.....set|
|00000ca0| 20 76 61 6c 75 65 20 5b | 65 78 70 72 20 7b 24 76 | value [|expr {$v|
|00000cb0| 61 6c 75 65 20 2f 20 31 | 30 7d 5d 0d 09 09 09 09 |alue / 1|0}].....|
|00000cc0| 69 6e 63 72 20 74 65 6e | 0d 09 09 09 09 73 65 74 |incr ten|.....set|
|00000cd0| 20 72 65 73 75 6c 74 20 | 22 24 64 69 67 69 74 24 | result |"$digit$|
|00000ce0| 72 65 73 75 6c 74 22 0d | 09 09 09 7d 0d 09 09 7d |result".|...}...}|
|00000cf0| 0d 09 09 64 65 66 61 75 | 6c 74 20 7b 0d 09 09 09 |...defau|lt {....|
|00000d00| 65 72 72 6f 72 20 22 55 | 6e 6b 6e 6f 77 6e 20 6e |error "U|nknown n|
|00000d10| 75 6d 62 65 72 69 6e 67 | 20 73 74 79 6c 65 22 0d |umbering| style".|
|00000d20| 09 09 7d 0d 09 7d 0d 09 | 63 61 73 65 20 24 73 74 |..}..}..|case $st|
|00000d30| 79 6c 65 20 7b 0d 09 09 | 7b 61 20 61 6c 70 68 61 |yle {...|{a alpha|
|00000d40| 20 61 6c 70 68 61 62 65 | 74 69 63 20 69 20 72 6f | alphabe|tic i ro|
|00000d50| 6d 61 6e 7d 20 7b 0d 09 | 09 09 72 65 74 75 72 6e |man} {..|..return|
|00000d60| 20 5b 73 74 72 69 6e 67 | 20 74 6f 6c 6f 77 65 72 | [string| tolower|
|00000d70| 20 24 72 65 73 75 6c 74 | 5d 0d 09 09 7d 0d 09 09 | $result|]...}...|
|00000d80| 7b 41 20 41 4c 50 48 41 | 20 41 4c 50 48 41 42 45 |{A ALPHA| ALPHABE|
|00000d90| 54 49 43 20 49 20 52 4f | 4d 41 4e 7d 20 7b 0d 09 |TIC I RO|MAN} {..|
|00000da0| 09 09 72 65 74 75 72 6e | 20 24 72 65 73 75 6c 74 |..return| $result|
|00000db0| 0d 09 09 7d 0d 09 7d 0d | 7d 0d 23 65 6e 64 70 72 |...}..}.|}.#endpr|
|00000dc0| 6f 63 20 6e 75 6d 62 65 | 72 0d 23 23 23 23 23 23 |oc numbe|r.######|
|00000dd0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000de0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000df0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000e00| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000e10| 23 23 23 23 23 23 23 23 | 23 23 0d 0d 00 00 00 00 |########|##......|
|00000e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e80| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000e90| 71 73 c4 9f 27 79 5c 01 | 07 18 28 60 14 2f 0b 20 |qs..'y\.|..(`./. |
|00000ea0| 53 20 50 22 68 01 00 f0 | 2c 8b 01 12 00 35 6d be |S P"h...|,....5m.|
|00000eb0| 0a 6e 75 6d 62 65 72 2e | 74 63 6c 65 02 00 00 00 |.number.|tcle....|
|00000ec0| 50 61 72 74 53 49 54 21 | 00 00 00 00 00 00 00 00 |PartSIT!|........|
|00000ed0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 ab 97 aa ed 00 00 | 00 00 00 00 01 7e 2c 01 |........|.....~,.|
|00000f00| 2a 00 5a 71 03 48 c6 2f | 06 2f 05 31 01 00 a0 2c |*.Zq.H./|./.1...,|
|00000f10| 33 68 82 57 72 25 01 19 | 8a 2f 6d 73 02 18 e0 ff |3h.Wr%..|./ms....|
|00000f20| dc 27 4b 5c 6a 23 7f 01 | 26 68 b5 55 56 5a 4f 38 |.'K\j#..|&h.UVZO8|
|00000f30| ee 2c 55 02 10 2e 00 1b | 56 5a 71 5a 54 5a 4f 60 |.,U.....|VZqZTZO`|
|00000f40| 4c 01 fe 72 73 84 5f 65 | 4e ff 00 00 01 7e a8 9f |L..rs._e|N....~..|
|00000f50| 65 72 00 12 08 01 00 00 | 02 26 2d 03 00 00 00 00 |er......|.&-.....|
|00000f60| 01 29 c8 5e 63 5b 5c 02 | 03 18 3c 2e 7b 70 4f 8c |.).^c[\.|..<.{pO.|
|00000f70| 4d 01 42 07 14 2f 0c 20 | 54 20 50 22 68 12 00 78 |M.B../. |T P"h..x|
|00000f80| 00 00 00 48 00 0a 43 6f | 75 72 69 65 72 00 00 de |...H..Co|urier...|
|00000f90| 11 14 00 00 00 00 00 f5 | 10 74 00 03 2f 0a 03 0d |........|.t../...|
|00000fa0| 00 ea 96 b4 00 00 00 04 | 00 04 00 46 00 1b 01 a9 |........|...F....|
|00000fb0| 01 d5 00 46 00 1b 01 a9 | 01 d5 00 0a 98 d3 00 00 |...F....|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|00000fd0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 de 11 14 |...L...L|...2....|
|00000fe0| 0c 20 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |. .....2|..MPSR..|
|00000ff0| 00 0a 03 ed ff ff 00 00 | 00 00 00 e2 5f 64 00 00 |........|...._d..|
+--------+-------------------------+-------------------------+--------+--------+