home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| Mailbox text, 1st line "From Modula to Oberon", ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| x-fmt/111 Plain Text File
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| application/mbox
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 4d 6f 64 | 75 6c 61 20 74 6f 20 4f |From Mod|ula to O|
|00000010| 62 65 72 6f 6e 0a 0a 4e | 2e 20 57 69 72 74 68 0a |beron..N|. Wirth.|
|00000020| 0a 41 62 73 74 72 61 63 | 74 0a 0a 54 68 65 20 70 |.Abstrac|t..The p|
|00000030| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 6c 61 6e 67 75 |rogrammi|ng langu|
|00000040| 61 67 65 20 4f 62 65 72 | 6f 6e 20 69 73 20 74 68 |age Ober|on is th|
|00000050| 65 20 72 65 73 75 6c 74 | 20 6f 66 20 61 20 63 6f |e result| of a co|
|00000060| 6e 63 65 6e 74 72 61 74 | 65 64 20 65 66 66 6f 72 |ncentrat|ed effor|
|00000070| 74 20 74 6f 0a 69 6e 63 | 72 65 61 73 65 20 74 68 |t to.inc|rease th|
|00000080| 65 20 70 6f 77 65 72 20 | 6f 66 20 4d 6f 64 75 6c |e power |of Modul|
|00000090| 61 2d 32 20 61 6e 64 20 | 73 69 6d 75 6c 74 61 6e |a-2 and |simultan|
|000000a0| 65 6f 75 73 6c 79 20 74 | 6f 20 72 65 64 75 63 65 |eously t|o reduce|
|000000b0| 20 69 74 73 20 63 6f 6d | 70 6c 65 78 69 74 79 2e | its com|plexity.|
|000000c0| 0a 53 65 76 65 72 61 6c | 20 66 65 61 74 75 72 65 |.Several| feature|
|000000d0| 73 20 77 65 72 65 20 65 | 6c 69 6d 69 6e 61 74 65 |s were e|liminate|
|000000e0| 64 2c 20 61 6e 64 20 61 | 20 66 65 77 20 77 65 72 |d, and a| few wer|
|000000f0| 65 20 61 64 64 65 64 20 | 69 6e 20 6f 72 64 65 72 |e added |in order|
|00000100| 20 74 6f 20 69 6e 63 72 | 65 61 73 65 0a 74 68 65 | to incr|ease.the|
|00000110| 20 65 78 70 72 65 73 73 | 69 76 65 20 70 6f 77 65 | express|ive powe|
|00000120| 72 20 61 6e 64 20 66 6c | 65 78 69 62 69 6c 69 74 |r and fl|exibilit|
|00000130| 79 20 6f 66 20 74 68 65 | 20 6c 61 6e 67 75 61 67 |y of the| languag|
|00000140| 65 2e 20 54 68 69 73 20 | 70 61 70 65 72 20 64 65 |e. This |paper de|
|00000150| 73 63 72 69 62 65 73 0a | 61 6e 64 20 6d 6f 74 69 |scribes.|and moti|
|00000160| 76 61 74 65 73 20 74 68 | 65 20 63 68 61 6e 67 65 |vates th|e change|
|00000170| 73 2e 20 54 68 65 20 6c | 61 6e 67 75 61 67 65 20 |s. The l|anguage |
|00000180| 69 73 20 64 65 66 69 6e | 65 64 20 69 6e 20 61 20 |is defin|ed in a |
|00000190| 63 6f 6e 63 69 73 65 20 | 72 65 70 6f 72 74 2e 0a |concise |report..|
|000001a0| 0a 49 6e 74 72 6f 64 75 | 63 74 69 6f 6e 0a 0a 54 |.Introdu|ction..T|
|000001b0| 68 65 20 70 72 6f 67 72 | 61 6d 6d 69 6e 67 20 6c |he progr|amming l|
|000001c0| 61 6e 67 75 61 67 65 20 | 4f 62 65 72 6f 6e 20 65 |anguage |Oberon e|
|000001d0| 76 6f 6c 76 65 64 20 66 | 72 6f 6d 20 61 20 70 72 |volved f|rom a pr|
|000001e0| 6f 6a 65 63 74 20 77 68 | 6f 73 65 20 67 6f 61 6c |oject wh|ose goal|
|000001f0| 20 77 61 73 20 74 68 65 | 0a 64 65 73 69 67 6e 20 | was the|.design |
|00000200| 6f 66 20 61 20 6d 6f 64 | 65 72 6e 2c 20 66 6c 65 |of a mod|ern, fle|
|00000210| 78 69 62 6c 65 2c 20 61 | 6e 64 20 65 66 66 69 63 |xible, a|nd effic|
|00000220| 69 65 6e 74 20 6f 70 65 | 72 61 74 69 6e 67 20 73 |ient ope|rating s|
|00000230| 79 73 74 65 6d 20 66 6f | 72 20 61 0a 73 69 6e 67 |ystem fo|r a.sing|
|00000240| 6c 65 2d 75 73 65 72 20 | 77 6f 72 6b 73 74 61 74 |le-user |workstat|
|00000250| 69 6f 6e 2e 20 41 20 70 | 72 69 6e 63 69 70 61 6c |ion. A p|rincipal|
|00000260| 20 67 75 69 64 65 6c 69 | 6e 65 20 77 61 73 20 74 | guideli|ne was t|
|00000270| 6f 20 63 6f 6e 63 65 6e | 74 72 61 74 65 20 6f 6e |o concen|trate on|
|00000280| 0a 70 72 6f 70 65 72 74 | 69 65 73 20 74 68 61 74 |.propert|ies that|
|00000290| 20 61 72 65 20 67 65 6e | 75 69 6e 65 6c 79 20 65 | are gen|uinely e|
|000002a0| 73 73 65 6e 74 69 61 6c | 20 61 6e 64 20 2d 20 61 |ssential| and - a|
|000002b0| 73 20 61 20 63 6f 6e 73 | 65 71 75 65 6e 63 65 20 |s a cons|equence |
|000002c0| 2d 20 74 6f 20 6f 6d 69 | 74 0a 65 70 68 65 6d 65 |- to omi|t.epheme|
|000002d0| 72 61 6c 20 69 73 73 75 | 65 73 2e 20 49 74 20 69 |ral issu|es. It i|
|000002e0| 73 20 74 68 65 20 62 65 | 73 74 20 77 61 79 20 74 |s the be|st way t|
|000002f0| 6f 20 6b 65 65 70 20 61 | 20 73 79 73 74 65 6d 20 |o keep a| system |
|00000300| 69 6e 20 68 61 6e 64 2c | 20 74 6f 20 6d 61 6b 65 |in hand,| to make|
|00000310| 20 69 74 0a 75 6e 64 65 | 72 73 74 61 6e 64 61 62 | it.unde|rstandab|
|00000320| 6c 65 2c 20 65 78 70 6c | 69 63 61 62 6c 65 2c 20 |le, expl|icable, |
|00000330| 72 65 6c 69 61 62 6c 65 | 2c 20 61 6e 64 20 65 66 |reliable|, and ef|
|00000340| 66 69 63 69 65 6e 74 6c | 79 20 69 6d 70 6c 65 6d |ficientl|y implem|
|00000350| 65 6e 74 61 62 6c 65 2e | 0a 0a 49 6e 69 74 69 61 |entable.|..Initia|
|00000360| 6c 6c 79 2c 20 69 74 20 | 77 61 73 20 70 6c 61 6e |lly, it |was plan|
|00000370| 6e 65 64 20 74 6f 20 65 | 78 70 72 65 73 73 20 74 |ned to e|xpress t|
|00000380| 68 65 20 73 79 73 74 65 | 6d 20 69 6e 20 4d 6f 64 |he syste|m in Mod|
|00000390| 75 6c 61 2d 32 20 5b 31 | 5d 0a 28 73 75 62 73 65 |ula-2 [1|].(subse|
|000003a0| 71 75 65 6e 74 6c 79 20 | 63 61 6c 6c 65 64 20 4d |quently |called M|
|000003b0| 6f 64 75 6c 61 29 2c 20 | 61 73 20 74 68 61 74 20 |odula), |as that |
|000003c0| 6c 61 6e 67 75 61 67 65 | 20 73 75 70 70 6f 72 74 |language| support|
|000003d0| 73 20 74 68 65 20 6e 6f | 74 69 6f 6e 20 6f 66 0a |s the no|tion of.|
|000003e0| 6d 6f 64 75 6c 61 72 20 | 64 65 73 69 67 6e 20 71 |modular |design q|
|000003f0| 75 69 74 65 20 65 66 66 | 65 63 74 69 76 65 6c 79 |uite eff|ectively|
|00000400| 2c 20 61 6e 64 20 62 65 | 63 61 75 73 65 20 61 6e |, and be|cause an|
|00000410| 20 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 | operati|ng syste|
|00000420| 6d 20 68 61 73 20 74 6f | 20 62 65 0a 64 65 73 69 |m has to| be.desi|
|00000430| 67 6e 65 64 20 69 6e 20 | 74 65 72 6d 73 20 6f 66 |gned in |terms of|
|00000440| 20 73 65 70 61 72 61 74 | 65 6c 79 20 63 6f 6d 70 | separat|ely comp|
|00000450| 69 6c 61 62 6c 65 20 70 | 61 72 74 73 20 77 69 74 |ilable p|arts wit|
|00000460| 68 20 63 6f 6e 73 63 69 | 65 6e 74 69 6f 75 73 6c |h consci|entiousl|
|00000470| 79 0a 63 68 6f 73 65 6e | 20 69 6e 74 65 72 66 61 |y.chosen| interfa|
|00000480| 63 65 73 2e 20 49 6e 20 | 66 61 63 74 2c 20 61 6e |ces. In |fact, an|
|00000490| 20 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 | operati|ng syste|
|000004a0| 6d 20 73 68 6f 75 6c 64 | 20 62 65 20 6e 6f 20 6d |m should| be no m|
|000004b0| 6f 72 65 20 74 68 61 6e | 20 61 0a 73 65 74 20 6f |ore than| a.set o|
|000004c0| 66 20 62 61 73 69 63 20 | 6d 6f 64 75 6c 65 73 2c |f basic |modules,|
|000004d0| 20 61 6e 64 20 74 68 65 | 20 64 65 73 69 67 6e 20 | and the| design |
|000004e0| 6f 66 20 61 6e 20 61 70 | 70 6c 69 63 61 74 69 6f |of an ap|plicatio|
|000004f0| 6e 20 6d 75 73 74 20 62 | 65 20 63 6f 6e 73 69 64 |n must b|e consid|
|00000500| 65 72 65 64 0a 61 73 20 | 61 20 67 6f 61 6c 2d 6f |ered.as |a goal-o|
|00000510| 72 69 65 6e 74 65 64 20 | 65 78 74 65 6e 73 69 6f |riented |extensio|
|00000520| 6e 20 6f 66 20 74 68 61 | 74 20 62 61 73 69 63 20 |n of tha|t basic |
|00000530| 73 65 74 3a 20 50 72 6f | 67 72 61 6d 6d 69 6e 67 |set: Pro|gramming|
|00000540| 20 69 73 20 61 6c 77 61 | 79 73 0a 65 78 74 65 6e | is alwa|ys.exten|
|00000550| 64 69 6e 67 20 61 20 67 | 69 76 65 6e 20 73 79 73 |ding a g|iven sys|
|00000560| 74 65 6d 2e 0a 0a 57 68 | 65 72 65 61 73 20 6d 6f |tem...Wh|ereas mo|
|00000570| 64 65 72 6e 20 6c 61 6e | 67 75 61 67 65 73 2c 20 |dern lan|guages, |
|00000580| 73 75 63 68 20 61 73 20 | 4d 6f 64 75 6c 61 2c 20 |such as |Modula, |
|00000590| 73 75 70 70 6f 72 74 20 | 74 68 65 20 6e 6f 74 69 |support |the noti|
|000005a0| 6f 6e 20 6f 66 0a 65 78 | 74 65 6e 73 69 62 69 6c |on of.ex|tensibil|
|000005b0| 69 74 79 20 69 6e 20 74 | 68 65 20 70 72 6f 63 65 |ity in t|he proce|
|000005c0| 64 75 72 61 6c 20 72 65 | 61 6c 6d 2c 20 74 68 65 |dural re|alm, the|
|000005d0| 20 6e 6f 74 69 6f 6e 20 | 69 73 20 6c 65 73 73 20 | notion |is less |
|000005e0| 77 65 6c 6c 20 65 73 74 | 61 62 6c 69 73 68 65 64 |well est|ablished|
|000005f0| 0a 69 6e 20 74 68 65 20 | 64 6f 6d 61 69 6e 20 6f |.in the |domain o|
|00000600| 66 20 64 61 74 61 20 74 | 79 70 65 73 2e 20 49 6e |f data t|ypes. In|
|00000610| 20 70 61 72 74 69 63 75 | 6c 61 72 2c 20 4d 6f 64 | particu|lar, Mod|
|00000620| 75 6c 61 20 64 6f 65 73 | 20 6e 6f 74 20 61 6c 6c |ula does| not all|
|00000630| 6f 77 20 74 68 65 0a 64 | 65 66 69 6e 69 74 69 6f |ow the.d|efinitio|
|00000640| 6e 20 6f 66 20 6e 65 77 | 20 64 61 74 61 20 74 79 |n of new| data ty|
|00000650| 70 65 73 20 61 73 20 65 | 78 74 65 6e 73 69 6f 6e |pes as e|xtension|
|00000660| 73 20 6f 66 20 6f 74 68 | 65 72 2c 20 70 72 6f 67 |s of oth|er, prog|
|00000670| 72 61 6d 6d 65 72 2d 64 | 65 66 69 6e 65 64 0a 74 |rammer-d|efined.t|
|00000680| 79 70 65 73 20 69 6e 20 | 61 6e 20 61 64 65 71 75 |ypes in |an adequ|
|00000690| 61 74 65 20 6d 61 6e 6e | 65 72 2e 20 41 6e 20 61 |ate mann|er. An a|
|000006a0| 64 64 69 74 69 6f 6e 61 | 6c 20 66 65 61 74 75 72 |dditiona|l featur|
|000006b0| 65 20 77 61 73 20 63 61 | 6c 6c 65 64 20 66 6f 72 |e was ca|lled for|
|000006c0| 2c 20 74 68 65 72 65 62 | 79 0a 67 69 76 69 6e 67 |, thereb|y.giving|
|000006d0| 20 72 69 73 65 20 74 6f | 20 61 6e 20 65 78 74 65 | rise to| an exte|
|000006e0| 6e 73 69 6f 6e 20 6f 66 | 20 4d 6f 64 75 6c 61 2e |nsion of| Modula.|
|000006f0| 0a 0a 54 68 65 20 63 6f | 6e 63 65 70 74 20 6f 66 |..The co|ncept of|
|00000700| 20 74 68 65 20 70 6c 61 | 6e 6e 65 64 20 6f 70 65 | the pla|nned ope|
|00000710| 72 61 74 69 6e 67 20 73 | 79 73 74 65 6d 20 61 6c |rating s|ystem al|
|00000720| 73 6f 20 63 61 6c 6c 65 | 64 20 66 6f 72 20 61 20 |so calle|d for a |
|00000730| 68 69 67 68 6c 79 0a 64 | 79 6e 61 6d 69 63 2c 20 |highly.d|ynamic, |
|00000740| 63 65 6e 74 72 61 6c 69 | 7a 65 64 20 73 74 6f 72 |centrali|zed stor|
|00000750| 61 67 65 20 6d 61 6e 61 | 67 65 6d 65 6e 74 20 72 |age mana|gement r|
|00000760| 65 6c 79 69 6e 67 20 6f | 6e 20 74 68 65 20 74 65 |elying o|n the te|
|00000770| 63 68 6e 69 71 75 65 20 | 6f 66 20 67 61 72 62 61 |chnique |of garba|
|00000780| 67 65 0a 63 6f 6c 6c 65 | 63 74 69 6f 6e 2e 20 41 |ge.colle|ction. A|
|00000790| 6c 74 68 6f 75 67 68 20 | 4d 6f 64 75 6c 61 20 64 |lthough |Modula d|
|000007a0| 6f 65 73 20 6e 6f 74 20 | 70 72 65 76 65 6e 74 20 |oes not |prevent |
|000007b0| 74 68 65 20 69 6e 63 6f | 72 70 6f 72 61 74 69 6f |the inco|rporatio|
|000007c0| 6e 20 6f 66 20 61 20 67 | 61 72 62 61 67 65 0a 63 |n of a g|arbage.c|
|000007d0| 6f 6c 6c 65 63 74 6f 72 | 20 69 6e 20 70 72 69 6e |ollector| in prin|
|000007e0| 63 69 70 6c 65 2c 20 69 | 74 73 20 76 61 72 69 61 |ciple, i|ts varia|
|000007f0| 6e 74 20 72 65 63 6f 72 | 64 20 66 65 61 74 75 72 |nt recor|d featur|
|00000800| 65 20 63 6f 6e 73 74 69 | 74 75 74 65 73 20 61 20 |e consti|tutes a |
|00000810| 67 65 6e 75 69 6e 65 0a | 6f 62 73 74 61 63 6c 65 |genuine.|obstacle|
|00000820| 2e 20 41 73 20 74 68 65 | 20 6e 65 77 20 66 61 63 |. As the| new fac|
|00000830| 69 6c 69 74 79 20 66 6f | 72 20 65 78 74 65 6e 64 |ility fo|r extend|
|00000840| 69 6e 67 20 74 79 70 65 | 73 20 77 6f 75 6c 64 20 |ing type|s would |
|00000850| 6d 61 6b 65 20 74 68 65 | 20 76 61 72 69 61 6e 74 |make the| variant|
|00000860| 0a 72 65 63 6f 72 64 20 | 66 65 61 74 75 72 65 20 |.record |feature |
|00000870| 73 75 70 65 72 66 6c 75 | 6f 75 73 2c 20 74 68 65 |superflu|ous, the|
|00000880| 20 72 65 6d 6f 76 61 6c | 20 6f 66 20 74 68 69 73 | removal| of this|
|00000890| 20 73 74 75 6d 62 6c 69 | 6e 67 20 62 6c 6f 63 6b | stumbli|ng block|
|000008a0| 20 77 61 73 20 61 0a 6c | 6f 67 69 63 61 6c 20 64 | was a.l|ogical d|
|000008b0| 65 63 69 73 69 6f 6e 2e | 20 54 68 69 73 20 73 74 |ecision.| This st|
|000008c0| 65 70 2c 20 68 6f 77 65 | 76 65 72 2c 20 67 61 76 |ep, howe|ver, gav|
|000008d0| 65 20 72 69 73 65 20 74 | 6f 20 61 20 72 65 73 74 |e rise t|o a rest|
|000008e0| 72 69 63 74 69 6f 6e 20 | 28 73 75 62 73 65 74 29 |riction |(subset)|
|000008f0| 0a 6f 66 20 4d 6f 64 75 | 6c 61 2e 0a 0a 49 74 20 |.of Modu|la...It |
|00000900| 73 6f 6f 6e 20 62 65 63 | 61 6d 65 20 63 6c 65 61 |soon bec|ame clea|
|00000910| 72 20 74 68 61 74 20 74 | 68 65 20 72 75 6c 65 20 |r that t|he rule |
|00000920| 74 6f 20 63 6f 6e 63 65 | 6e 74 72 61 74 65 20 6f |to conce|ntrate o|
|00000930| 6e 20 74 68 65 20 65 73 | 73 65 6e 74 69 61 6c 20 |n the es|sential |
|00000940| 61 6e 64 20 74 6f 0a 65 | 6c 69 6d 69 6e 61 74 65 |and to.e|liminate|
|00000950| 20 74 68 65 20 69 6e 65 | 73 73 65 6e 74 69 61 6c | the ine|ssential|
|00000960| 20 73 68 6f 75 6c 64 20 | 6e 6f 74 20 6f 6e 6c 79 | should |not only|
|00000970| 20 62 65 20 61 70 70 6c | 69 65 64 20 74 6f 20 74 | be appl|ied to t|
|00000980| 68 65 20 64 65 73 69 67 | 6e 20 6f 66 20 74 68 65 |he desig|n of the|
|00000990| 0a 6e 65 77 20 73 79 73 | 74 65 6d 2c 20 62 75 74 |.new sys|tem, but|
|000009a0| 20 65 71 75 61 6c 6c 79 | 20 73 74 72 69 6e 67 65 | equally| stringe|
|000009b0| 6e 74 6c 79 20 74 6f 20 | 74 68 65 20 6c 61 6e 67 |ntly to |the lang|
|000009c0| 75 61 67 65 20 69 6e 20 | 77 68 69 63 68 20 74 68 |uage in |which th|
|000009d0| 65 20 73 79 73 74 65 6d | 20 69 73 0a 66 6f 72 6d |e system| is.form|
|000009e0| 75 6c 61 74 65 64 2e 20 | 54 68 65 20 61 70 70 6c |ulated. |The appl|
|000009f0| 69 63 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 70 |ication |of the p|
|00000a00| 72 69 6e 63 69 70 6c 65 | 20 74 68 75 73 20 6c 65 |rinciple| thus le|
|00000a10| 64 20 66 72 6f 6d 20 4d | 6f 64 75 6c 61 20 74 6f |d from M|odula to|
|00000a20| 20 61 20 6e 65 77 0a 6c | 61 6e 67 75 61 67 65 2e | a new.l|anguage.|
|00000a30| 20 48 6f 77 65 76 65 72 | 2c 20 74 68 65 20 61 64 | However|, the ad|
|00000a40| 6a 65 63 74 69 76 65 20 | 22 6e 65 77 22 20 68 61 |jective |"new" ha|
|00000a50| 73 20 74 6f 20 62 65 20 | 75 6e 64 65 72 73 74 6f |s to be |understo|
|00000a60| 6f 64 20 69 6e 20 70 72 | 6f 70 65 72 0a 63 6f 6e |od in pr|oper.con|
|00000a70| 74 65 78 74 3a 20 4f 62 | 65 72 6f 6e 20 65 76 6f |text: Ob|eron evo|
|00000a80| 6c 76 65 64 20 66 72 6f | 6d 20 4d 6f 64 75 6c 61 |lved fro|m Modula|
|00000a90| 20 62 79 20 76 65 72 79 | 20 66 65 77 20 61 64 64 | by very| few add|
|00000aa0| 69 74 69 6f 6e 73 20 61 | 6e 64 20 73 65 76 65 72 |itions a|nd sever|
|00000ab0| 61 6c 0a 73 75 62 74 72 | 61 63 74 69 6f 6e 73 2e |al.subtr|actions.|
|00000ac0| 20 49 6e 20 72 65 6c 79 | 69 6e 67 20 6f 6e 20 65 | In rely|ing on e|
|00000ad0| 76 6f 6c 75 74 69 6f 6e | 20 72 61 74 68 65 72 20 |volution| rather |
|00000ae0| 74 68 61 6e 20 72 65 76 | 6f 6c 75 74 69 6f 6e 20 |than rev|olution |
|00000af0| 77 65 20 72 65 6d 61 69 | 6e 20 69 6e 0a 74 68 65 |we remai|n in.the|
|00000b00| 20 74 72 61 64 69 74 69 | 6f 6e 20 6f 66 20 61 20 | traditi|on of a |
|00000b10| 6c 6f 6e 67 20 64 65 76 | 65 6c 6f 70 6d 65 6e 74 |long dev|elopment|
|00000b20| 20 74 68 61 74 20 6c 65 | 64 20 66 72 6f 6d 20 41 | that le|d from A|
|00000b30| 6c 67 6f 6c 20 74 6f 20 | 50 61 73 63 61 6c 2c 20 |lgol to |Pascal, |
|00000b40| 74 68 65 6e 20 74 6f 0a | 4d 6f 64 75 6c 61 2d 32 |then to.|Modula-2|
|00000b50| 2c 20 61 6e 64 20 65 76 | 65 6e 74 75 61 6c 6c 79 |, and ev|entually|
|00000b60| 20 74 6f 20 4f 62 65 72 | 6f 6e 2e 20 54 68 65 20 | to Ober|on. The |
|00000b70| 63 6f 6d 6d 6f 6e 20 74 | 72 61 69 74 73 20 6f 66 |common t|raits of|
|00000b80| 20 74 68 65 73 65 20 6c | 61 6e 67 75 61 67 65 73 | these l|anguages|
|00000b90| 0a 61 72 65 20 74 68 65 | 69 72 20 70 72 6f 63 65 |.are the|ir proce|
|00000ba0| 64 75 72 61 6c 20 72 61 | 74 68 65 72 20 74 68 61 |dural ra|ther tha|
|00000bb0| 6e 20 66 75 6e 63 74 69 | 6f 6e 61 6c 20 6d 6f 64 |n functi|onal mod|
|00000bc0| 65 6c 20 61 6e 64 20 74 | 68 65 20 73 74 72 69 63 |el and t|he stric|
|00000bd0| 74 20 74 79 70 69 6e 67 | 20 6f 66 0a 64 61 74 61 |t typing| of.data|
|00000be0| 2e 20 45 76 65 6e 20 6d | 6f 72 65 20 66 75 6e 64 |. Even m|ore fund|
|00000bf0| 61 6d 65 6e 74 61 6c 2c | 20 70 65 72 68 61 70 73 |amental,| perhaps|
|00000c00| 2c 20 69 73 20 74 68 65 | 20 69 64 65 61 20 6f 66 |, is the| idea of|
|00000c10| 20 61 62 73 74 72 61 63 | 74 69 6f 6e 3a 20 74 68 | abstrac|tion: th|
|00000c20| 65 0a 6c 61 6e 67 75 61 | 67 65 20 6d 75 73 74 20 |e.langua|ge must |
|00000c30| 62 65 20 64 65 66 69 6e | 65 64 20 69 6e 20 74 65 |be defin|ed in te|
|00000c40| 72 6d 73 20 6f 66 20 6d | 61 74 68 65 6d 61 74 69 |rms of m|athemati|
|00000c50| 63 61 6c 2c 20 61 62 73 | 74 72 61 63 74 20 63 6f |cal, abs|tract co|
|00000c60| 6e 63 65 70 74 73 0a 77 | 69 74 68 6f 75 74 20 72 |ncepts.w|ithout r|
|00000c70| 65 66 65 72 65 6e 63 65 | 20 74 6f 20 61 6e 79 20 |eference| to any |
|00000c80| 63 6f 6d 70 75 74 69 6e | 67 20 6d 65 63 68 61 6e |computin|g mechan|
|00000c90| 69 73 6d 2e 20 4f 6e 6c | 79 20 69 66 20 61 20 6c |ism. Onl|y if a l|
|00000ca0| 61 6e 67 75 61 67 65 20 | 73 61 74 69 73 66 69 65 |anguage |satisfie|
|00000cb0| 73 0a 74 68 69 73 20 63 | 72 69 74 65 72 69 6f 6e |s.this c|riterion|
|00000cc0| 2c 20 63 61 6e 20 69 74 | 20 62 65 20 63 61 6c 6c |, can it| be call|
|00000cd0| 65 64 20 22 68 69 67 68 | 65 72 2d 6c 65 76 65 6c |ed "high|er-level|
|00000ce0| 22 2e 20 4e 6f 20 73 79 | 6e 74 61 63 74 69 63 20 |". No sy|ntactic |
|00000cf0| 63 6f 61 74 69 6e 67 0a | 77 68 61 74 73 6f 65 76 |coating.|whatsoev|
|00000d00| 65 72 20 63 61 6e 20 65 | 61 72 6e 20 61 20 6c 61 |er can e|arn a la|
|00000d10| 6e 67 75 61 67 65 20 74 | 68 69 73 20 61 74 74 72 |nguage t|his attr|
|00000d20| 69 62 75 74 65 20 61 6c | 6f 6e 65 2e 0a 0a 54 68 |ibute al|one...Th|
|00000d30| 65 20 64 65 66 69 6e 69 | 74 69 6f 6e 20 6f 66 20 |e defini|tion of |
|00000d40| 61 20 6c 61 6e 67 75 61 | 67 65 20 6d 75 73 74 20 |a langua|ge must |
|00000d50| 62 65 20 63 6f 68 65 72 | 65 6e 74 20 61 6e 64 20 |be coher|ent and |
|00000d60| 63 6f 6e 63 69 73 65 2e | 20 54 68 69 73 20 63 61 |concise.| This ca|
|00000d70| 6e 20 6f 6e 6c 79 20 62 | 65 0a 61 63 68 69 65 76 |n only b|e.achiev|
|00000d80| 65 64 20 62 79 20 61 20 | 63 61 72 65 66 75 6c 20 |ed by a |careful |
|00000d90| 63 68 6f 69 63 65 20 6f | 66 20 74 68 65 20 75 6e |choice o|f the un|
|00000da0| 64 65 72 6c 79 69 6e 67 | 20 61 62 73 74 72 61 63 |derlying| abstrac|
|00000db0| 74 69 6f 6e 73 20 61 6e | 64 20 61 6e 0a 61 70 70 |tions an|d an.app|
|00000dc0| 72 6f 70 72 69 61 74 65 | 20 73 74 72 75 63 74 75 |ropriate| structu|
|00000dd0| 72 65 20 63 6f 6d 62 69 | 6e 69 6e 67 20 74 68 65 |re combi|ning the|
|00000de0| 6d 2e 20 54 68 65 20 6c | 61 6e 67 75 61 67 65 20 |m. The l|anguage |
|00000df0| 6d 61 6e 75 61 6c 20 6d | 75 73 74 20 62 65 0a 72 |manual m|ust be.r|
|00000e00| 65 61 73 6f 6e 61 62 6c | 79 20 73 68 6f 72 74 2c |easonabl|y short,|
|00000e10| 20 61 76 6f 69 64 69 6e | 67 20 74 68 65 20 65 78 | avoidin|g the ex|
|00000e20| 70 6c 61 6e 61 74 69 6f | 6e 20 6f 66 20 69 6e 64 |planatio|n of ind|
|00000e30| 69 76 69 64 75 61 6c 20 | 63 61 73 65 73 20 64 65 |ividual |cases de|
|00000e40| 72 69 76 61 62 6c 65 0a | 66 72 6f 6d 20 74 68 65 |rivable.|from the|
|00000e50| 20 67 65 6e 65 72 61 6c | 20 72 75 6c 65 73 2e 20 | general| rules. |
|00000e60| 54 68 65 20 70 6f 77 65 | 72 20 6f 66 20 61 20 66 |The powe|r of a f|
|00000e70| 6f 72 6d 61 6c 69 73 6d | 20 6d 75 73 74 20 6e 6f |ormalism| must no|
|00000e80| 74 20 62 65 20 6d 65 61 | 73 75 72 65 64 20 62 79 |t be mea|sured by|
|00000e90| 0a 74 68 65 20 6c 65 6e | 67 74 68 20 6f 66 20 69 |.the len|gth of i|
|00000ea0| 74 73 20 64 65 73 63 72 | 69 70 74 69 6f 6e 2e 20 |ts descr|iption. |
|00000eb0| 54 6f 20 74 68 65 20 63 | 6f 6e 74 72 61 72 79 2c |To the c|ontrary,|
|00000ec0| 20 61 6e 20 6f 76 65 72 | 6c 79 20 6c 65 6e 67 74 | an over|ly lengt|
|00000ed0| 68 79 0a 64 65 66 69 6e | 69 74 69 6f 6e 20 69 73 |hy.defin|ition is|
|00000ee0| 20 61 20 73 75 72 65 20 | 73 79 6d 70 74 6f 6d 20 | a sure |symptom |
|00000ef0| 6f 66 20 69 6e 61 64 65 | 71 75 61 63 79 2e 20 49 |of inade|quacy. I|
|00000f00| 6e 20 74 68 69 73 20 72 | 65 73 70 65 63 74 2c 20 |n this r|espect, |
|00000f10| 6e 6f 74 20 63 6f 6d 70 | 6c 65 78 69 74 79 0a 62 |not comp|lexity.b|
|00000f20| 75 74 20 73 69 6d 70 6c | 69 63 69 74 79 20 6d 75 |ut simpl|icity mu|
|00000f30| 73 74 20 62 65 20 74 68 | 65 20 67 6f 61 6c 2e 0a |st be th|e goal..|
|00000f40| 0a 49 6e 20 73 70 69 74 | 65 20 6f 66 20 69 74 73 |.In spit|e of its|
|00000f50| 20 62 72 65 76 69 74 79 | 2c 20 61 20 64 65 73 63 | brevity|, a desc|
|00000f60| 72 69 70 74 69 6f 6e 20 | 6d 75 73 74 20 62 65 20 |ription |must be |
|00000f70| 63 6f 6d 70 6c 65 74 65 | 2e 20 43 6f 6d 70 6c 65 |complete|. Comple|
|00000f80| 74 65 6e 65 73 73 20 69 | 73 20 74 6f 0a 62 65 20 |teness i|s to.be |
|00000f90| 61 63 68 69 65 76 65 64 | 20 77 69 74 68 69 6e 20 |achieved| within |
|00000fa0| 74 68 65 20 66 72 61 6d | 65 77 6f 72 6b 20 6f 66 |the fram|ework of|
|00000fb0| 20 74 68 65 20 63 68 6f | 73 65 6e 20 61 62 73 74 | the cho|sen abst|
|00000fc0| 72 61 63 74 69 6f 6e 73 | 2e 20 4c 69 6d 69 74 61 |ractions|. Limita|
|00000fd0| 74 69 6f 6e 73 0a 69 6d | 70 6f 73 65 64 20 62 79 |tions.im|posed by|
|00000fe0| 20 70 61 72 74 69 63 75 | 6c 61 72 20 69 6d 70 6c | particu|lar impl|
|00000ff0| 65 6d 65 6e 74 61 74 69 | 6f 6e 73 20 64 6f 20 6e |ementati|ons do n|
|00001000| 6f 74 20 62 65 6c 6f 6e | 67 20 74 6f 20 61 20 6c |ot belon|g to a l|
|00001010| 61 6e 67 75 61 67 65 0a | 64 65 66 69 6e 69 74 69 |anguage.|definiti|
|00001020| 6f 6e 20 70 72 6f 70 65 | 72 2e 20 45 78 61 6d 70 |on prope|r. Examp|
|00001030| 6c 65 73 20 6f 66 20 73 | 75 63 68 20 72 65 73 74 |les of s|uch rest|
|00001040| 72 69 63 74 69 6f 6e 73 | 20 61 72 65 20 74 68 65 |rictions| are the|
|00001050| 20 6d 61 78 69 6d 75 6d | 20 76 61 6c 75 65 73 20 | maximum| values |
|00001060| 6f 66 0a 6e 75 6d 62 65 | 72 73 2c 20 72 6f 75 6e |of.numbe|rs, roun|
|00001070| 64 69 6e 67 20 61 6e 64 | 20 74 72 75 6e 63 61 74 |ding and| truncat|
|00001080| 69 6f 6e 20 65 72 72 6f | 72 73 20 69 6e 20 61 72 |ion erro|rs in ar|
|00001090| 69 74 68 6d 65 74 69 63 | 2c 20 61 6e 64 20 61 63 |ithmetic|, and ac|
|000010a0| 74 69 6f 6e 73 20 74 61 | 6b 65 6e 0a 77 68 65 6e |tions ta|ken.when|
|000010b0| 20 61 20 70 72 6f 67 72 | 61 6d 20 76 69 6f 6c 61 | a progr|am viola|
|000010c0| 74 65 73 20 74 68 65 20 | 73 74 61 74 65 64 20 72 |tes the |stated r|
|000010d0| 75 6c 65 73 2e 20 49 74 | 20 73 68 6f 75 6c 64 20 |ules. It| should |
|000010e0| 6e 6f 74 20 62 65 20 6e | 65 63 65 73 73 61 72 79 |not be n|ecessary|
|000010f0| 20 74 6f 0a 73 75 70 70 | 6c 65 6d 65 6e 74 20 61 | to.supp|lement a|
|00001100| 20 6c 61 6e 67 75 61 67 | 65 20 64 65 66 69 6e 69 | languag|e defini|
|00001110| 74 69 6f 6e 20 77 69 74 | 68 20 61 20 76 6f 6c 75 |tion wit|h a volu|
|00001120| 6d 69 6e 6f 75 73 20 73 | 74 61 6e 64 61 72 64 73 |minous s|tandards|
|00001130| 20 64 6f 63 75 6d 65 6e | 74 20 74 6f 0a 63 6f 76 | documen|t to.cov|
|00001140| 65 72 20 22 75 6e 66 6f | 72 65 73 65 65 6e 22 20 |er "unfo|reseen" |
|00001150| 63 61 73 65 73 2e 0a 0a | 42 75 74 20 6e 65 69 74 |cases...|But neit|
|00001160| 68 65 72 20 73 68 6f 75 | 6c 64 20 61 20 70 72 6f |her shou|ld a pro|
|00001170| 67 72 61 6d 6d 69 6e 67 | 20 6c 61 6e 67 75 61 67 |gramming| languag|
|00001180| 65 20 62 65 20 61 20 6d | 61 74 68 65 6d 61 74 69 |e be a m|athemati|
|00001190| 63 61 6c 20 74 68 65 6f | 72 79 20 6f 6e 6c 79 2e |cal theo|ry only.|
|000011a0| 20 49 74 0a 6d 75 73 74 | 20 62 65 20 61 20 70 72 | It.must| be a pr|
|000011b0| 61 63 74 69 63 61 6c 20 | 74 6f 6f 6c 2e 20 54 68 |actical |tool. Th|
|000011c0| 69 73 20 69 6d 70 6f 73 | 65 73 20 63 65 72 74 61 |is impos|es certa|
|000011d0| 69 6e 20 6c 69 6d 69 74 | 73 20 6f 6e 20 74 68 65 |in limit|s on the|
|000011e0| 20 74 65 72 73 65 6e 65 | 73 73 20 6f 66 0a 74 68 | tersene|ss of.th|
|000011f0| 65 20 66 6f 72 6d 61 6c | 69 73 6d 2e 20 53 65 76 |e formal|ism. Sev|
|00001200| 65 72 61 6c 20 66 65 61 | 74 75 72 65 73 20 6f 66 |eral fea|tures of|
|00001210| 20 4f 62 65 72 6f 6e 20 | 61 72 65 20 73 75 70 65 | Oberon |are supe|
|00001220| 72 66 6c 75 6f 75 73 20 | 66 72 6f 6d 20 61 20 70 |rfluous |from a p|
|00001230| 75 72 65 6c 79 0a 74 68 | 65 6f 72 65 74 69 63 61 |urely.th|eoretica|
|00001240| 6c 20 70 6f 69 6e 74 20 | 6f 66 20 76 69 65 77 2e |l point |of view.|
|00001250| 20 54 68 65 79 20 61 72 | 65 20 6e 65 76 65 72 74 | They ar|e nevert|
|00001260| 68 65 6c 65 73 73 20 72 | 65 74 61 69 6e 65 64 20 |heless r|etained |
|00001270| 66 6f 72 20 70 72 61 63 | 74 69 63 61 6c 0a 72 65 |for prac|tical.re|
|00001280| 61 73 6f 6e 73 2c 20 65 | 69 74 68 65 72 20 66 6f |asons, e|ither fo|
|00001290| 72 20 70 72 6f 67 72 61 | 6d 6d 65 72 73 27 20 63 |r progra|mmers' c|
|000012a0| 6f 6e 76 65 6e 69 65 6e | 63 65 20 6f 72 20 74 6f |onvenien|ce or to|
|000012b0| 20 61 6c 6c 6f 77 20 66 | 6f 72 20 65 66 66 69 63 | allow f|or effic|
|000012c0| 69 65 6e 74 20 63 6f 64 | 65 0a 67 65 6e 65 72 61 |ient cod|e.genera|
|000012d0| 74 69 6f 6e 20 77 69 74 | 68 6f 75 74 20 74 68 65 |tion wit|hout the|
|000012e0| 20 6e 65 63 65 73 73 69 | 74 79 20 6f 66 20 63 6f | necessi|ty of co|
|000012f0| 6d 70 6c 65 78 2c 20 22 | 6f 70 74 69 6d 69 7a 69 |mplex, "|optimizi|
|00001300| 6e 67 22 20 70 61 74 74 | 65 72 6e 20 6d 61 74 63 |ng" patt|ern matc|
|00001310| 68 69 6e 67 0a 61 6c 67 | 6f 72 69 74 68 6d 73 20 |hing.alg|orithms |
|00001320| 69 6e 20 63 6f 6d 70 69 | 6c 65 72 73 2e 20 45 78 |in compi|lers. Ex|
|00001330| 61 6d 70 6c 65 73 20 6f | 66 20 73 75 63 68 20 66 |amples o|f such f|
|00001340| 65 61 74 75 72 65 73 20 | 61 72 65 20 74 68 65 20 |eatures |are the |
|00001350| 70 72 65 73 65 6e 63 65 | 20 6f 66 0a 73 65 76 65 |presence| of.seve|
|00001360| 72 61 6c 20 66 6f 72 6d | 73 20 6f 66 20 72 65 70 |ral form|s of rep|
|00001370| 65 74 69 74 69 76 65 20 | 73 74 61 74 65 6d 65 6e |etitive |statemen|
|00001380| 74 73 2c 20 61 6e 64 20 | 6f 66 20 73 74 61 6e 64 |ts, and |of stand|
|00001390| 61 72 64 20 70 72 6f 63 | 65 64 75 72 65 73 20 73 |ard proc|edures s|
|000013a0| 75 63 68 20 61 73 0a 49 | 4e 43 2c 20 44 45 43 2c |uch as.I|NC, DEC,|
|000013b0| 20 61 6e 64 20 4f 44 44 | 2e 20 54 68 65 79 20 63 | and ODD|. They c|
|000013c0| 6f 6d 70 6c 69 63 61 74 | 65 20 6e 65 69 74 68 65 |omplicat|e neithe|
|000013d0| 72 20 74 68 65 20 6c 61 | 6e 67 75 61 67 65 20 63 |r the la|nguage c|
|000013e0| 6f 6e 63 65 70 74 75 61 | 6c 6c 79 20 6e 6f 72 0a |onceptua|lly nor.|
|000013f0| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 20 74 6f 20 |the comp|iler to |
|00001400| 61 6e 79 20 73 69 67 6e | 69 66 69 63 61 6e 74 20 |any sign|ificant |
|00001410| 64 65 67 72 65 65 2e 0a | 0a 54 68 65 73 65 20 75 |degree..|.These u|
|00001420| 6e 64 65 72 6c 79 69 6e | 67 20 70 72 65 6d 69 73 |nderlyin|g premis|
|00001430| 65 73 20 6d 75 73 74 20 | 62 65 20 6b 65 70 74 20 |es must |be kept |
|00001440| 69 6e 20 6d 69 6e 64 20 | 77 68 65 6e 20 63 6f 6d |in mind |when com|
|00001450| 70 61 72 69 6e 67 20 4f | 62 65 72 6f 6e 20 77 69 |paring O|beron wi|
|00001460| 74 68 0a 6f 74 68 65 72 | 20 6c 61 6e 67 75 61 67 |th.other| languag|
|00001470| 65 73 2e 20 4e 65 69 74 | 68 65 72 20 74 68 65 20 |es. Neit|her the |
|00001480| 6c 61 6e 67 75 61 67 65 | 20 6e 6f 72 20 69 74 73 |language| nor its|
|00001490| 20 64 65 66 69 6e 69 6e | 67 20 64 6f 63 75 6d 65 | definin|g docume|
|000014a0| 6e 74 20 72 65 61 63 68 | 20 74 68 65 0a 69 64 65 |nt reach| the.ide|
|000014b0| 61 6c 3b 20 62 75 74 20 | 4f 62 65 72 6f 6e 20 61 |al; but |Oberon a|
|000014c0| 70 70 72 6f 78 69 6d 61 | 74 65 73 20 74 68 65 73 |pproxima|tes thes|
|000014d0| 65 20 67 6f 61 6c 73 20 | 6d 75 63 68 20 62 65 74 |e goals |much bet|
|000014e0| 74 65 72 20 74 68 61 6e | 20 69 74 73 0a 70 72 65 |ter than| its.pre|
|000014f0| 64 65 63 65 73 73 6f 72 | 73 2e 0a 0a 41 20 63 6f |decessor|s...A co|
|00001500| 6d 70 69 6c 65 72 20 66 | 6f 72 20 4f 62 65 72 6f |mpiler f|or Obero|
|00001510| 6e 20 68 61 73 20 62 65 | 65 6e 20 69 6d 70 6c 65 |n has be|en imple|
|00001520| 6d 65 6e 74 65 64 20 66 | 6f 72 20 74 68 65 20 4e |mented f|or the N|
|00001530| 53 33 32 30 30 30 20 70 | 72 6f 63 65 73 73 6f 72 |S32000 p|rocessor|
|00001540| 20 66 61 6d 69 6c 79 0a | 61 6e 64 20 69 73 20 65 | family.|and is e|
|00001550| 6d 62 65 64 64 65 64 20 | 69 6e 20 74 68 65 20 4f |mbedded |in the O|
|00001560| 62 65 72 6f 6e 20 6f 70 | 65 72 61 74 69 6e 67 20 |beron op|erating |
|00001570| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 5b 38 5d 2e |environm|ent [8].|
|00001580| 20 54 68 65 20 63 6f 6d | 70 69 6c 65 72 0a 72 65 | The com|piler.re|
|00001590| 71 75 69 72 65 73 20 6c | 65 73 73 20 74 68 61 6e |quires l|ess than|
|000015a0| 20 35 30 20 4b 42 79 74 | 65 20 6f 66 20 6d 65 6d | 50 KByt|e of mem|
|000015b0| 6f 72 79 2c 20 63 6f 6e | 73 69 73 74 73 20 6f 66 |ory, con|sists of|
|000015c0| 20 36 20 6d 6f 64 75 6c | 65 73 20 77 69 74 68 20 | 6 modul|es with |
|000015d0| 61 20 74 6f 74 61 6c 0a | 6f 66 20 61 62 6f 75 74 |a total.|of about|
|000015e0| 20 34 30 30 30 20 6c 69 | 6e 65 73 20 6f 66 20 73 | 4000 li|nes of s|
|000015f0| 6f 75 72 63 65 20 63 6f | 64 65 2c 20 61 6e 64 20 |ource co|de, and |
|00001600| 63 6f 6d 70 69 6c 65 73 | 20 69 74 73 65 6c 66 20 |compiles| itself |
|00001610| 69 6e 20 61 62 6f 75 74 | 20 31 35 20 73 65 63 6f |in about| 15 seco|
|00001620| 6e 64 73 0a 6f 6e 20 61 | 20 77 6f 72 6b 73 74 61 |nds.on a| worksta|
|00001630| 74 69 6f 6e 20 77 69 74 | 68 20 61 20 32 35 4d 48 |tion wit|h a 25MH|
|00001640| 7a 20 4e 53 33 32 35 33 | 32 20 70 72 6f 63 65 73 |z NS3253|2 proces|
|00001650| 73 6f 72 2e 0a 0a 41 66 | 74 65 72 20 65 78 74 65 |sor...Af|ter exte|
|00001660| 6e 73 69 76 65 20 65 78 | 70 65 72 69 65 6e 63 65 |nsive ex|perience|
|00001670| 20 69 6e 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 20 | in prog|ramming |
|00001680| 77 69 74 68 20 4f 62 65 | 72 6f 6e 2c 20 61 20 72 |with Obe|ron, a r|
|00001690| 65 76 69 73 69 6f 6e 20 | 77 61 73 0a 64 65 66 69 |evision |was.defi|
|000016a0| 6e 65 64 20 61 6e 64 20 | 69 6d 70 6c 65 6d 65 6e |ned and |implemen|
|000016b0| 74 65 64 2e 20 54 68 65 | 20 64 69 66 66 65 72 65 |ted. The| differe|
|000016c0| 6e 63 65 73 20 62 65 74 | 77 65 65 6e 20 74 68 65 |nces bet|ween the|
|000016d0| 20 74 77 6f 20 76 65 72 | 73 69 6f 6e 73 20 61 72 | two ver|sions ar|
|000016e0| 65 0a 73 75 6d 6d 61 72 | 69 73 65 64 20 74 6f 77 |e.summar|ised tow|
|000016f0| 61 72 64 73 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |ards the| end of |
|00001700| 74 68 65 20 70 61 70 65 | 72 2e 20 53 75 62 73 65 |the pape|r. Subse|
|00001710| 71 75 65 6e 74 6c 79 2c | 20 77 65 20 70 72 65 73 |quently,| we pres|
|00001720| 65 6e 74 20 61 20 62 72 | 69 65 66 0a 69 6e 74 72 |ent a br|ief.intr|
|00001730| 6f 64 75 63 74 69 6f 6e | 20 74 6f 20 28 72 65 76 |oduction| to (rev|
|00001740| 69 73 65 64 29 20 4f 62 | 65 72 6f 6e 20 61 73 73 |ised) Ob|eron ass|
|00001750| 75 6d 69 6e 67 20 66 61 | 6d 69 6c 69 61 72 69 74 |uming fa|miliarit|
|00001760| 79 20 77 69 74 68 20 4d | 6f 64 75 6c 61 20 28 6f |y with M|odula (o|
|00001770| 72 0a 50 61 73 63 61 6c | 29 2c 20 63 6f 6e 63 65 |r.Pascal|), conce|
|00001780| 6e 74 72 61 74 69 6e 67 | 20 6f 6e 20 74 68 65 20 |ntrating| on the |
|00001790| 61 64 64 65 64 20 66 65 | 61 74 75 72 65 73 20 61 |added fe|atures a|
|000017a0| 6e 64 20 6c 69 73 74 69 | 6e 67 20 74 68 65 20 65 |nd listi|ng the e|
|000017b0| 6c 69 6d 69 6e 61 74 65 | 64 0a 6f 6e 65 73 2e 20 |liminate|d.ones. |
|000017c0| 49 6e 20 6f 72 64 65 72 | 20 74 6f 20 62 65 20 61 |In order| to be a|
|000017d0| 62 6c 65 20 74 6f 20 73 | 74 61 72 74 20 77 69 74 |ble to s|tart wit|
|000017e0| 68 20 61 20 63 6c 65 61 | 6e 20 73 6c 61 74 65 2c |h a clea|n slate,|
|000017f0| 20 74 68 65 20 6c 61 74 | 74 65 72 20 61 72 65 20 | the lat|ter are |
|00001800| 74 61 6b 65 6e 0a 66 69 | 72 73 74 2e 0a 0a 46 65 |taken.fi|rst...Fe|
|00001810| 61 74 75 72 65 73 20 6f | 6d 69 74 74 65 64 20 66 |atures o|mitted f|
|00001820| 72 6f 6d 20 4d 6f 64 75 | 6c 61 0a 0a 44 61 74 61 |rom Modu|la..Data|
|00001830| 20 74 79 70 65 73 0a 0a | 56 61 72 69 61 6e 74 20 | types..|Variant |
|00001840| 72 65 63 6f 72 64 73 20 | 61 72 65 20 65 6c 69 6d |records |are elim|
|00001850| 69 6e 61 74 65 64 2c 20 | 62 65 63 61 75 73 65 20 |inated, |because |
|00001860| 74 68 65 79 20 63 6f 6e | 73 74 69 74 75 74 65 20 |they con|stitute |
|00001870| 61 20 67 65 6e 75 69 6e | 65 0a 64 69 66 66 69 63 |a genuin|e.diffic|
|00001880| 75 6c 74 79 20 66 6f 72 | 20 74 68 65 20 69 6d 70 |ulty for| the imp|
|00001890| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 61 |lementat|ion of a|
|000018a0| 20 72 65 6c 69 61 62 6c | 65 20 73 74 6f 72 61 67 | reliabl|e storag|
|000018b0| 65 20 6d 61 6e 61 67 65 | 6d 65 6e 74 20 73 79 73 |e manage|ment sys|
|000018c0| 74 65 6d 0a 62 61 73 65 | 64 20 6f 6e 20 61 75 74 |tem.base|d on aut|
|000018d0| 6f 6d 61 74 69 63 20 67 | 61 72 62 61 67 65 20 63 |omatic g|arbage c|
|000018e0| 6f 6c 6c 65 63 74 69 6f | 6e 2e 20 54 68 65 20 66 |ollectio|n. The f|
|000018f0| 75 6e 63 74 69 6f 6e 61 | 6c 69 74 79 20 6f 66 20 |unctiona|lity of |
|00001900| 76 61 72 69 61 6e 74 20 | 72 65 63 6f 72 64 73 0a |variant |records.|
|00001910| 69 73 20 70 72 65 73 65 | 72 76 65 64 20 62 79 20 |is prese|rved by |
|00001920| 74 68 65 20 69 6e 74 72 | 6f 64 75 63 74 69 6f 6e |the intr|oduction|
|00001930| 20 6f 66 20 65 78 74 65 | 6e 73 69 62 6c 65 20 64 | of exte|nsible d|
|00001940| 61 74 61 20 74 79 70 65 | 73 2e 0a 0a 4f 70 61 71 |ata type|s...Opaq|
|00001950| 75 65 20 74 79 70 65 73 | 20 63 61 74 65 72 20 66 |ue types| cater f|
|00001960| 6f 72 20 74 68 65 20 63 | 6f 6e 63 65 70 74 20 6f |or the c|oncept o|
|00001970| 66 20 61 62 73 74 72 61 | 63 74 20 64 61 74 61 20 |f abstra|ct data |
|00001980| 74 79 70 65 20 61 6e 64 | 20 69 6e 66 6f 72 6d 61 |type and| informa|
|00001990| 74 69 6f 6e 0a 68 69 64 | 69 6e 67 2e 20 54 68 65 |tion.hid|ing. The|
|000019a0| 79 20 61 72 65 20 65 6c | 69 6d 69 6e 61 74 65 64 |y are el|iminated|
|000019b0| 20 61 73 20 73 75 63 68 | 2c 20 62 65 63 61 75 73 | as such|, becaus|
|000019c0| 65 20 61 67 61 69 6e 20 | 74 68 65 20 63 6f 6e 63 |e again |the conc|
|000019d0| 65 70 74 20 69 73 20 63 | 6f 76 65 72 65 64 0a 62 |ept is c|overed.b|
|000019e0| 79 20 74 68 65 20 6e 65 | 77 20 66 61 63 69 6c 69 |y the ne|w facili|
|000019f0| 74 79 20 6f 66 20 65 78 | 74 65 6e 64 65 64 20 72 |ty of ex|tended r|
|00001a00| 65 63 6f 72 64 20 74 79 | 70 65 73 2e 0a 0a 45 6e |ecord ty|pes...En|
|00001a10| 75 6d 65 72 61 74 69 6f | 6e 20 74 79 70 65 73 20 |umeratio|n types |
|00001a20| 61 70 70 65 61 72 20 74 | 6f 20 62 65 20 61 20 73 |appear t|o be a s|
|00001a30| 69 6d 70 6c 65 20 65 6e | 6f 75 67 68 20 66 65 61 |imple en|ough fea|
|00001a40| 74 75 72 65 20 74 6f 20 | 62 65 0a 75 6e 63 6f 6e |ture to |be.uncon|
|00001a50| 74 72 6f 76 65 72 73 69 | 61 6c 2e 20 48 6f 77 65 |troversi|al. Howe|
|00001a60| 76 65 72 2c 20 74 68 65 | 79 20 64 65 66 79 20 65 |ver, the|y defy e|
|00001a70| 78 74 65 6e 73 69 62 69 | 6c 69 74 79 20 6f 76 65 |xtensibi|lity ove|
|00001a80| 72 20 6d 6f 64 75 6c 65 | 20 62 6f 75 6e 64 61 72 |r module| boundar|
|00001a90| 69 65 73 2e 0a 45 69 74 | 68 65 72 20 61 20 66 61 |ies..Eit|her a fa|
|00001aa0| 63 69 6c 69 74 79 20 74 | 6f 20 65 78 74 65 6e 64 |cility t|o extend|
|00001ab0| 20 67 69 76 65 6e 20 65 | 6e 75 6d 65 72 61 74 69 | given e|numerati|
|00001ac0| 6f 6e 20 74 79 70 65 73 | 20 68 61 73 20 74 6f 20 |on types| has to |
|00001ad0| 62 65 20 69 6e 74 72 6f | 64 75 63 65 64 2c 0a 6f |be intro|duced,.o|
|00001ae0| 72 20 74 68 65 79 20 68 | 61 76 65 20 74 6f 20 62 |r they h|ave to b|
|00001af0| 65 20 64 72 6f 70 70 65 | 64 2e 20 41 20 72 65 61 |e droppe|d. A rea|
|00001b00| 73 6f 6e 20 69 6e 20 66 | 61 76 6f 75 72 20 6f 66 |son in f|avour of|
|00001b10| 20 74 68 65 20 6c 61 74 | 74 65 72 2c 20 72 61 64 | the lat|ter, rad|
|00001b20| 69 63 61 6c 0a 73 6f 6c | 75 74 69 6f 6e 20 77 61 |ical.sol|ution wa|
|00001b30| 73 20 74 68 65 20 6f 62 | 73 65 72 76 61 74 69 6f |s the ob|servatio|
|00001b40| 6e 20 74 68 61 74 20 69 | 6e 20 61 20 67 72 6f 77 |n that i|n a grow|
|00001b50| 69 6e 67 20 6e 75 6d 62 | 65 72 20 6f 66 20 70 72 |ing numb|er of pr|
|00001b60| 6f 67 72 61 6d 73 20 74 | 68 65 0a 69 6e 64 69 73 |ograms t|he.indis|
|00001b70| 63 72 69 6d 69 6e 61 74 | 65 20 75 73 65 20 6f 66 |criminat|e use of|
|00001b80| 20 65 6e 75 6d 65 72 61 | 74 69 6f 6e 73 20 28 61 | enumera|tions (a|
|00001b90| 6e 64 20 73 75 62 72 61 | 6e 67 65 73 29 20 68 61 |nd subra|nges) ha|
|00001ba0| 64 20 6c 65 64 20 74 6f | 20 61 20 74 79 70 65 0a |d led to| a type.|
|00001bb0| 65 78 70 6c 6f 73 69 6f | 6e 20 74 68 61 74 20 63 |explosio|n that c|
|00001bc0| 6f 6e 74 72 69 62 75 74 | 65 64 20 6e 6f 74 20 74 |ontribut|ed not t|
|00001bd0| 6f 20 70 72 6f 67 72 61 | 6d 20 63 6c 61 72 69 74 |o progra|m clarit|
|00001be0| 79 20 62 75 74 20 72 61 | 74 68 65 72 20 74 6f 20 |y but ra|ther to |
|00001bf0| 76 65 72 62 6f 73 69 74 | 79 2e 0a 49 6e 20 63 6f |verbosit|y..In co|
|00001c00| 6e 6e 65 63 74 69 6f 6e | 20 77 69 74 68 20 69 6d |nnection| with im|
|00001c10| 70 6f 72 74 20 61 6e 64 | 20 65 78 70 6f 72 74 2c |port and| export,|
|00001c20| 20 65 6e 75 6d 65 72 61 | 74 69 6f 6e 73 20 67 69 | enumera|tions gi|
|00001c30| 76 65 20 72 69 73 65 20 | 74 6f 20 74 68 65 0a 65 |ve rise |to the.e|
|00001c40| 78 63 65 70 74 69 6f 6e | 61 6c 20 72 75 6c 65 20 |xception|al rule |
|00001c50| 74 68 61 74 20 74 68 65 | 20 69 6d 70 6f 72 74 20 |that the| import |
|00001c60| 6f 66 20 61 20 74 79 70 | 65 20 69 64 65 6e 74 69 |of a typ|e identi|
|00001c70| 66 69 65 72 20 61 6c 73 | 6f 20 63 61 75 73 65 73 |fier als|o causes|
|00001c80| 20 74 68 65 0a 28 61 75 | 74 6f 6d 61 74 69 63 29 | the.(au|tomatic)|
|00001c90| 20 69 6d 70 6f 72 74 20 | 6f 66 20 61 6c 6c 20 61 | import |of all a|
|00001ca0| 73 73 6f 63 69 61 74 65 | 64 20 63 6f 6e 73 74 61 |ssociate|d consta|
|00001cb0| 6e 74 20 69 64 65 6e 74 | 69 66 69 65 72 73 2e 20 |nt ident|ifiers. |
|00001cc0| 54 68 69 73 20 65 78 63 | 65 70 74 69 6f 6e 61 6c |This exc|eptional|
|00001cd0| 0a 72 75 6c 65 20 64 65 | 66 69 65 73 20 63 6f 6e |.rule de|fies con|
|00001ce0| 63 65 70 74 75 61 6c 20 | 73 69 6d 70 6c 69 63 69 |ceptual |simplici|
|00001cf0| 74 79 20 61 6e 64 20 63 | 61 75 73 65 73 20 75 6e |ty and c|auses un|
|00001d00| 70 6c 65 61 73 61 6e 74 | 20 70 72 6f 62 6c 65 6d |pleasant| problem|
|00001d10| 73 20 66 6f 72 20 74 68 | 65 0a 69 6d 70 6c 65 6d |s for th|e.implem|
|00001d20| 65 6e 74 6f 72 2e 0a 0a | 53 75 62 72 61 6e 67 65 |entor...|Subrange|
|00001d30| 20 74 79 70 65 73 20 77 | 65 72 65 20 69 6e 74 72 | types w|ere intr|
|00001d40| 6f 64 75 63 65 64 20 69 | 6e 20 50 61 73 63 61 6c |oduced i|n Pascal|
|00001d50| 20 28 61 6e 64 20 61 64 | 6f 70 74 65 64 20 69 6e | (and ad|opted in|
|00001d60| 20 4d 6f 64 75 6c 61 29 | 20 66 6f 72 20 74 77 6f | Modula)| for two|
|00001d70| 0a 72 65 61 73 6f 6e 73 | 3a 20 28 31 29 20 74 6f |.reasons|: (1) to|
|00001d80| 20 69 6e 64 69 63 61 74 | 65 20 74 68 61 74 20 61 | indicat|e that a|
|00001d90| 20 76 61 72 69 61 62 6c | 65 20 61 63 63 65 70 74 | variabl|e accept|
|00001da0| 73 20 61 20 6c 69 6d 69 | 74 65 64 20 72 61 6e 67 |s a limi|ted rang|
|00001db0| 65 20 6f 66 20 76 61 6c | 75 65 73 0a 6f 66 20 74 |e of val|ues.of t|
|00001dc0| 68 65 20 62 61 73 65 20 | 74 79 70 65 20 61 6e 64 |he base |type and|
|00001dd0| 20 74 6f 20 61 6c 6c 6f | 77 20 61 20 63 6f 6d 70 | to allo|w a comp|
|00001de0| 69 6c 65 72 20 74 6f 20 | 67 65 6e 65 72 61 74 65 |iler to |generate|
|00001df0| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 67 75 61 | appropr|iate gua|
|00001e00| 72 64 73 20 66 6f 72 0a | 61 73 73 69 67 6e 6d 65 |rds for.|assignme|
|00001e10| 6e 74 73 2c 20 61 6e 64 | 20 28 32 29 20 74 6f 20 |nts, and| (2) to |
|00001e20| 61 6c 6c 6f 77 20 61 20 | 63 6f 6d 70 69 6c 65 72 |allow a |compiler|
|00001e30| 20 74 6f 20 61 6c 6c 6f | 63 61 74 65 20 74 68 65 | to allo|cate the|
|00001e40| 20 6d 69 6e 69 6d 61 6c | 20 73 74 6f 72 61 67 65 | minimal| storage|
|00001e50| 0a 73 70 61 63 65 20 6e | 65 65 64 65 64 20 74 6f |.space n|eeded to|
|00001e60| 20 73 74 6f 72 65 20 76 | 61 6c 75 65 73 20 6f 66 | store v|alues of|
|00001e70| 20 74 68 65 20 69 6e 64 | 69 63 61 74 65 64 20 73 | the ind|icated s|
|00001e80| 75 62 72 61 6e 67 65 2e | 20 54 68 69 73 20 61 70 |ubrange.| This ap|
|00001e90| 70 65 61 72 65 64 0a 64 | 65 73 69 72 61 62 6c 65 |peared.d|esirable|
|00001ea0| 20 69 6e 20 63 6f 6e 6e | 65 63 74 69 6f 6e 20 77 | in conn|ection w|
|00001eb0| 69 74 68 20 70 61 63 6b | 65 64 20 72 65 63 6f 72 |ith pack|ed recor|
|00001ec0| 64 73 2e 20 56 65 72 79 | 20 66 65 77 20 69 6d 70 |ds. Very| few imp|
|00001ed0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 73 20 68 61 76 |lementat|ions hav|
|00001ee0| 65 0a 74 61 6b 65 6e 20 | 61 64 76 61 6e 74 61 67 |e.taken |advantag|
|00001ef0| 65 20 6f 66 20 74 68 69 | 73 20 73 70 61 63 65 20 |e of thi|s space |
|00001f00| 73 61 76 69 6e 67 20 66 | 61 63 69 6c 69 74 79 2c |saving f|acility,|
|00001f10| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 61 64 64 | because| the add|
|00001f20| 69 74 69 6f 6e 61 6c 0a | 63 6f 6d 70 69 6c 65 72 |itional.|compiler|
|00001f30| 20 63 6f 6d 70 6c 65 78 | 69 74 79 20 69 73 20 76 | complex|ity is v|
|00001f40| 65 72 79 20 63 6f 6e 73 | 69 64 65 72 61 62 6c 65 |ery cons|iderable|
|00001f50| 2e 20 52 65 61 73 6f 6e | 20 31 20 61 6c 6f 6e 65 |. Reason| 1 alone|
|00001f60| 2c 20 68 6f 77 65 76 65 | 72 2c 20 64 69 64 20 6e |, howeve|r, did n|
|00001f70| 6f 74 0a 61 70 70 65 61 | 72 20 74 6f 20 70 72 6f |ot.appea|r to pro|
|00001f80| 76 69 64 65 20 73 75 66 | 66 69 63 69 65 6e 74 20 |vide suf|ficient |
|00001f90| 6a 75 73 74 69 66 69 63 | 61 74 69 6f 6e 20 74 6f |justific|ation to|
|00001fa0| 20 72 65 74 61 69 6e 20 | 74 68 65 20 73 75 62 72 | retain |the subr|
|00001fb0| 61 6e 67 65 20 66 61 63 | 69 6c 69 74 79 0a 69 6e |ange fac|ility.in|
|00001fc0| 20 4f 62 65 72 6f 6e 2e | 0a 0a 57 69 74 68 20 74 | Oberon.|..With t|
|00001fd0| 68 65 20 61 62 73 65 6e | 63 65 20 6f 66 20 65 6e |he absen|ce of en|
|00001fe0| 75 6d 65 72 61 74 69 6f | 6e 20 61 6e 64 20 73 75 |umeratio|n and su|
|00001ff0| 62 72 61 6e 67 65 20 74 | 79 70 65 73 2c 20 74 68 |brange t|ypes, th|
|00002000| 65 20 67 65 6e 65 72 61 | 6c 20 70 6f 73 73 69 62 |e genera|l possib|
|00002010| 69 6c 69 74 79 0a 6f 66 | 20 64 65 66 69 6e 69 6e |ility.of| definin|
|00002020| 67 20 73 65 74 20 74 79 | 70 65 73 20 62 61 73 65 |g set ty|pes base|
|00002030| 64 20 6f 6e 20 67 69 76 | 65 6e 20 65 6c 65 6d 65 |d on giv|en eleme|
|00002040| 6e 74 20 74 79 70 65 73 | 20 61 70 70 65 61 72 65 |nt types| appeare|
|00002050| 64 20 61 73 20 72 65 64 | 75 6e 64 61 6e 74 2e 0a |d as red|undant..|
|00002060| 49 6e 73 74 65 61 64 2c | 20 61 20 73 69 6e 67 6c |Instead,| a singl|
|00002070| 65 2c 20 62 61 73 69 63 | 20 74 79 70 65 20 53 45 |e, basic| type SE|
|00002080| 54 20 69 73 20 69 6e 74 | 72 6f 64 75 63 65 64 2c |T is int|roduced,|
|00002090| 20 77 68 6f 73 65 20 76 | 61 6c 75 65 73 20 61 72 | whose v|alues ar|
|000020a0| 65 20 73 65 74 73 20 6f | 66 0a 69 6e 74 65 67 65 |e sets o|f.intege|
|000020b0| 72 73 20 66 72 6f 6d 20 | 30 20 74 6f 20 61 6e 20 |rs from |0 to an |
|000020c0| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 2d 64 |implemen|tation-d|
|000020d0| 65 66 69 6e 65 64 20 6d | 61 78 69 6d 75 6d 2e 0a |efined m|aximum..|
|000020e0| 0a 54 68 65 20 62 61 73 | 69 63 20 74 79 70 65 20 |.The bas|ic type |
|000020f0| 43 41 52 44 49 4e 41 4c | 20 68 61 64 20 62 65 65 |CARDINAL| had bee|
|00002100| 6e 20 69 6e 74 72 6f 64 | 75 63 65 64 20 69 6e 20 |n introd|uced in |
|00002110| 4d 6f 64 75 6c 61 20 69 | 6e 20 6f 72 64 65 72 20 |Modula i|n order |
|00002120| 74 6f 20 61 6c 6c 6f 77 | 0a 61 64 64 72 65 73 73 |to allow|.address|
|00002130| 20 61 72 69 74 68 6d 65 | 74 69 63 20 77 69 74 68 | arithme|tic with|
|00002140| 20 76 61 6c 75 65 73 20 | 66 72 6f 6d 20 30 20 74 | values |from 0 t|
|00002150| 6f 20 32 31 36 20 6f 6e | 20 31 36 2d 62 69 74 20 |o 216 on| 16-bit |
|00002160| 63 6f 6d 70 75 74 65 72 | 73 2e 20 57 69 74 68 20 |computer|s. With |
|00002170| 74 68 65 0a 70 72 65 76 | 61 6c 65 6e 63 65 20 6f |the.prev|alence o|
|00002180| 66 20 33 32 2d 62 69 74 | 20 61 64 64 72 65 73 73 |f 32-bit| address|
|00002190| 65 73 20 69 6e 20 6d 6f | 64 65 72 6e 20 70 72 6f |es in mo|dern pro|
|000021a0| 63 65 73 73 6f 72 73 2c | 20 74 68 65 20 6e 65 65 |cessors,| the nee|
|000021b0| 64 20 66 6f 72 20 75 6e | 73 69 67 6e 65 64 0a 61 |d for un|signed.a|
|000021c0| 72 69 74 68 6d 65 74 69 | 63 20 68 61 73 20 70 72 |rithmeti|c has pr|
|000021d0| 61 63 74 69 63 61 6c 6c | 79 20 76 61 6e 69 73 68 |acticall|y vanish|
|000021e0| 65 64 2c 20 61 6e 64 20 | 74 68 65 72 65 66 6f 72 |ed, and |therefor|
|000021f0| 65 20 74 68 65 20 74 79 | 70 65 20 43 41 52 44 49 |e the ty|pe CARDI|
|00002200| 4e 41 4c 20 68 61 73 0a | 62 65 65 6e 20 65 6c 69 |NAL has.|been eli|
|00002210| 6d 69 6e 61 74 65 64 2e | 20 57 69 74 68 20 69 74 |minated.| With it|
|00002220| 2c 20 74 68 65 20 62 6f | 74 68 65 72 73 6f 6d 65 |, the bo|thersome|
|00002230| 20 69 6e 63 6f 6d 70 61 | 74 69 62 69 6c 69 74 69 | incompa|tibiliti|
|00002240| 65 73 20 6f 66 20 6f 70 | 65 72 61 6e 64 73 20 6f |es of op|erands o|
|00002250| 66 0a 74 79 70 65 73 20 | 43 41 52 44 49 4e 41 4c |f.types |CARDINAL|
|00002260| 20 61 6e 64 20 49 4e 54 | 45 47 45 52 20 68 61 76 | and INT|EGER hav|
|00002270| 65 20 64 69 73 61 70 70 | 65 61 72 65 64 2e 0a 0a |e disapp|eared...|
|00002280| 50 6f 69 6e 74 65 72 20 | 74 79 70 65 73 20 61 72 |Pointer |types ar|
|00002290| 65 20 72 65 73 74 72 69 | 63 74 65 64 20 74 6f 20 |e restri|cted to |
|000022a0| 62 65 20 62 6f 75 6e 64 | 20 74 6f 20 61 20 72 65 |be bound| to a re|
|000022b0| 63 6f 72 64 20 74 79 70 | 65 20 6f 72 20 74 6f 20 |cord typ|e or to |
|000022c0| 61 6e 20 61 72 72 61 79 | 0a 74 79 70 65 2e 0a 0a |an array|.type...|
|000022d0| 54 68 65 20 6e 6f 74 69 | 6f 6e 20 6f 66 20 61 20 |The noti|on of a |
|000022e0| 64 65 66 69 6e 61 62 6c | 65 20 69 6e 64 65 78 20 |definabl|e index |
|000022f0| 74 79 70 65 20 6f 66 20 | 61 72 72 61 79 73 20 68 |type of |arrays h|
|00002300| 61 73 20 61 6c 73 6f 20 | 62 65 65 6e 20 61 62 61 |as also |been aba|
|00002310| 6e 64 6f 6e 65 64 3a 20 | 41 6c 6c 0a 69 6e 64 69 |ndoned: |All.indi|
|00002320| 63 65 73 20 61 72 65 20 | 62 79 20 64 65 66 61 75 |ces are |by defau|
|00002330| 6c 74 20 69 6e 74 65 67 | 65 72 73 2e 20 46 75 72 |lt integ|ers. Fur|
|00002340| 74 68 65 72 6d 6f 72 65 | 2c 20 74 68 65 20 6c 6f |thermore|, the lo|
|00002350| 77 65 72 20 62 6f 75 6e | 64 20 69 73 20 66 69 78 |wer boun|d is fix|
|00002360| 65 64 20 74 6f 0a 30 3b | 20 61 72 72 61 79 20 64 |ed to.0;| array d|
|00002370| 65 63 6c 61 72 61 74 69 | 6f 6e 73 20 73 70 65 63 |eclarati|ons spec|
|00002380| 69 66 79 20 61 20 6e 75 | 6d 62 65 72 20 6f 66 20 |ify a nu|mber of |
|00002390| 65 6c 65 6d 65 6e 74 73 | 20 28 6c 65 6e 67 74 68 |elements| (length|
|000023a0| 29 20 72 61 74 68 65 72 | 20 74 68 61 6e 20 61 0a |) rather| than a.|
|000023b0| 70 61 69 72 20 6f 66 20 | 62 6f 75 6e 64 73 2e 20 |pair of |bounds. |
|000023c0| 54 68 69 73 20 62 72 65 | 61 6b 20 77 69 74 68 20 |This bre|ak with |
|000023d0| 61 20 6c 6f 6e 67 20 73 | 74 61 6e 64 69 6e 67 20 |a long s|tanding |
|000023e0| 74 72 61 64 69 74 69 6f | 6e 20 73 69 6e 63 65 20 |traditio|n since |
|000023f0| 41 6c 67 6f 6c 20 36 30 | 0a 63 6c 65 61 72 6c 79 |Algol 60|.clearly|
|00002400| 20 64 65 6d 6f 6e 73 74 | 72 61 74 65 73 20 74 68 | demonst|rates th|
|00002410| 65 20 70 72 69 6e 63 69 | 70 6c 65 20 6f 66 20 65 |e princi|ple of e|
|00002420| 6c 69 6d 69 6e 61 74 69 | 6e 67 20 74 68 65 20 69 |liminati|ng the i|
|00002430| 6e 65 73 73 65 6e 74 69 | 61 6c 2e 20 54 68 65 0a |nessenti|al. The.|
|00002440| 73 70 65 63 69 66 69 63 | 61 74 69 6f 6e 20 6f 66 |specific|ation of|
|00002450| 20 61 6e 20 61 72 62 69 | 74 72 61 72 79 20 6c 6f | an arbi|trary lo|
|00002460| 77 65 72 20 62 6f 75 6e | 64 20 68 61 72 64 6c 79 |wer boun|d hardly|
|00002470| 20 70 72 6f 76 69 64 65 | 73 20 61 6e 79 20 61 64 | provide|s any ad|
|00002480| 64 69 74 69 6f 6e 61 6c | 0a 65 78 70 72 65 73 73 |ditional|.express|
|00002490| 69 76 65 20 70 6f 77 65 | 72 2e 20 49 74 20 72 65 |ive powe|r. It re|
|000024a0| 70 72 65 73 65 6e 74 73 | 20 61 20 72 61 74 68 65 |presents| a rathe|
|000024b0| 72 20 6c 69 6d 69 74 65 | 64 20 6b 69 6e 64 20 6f |r limite|d kind o|
|000024c0| 66 20 6d 61 70 70 69 6e | 67 20 6f 66 20 69 6e 64 |f mappin|g of ind|
|000024d0| 69 63 65 73 0a 77 68 69 | 63 68 20 69 6e 74 72 6f |ices.whi|ch intro|
|000024e0| 64 75 63 65 73 20 61 20 | 68 69 64 64 65 6e 20 63 |duces a |hidden c|
|000024f0| 6f 6d 70 75 74 61 74 69 | 6f 6e 61 6c 20 65 66 66 |omputati|onal eff|
|00002500| 6f 72 74 20 74 68 61 74 | 20 69 73 20 69 6e 63 6f |ort that| is inco|
|00002510| 6d 6d 65 6e 73 75 72 61 | 74 65 20 77 69 74 68 0a |mmensura|te with.|
|00002520| 74 68 65 20 73 75 70 70 | 6f 73 65 64 20 67 61 69 |the supp|osed gai|
|00002530| 6e 20 69 6e 20 63 6f 6e | 76 65 6e 69 65 6e 63 65 |n in con|venience|
|00002540| 2e 20 54 68 69 73 20 65 | 66 66 6f 72 74 20 69 73 |. This e|ffort is|
|00002550| 20 70 61 72 74 69 63 75 | 6c 61 72 6c 79 20 68 65 | particu|larly he|
|00002560| 61 76 79 20 69 6e 0a 63 | 6f 6e 6e 65 63 74 69 6f |avy in.c|onnectio|
|00002570| 6e 20 77 69 74 68 20 62 | 6f 75 6e 64 20 63 68 65 |n with b|ound che|
|00002580| 63 6b 69 6e 67 20 61 6e | 64 20 77 69 74 68 20 64 |cking an|d with d|
|00002590| 79 6e 61 6d 69 63 20 61 | 72 72 61 79 73 2e 0a 0a |ynamic a|rrays...|
|000025a0| 4d 6f 64 75 6c 65 73 20 | 61 6e 64 20 69 6d 70 6f |Modules |and impo|
|000025b0| 72 74 2f 65 78 70 6f 72 | 74 20 72 75 6c 65 73 0a |rt/expor|t rules.|
|000025c0| 0a 45 78 70 65 72 69 65 | 6e 63 65 20 77 69 74 68 |.Experie|nce with|
|000025d0| 20 4d 6f 64 75 6c 61 20 | 6f 76 65 72 20 74 68 65 | Modula |over the|
|000025e0| 20 6c 61 73 74 20 65 69 | 67 68 74 20 79 65 61 72 | last ei|ght year|
|000025f0| 73 20 68 61 73 20 73 68 | 6f 77 6e 20 74 68 61 74 |s has sh|own that|
|00002600| 20 6c 6f 63 61 6c 0a 6d | 6f 64 75 6c 65 73 20 77 | local.m|odules w|
|00002610| 65 72 65 20 72 61 72 65 | 6c 79 20 75 73 65 64 2e |ere rare|ly used.|
|00002620| 20 43 6f 6e 73 69 64 65 | 72 69 6e 67 20 74 68 65 | Conside|ring the|
|00002630| 20 61 64 64 69 74 69 6f | 6e 61 6c 20 63 6f 6d 70 | additio|nal comp|
|00002640| 6c 65 78 69 74 79 20 6f | 66 20 74 68 65 0a 63 6f |lexity o|f the.co|
|00002650| 6d 70 69 6c 65 72 20 72 | 65 71 75 69 72 65 64 20 |mpiler r|equired |
|00002660| 74 6f 20 68 61 6e 64 6c | 65 20 74 68 65 6d 2c 20 |to handl|e them, |
|00002670| 61 6e 64 20 74 68 65 20 | 61 64 64 69 74 69 6f 6e |and the |addition|
|00002680| 61 6c 20 63 6f 6d 70 6c | 69 63 61 74 69 6f 6e 73 |al compl|ications|
|00002690| 20 69 6e 20 74 68 65 0a | 76 69 73 69 62 6c 69 74 | in the.|visiblit|
|000026a0| 79 20 72 75 6c 65 73 20 | 6f 66 20 74 68 65 20 6c |y rules |of the l|
|000026b0| 61 6e 67 75 61 67 65 20 | 64 65 66 69 6e 69 74 69 |anguage |definiti|
|000026c0| 6f 6e 2c 20 74 68 65 20 | 65 6c 69 6d 69 6e 61 74 |on, the |eliminat|
|000026d0| 69 6f 6e 20 6f 66 20 6c | 6f 63 61 6c 0a 6d 6f 64 |ion of l|ocal.mod|
|000026e0| 75 6c 65 73 20 61 70 70 | 65 61 72 73 20 6a 75 73 |ules app|ears jus|
|000026f0| 74 69 66 69 65 64 2e 0a | 0a 54 68 65 20 71 75 61 |tified..|.The qua|
|00002700| 6c 69 66 69 63 61 74 69 | 6f 6e 20 6f 66 20 61 6e |lificati|on of an|
|00002710| 20 69 6d 70 6f 72 74 65 | 64 20 6f 62 6a 65 63 74 | importe|d object|
|00002720| 27 73 20 69 64 65 6e 74 | 69 66 69 65 72 20 78 20 |'s ident|ifier x |
|00002730| 62 79 20 74 68 65 20 65 | 78 70 6f 72 74 69 6e 67 |by the e|xporting|
|00002740| 0a 6d 6f 64 75 6c 65 27 | 73 20 6e 61 6d 65 20 4d |.module'|s name M|
|00002750| 2c 20 76 69 7a 2e 20 4d | 2e 78 2c 20 63 61 6e 20 |, viz. M|.x, can |
|00002760| 62 65 20 63 69 72 63 75 | 6d 76 65 6e 74 65 64 20 |be circu|mvented |
|00002770| 69 6e 20 4d 6f 64 75 6c | 61 20 62 79 20 74 68 65 |in Modul|a by the|
|00002780| 20 75 73 65 20 6f 66 20 | 74 68 65 0a 69 6d 70 6f | use of |the.impo|
|00002790| 72 74 20 63 6c 61 75 73 | 65 20 46 52 4f 4d 20 4d |rt claus|e FROM M|
|000027a0| 20 49 4d 50 4f 52 54 20 | 78 2e 20 54 68 69 73 20 | IMPORT |x. This |
|000027b0| 66 61 63 69 6c 69 74 79 | 20 68 61 73 20 61 6c 73 |facility| has als|
|000027c0| 6f 20 62 65 65 6e 20 64 | 69 73 63 61 72 64 65 64 |o been d|iscarded|
|000027d0| 2e 0a 45 78 70 65 72 69 | 65 6e 63 65 20 69 6e 20 |..Experi|ence in |
|000027e0| 70 72 6f 67 72 61 6d 6d | 69 6e 67 20 73 79 73 74 |programm|ing syst|
|000027f0| 65 6d 73 20 69 6e 76 6f | 6c 76 69 6e 67 20 6d 61 |ems invo|lving ma|
|00002800| 6e 79 20 6d 6f 64 75 6c | 65 73 20 68 61 73 20 74 |ny modul|es has t|
|00002810| 61 75 67 68 74 20 74 68 | 61 74 0a 74 68 65 20 65 |aught th|at.the e|
|00002820| 78 70 6c 69 63 69 74 20 | 71 75 61 6c 69 66 69 63 |xplicit |qualific|
|00002830| 61 74 69 6f 6e 20 6f 66 | 20 65 61 63 68 20 6f 63 |ation of| each oc|
|00002840| 63 75 72 72 65 6e 63 65 | 20 6f 66 20 78 20 69 73 |currence| of x is|
|00002850| 20 61 63 74 75 61 6c 6c | 79 20 70 72 65 66 65 72 | actuall|y prefer|
|00002860| 61 62 6c 65 2e 0a 41 20 | 73 69 6d 70 6c 69 66 69 |able..A |simplifi|
|00002870| 63 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 63 6f |cation o|f the co|
|00002880| 6d 70 69 6c 65 72 20 69 | 73 20 61 20 77 65 6c 63 |mpiler i|s a welc|
|00002890| 6f 6d 65 20 73 69 64 65 | 2d 65 66 66 65 63 74 2e |ome side|-effect.|
|000028a0| 0a 0a 54 68 65 20 64 75 | 61 6c 20 72 6f 6c 65 20 |..The du|al role |
|000028b0| 6f 66 20 74 68 65 20 6d | 61 69 6e 20 6d 6f 64 75 |of the m|ain modu|
|000028c0| 6c 65 20 69 6e 20 4d 6f | 64 75 6c 61 20 69 73 20 |le in Mo|dula is |
|000028d0| 63 6f 6e 63 65 70 74 75 | 61 6c 6c 79 20 63 6f 6e |conceptu|ally con|
|000028e0| 66 75 73 69 6e 67 2e 20 | 49 74 0a 63 6f 6e 73 74 |fusing. |It.const|
|000028f0| 69 74 75 74 65 73 20 61 | 20 6d 6f 64 75 6c 65 20 |itutes a| module |
|00002900| 69 6e 20 74 68 65 20 73 | 65 6e 73 65 20 6f 66 20 |in the s|ense of |
|00002910| 61 20 70 61 63 6b 61 67 | 65 20 6f 66 20 64 61 74 |a packag|e of dat|
|00002920| 61 20 61 6e 64 20 70 72 | 6f 63 65 64 75 72 65 73 |a and pr|ocedures|
|00002930| 0a 65 6e 63 6c 6f 73 65 | 64 20 62 79 20 61 20 73 |.enclose|d by a s|
|00002940| 63 6f 70 65 20 6f 66 20 | 76 69 73 69 62 69 6c 69 |cope of |visibili|
|00002950| 74 79 2c 20 61 6e 64 20 | 61 74 20 74 68 65 20 73 |ty, and |at the s|
|00002960| 61 6d 65 20 74 69 6d 65 | 20 69 74 20 63 6f 6e 73 |ame time| it cons|
|00002970| 74 69 74 75 74 65 73 20 | 61 0a 73 69 6e 67 6c 65 |titutes |a.single|
|00002980| 20 70 72 6f 63 65 64 75 | 72 65 20 63 61 6c 6c 65 | procedu|re calle|
|00002990| 64 20 6d 61 69 6e 20 70 | 72 6f 67 72 61 6d 2e 20 |d main p|rogram. |
|000029a0| 41 20 6d 6f 64 75 6c 65 | 20 69 73 20 63 6f 6d 70 |A module| is comp|
|000029b0| 6f 73 65 64 20 6f 66 20 | 74 77 6f 20 74 65 78 74 |osed of |two text|
|000029c0| 75 61 6c 0a 70 69 65 63 | 65 73 2c 20 63 61 6c 6c |ual.piec|es, call|
|000029d0| 65 64 20 74 68 65 20 64 | 65 66 69 6e 69 74 69 6f |ed the d|efinitio|
|000029e0| 6e 20 70 61 72 74 20 61 | 6e 64 20 74 68 65 20 69 |n part a|nd the i|
|000029f0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 70 61 |mplement|ation pa|
|00002a00| 72 74 2e 20 54 68 65 20 | 66 6f 72 6d 65 72 0a 69 |rt. The |former.i|
|00002a10| 73 20 6d 69 73 73 69 6e | 67 20 69 6e 20 74 68 65 |s missin|g in the|
|00002a20| 20 63 61 73 65 20 6f 66 | 20 61 20 6d 61 69 6e 20 | case of| a main |
|00002a30| 70 72 6f 67 72 61 6d 20 | 6d 6f 64 75 6c 65 2e 0a |program |module..|
|00002a40| 0a 42 79 20 63 6f 6e 74 | 72 61 73 74 2c 20 61 20 |.By cont|rast, a |
|00002a50| 6d 6f 64 75 6c 65 20 69 | 6e 20 4f 62 65 72 6f 6e |module i|n Oberon|
|00002a60| 20 69 73 20 69 6e 20 69 | 74 73 65 6c 66 20 63 6f | is in i|tself co|
|00002a70| 6d 70 6c 65 74 65 20 61 | 6e 64 20 63 6f 6e 73 74 |mplete a|nd const|
|00002a80| 69 74 75 74 65 73 20 61 | 0a 75 6e 69 74 20 6f 66 |itutes a|.unit of|
|00002a90| 20 63 6f 6d 70 69 6c 61 | 74 69 6f 6e 2e 20 44 65 | compila|tion. De|
|00002aa0| 66 69 6e 69 74 69 6f 6e | 20 61 6e 64 20 69 6d 70 |finition| and imp|
|00002ab0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 70 61 72 74 |lementat|ion part|
|00002ac0| 73 20 61 72 65 20 6d 65 | 72 67 65 64 3b 20 6e 61 |s are me|rged; na|
|00002ad0| 6d 65 73 0a 74 6f 20 62 | 65 20 76 69 73 69 62 6c |mes.to b|e visibl|
|00002ae0| 65 20 69 6e 20 63 6c 69 | 65 6e 74 20 6d 6f 64 75 |e in cli|ent modu|
|00002af0| 6c 65 73 2c 20 69 2e 65 | 2e 20 65 78 70 6f 72 74 |les, i.e|. export|
|00002b00| 65 64 20 69 64 65 6e 74 | 69 66 69 65 72 73 2c 20 |ed ident|ifiers, |
|00002b10| 61 72 65 20 6d 61 72 6b | 65 64 2c 20 61 6e 64 0a |are mark|ed, and.|
|00002b20| 74 68 65 79 20 74 79 70 | 69 63 61 6c 6c 79 20 70 |they typ|ically p|
|00002b30| 72 65 63 65 64 65 20 74 | 68 65 20 64 65 63 6c 61 |recede t|he decla|
|00002b40| 72 61 74 69 6f 6e 73 20 | 6f 66 20 6f 62 6a 65 63 |rations |of objec|
|00002b50| 74 73 20 6e 6f 74 20 65 | 78 70 6f 72 74 65 64 2e |ts not e|xported.|
|00002b60| 20 41 0a 63 6f 6d 70 69 | 6c 61 74 69 6f 6e 20 67 | A.compi|lation g|
|00002b70| 65 6e 65 72 61 74 65 73 | 20 69 6e 20 67 65 6e 65 |enerates| in gene|
|00002b80| 72 61 6c 20 61 20 63 68 | 61 6e 67 65 64 20 6f 62 |ral a ch|anged ob|
|00002b90| 6a 65 63 74 20 66 69 6c | 65 20 61 6e 64 20 61 20 |ject fil|e and a |
|00002ba0| 6e 65 77 20 73 79 6d 62 | 6f 6c 0a 66 69 6c 65 2e |new symb|ol.file.|
|00002bb0| 20 54 68 65 20 6c 61 74 | 74 65 72 20 63 6f 6e 74 | The lat|ter cont|
|00002bc0| 61 69 6e 73 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ains inf|ormation|
|00002bd0| 20 61 62 6f 75 74 20 65 | 78 70 6f 72 74 65 64 20 | about e|xported |
|00002be0| 6f 62 6a 65 63 74 73 20 | 66 6f 72 20 75 73 65 20 |objects |for use |
|00002bf0| 69 6e 20 74 68 65 0a 63 | 6f 6d 70 69 6c 61 74 69 |in the.c|ompilati|
|00002c00| 6f 6e 20 6f 66 20 63 6c | 69 65 6e 74 20 6d 6f 64 |on of cl|ient mod|
|00002c10| 75 6c 65 73 2e 20 54 68 | 65 20 67 65 6e 65 72 61 |ules. Th|e genera|
|00002c20| 74 69 6f 6e 20 6f 66 20 | 61 20 6e 65 77 20 73 79 |tion of |a new sy|
|00002c30| 6d 62 6f 6c 20 66 69 6c | 65 20 6d 75 73 74 2c 0a |mbol fil|e must,.|
|00002c40| 68 6f 77 65 76 65 72 2c | 20 62 65 20 73 70 65 63 |however,| be spec|
|00002c50| 69 66 69 63 61 6c 6c 79 | 20 65 6e 61 62 6c 65 64 |ifically| enabled|
|00002c60| 20 62 79 20 61 20 63 6f | 6d 70 69 6c 65 72 20 6f | by a co|mpiler o|
|00002c70| 70 74 69 6f 6e 2c 20 62 | 65 63 61 75 73 65 20 69 |ption, b|ecause i|
|00002c80| 74 20 77 69 6c 6c 0a 69 | 6e 76 61 6c 69 64 61 74 |t will.i|nvalidat|
|00002c90| 65 20 70 72 65 76 69 6f | 75 73 20 63 6f 6d 70 69 |e previo|us compi|
|00002ca0| 6c 61 74 69 6f 6e 73 20 | 6f 66 20 63 6c 69 65 6e |lations |of clien|
|00002cb0| 74 73 2e 0a 0a 54 68 65 | 20 6e 6f 74 69 6f 6e 20 |ts...The| notion |
|00002cc0| 6f 66 20 61 20 6d 61 69 | 6e 20 70 72 6f 67 72 61 |of a mai|n progra|
|00002cd0| 6d 20 68 61 73 20 62 65 | 65 6e 20 61 62 61 6e 64 |m has be|en aband|
|00002ce0| 6f 6e 65 64 2e 20 49 6e | 73 74 65 61 64 2c 20 74 |oned. In|stead, t|
|00002cf0| 68 65 20 73 65 74 20 6f | 66 0a 6d 6f 64 75 6c 65 |he set o|f.module|
|00002d00| 73 20 6c 69 6e 6b 65 64 | 20 74 68 72 6f 75 67 68 |s linked| through|
|00002d10| 20 69 6d 70 6f 72 74 73 | 20 74 79 70 69 63 61 6c | imports| typical|
|00002d20| 6c 79 20 63 6f 6e 74 61 | 69 6e 73 20 28 70 61 72 |ly conta|ins (par|
|00002d30| 61 6d 65 74 65 72 6c 65 | 73 73 29 0a 70 72 6f 63 |ameterle|ss).proc|
|00002d40| 65 64 75 72 65 73 2e 20 | 54 68 65 79 20 61 72 65 |edures. |They are|
|00002d50| 20 74 6f 20 62 65 20 63 | 6f 6e 73 69 64 65 72 65 | to be c|onsidere|
|00002d60| 64 20 61 73 20 69 6e 64 | 69 76 69 64 75 61 6c 6c |d as ind|ividuall|
|00002d70| 79 20 61 63 74 69 76 61 | 74 61 62 6c 65 2c 20 61 |y activa|table, a|
|00002d80| 6e 64 20 74 68 65 79 0a | 61 72 65 20 63 61 6c 6c |nd they.|are call|
|00002d90| 65 64 20 63 6f 6d 6d 61 | 6e 64 73 2e 20 53 75 63 |ed comma|nds. Suc|
|00002da0| 68 20 61 6e 20 61 63 74 | 69 76 61 74 69 6f 6e 20 |h an act|ivation |
|00002db0| 68 61 73 20 74 68 65 20 | 66 6f 72 6d 20 4d 2e 50 |has the |form M.P|
|00002dc0| 2c 20 77 68 65 72 65 20 | 50 20 64 65 6e 6f 74 65 |, where |P denote|
|00002dd0| 73 0a 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 61 6e |s.the co|mmand an|
|00002de0| 64 20 4d 20 74 68 65 20 | 6d 6f 64 75 6c 65 20 63 |d M the |module c|
|00002df0| 6f 6e 74 61 69 6e 69 6e | 67 20 69 74 2e 20 54 68 |ontainin|g it. Th|
|00002e00| 65 20 65 66 66 65 63 74 | 20 6f 66 20 61 20 63 6f |e effect| of a co|
|00002e10| 6d 6d 61 6e 64 20 69 73 | 0a 63 6f 6e 73 69 64 65 |mmand is|.conside|
|00002e20| 72 65 64 20 2d 20 6e 6f | 74 20 6c 69 6b 65 20 74 |red - no|t like t|
|00002e30| 68 61 74 20 6f 66 20 61 | 20 6d 61 69 6e 20 70 72 |hat of a| main pr|
|00002e40| 6f 67 72 61 6d 20 61 73 | 20 61 63 63 65 70 74 69 |ogram as| accepti|
|00002e50| 6e 67 20 69 6e 70 75 74 | 20 61 6e 64 0a 74 72 61 |ng input| and.tra|
|00002e60| 6e 73 66 6f 72 6d 69 6e | 67 20 69 74 20 74 6f 20 |nsformin|g it to |
|00002e70| 6f 75 74 70 75 74 20 2d | 20 61 73 20 61 20 63 68 |output -| as a ch|
|00002e80| 61 6e 67 65 20 6f 66 20 | 73 74 61 74 65 20 72 65 |ange of |state re|
|00002e90| 70 72 65 73 65 6e 74 65 | 64 20 62 79 20 67 6c 6f |presente|d by glo|
|00002ea0| 62 61 6c 0a 64 61 74 61 | 2e 0a 0a 53 74 61 74 65 |bal.data|...State|
|00002eb0| 6d 65 6e 74 73 0a 0a 54 | 68 65 20 77 69 74 68 20 |ments..T|he with |
|00002ec0| 73 74 61 74 65 6d 65 6e | 74 20 6f 66 20 4d 6f 64 |statemen|t of Mod|
|00002ed0| 75 6c 61 20 68 61 73 20 | 62 65 65 6e 20 64 69 73 |ula has |been dis|
|00002ee0| 63 61 72 64 65 64 2e 20 | 4c 69 6b 65 20 69 6e 20 |carded. |Like in |
|00002ef0| 74 68 65 20 63 61 73 65 | 20 6f 66 0a 69 6d 70 6f |the case| of.impo|
|00002f00| 72 74 65 64 20 69 64 65 | 6e 74 69 66 69 65 72 73 |rted ide|ntifiers|
|00002f10| 2c 20 74 68 65 20 65 78 | 70 6c 69 63 69 74 20 71 |, the ex|plicit q|
|00002f20| 75 61 6c 69 66 69 63 61 | 74 69 6f 6e 20 6f 66 20 |ualifica|tion of |
|00002f30| 66 69 65 6c 64 20 69 64 | 65 6e 74 69 66 69 65 72 |field id|entifier|
|00002f40| 73 20 69 73 20 74 6f 0a | 62 65 20 70 72 65 66 65 |s is to.|be prefe|
|00002f50| 72 72 65 64 2e 20 41 6e | 6f 74 68 65 72 20 66 6f |rred. An|other fo|
|00002f60| 72 6d 20 6f 66 20 77 69 | 74 68 20 73 74 61 74 65 |rm of wi|th state|
|00002f70| 6d 65 6e 74 20 69 73 20 | 69 6e 74 72 6f 64 75 63 |ment is |introduc|
|00002f80| 65 64 3b 20 69 74 20 68 | 61 73 20 61 0a 64 69 66 |ed; it h|as a.dif|
|00002f90| 66 65 72 65 6e 74 20 66 | 75 6e 63 74 69 6f 6e 20 |ferent f|unction |
|00002fa0| 61 6e 64 20 69 73 20 63 | 61 6c 6c 65 64 20 61 20 |and is c|alled a |
|00002fb0| 72 65 67 69 6f 6e 61 6c | 20 67 75 61 72 64 20 28 |regional| guard (|
|00002fc0| 73 65 65 20 62 65 6c 6f | 77 29 2e 0a 0a 54 68 65 |see belo|w)...The|
|00002fd0| 20 65 6c 69 6d 69 6e 61 | 74 69 6f 6e 20 6f 66 20 | elimina|tion of |
|00002fe0| 74 68 65 20 66 6f 72 20 | 73 74 61 74 65 6d 65 6e |the for |statemen|
|00002ff0| 74 20 63 6f 6e 73 74 69 | 74 75 74 65 73 20 61 20 |t consti|tutes a |
|00003000| 62 72 65 61 6b 20 77 69 | 74 68 20 61 6e 6f 74 68 |break wi|th anoth|
|00003010| 65 72 20 6c 6f 6e 67 0a | 73 74 61 6e 64 69 6e 67 |er long.|standing|
|00003020| 20 74 72 61 64 69 74 69 | 6f 6e 2e 20 54 68 65 20 | traditi|on. The |
|00003030| 62 61 72 6f 71 75 65 20 | 6d 65 63 68 61 6e 69 73 |baroque |mechanis|
|00003040| 6d 20 6f 66 20 41 6c 67 | 6f 6c 20 36 30 27 73 20 |m of Alg|ol 60's |
|00003050| 66 6f 72 20 73 74 61 74 | 65 6d 65 6e 74 20 68 61 |for stat|ement ha|
|00003060| 64 0a 62 65 65 6e 20 74 | 72 69 6d 6d 65 64 20 73 |d.been t|rimmed s|
|00003070| 69 67 6e 69 66 69 63 61 | 6e 74 6c 79 20 69 6e 20 |ignifica|ntly in |
|00003080| 50 61 73 63 61 6c 20 28 | 61 6e 64 20 4d 6f 64 75 |Pascal (|and Modu|
|00003090| 6c 61 29 2e 20 49 74 73 | 20 6d 61 72 67 69 6e 61 |la). Its| margina|
|000030a0| 6c 20 76 61 6c 75 65 20 | 69 6e 0a 70 72 61 63 74 |l value |in.pract|
|000030b0| 69 63 65 20 68 61 73 20 | 6c 65 64 20 74 6f 20 69 |ice has |led to i|
|000030c0| 74 73 20 61 62 73 65 6e | 63 65 20 66 72 6f 6d 20 |ts absen|ce from |
|000030d0| 4f 62 65 72 6f 6e 2e 0a | 0a 4c 6f 77 2d 6c 65 76 |Oberon..|.Low-lev|
|000030e0| 65 6c 20 66 61 63 69 6c | 69 74 69 65 73 0a 0a 4d |el facil|ities..M|
|000030f0| 6f 64 75 6c 61 20 6d 61 | 6b 65 73 20 61 63 63 65 |odula ma|kes acce|
|00003100| 73 73 20 74 6f 20 6d 61 | 63 68 69 6e 65 2d 73 70 |ss to ma|chine-sp|
|00003110| 65 63 69 66 69 63 20 66 | 61 63 69 6c 69 74 69 65 |ecific f|acilitie|
|00003120| 73 20 70 6f 73 73 69 62 | 6c 65 20 74 68 72 6f 75 |s possib|le throu|
|00003130| 67 68 0a 6c 6f 77 2d 6c | 65 76 65 6c 20 63 6f 6e |gh.low-l|evel con|
|00003140| 73 74 72 75 63 74 73 2c | 20 73 75 63 68 20 61 73 |structs,| such as|
|00003150| 20 74 68 65 20 64 61 74 | 61 20 74 79 70 65 73 20 | the dat|a types |
|00003160| 41 44 44 52 45 53 53 20 | 61 6e 64 20 57 4f 52 44 |ADDRESS |and WORD|
|00003170| 2c 20 61 62 73 6f 6c 75 | 74 65 0a 61 64 64 72 65 |, absolu|te.addre|
|00003180| 73 73 69 6e 67 20 6f 66 | 20 76 61 72 69 61 62 6c |ssing of| variabl|
|00003190| 65 73 2c 20 61 6e 64 20 | 74 79 70 65 20 63 61 73 |es, and |type cas|
|000031a0| 74 69 6e 67 20 66 75 6e | 63 74 69 6f 6e 73 2e 20 |ting fun|ctions. |
|000031b0| 4d 6f 73 74 20 6f 66 20 | 74 68 65 6d 20 61 72 65 |Most of |them are|
|000031c0| 0a 70 61 63 6b 61 67 65 | 64 20 69 6e 20 61 20 6d |.package|d in a m|
|000031d0| 6f 64 75 6c 65 20 63 61 | 6c 6c 65 64 20 53 59 53 |odule ca|lled SYS|
|000031e0| 54 45 4d 2e 20 54 68 65 | 73 65 20 66 65 61 74 75 |TEM. The|se featu|
|000031f0| 72 65 73 20 77 65 72 65 | 20 73 75 70 70 6f 73 65 |res were| suppose|
|00003200| 64 20 74 6f 20 62 65 0a | 72 61 72 65 6c 79 20 75 |d to be.|rarely u|
|00003210| 73 65 64 20 61 6e 64 20 | 65 61 73 69 6c 79 20 76 |sed and |easily v|
|00003220| 69 73 69 62 6c 65 20 74 | 68 72 6f 75 67 68 20 74 |isible t|hrough t|
|00003230| 68 65 20 70 72 65 73 65 | 6e 63 65 20 6f 66 20 74 |he prese|nce of t|
|00003240| 68 65 20 69 64 65 6e 74 | 69 66 69 65 72 0a 53 59 |he ident|ifier.SY|
|00003250| 53 54 45 4d 20 69 6e 20 | 61 20 6d 6f 64 75 6c 65 |STEM in |a module|
|00003260| 27 73 20 69 6d 70 6f 72 | 74 20 6c 69 73 74 2e 20 |'s impor|t list. |
|00003270| 45 78 70 65 72 69 65 6e | 63 65 20 68 61 73 20 72 |Experien|ce has r|
|00003280| 65 76 65 61 6c 65 64 2c | 20 68 6f 77 65 76 65 72 |evealed,| however|
|00003290| 2c 20 74 68 61 74 20 61 | 0a 73 69 67 6e 69 66 69 |, that a|.signifi|
|000032a0| 63 61 6e 74 20 6e 75 6d | 62 65 72 20 6f 66 20 70 |cant num|ber of p|
|000032b0| 72 6f 67 72 61 6d 6d 65 | 72 73 20 69 6d 70 6f 72 |rogramme|rs impor|
|000032c0| 74 20 74 68 69 73 20 6d | 6f 64 75 6c 65 20 71 75 |t this m|odule qu|
|000032d0| 69 74 65 0a 69 6e 64 69 | 73 63 72 69 6d 69 6e 61 |ite.indi|scrimina|
|000032e0| 74 65 6c 79 2e 20 41 20 | 70 61 72 74 69 63 75 6c |tely. A |particul|
|000032f0| 61 72 6c 79 20 73 65 64 | 75 63 74 69 76 65 20 74 |arly sed|uctive t|
|00003300| 72 61 70 20 69 73 20 74 | 68 65 20 75 73 65 20 6f |rap is t|he use o|
|00003310| 66 20 20 4d 6f 64 75 6c | 61 27 73 0a 74 79 70 65 |f Modul|a's.type|
|00003320| 20 74 72 61 6e 73 66 65 | 72 20 66 75 6e 63 74 69 | transfe|r functi|
|00003330| 6f 6e 73 2e 0a 0a 49 74 | 20 61 70 70 65 61 72 73 |ons...It| appears|
|00003340| 20 70 72 65 66 65 72 61 | 62 6c 65 20 74 6f 20 64 | prefera|ble to d|
|00003350| 72 6f 70 20 74 68 65 20 | 70 72 65 74 65 6e 73 65 |rop the |pretense|
|00003360| 20 6f 66 20 70 6f 72 74 | 61 62 69 6c 69 74 79 20 | of port|ability |
|00003370| 6f 66 20 70 72 6f 67 72 | 61 6d 73 20 74 68 61 74 |of progr|ams that|
|00003380| 0a 69 6d 70 6f 72 74 20 | 61 20 22 73 74 61 6e 64 |.import |a "stand|
|00003390| 61 72 64 22 2c 20 79 65 | 74 20 73 79 73 74 65 6d |ard", ye|t system|
|000033a0| 2d 73 70 65 63 69 66 69 | 63 20 6d 6f 64 75 6c 65 |-specifi|c module|
|000033b0| 2e 20 54 79 70 65 20 74 | 72 61 6e 73 66 65 72 20 |. Type t|ransfer |
|000033c0| 66 75 6e 63 74 69 6f 6e | 73 0a 64 65 6e 6f 74 65 |function|s.denote|
|000033d0| 64 20 62 79 20 74 79 70 | 65 20 69 64 65 6e 74 69 |d by typ|e identi|
|000033e0| 66 69 65 72 73 20 61 72 | 65 20 74 68 65 72 65 66 |fiers ar|e theref|
|000033f0| 6f 72 65 20 65 6c 69 6d | 69 6e 61 74 65 64 2c 20 |ore elim|inated, |
|00003400| 61 6e 64 20 74 68 65 20 | 6d 6f 64 75 6c 65 20 53 |and the |module S|
|00003410| 59 53 54 45 4d 0a 69 73 | 20 72 65 73 74 72 69 63 |YSTEM.is| restric|
|00003420| 74 65 64 20 74 6f 20 70 | 72 6f 76 69 64 69 6e 67 |ted to p|roviding|
|00003430| 20 61 20 66 65 77 20 6d | 61 63 68 69 6e 65 2d 73 | a few m|achine-s|
|00003440| 70 65 63 69 66 69 63 20 | 66 75 6e 63 74 69 6f 6e |pecific |function|
|00003450| 73 20 74 68 61 74 20 74 | 79 70 69 63 61 6c 6c 79 |s that t|ypically|
|00003460| 0a 61 72 65 20 63 6f 6d | 70 69 6c 65 64 20 69 6e |.are com|piled in|
|00003470| 74 6f 20 69 6e 6c 69 6e | 65 20 63 6f 64 65 2e 20 |to inlin|e code. |
|00003480| 49 6e 20 70 61 72 74 69 | 63 75 6c 61 72 2c 20 69 |In parti|cular, i|
|00003490| 74 20 64 6f 65 73 20 6e | 6f 74 20 63 6f 6e 74 61 |t does n|ot conta|
|000034a0| 69 6e 20 61 6e 79 20 64 | 61 74 61 0a 74 79 70 65 |in any d|ata.type|
|000034b0| 73 2c 20 73 75 63 68 20 | 61 73 20 41 44 44 52 45 |s, such |as ADDRE|
|000034c0| 53 53 20 61 6e 64 20 57 | 4f 52 44 2e 20 49 6e 64 |SS and W|ORD. Ind|
|000034d0| 69 76 69 64 75 61 6c 20 | 69 6d 70 6c 65 6d 65 6e |ividual |implemen|
|000034e0| 74 61 74 69 6f 6e 73 20 | 61 72 65 20 66 72 65 65 |tations |are free|
|000034f0| 20 74 6f 0a 70 72 6f 76 | 69 64 65 20 61 70 70 72 | to.prov|ide appr|
|00003500| 6f 70 72 69 61 74 65 20 | 76 65 72 73 69 6f 6e 73 |opriate |versions|
|00003510| 20 6f 66 20 74 68 65 20 | 6d 6f 64 75 6c 65 20 53 | of the |module S|
|00003520| 59 53 54 45 4d 2c 20 62 | 75 74 20 74 68 65 69 72 |YSTEM, b|ut their|
|00003530| 20 66 61 63 69 6c 69 74 | 69 65 73 20 64 6f 0a 6e | facilit|ies do.n|
|00003540| 6f 74 20 62 65 6c 6f 6e | 67 20 74 6f 20 74 68 65 |ot belon|g to the|
|00003550| 20 6c 61 6e 67 75 61 67 | 65 20 64 65 66 69 6e 69 | languag|e defini|
|00003560| 74 69 6f 6e 2e 20 54 68 | 65 20 75 73 65 20 6f 66 |tion. Th|e use of|
|00003570| 20 53 59 53 54 45 4d 20 | 64 65 63 6c 61 72 65 73 | SYSTEM |declares|
|00003580| 20 61 20 70 72 6f 67 72 | 61 6d 0a 74 6f 20 62 65 | a progr|am.to be|
|00003590| 20 70 61 74 65 6e 74 6c | 79 20 69 6d 70 6c 65 6d | patentl|y implem|
|000035a0| 65 6e 74 61 74 69 6f 6e | 2d 73 70 65 63 69 66 69 |entation|-specifi|
|000035b0| 63 20 61 6e 64 20 74 68 | 65 72 65 62 79 20 6e 6f |c and th|ereby no|
|000035c0| 6e 2d 70 6f 72 74 61 62 | 6c 65 2e 0a 0a 43 6f 6e |n-portab|le...Con|
|000035d0| 63 75 72 72 65 6e 63 79 | 0a 0a 54 68 65 20 73 79 |currency|..The sy|
|000035e0| 73 74 65 6d 20 4f 62 65 | 72 6f 6e 20 64 6f 65 73 |stem Obe|ron does|
|000035f0| 20 6e 6f 74 20 72 65 71 | 75 69 72 65 20 61 6e 79 | not req|uire any|
|00003600| 20 6c 61 6e 67 75 61 67 | 65 20 66 61 63 69 6c 69 | languag|e facili|
|00003610| 74 69 65 73 20 66 6f 72 | 20 65 78 70 72 65 73 73 |ties for| express|
|00003620| 69 6e 67 0a 63 6f 6e 63 | 75 72 72 65 6e 74 20 70 |ing.conc|urrent p|
|00003630| 72 6f 63 65 73 73 65 73 | 2e 20 54 68 65 20 70 65 |rocesses|. The pe|
|00003640| 72 74 69 6e 65 6e 74 20 | 72 75 64 69 6d 65 6e 74 |rtinent |rudiment|
|00003650| 61 72 79 20 66 65 61 74 | 75 72 65 73 20 6f 66 20 |ary feat|ures of |
|00003660| 4d 6f 64 75 6c 61 2c 20 | 69 6e 0a 70 61 72 74 69 |Modula, |in.parti|
|00003670| 63 75 6c 61 72 20 74 68 | 65 20 63 6f 72 6f 75 74 |cular th|e corout|
|00003680| 69 6e 65 2c 20 77 65 72 | 65 20 74 68 65 72 65 66 |ine, wer|e theref|
|00003690| 6f 72 65 20 6e 6f 74 20 | 72 65 74 61 69 6e 65 64 |ore not |retained|
|000036a0| 2e 20 54 68 69 73 20 65 | 78 63 6c 75 73 69 6f 6e |. This e|xclusion|
|000036b0| 20 69 73 0a 6d 65 72 65 | 6c 79 20 61 20 72 65 66 | is.mere|ly a ref|
|000036c0| 6c 65 63 74 69 6f 6e 20 | 6f 66 20 6f 75 72 20 61 |lection |of our a|
|000036d0| 63 74 75 61 6c 20 6e 65 | 65 64 73 20 77 69 74 68 |ctual ne|eds with|
|000036e0| 69 6e 20 74 68 65 20 63 | 6f 6e 63 72 65 74 65 20 |in the c|oncrete |
|000036f0| 70 72 6f 6a 65 63 74 2c | 20 62 75 74 0a 6e 6f 74 |project,| but.not|
|00003700| 20 6f 6e 20 74 68 65 20 | 67 65 6e 65 72 61 6c 20 | on the |general |
|00003710| 72 65 6c 65 76 61 6e 63 | 65 20 6f 66 20 63 6f 6e |relevanc|e of con|
|00003720| 63 75 72 72 65 6e 63 79 | 20 69 6e 20 70 72 6f 67 |currency| in prog|
|00003730| 72 61 6d 6d 69 6e 67 2e | 0a 0a 46 65 61 74 75 72 |ramming.|..Featur|
|00003740| 65 73 20 69 6e 74 72 6f | 64 75 63 65 64 20 69 6e |es intro|duced in|
|00003750| 20 4f 62 65 72 6f 6e 0a | 0a 49 6e 20 63 6f 6e 74 | Oberon.|.In cont|
|00003760| 72 61 73 74 20 74 6f 20 | 74 68 65 20 6e 75 6d 62 |rast to |the numb|
|00003770| 65 72 20 6f 66 20 65 6c | 69 6d 69 6e 61 74 65 64 |er of el|iminated|
|00003780| 20 66 65 61 74 75 72 65 | 73 2c 20 74 68 65 72 65 | feature|s, there|
|00003790| 20 61 72 65 20 6f 6e 6c | 79 20 61 20 66 65 77 20 | are onl|y a few |
|000037a0| 6e 65 77 0a 6f 6e 65 73 | 2e 20 54 68 65 20 69 6d |new.ones|. The im|
|000037b0| 70 6f 72 74 61 6e 74 20 | 6e 65 77 20 63 6f 6e 63 |portant |new conc|
|000037c0| 65 70 74 73 20 61 72 65 | 20 74 79 70 65 20 65 78 |epts are| type ex|
|000037d0| 74 65 6e 73 69 6f 6e 20 | 61 6e 64 20 74 79 70 65 |tension |and type|
|000037e0| 20 69 6e 63 6c 75 73 69 | 6f 6e 2e 0a 46 75 72 74 | inclusi|on..Furt|
|000037f0| 68 65 72 6d 6f 72 65 2c | 20 6f 70 65 6e 20 61 72 |hermore,| open ar|
|00003800| 72 61 79 73 20 6d 61 79 | 20 68 61 76 65 20 73 65 |rays may| have se|
|00003810| 76 65 72 61 6c 20 64 69 | 6d 65 6e 73 69 6f 6e 73 |veral di|mensions|
|00003820| 20 28 69 6e 64 69 63 65 | 73 29 2c 20 77 68 65 72 | (indice|s), wher|
|00003830| 65 61 73 20 69 6e 0a 4d | 6f 64 75 6c 61 20 74 68 |eas in.M|odula th|
|00003840| 65 79 20 77 65 72 65 20 | 63 6f 6e 66 69 6e 65 64 |ey were |confined|
|00003850| 20 74 6f 20 61 20 73 69 | 6e 67 6c 65 20 64 69 6d | to a si|ngle dim|
|00003860| 65 6e 73 69 6f 6e 2e 0a | 0a 54 79 70 65 20 65 78 |ension..|.Type ex|
|00003870| 74 65 6e 73 69 6f 6e 0a | 0a 54 68 65 20 6d 6f 73 |tension.|.The mos|
|00003880| 74 20 69 6d 70 6f 72 74 | 61 6e 74 20 61 64 64 69 |t import|ant addi|
|00003890| 74 69 6f 6e 20 69 73 20 | 74 68 65 20 66 61 63 69 |tion is |the faci|
|000038a0| 6c 69 74 79 20 6f 66 20 | 65 78 74 65 6e 64 65 64 |lity of |extended|
|000038b0| 20 72 65 63 6f 72 64 20 | 74 79 70 65 73 2e 20 49 | record |types. I|
|000038c0| 74 0a 70 65 72 6d 69 74 | 73 20 74 68 65 20 63 6f |t.permit|s the co|
|000038d0| 6e 73 74 72 75 63 74 69 | 6f 6e 20 6f 66 20 6e 65 |nstructi|on of ne|
|000038e0| 77 20 74 79 70 65 73 20 | 6f 6e 20 74 68 65 20 62 |w types |on the b|
|000038f0| 61 73 69 73 20 6f 66 20 | 65 78 69 73 74 69 6e 67 |asis of |existing|
|00003900| 20 74 79 70 65 73 2c 20 | 61 6e 64 0a 65 73 74 61 | types, |and.esta|
|00003910| 62 6c 69 73 68 65 73 20 | 61 20 63 65 72 74 61 69 |blishes |a certai|
|00003920| 6e 20 64 65 67 72 65 65 | 20 6f 66 20 63 6f 6d 70 |n degree| of comp|
|00003930| 61 74 69 62 69 6c 69 74 | 79 20 62 65 74 77 65 65 |atibilit|y betwee|
|00003940| 6e 20 74 68 65 20 6e 65 | 77 20 61 6e 64 20 6f 6c |n the ne|w and ol|
|00003950| 64 0a 74 79 70 65 73 2e | 20 41 73 73 75 6d 69 6e |d.types.| Assumin|
|00003960| 67 20 61 20 67 69 76 65 | 6e 20 74 79 70 65 0a 0a |g a give|n type..|
|00003970| 54 20 20 3d 20 20 52 45 | 43 4f 52 44 20 78 2c 20 |T = RE|CORD x, |
|00003980| 79 3a 20 49 4e 54 45 47 | 45 52 20 45 4e 44 0a 0a |y: INTEG|ER END..|
|00003990| 65 78 74 65 6e 73 69 6f | 6e 73 20 6d 61 79 20 62 |extensio|ns may b|
|000039a0| 65 20 64 65 66 69 6e 65 | 64 20 77 68 69 63 68 20 |e define|d which |
|000039b0| 63 6f 6e 74 61 69 6e 20 | 63 65 72 74 61 69 6e 20 |contain |certain |
|000039c0| 66 69 65 6c 64 73 20 69 | 6e 20 61 64 64 69 74 69 |fields i|n additi|
|000039d0| 6f 6e 20 74 6f 20 74 68 | 65 0a 65 78 69 73 74 69 |on to th|e.existi|
|000039e0| 6e 67 20 6f 6e 65 73 2e | 20 46 6f 72 20 65 78 61 |ng ones.| For exa|
|000039f0| 6d 70 6c 65 0a 0a 54 30 | 20 20 3d 20 20 52 45 43 |mple..T0| = REC|
|00003a00| 4f 52 44 20 28 54 29 20 | 20 7a 3a 20 52 45 41 4c |ORD (T) | z: REAL|
|00003a10| 20 45 4e 44 0a 54 31 20 | 20 3d 20 20 52 45 43 4f | END.T1 | = RECO|
|00003a20| 52 44 20 28 54 29 20 20 | 77 3a 20 4c 4f 4e 47 52 |RD (T) |w: LONGR|
|00003a30| 45 41 4c 20 45 4e 44 0a | 0a 64 65 66 69 6e 65 20 |EAL END.|.define |
|00003a40| 74 79 70 65 73 20 77 69 | 74 68 20 66 69 65 6c 64 |types wi|th field|
|00003a50| 73 20 78 2c 20 79 2c 20 | 7a 20 61 6e 64 20 78 2c |s x, y, |z and x,|
|00003a60| 20 79 2c 20 77 20 72 65 | 73 70 65 63 74 69 76 65 | y, w re|spective|
|00003a70| 6c 79 2e 20 57 65 20 64 | 65 66 69 6e 65 20 61 20 |ly. We d|efine a |
|00003a80| 74 79 70 65 0a 64 65 63 | 6c 61 72 65 64 20 62 79 |type.dec|lared by|
|00003a90| 0a 0a 54 27 20 20 3d 20 | 20 52 45 43 4f 52 44 20 |..T' = | RECORD |
|00003aa0| 28 54 29 20 3c 66 69 65 | 6c 64 20 64 65 66 69 6e |(T) <fie|ld defin|
|00003ab0| 69 74 69 6f 6e 73 3e 20 | 45 4e 44 0a 0a 74 6f 20 |itions> |END..to |
|00003ac0| 62 65 20 61 20 28 64 69 | 72 65 63 74 29 20 65 78 |be a (di|rect) ex|
|00003ad0| 74 65 6e 73 69 6f 6e 20 | 6f 66 20 54 2c 20 61 6e |tension |of T, an|
|00003ae0| 64 20 63 6f 6e 76 65 72 | 73 65 6c 79 20 54 20 74 |d conver|sely T t|
|00003af0| 6f 20 62 65 20 74 68 65 | 20 28 64 69 72 65 63 74 |o be the| (direct|
|00003b00| 29 20 62 61 73 65 0a 74 | 79 70 65 20 6f 66 20 54 |) base.t|ype of T|
|00003b10| 27 2e 20 45 78 74 65 6e | 64 65 64 20 74 79 70 65 |'. Exten|ded type|
|00003b20| 73 20 6d 61 79 20 62 65 | 20 65 78 74 65 6e 64 65 |s may be| extende|
|00003b30| 64 20 61 67 61 69 6e 2c | 20 67 69 76 69 6e 67 20 |d again,| giving |
|00003b40| 72 69 73 65 20 74 6f 20 | 74 68 65 0a 66 6f 6c 6c |rise to |the.foll|
|00003b50| 6f 77 69 6e 67 20 64 65 | 66 69 6e 69 74 69 6f 6e |owing de|finition|
|00003b60| 73 3a 0a 0a 41 20 74 79 | 70 65 20 54 27 20 69 73 |s:..A ty|pe T' is|
|00003b70| 20 61 6e 20 65 78 74 65 | 6e 73 69 6f 6e 20 6f 66 | an exte|nsion of|
|00003b80| 20 54 2c 20 69 66 20 54 | 27 20 3d 20 54 20 6f 72 | T, if T|' = T or|
|00003b90| 20 54 27 20 69 73 20 61 | 20 64 69 72 65 63 74 20 | T' is a| direct |
|00003ba0| 65 78 74 65 6e 73 69 6f | 6e 20 6f 66 20 61 6e 0a |extensio|n of an.|
|00003bb0| 65 78 74 65 6e 73 69 6f | 6e 20 6f 66 20 54 2e 20 |extensio|n of T. |
|00003bc0| 43 6f 6e 76 65 72 73 65 | 6c 79 2c 20 54 20 69 73 |Converse|ly, T is|
|00003bd0| 20 61 20 62 61 73 65 20 | 74 79 70 65 20 6f 66 20 | a base |type of |
|00003be0| 54 27 2c 20 69 66 20 54 | 20 3d 20 54 27 20 6f 72 |T', if T| = T' or|
|00003bf0| 20 54 20 69 73 20 74 68 | 65 0a 64 69 72 65 63 74 | T is th|e.direct|
|00003c00| 20 62 61 73 65 20 74 79 | 70 65 20 6f 66 20 61 20 | base ty|pe of a |
|00003c10| 62 61 73 65 20 74 79 70 | 65 20 6f 66 20 54 27 2e |base typ|e of T'.|
|00003c20| 20 57 65 20 64 65 6e 6f | 74 65 20 74 68 69 73 20 | We deno|te this |
|00003c30| 72 65 6c 61 74 69 6f 6e | 73 68 69 70 20 62 79 20 |relation|ship by |
|00003c40| 54 27 20 2e 0a 54 2e 0a | 0a 54 68 65 20 72 75 6c |T' ..T..|.The rul|
|00003c50| 65 20 6f 66 20 61 73 73 | 69 67 6e 6d 65 6e 74 20 |e of ass|ignment |
|00003c60| 63 6f 6d 70 61 74 69 62 | 69 6c 69 74 79 20 73 74 |compatib|ility st|
|00003c70| 61 74 65 73 20 74 68 61 | 74 20 76 61 6c 75 65 73 |ates tha|t values|
|00003c80| 20 6f 66 20 61 6e 20 65 | 78 74 65 6e 64 65 64 20 | of an e|xtended |
|00003c90| 74 79 70 65 0a 61 72 65 | 20 61 73 73 69 67 6e 61 |type.are| assigna|
|00003ca0| 62 6c 65 20 74 6f 20 76 | 61 72 69 61 62 6c 65 73 |ble to v|ariables|
|00003cb0| 20 6f 66 20 74 68 65 69 | 72 20 62 61 73 65 20 74 | of thei|r base t|
|00003cc0| 79 70 65 73 2e 20 46 6f | 72 20 65 78 61 6d 70 6c |ypes. Fo|r exampl|
|00003cd0| 65 2c 20 61 20 72 65 63 | 6f 72 64 20 6f 66 0a 74 |e, a rec|ord of.t|
|00003ce0| 79 70 65 20 54 30 20 63 | 61 6e 20 62 65 20 61 73 |ype T0 c|an be as|
|00003cf0| 73 69 67 6e 65 64 20 74 | 6f 20 61 20 76 61 72 69 |signed t|o a vari|
|00003d00| 61 62 6c 65 20 6f 66 20 | 74 68 65 20 62 61 73 65 |able of |the base|
|00003d10| 20 74 79 70 65 20 54 2e | 20 54 68 69 73 20 61 73 | type T.| This as|
|00003d20| 73 69 67 6e 6d 65 6e 74 | 0a 69 6e 76 6f 6c 76 65 |signment|.involve|
|00003d30| 73 20 74 68 65 20 66 69 | 65 6c 64 73 20 78 20 61 |s the fi|elds x a|
|00003d40| 6e 64 20 79 20 6f 6e 6c | 79 2c 20 61 6e 64 20 69 |nd y onl|y, and i|
|00003d50| 6e 20 66 61 63 74 20 63 | 6f 6e 73 74 69 74 75 74 |n fact c|onstitut|
|00003d60| 65 73 20 61 20 70 72 6f | 6a 65 63 74 69 6f 6e 20 |es a pro|jection |
|00003d70| 6f 66 0a 74 68 65 20 76 | 61 6c 75 65 20 6f 6e 74 |of.the v|alue ont|
|00003d80| 6f 20 74 68 65 20 73 70 | 61 63 65 20 73 70 61 6e |o the sp|ace span|
|00003d90| 6e 65 64 20 62 79 20 74 | 68 65 20 62 61 73 65 20 |ned by t|he base |
|00003da0| 74 79 70 65 2e 0a 0a 49 | 74 20 69 73 20 69 6d 70 |type...I|t is imp|
|00003db0| 6f 72 74 61 6e 74 20 74 | 6f 20 61 6c 6c 6f 77 20 |ortant t|o allow |
|00003dc0| 6d 6f 64 75 6c 65 73 20 | 77 68 69 63 68 20 69 6d |modules |which im|
|00003dd0| 70 6f 72 74 20 61 20 62 | 61 73 65 20 74 79 70 65 |port a b|ase type|
|00003de0| 20 74 6f 20 62 65 20 61 | 62 6c 65 20 74 6f 0a 64 | to be a|ble to.d|
|00003df0| 65 63 6c 61 72 65 20 65 | 78 74 65 6e 64 65 64 20 |eclare e|xtended |
|00003e00| 74 79 70 65 73 2e 20 49 | 6e 20 66 61 63 74 2c 20 |types. I|n fact, |
|00003e10| 74 68 69 73 20 69 73 20 | 70 72 6f 62 61 62 6c 79 |this is |probably|
|00003e20| 20 74 68 65 20 6e 6f 72 | 6d 61 6c 20 75 73 61 67 | the nor|mal usag|
|00003e30| 65 2e 0a 0a 54 68 69 73 | 20 63 6f 6e 63 65 70 74 |e...This| concept|
|00003e40| 20 6f 66 20 65 78 74 65 | 6e 73 69 62 6c 65 20 64 | of exte|nsible d|
|00003e50| 61 74 61 20 74 79 70 65 | 20 67 61 69 6e 73 20 69 |ata type| gains i|
|00003e60| 6d 70 6f 72 74 61 6e 63 | 65 20 77 68 65 6e 20 65 |mportanc|e when e|
|00003e70| 78 74 65 6e 64 65 64 20 | 74 6f 0a 70 6f 69 6e 74 |xtended |to.point|
|00003e80| 65 72 73 2e 20 49 74 20 | 69 73 20 61 70 70 72 6f |ers. It |is appro|
|00003e90| 70 72 69 61 74 65 20 74 | 6f 20 73 61 79 20 74 68 |priate t|o say th|
|00003ea0| 61 74 20 61 20 70 6f 69 | 6e 74 65 72 20 74 79 70 |at a poi|nter typ|
|00003eb0| 65 20 50 27 20 62 6f 75 | 6e 64 20 74 6f 20 54 27 |e P' bou|nd to T'|
|00003ec0| 0a 65 78 74 65 6e 64 73 | 20 61 20 70 6f 69 6e 74 |.extends| a point|
|00003ed0| 65 72 20 74 79 70 65 20 | 50 2c 20 69 66 20 50 20 |er type |P, if P |
|00003ee0| 69 73 20 62 6f 75 6e 64 | 20 74 6f 20 61 20 62 61 |is bound| to a ba|
|00003ef0| 73 65 20 74 79 70 65 20 | 54 20 6f 66 20 54 27 2c |se type |T of T',|
|00003f00| 20 61 6e 64 20 74 6f 0a | 65 78 74 65 6e 64 20 74 | and to.|extend t|
|00003f10| 68 65 20 61 73 73 69 67 | 6e 6d 65 6e 74 20 72 75 |he assig|nment ru|
|00003f20| 6c 65 20 74 6f 20 63 6f | 76 65 72 20 74 68 69 73 |le to co|ver this|
|00003f30| 20 63 61 73 65 2e 20 49 | 74 20 69 73 20 6e 6f 77 | case. I|t is now|
|00003f40| 20 70 6f 73 73 69 62 6c | 65 20 74 6f 20 66 6f 72 | possibl|e to for|
|00003f50| 6d 0a 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |m.data s|tructure|
|00003f60| 73 20 77 68 6f 73 65 20 | 6e 6f 64 65 73 20 61 72 |s whose |nodes ar|
|00003f70| 65 20 6f 66 20 64 69 66 | 66 65 72 65 6e 74 20 74 |e of dif|ferent t|
|00003f80| 79 70 65 73 2c 20 69 2e | 65 2e 20 69 6e 68 6f 6d |ypes, i.|e. inhom|
|00003f90| 6f 67 65 6e 65 6f 75 73 | 20 64 61 74 61 0a 73 74 |ogeneous| data.st|
|00003fa0| 72 75 63 74 75 72 65 73 | 2e 20 54 68 65 20 69 6e |ructures|. The in|
|00003fb0| 68 6f 6d 6f 67 65 6e 65 | 69 74 79 20 69 73 20 61 |homogene|ity is a|
|00003fc0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 28 61 6e |utomatic|ally (an|
|00003fd0| 64 20 6d 6f 73 74 20 73 | 65 6e 73 69 62 6c 79 29 |d most s|ensibly)|
|00003fe0| 20 62 6f 75 6e 64 65 64 | 0a 62 79 20 74 68 65 20 | bounded|.by the |
|00003ff0| 66 61 63 74 20 74 68 61 | 74 20 74 68 65 20 6e 6f |fact tha|t the no|
|00004000| 64 65 73 20 61 72 65 20 | 6c 69 6e 6b 65 64 20 62 |des are |linked b|
|00004010| 79 20 70 6f 69 6e 74 65 | 72 73 20 6f 66 20 61 20 |y pointe|rs of a |
|00004020| 63 6f 6d 6d 6f 6e 20 62 | 61 73 65 20 74 79 70 65 |common b|ase type|
|00004030| 2e 0a 0a 54 79 70 69 63 | 61 6c 6c 79 2c 20 74 68 |...Typic|ally, th|
|00004040| 65 20 70 6f 69 6e 74 65 | 72 20 66 69 65 6c 64 73 |e pointe|r fields|
|00004050| 20 65 73 74 61 62 6c 69 | 73 68 69 6e 67 20 74 68 | establi|shing th|
|00004060| 65 20 73 74 72 75 63 74 | 75 72 65 20 61 72 65 20 |e struct|ure are |
|00004070| 63 6f 6e 74 61 69 6e 65 | 64 20 69 6e 0a 74 68 65 |containe|d in.the|
|00004080| 20 62 61 73 65 20 74 79 | 70 65 20 54 2c 20 61 6e | base ty|pe T, an|
|00004090| 64 20 74 68 65 20 70 72 | 6f 63 65 64 75 72 65 73 |d the pr|ocedures|
|000040a0| 20 6d 61 6e 69 70 75 6c | 61 74 69 6e 67 20 74 68 | manipul|ating th|
|000040b0| 65 20 73 74 72 75 63 74 | 75 72 65 20 61 72 65 20 |e struct|ure are |
|000040c0| 64 65 66 69 6e 65 64 0a | 69 6e 20 74 68 65 20 73 |defined.|in the s|
|000040d0| 61 6d 65 20 28 62 61 73 | 65 29 20 6d 6f 64 75 6c |ame (bas|e) modul|
|000040e0| 65 20 61 73 20 54 2e 20 | 49 6e 64 69 76 69 64 75 |e as T. |Individu|
|000040f0| 61 6c 20 65 78 74 65 6e | 73 69 6f 6e 73 20 28 76 |al exten|sions (v|
|00004100| 61 72 69 61 6e 74 73 29 | 20 61 72 65 0a 64 65 66 |ariants)| are.def|
|00004110| 69 6e 65 64 20 69 6e 20 | 63 6c 69 65 6e 74 20 6d |ined in |client m|
|00004120| 6f 64 75 6c 65 73 20 74 | 6f 67 65 74 68 65 72 20 |odules t|ogether |
|00004130| 77 69 74 68 20 70 72 6f | 63 65 64 75 72 65 73 20 |with pro|cedures |
|00004140| 6f 70 65 72 61 74 69 6e | 67 20 6f 6e 20 6e 6f 64 |operatin|g on nod|
|00004150| 65 73 20 6f 66 0a 74 68 | 65 20 65 78 74 65 6e 64 |es of.th|e extend|
|00004160| 65 64 20 74 79 70 65 2e | 20 54 68 69 73 20 73 63 |ed type.| This sc|
|00004170| 68 65 6d 65 20 69 73 20 | 69 6e 20 66 75 6c 6c 20 |heme is |in full |
|00004180| 61 63 63 6f 72 64 61 6e | 63 65 20 77 69 74 68 20 |accordan|ce with |
|00004190| 74 68 65 20 6e 6f 74 69 | 6f 6e 20 6f 66 0a 73 79 |the noti|on of.sy|
|000041a0| 73 74 65 6d 20 65 78 74 | 65 6e 73 69 62 69 6c 69 |stem ext|ensibili|
|000041b0| 74 79 3a 20 6e 65 77 20 | 6d 6f 64 75 6c 65 73 20 |ty: new |modules |
|000041c0| 64 65 66 69 6e 69 6e 67 | 20 6e 65 77 20 65 78 74 |defining| new ext|
|000041d0| 65 6e 73 69 6f 6e 73 20 | 6d 61 79 20 62 65 20 61 |ensions |may be a|
|000041e0| 64 64 65 64 20 74 6f 20 | 61 0a 73 79 73 74 65 6d |dded to |a.system|
|000041f0| 20 77 69 74 68 6f 75 74 | 20 72 65 71 75 69 72 69 | without| requiri|
|00004200| 6e 67 20 61 20 63 68 61 | 6e 67 65 20 6f 66 20 74 |ng a cha|nge of t|
|00004210| 68 65 20 62 61 73 65 20 | 6d 6f 64 75 6c 65 73 2c |he base |modules,|
|00004220| 20 6e 6f 74 20 65 76 65 | 6e 20 74 68 65 69 72 0a | not eve|n their.|
|00004230| 72 65 63 6f 6d 70 69 6c | 61 74 69 6f 6e 2e 0a 0a |recompil|ation...|
|00004240| 41 73 20 61 63 63 65 73 | 73 20 74 6f 20 61 6e 20 |As acces|s to an |
|00004250| 69 6e 64 69 76 69 64 75 | 61 6c 20 6e 6f 64 65 20 |individu|al node |
|00004260| 76 69 61 20 61 20 70 6f | 69 6e 74 65 72 20 62 6f |via a po|inter bo|
|00004270| 75 6e 64 20 74 6f 20 61 | 20 62 61 73 65 20 74 79 |und to a| base ty|
|00004280| 70 65 20 70 72 6f 76 69 | 64 65 73 0a 61 20 70 72 |pe provi|des.a pr|
|00004290| 6f 6a 65 63 74 65 64 20 | 76 69 65 77 20 6f 66 20 |ojected |view of |
|000042a0| 74 68 65 20 6e 6f 64 65 | 20 64 61 74 61 20 6f 6e |the node| data on|
|000042b0| 6c 79 2c 20 61 20 66 61 | 63 69 6c 69 74 79 20 74 |ly, a fa|cility t|
|000042c0| 6f 20 77 69 64 65 6e 20 | 74 68 65 20 76 69 65 77 |o widen |the view|
|000042d0| 20 69 73 0a 6e 65 63 65 | 73 73 61 72 79 2e 20 49 | is.nece|ssary. I|
|000042e0| 74 20 64 65 70 65 6e 64 | 73 20 6f 6e 20 74 68 65 |t depend|s on the|
|000042f0| 20 61 62 69 6c 69 74 79 | 20 74 6f 20 64 65 74 65 | ability| to dete|
|00004300| 72 6d 69 6e 65 20 74 68 | 65 20 61 63 74 75 61 6c |rmine th|e actual|
|00004310| 20 74 79 70 65 20 6f 66 | 20 74 68 65 0a 72 65 66 | type of| the.ref|
|00004320| 65 72 65 6e 63 65 64 20 | 6e 6f 64 65 2e 20 54 68 |erenced |node. Th|
|00004330| 69 73 20 69 73 20 61 63 | 68 69 65 76 65 64 20 62 |is is ac|hieved b|
|00004340| 79 20 61 20 74 79 70 65 | 20 74 65 73 74 2c 20 61 |y a type| test, a|
|00004350| 20 42 6f 6f 6c 65 61 6e | 20 65 78 70 72 65 73 73 | Boolean| express|
|00004360| 69 6f 6e 20 6f 66 0a 74 | 68 65 20 66 6f 72 6d 0a |ion of.t|he form.|
|00004370| 0a 74 20 49 53 20 54 27 | 20 20 28 6f 72 20 20 20 |.t IS T'| (or |
|00004380| 70 20 49 53 20 50 27 29 | 0a 0a 49 66 20 74 68 65 |p IS P')|..If the|
|00004390| 20 74 65 73 74 20 69 73 | 20 61 66 66 69 72 6d 61 | test is| affirma|
|000043a0| 74 69 76 65 2c 20 61 6e | 20 61 73 73 69 67 6e 6d |tive, an| assignm|
|000043b0| 65 6e 74 20 74 27 20 3a | 3d 20 74 20 28 74 27 20 |ent t' :|= t (t' |
|000043c0| 6f 66 20 74 79 70 65 20 | 54 27 29 20 6f 72 20 70 |of type |T') or p|
|000043d0| 27 20 3a 3d 0a 70 20 28 | 70 27 20 6f 66 20 74 79 |' :=.p (|p' of ty|
|000043e0| 70 65 20 50 27 29 20 73 | 68 6f 75 6c 64 20 62 65 |pe P') s|hould be|
|000043f0| 20 70 6f 73 73 69 62 6c | 65 2e 20 54 68 65 20 73 | possibl|e. The s|
|00004400| 74 61 74 69 63 20 76 69 | 65 77 20 6f 66 20 74 79 |tatic vi|ew of ty|
|00004410| 70 65 73 2c 20 68 6f 77 | 65 76 65 72 2c 0a 70 72 |pes, how|ever,.pr|
|00004420| 6f 68 69 62 69 74 73 20 | 74 68 69 73 2e 20 4e 6f |ohibits |this. No|
|00004430| 74 65 20 74 68 61 74 20 | 62 6f 74 68 20 61 73 73 |te that |both ass|
|00004440| 69 67 6e 6d 65 6e 74 73 | 20 76 69 6f 6c 61 74 65 |ignments| violate|
|00004450| 20 74 68 65 20 72 75 6c | 65 20 6f 66 20 61 73 73 | the rul|e of ass|
|00004460| 69 67 6e 6d 65 6e 74 0a | 63 6f 6d 70 61 74 69 62 |ignment.|compatib|
|00004470| 69 6c 69 74 79 2e 20 54 | 68 65 20 64 65 73 69 72 |ility. T|he desir|
|00004480| 65 64 20 61 73 73 69 67 | 6e 6d 65 6e 74 20 69 73 |ed assig|nment is|
|00004490| 20 6d 61 64 65 20 70 6f | 73 73 69 62 6c 65 20 62 | made po|ssible b|
|000044a0| 79 20 70 72 6f 76 69 64 | 69 6e 67 20 61 20 74 79 |y provid|ing a ty|
|000044b0| 70 65 0a 67 75 61 72 64 | 20 6f 66 20 74 68 65 20 |pe.guard| of the |
|000044c0| 66 6f 72 6d 0a 0a 74 27 | 20 3a 3d 20 74 28 54 27 |form..t'| := t(T'|
|000044d0| 29 20 20 28 70 27 20 3a | 3d 20 70 28 50 27 29 29 |) (p' :|= p(P'))|
|000044e0| 0a 0a 61 6e 64 20 62 79 | 20 74 68 65 20 73 61 6d |..and by| the sam|
|000044f0| 65 20 74 6f 6b 65 6e 20 | 61 63 63 65 73 73 20 74 |e token |access t|
|00004500| 6f 20 74 68 65 20 66 69 | 65 6c 64 20 7a 20 6f 66 |o the fi|eld z of|
|00004510| 20 61 20 54 30 20 28 73 | 65 65 20 70 72 65 76 69 | a T0 (s|ee previ|
|00004520| 6f 75 73 20 65 78 61 6d | 70 6c 65 73 29 0a 69 73 |ous exam|ples).is|
|00004530| 20 6d 61 64 65 20 70 6f | 73 73 69 62 6c 65 20 62 | made po|ssible b|
|00004540| 79 20 61 20 74 79 70 65 | 20 67 75 61 72 64 20 69 |y a type| guard i|
|00004550| 6e 20 74 68 65 20 64 65 | 73 69 67 6e 61 74 6f 72 |n the de|signator|
|00004560| 20 20 74 28 54 30 29 2e | 7a 2e 20 48 65 72 65 20 | t(T0).|z. Here |
|00004570| 74 68 65 20 67 75 61 72 | 64 0a 61 73 73 65 72 74 |the guar|d.assert|
|00004580| 73 20 74 68 61 74 20 74 | 20 69 73 20 28 63 75 72 |s that t| is (cur|
|00004590| 72 65 6e 74 6c 79 29 20 | 6f 66 20 74 79 70 65 20 |rently) |of type |
|000045a0| 54 30 2e 20 49 6e 20 61 | 6e 61 6c 6f 67 79 20 74 |T0. In a|nalogy t|
|000045b0| 6f 20 61 72 72 61 79 20 | 62 6f 75 6e 64 20 63 68 |o array |bound ch|
|000045c0| 65 63 6b 73 0a 61 6e 64 | 20 63 61 73 65 20 73 65 |ecks.and| case se|
|000045d0| 6c 65 63 74 6f 72 73 2c | 20 61 20 66 61 69 6c 69 |lectors,| a faili|
|000045e0| 6e 67 20 67 75 61 72 64 | 20 6c 65 61 64 73 20 74 |ng guard| leads t|
|000045f0| 6f 20 70 72 6f 67 72 61 | 6d 20 61 62 6f 72 74 69 |o progra|m aborti|
|00004600| 6f 6e 2e 0a 0a 57 68 65 | 72 65 61 73 20 61 20 67 |on...Whe|reas a g|
|00004610| 75 61 72 64 20 6f 66 20 | 74 68 65 20 66 6f 72 6d |uard of |the form|
|00004620| 20 74 28 54 29 20 61 73 | 73 65 72 74 73 20 74 68 | t(T) as|serts th|
|00004630| 61 74 20 74 20 69 73 20 | 6f 66 20 74 79 70 65 20 |at t is |of type |
|00004640| 54 20 66 6f 72 20 74 68 | 65 0a 64 65 73 69 67 6e |T for th|e.design|
|00004650| 61 74 6f 72 20 28 73 74 | 61 72 74 69 6e 67 20 77 |ator (st|arting w|
|00004660| 69 74 68 29 20 74 20 6f | 6e 6c 79 2c 20 61 20 72 |ith) t o|nly, a r|
|00004670| 65 67 69 6f 6e 61 6c 20 | 74 79 70 65 20 67 75 61 |egional |type gua|
|00004680| 72 64 20 6d 61 69 6e 74 | 61 69 6e 73 20 74 68 65 |rd maint|ains the|
|00004690| 0a 61 73 73 65 72 74 69 | 6f 6e 20 6f 76 65 72 20 |.asserti|on over |
|000046a0| 61 6e 20 65 6e 74 69 72 | 65 20 73 65 71 75 65 6e |an entir|e sequen|
|000046b0| 63 65 20 6f 66 20 73 74 | 61 74 65 6d 65 6e 74 73 |ce of st|atements|
|000046c0| 2e 20 49 74 20 68 61 73 | 20 74 68 65 20 66 6f 72 |. It has| the for|
|000046d0| 6d 0a 0a 57 49 54 48 20 | 74 3a 20 54 20 44 4f 20 |m..WITH |t: T DO |
|000046e0| 53 74 61 74 65 6d 65 6e | 74 53 65 71 75 65 6e 63 |Statemen|tSequenc|
|000046f0| 65 20 45 4e 44 0a 0a 61 | 6e 64 20 73 70 65 63 69 |e END..a|nd speci|
|00004700| 66 69 65 73 20 74 68 61 | 74 20 74 20 69 73 20 74 |fies tha|t t is t|
|00004710| 6f 20 62 65 20 72 65 67 | 61 72 64 65 64 20 61 73 |o be reg|arded as|
|00004720| 20 6f 66 20 74 79 70 65 | 20 54 20 77 69 74 68 69 | of type| T withi|
|00004730| 6e 20 74 68 65 20 65 6e | 74 69 72 65 0a 73 74 61 |n the en|tire.sta|
|00004740| 74 65 6d 65 6e 74 20 73 | 65 71 75 65 6e 63 65 2e |tement s|equence.|
|00004750| 20 54 79 70 69 63 61 6c | 6c 79 2c 20 54 20 69 73 | Typical|ly, T is|
|00004760| 20 61 6e 20 65 78 74 65 | 6e 73 69 6f 6e 20 6f 66 | an exte|nsion of|
|00004770| 20 74 68 65 20 64 65 63 | 6c 61 72 65 64 20 74 79 | the dec|lared ty|
|00004780| 70 65 20 6f 66 20 74 2e | 0a 4e 6f 74 65 20 74 68 |pe of t.|.Note th|
|00004790| 61 74 20 61 73 73 69 67 | 6e 6d 65 6e 74 73 20 74 |at assig|nments t|
|000047a0| 6f 20 74 20 77 69 74 68 | 69 6e 20 74 68 65 20 72 |o t with|in the r|
|000047b0| 65 67 69 6f 6e 20 74 68 | 65 72 65 66 6f 72 65 20 |egion th|erefore |
|000047c0| 72 65 71 75 69 72 65 20 | 74 68 65 20 61 73 73 69 |require |the assi|
|000047d0| 67 6e 65 64 0a 76 61 6c | 75 65 20 74 6f 20 62 65 |gned.val|ue to be|
|000047e0| 20 28 61 6e 20 65 78 74 | 65 6e 73 69 6f 6e 29 20 | (an ext|ension) |
|000047f0| 6f 66 20 74 79 70 65 20 | 54 2e 20 54 68 65 20 72 |of type |T. The r|
|00004800| 65 67 69 6f 6e 61 6c 20 | 67 75 61 72 64 20 73 65 |egional |guard se|
|00004810| 72 76 65 73 20 74 6f 20 | 72 65 64 75 63 65 0a 74 |rves to |reduce.t|
|00004820| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 67 75 61 |he numbe|r of gua|
|00004830| 72 64 20 65 76 61 6c 75 | 61 74 69 6f 6e 73 2e 0a |rd evalu|ations..|
|00004840| 0a 41 73 20 61 6e 20 65 | 78 61 6d 70 6c 65 20 6f |.As an e|xample o|
|00004850| 66 20 74 68 65 20 75 73 | 65 20 6f 66 20 74 79 70 |f the us|e of typ|
|00004860| 65 20 74 65 73 74 73 20 | 61 6e 64 20 67 75 61 72 |e tests |and guar|
|00004870| 64 73 2c 20 63 6f 6e 73 | 69 64 65 72 20 74 68 65 |ds, cons|ider the|
|00004880| 20 66 6f 6c 6c 6f 77 69 | 6e 67 0a 74 79 70 65 73 | followi|ng.types|
|00004890| 20 4e 6f 64 65 20 61 6e | 64 20 4f 62 6a 65 63 74 | Node an|d Object|
|000048a0| 20 64 65 66 69 6e 65 64 | 20 69 6e 20 61 20 6d 6f | defined| in a mo|
|000048b0| 64 75 6c 65 20 4d 3a 0a | 0a 54 59 50 45 20 20 4e |dule M:.|.TYPE N|
|000048c0| 6f 64 65 20 3d 20 20 50 | 4f 49 4e 54 45 52 20 54 |ode = P|OINTER T|
|000048d0| 4f 20 4f 62 6a 65 63 74 | 3b 0a 20 20 4f 62 6a 65 |O Object|;. Obje|
|000048e0| 63 74 20 3d 20 20 52 45 | 43 4f 52 44 20 6b 65 79 |ct = RE|CORD key|
|000048f0| 2c 20 78 2c 20 79 3a 20 | 49 4e 54 45 47 45 52 3b |, x, y: |INTEGER;|
|00004900| 0a 09 20 6c 65 66 74 2c | 20 72 69 67 68 74 3a 20 |.. left,| right: |
|00004910| 4e 6f 64 65 0a 20 20 20 | 20 45 4e 44 0a 0a 45 6c |Node. | END..El|
|00004920| 65 6d 65 6e 74 73 20 69 | 6e 20 61 20 74 72 65 65 |ements i|n a tree|
|00004930| 20 73 74 72 75 63 74 75 | 72 65 20 61 6e 63 68 6f | structu|re ancho|
|00004940| 72 65 64 20 69 6e 20 61 | 20 76 61 72 69 61 62 6c |red in a| variabl|
|00004950| 65 20 63 61 6c 6c 65 64 | 20 72 6f 6f 74 20 28 6f |e called| root (o|
|00004960| 66 20 74 79 70 65 0a 4e | 6f 64 65 29 20 61 72 65 |f type.N|ode) are|
|00004970| 20 73 65 61 72 63 68 65 | 64 20 62 79 20 74 68 65 | searche|d by the|
|00004980| 20 70 72 6f 63 65 64 75 | 72 65 20 20 65 6c 65 6d | procedu|re elem|
|00004990| 65 6e 74 20 20 64 65 66 | 69 6e 65 64 20 69 6e 20 |ent def|ined in |
|000049a0| 4d 2e 0a 0a 50 52 4f 43 | 45 44 55 52 45 20 65 6c |M...PROC|EDURE el|
|000049b0| 65 6d 65 6e 74 28 6b 3a | 20 49 4e 54 45 47 45 52 |ement(k:| INTEGER|
|000049c0| 29 3a 20 4e 6f 64 65 3b | 0a 20 20 56 41 52 20 70 |): Node;|. VAR p|
|000049d0| 3a 20 4e 6f 64 65 3b 0a | 42 45 47 49 4e 20 70 20 |: Node;.|BEGIN p |
|000049e0| 3a 3d 20 72 6f 6f 74 3b | 0a 20 20 57 48 49 4c 45 |:= root;|. WHILE|
|000049f0| 20 28 70 20 23 20 4e 49 | 4c 29 20 26 20 28 70 2e | (p # NI|L) & (p.|
|00004a00| 6b 65 79 20 23 20 6b 29 | 20 44 4f 0a 20 20 20 20 |key # k)| DO. |
|00004a10| 49 46 20 70 2e 6b 65 79 | 20 3c 20 6b 20 54 48 45 |IF p.key| < k THE|
|00004a20| 4e 20 70 20 3a 3d 20 70 | 2e 6c 65 66 74 20 45 4c |N p := p|.left EL|
|00004a30| 53 45 20 70 20 3a 3d 20 | 70 2e 72 69 67 68 74 20 |SE p := |p.right |
|00004a40| 45 4e 44 0a 20 20 45 4e | 44 20 3b 0a 20 20 52 45 |END. EN|D ;. RE|
|00004a50| 54 55 52 4e 20 70 0a 45 | 4e 44 20 65 6c 65 6d 65 |TURN p.E|ND eleme|
|00004a60| 6e 74 0a 0a 4c 65 74 20 | 65 78 74 65 6e 73 69 6f |nt..Let |extensio|
|00004a70| 6e 73 20 6f 66 20 74 68 | 65 20 74 79 70 65 20 4f |ns of th|e type O|
|00004a80| 62 6a 65 63 74 20 62 65 | 20 64 65 66 69 6e 65 64 |bject be| defined|
|00004a90| 20 28 74 6f 67 65 74 68 | 65 72 20 77 69 74 68 20 | (togeth|er with |
|00004aa0| 74 68 65 69 72 20 70 6f | 69 6e 74 65 72 0a 74 79 |their po|inter.ty|
|00004ab0| 70 65 73 29 20 69 6e 20 | 61 20 6d 6f 64 75 6c 65 |pes) in |a module|
|00004ac0| 20 4d 31 20 77 68 69 63 | 68 20 69 73 20 61 20 63 | M1 whic|h is a c|
|00004ad0| 6c 69 65 6e 74 20 6f 66 | 20 4d 3a 0a 0a 54 59 50 |lient of| M:..TYP|
|00004ae0| 45 20 20 52 65 63 74 61 | 6e 67 6c 65 20 3d 20 20 |E Recta|ngle = |
|00004af0| 50 4f 49 4e 54 45 52 20 | 54 4f 20 52 65 63 74 4f |POINTER |TO RectO|
|00004b00| 62 6a 65 63 74 3b 0a 20 | 20 52 65 63 74 4f 62 6a |bject;. | RectObj|
|00004b10| 65 63 74 20 3d 09 52 45 | 43 4f 52 44 20 28 4f 62 |ect =.RE|CORD (Ob|
|00004b20| 6a 65 63 74 29 20 77 2c | 20 68 3a 20 52 45 41 4c |ject) w,| h: REAL|
|00004b30| 20 45 4e 44 20 3b 0a 20 | 20 43 69 72 63 6c 65 20 | END ;. | Circle |
|00004b40| 3d 20 20 50 4f 49 4e 54 | 45 52 20 54 4f 20 43 69 |= POINT|ER TO Ci|
|00004b50| 72 63 6c 65 4f 62 6a 65 | 63 74 3b 0a 20 20 43 69 |rcleObje|ct;. Ci|
|00004b60| 72 63 6c 65 4f 62 6a 65 | 63 74 20 3d 20 20 52 45 |rcleObje|ct = RE|
|00004b70| 43 4f 52 44 20 28 4f 62 | 6a 65 63 74 29 20 72 61 |CORD (Ob|ject) ra|
|00004b80| 64 3a 20 52 45 41 4c 3b | 20 73 68 61 64 65 64 3a |d: REAL;| shaded:|
|00004b90| 20 42 4f 4f 4c 45 41 4e | 20 45 4e 44 0a 0a 41 66 | BOOLEAN| END..Af|
|00004ba0| 74 65 72 20 74 68 65 20 | 73 65 61 72 63 68 20 6f |ter the |search o|
|00004bb0| 66 20 61 6e 20 65 6c 65 | 6d 65 6e 74 2c 20 74 68 |f an ele|ment, th|
|00004bc0| 65 20 74 79 70 65 20 74 | 65 73 74 20 69 73 20 75 |e type t|est is u|
|00004bd0| 73 65 64 20 74 6f 20 64 | 69 73 63 72 69 6d 69 6e |sed to d|iscrimin|
|00004be0| 61 74 65 0a 62 65 74 77 | 65 65 6e 20 74 68 65 20 |ate.betw|een the |
|00004bf0| 64 69 66 66 65 72 65 6e | 74 20 65 78 74 65 6e 73 |differen|t extens|
|00004c00| 69 6f 6e 73 2c 20 61 6e | 64 20 74 68 65 20 74 79 |ions, an|d the ty|
|00004c10| 70 65 20 67 75 61 72 64 | 20 74 6f 20 61 63 63 65 |pe guard| to acce|
|00004c20| 73 73 20 65 78 74 65 6e | 73 69 6f 6e 0a 66 69 65 |ss exten|sion.fie|
|00004c30| 6c 64 73 2e 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |lds. For| example|
|00004c40| 3a 0a 0a 70 20 3a 3d 20 | 4d 2e 65 6c 65 6d 65 6e |:..p := |M.elemen|
|00004c50| 74 28 4b 29 3b 0a 49 46 | 20 70 20 23 20 4e 49 4c |t(K);.IF| p # NIL|
|00004c60| 20 54 48 45 4e 0a 20 20 | 49 46 20 70 20 49 53 20 | THEN. |IF p IS |
|00004c70| 52 65 63 74 61 6e 67 6c | 65 20 54 48 45 4e 20 20 |Rectangl|e THEN |
|00004c80| 2e 2e 2e 20 20 70 28 52 | 65 63 74 61 6e 67 6c 65 |... p(R|ectangle|
|00004c90| 29 2e 77 20 20 2e 2e 2e | 0a 20 20 45 4c 53 49 46 |).w ...|. ELSIF|
|00004ca0| 20 28 70 20 49 53 20 43 | 69 72 63 6c 65 29 20 26 | (p IS C|ircle) &|
|00004cb0| 20 7e 70 28 43 69 72 63 | 6c 65 29 2e 73 68 61 64 | ~p(Circ|le).shad|
|00004cc0| 65 64 20 54 48 45 4e 20 | 20 2e 2e 2e 20 20 70 28 |ed THEN | ... p(|
|00004cd0| 43 69 72 63 6c 65 29 2e | 72 61 64 20 20 2e 2e 2e |Circle).|rad ...|
|00004ce0| 0a 20 20 45 4c 53 49 46 | 20 20 2e 2e 2e 0a 0a 54 |. ELSIF| .....T|
|00004cf0| 68 65 20 65 78 74 65 6e | 73 69 62 69 6c 69 74 79 |he exten|sibility|
|00004d00| 20 6f 66 20 61 20 73 79 | 73 74 65 6d 20 72 65 73 | of a sy|stem res|
|00004d10| 74 73 20 75 70 6f 6e 20 | 74 68 65 20 70 72 65 6d |ts upon |the prem|
|00004d20| 69 73 65 20 74 68 61 74 | 20 6e 65 77 20 6d 6f 64 |ise that| new mod|
|00004d30| 75 6c 65 73 0a 64 65 66 | 69 6e 69 6e 67 20 6e 65 |ules.def|ining ne|
|00004d40| 77 20 65 78 74 65 6e 73 | 69 6f 6e 73 20 6d 61 79 |w extens|ions may|
|00004d50| 20 62 65 20 61 64 64 65 | 64 20 77 69 74 68 6f 75 | be adde|d withou|
|00004d60| 74 20 72 65 71 75 69 72 | 69 6e 67 20 61 64 61 70 |t requir|ing adap|
|00004d70| 74 61 74 69 6f 6e 73 20 | 6e 6f 72 20 65 76 65 6e |tations |nor even|
|00004d80| 0a 72 65 63 6f 6d 70 69 | 6c 61 74 69 6f 6e 20 6f |.recompi|lation o|
|00004d90| 66 20 74 68 65 20 65 78 | 69 73 74 69 6e 67 20 70 |f the ex|isting p|
|00004da0| 61 72 74 73 2c 20 61 6c | 74 68 6f 75 67 68 20 63 |arts, al|though c|
|00004db0| 6f 6d 70 6f 6e 65 6e 74 | 73 20 6f 66 20 74 68 65 |omponent|s of the|
|00004dc0| 20 6e 65 77 20 74 79 70 | 65 73 0a 61 72 65 20 69 | new typ|es.are i|
|00004dd0| 6e 63 6c 75 64 65 64 20 | 69 6e 20 61 6c 72 65 61 |ncluded |in alrea|
|00004de0| 64 79 20 65 78 69 73 74 | 69 6e 67 20 64 61 74 61 |dy exist|ing data|
|00004df0| 20 73 74 72 75 63 74 75 | 72 65 73 2e 0a 0a 54 68 | structu|res...Th|
|00004e00| 65 20 74 79 70 65 20 65 | 78 74 65 6e 73 69 6f 6e |e type e|xtension|
|00004e10| 20 66 61 63 69 6c 69 74 | 79 20 6e 6f 74 20 6f 6e | facilit|y not on|
|00004e20| 6c 79 20 72 65 70 6c 61 | 63 65 73 20 4d 6f 64 75 |ly repla|ces Modu|
|00004e30| 6c 61 27 73 20 76 61 72 | 69 61 6e 74 20 72 65 63 |la's var|iant rec|
|00004e40| 6f 72 64 73 2c 20 62 75 | 74 0a 72 65 70 72 65 73 |ords, bu|t.repres|
|00004e50| 65 6e 74 73 20 61 20 74 | 79 70 65 2d 73 61 66 65 |ents a t|ype-safe|
|00004e60| 20 61 6c 74 65 72 6e 61 | 74 69 76 65 2e 20 45 71 | alterna|tive. Eq|
|00004e70| 75 61 6c 6c 79 20 69 6d | 70 6f 72 74 61 6e 74 20 |ually im|portant |
|00004e80| 69 73 20 69 74 73 20 65 | 66 66 65 63 74 20 6f 66 |is its e|ffect of|
|00004e90| 0a 72 65 6c 61 74 69 6e | 67 20 74 79 70 65 73 20 |.relatin|g types |
|00004ea0| 69 6e 20 61 20 74 79 70 | 65 20 68 69 65 72 61 72 |in a typ|e hierar|
|00004eb0| 63 68 79 2e 20 57 65 20 | 63 6f 6d 70 61 72 65 2c |chy. We |compare,|
|00004ec0| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 74 68 | for exa|mple, th|
|00004ed0| 65 20 4d 6f 64 75 6c 61 | 0a 74 79 70 65 73 0a 0a |e Modula|.types..|
|00004ee0| 54 30 27 20 20 3d 20 20 | 52 45 43 4f 52 44 20 74 |T0' = |RECORD t|
|00004ef0| 3a 20 54 3b 20 20 7a 3a | 20 52 45 41 4c 20 45 4e |: T; z:| REAL EN|
|00004f00| 44 20 3b 0a 54 31 27 20 | 20 3d 20 20 52 45 43 4f |D ;.T1' | = RECO|
|00004f10| 52 44 20 74 3a 20 54 3b | 20 20 77 3a 20 4c 4f 4e |RD t: T;| w: LON|
|00004f20| 47 52 45 41 4c 20 45 4e | 44 0a 0a 77 68 69 63 68 |GREAL EN|D..which|
|00004f30| 20 72 65 66 65 72 20 74 | 6f 20 74 68 65 20 64 65 | refer t|o the de|
|00004f40| 66 69 6e 69 74 69 6f 6e | 20 6f 66 20 54 20 67 69 |finition| of T gi|
|00004f50| 76 65 6e 20 61 62 6f 76 | 65 2c 20 77 69 74 68 20 |ven abov|e, with |
|00004f60| 74 68 65 20 65 78 74 65 | 6e 64 65 64 20 4f 62 65 |the exte|nded Obe|
|00004f70| 72 6f 6e 0a 74 79 70 65 | 73 20 54 30 20 61 6e 64 |ron.type|s T0 and|
|00004f80| 20 54 31 20 64 65 66 69 | 6e 65 64 20 61 62 6f 76 | T1 defi|ned abov|
|00004f90| 65 2e 20 46 69 72 73 74 | 2c 20 74 68 65 20 4f 62 |e. First|, the Ob|
|00004fa0| 65 72 6f 6e 20 74 79 70 | 65 73 20 72 65 66 72 61 |eron typ|es refra|
|00004fb0| 69 6e 20 66 72 6f 6d 0a | 69 6e 74 72 6f 64 75 63 |in from.|introduc|
|00004fc0| 69 6e 67 20 61 20 6e 65 | 77 20 6e 61 6d 69 6e 67 |ing a ne|w naming|
|00004fd0| 20 73 63 6f 70 65 2e 20 | 47 69 76 65 6e 20 61 20 | scope. |Given a |
|00004fe0| 76 61 72 69 61 62 6c 65 | 20 72 30 20 6f 66 20 74 |variable| r0 of t|
|00004ff0| 79 70 65 20 54 30 2c 20 | 77 65 20 77 72 69 74 65 |ype T0, |we write|
|00005000| 0a 72 30 2e 78 20 69 6e | 73 74 65 61 64 20 6f 66 |.r0.x in|stead of|
|00005010| 20 72 30 2e 74 2e 78 20 | 61 73 20 69 6e 20 4d 6f | r0.t.x |as in Mo|
|00005020| 64 75 6c 61 2e 20 53 65 | 63 6f 6e 64 2c 20 74 68 |dula. Se|cond, th|
|00005030| 65 20 74 79 70 65 73 20 | 54 2c 20 54 30 27 2c 20 |e types |T, T0', |
|00005040| 61 6e 64 20 54 31 27 20 | 61 72 65 0a 64 69 73 74 |and T1' |are.dist|
|00005050| 69 6e 63 74 20 61 6e 64 | 20 75 6e 72 65 6c 61 74 |inct and| unrelat|
|00005060| 65 64 2e 20 49 6e 20 63 | 6f 6e 74 72 61 73 74 2c |ed. In c|ontrast,|
|00005070| 20 54 30 20 61 6e 64 20 | 54 31 20 61 72 65 20 72 | T0 and |T1 are r|
|00005080| 65 6c 61 74 65 64 20 74 | 6f 20 54 20 61 73 0a 65 |elated t|o T as.e|
|00005090| 78 74 65 6e 73 69 6f 6e | 73 2e 20 54 68 69 73 20 |xtension|s. This |
|000050a0| 62 65 63 6f 6d 65 73 20 | 6d 61 6e 69 66 65 73 74 |becomes |manifest|
|000050b0| 20 74 68 72 6f 75 67 68 | 20 74 68 65 20 74 79 70 | through| the typ|
|000050c0| 65 20 74 65 73 74 2c 20 | 77 68 69 63 68 20 61 73 |e test, |which as|
|000050d0| 73 65 72 74 73 20 74 68 | 61 74 0a 76 61 72 69 61 |serts th|at.varia|
|000050e0| 62 6c 65 20 72 30 20 69 | 73 20 6e 6f 74 20 6f 6e |ble r0 i|s not on|
|000050f0| 6c 79 20 6f 66 20 74 79 | 70 65 20 54 30 2c 20 62 |ly of ty|pe T0, b|
|00005100| 75 74 20 61 6c 73 6f 20 | 6f 66 20 62 61 73 65 20 |ut also |of base |
|00005110| 74 79 70 65 20 54 2e 0a | 0a 54 68 65 20 64 65 63 |type T..|.The dec|
|00005120| 6c 61 72 61 74 69 6f 6e | 20 6f 66 20 65 78 74 65 |laration| of exte|
|00005130| 6e 64 65 64 20 72 65 63 | 6f 72 64 20 74 79 70 65 |nded rec|ord type|
|00005140| 73 2c 20 74 68 65 20 74 | 79 70 65 20 74 65 73 74 |s, the t|ype test|
|00005150| 2c 20 61 6e 64 20 74 68 | 65 20 74 79 70 65 20 67 |, and th|e type g|
|00005160| 75 61 72 64 0a 61 72 65 | 20 74 68 65 20 6f 6e 6c |uard.are| the onl|
|00005170| 79 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 66 65 61 |y additi|onal fea|
|00005180| 74 75 72 65 73 20 69 6e | 74 72 6f 64 75 63 65 64 |tures in|troduced|
|00005190| 20 69 6e 20 74 68 69 73 | 20 63 6f 6e 74 65 78 74 | in this| context|
|000051a0| 2e 20 41 20 6d 6f 72 65 | 0a 65 78 74 65 6e 73 69 |. A more|.extensi|
|000051b0| 76 65 20 64 69 73 63 75 | 73 73 69 6f 6e 20 69 73 |ve discu|ssion is|
|000051c0| 20 70 72 6f 76 69 64 65 | 64 20 69 6e 20 5b 32 5d | provide|d in [2]|
|000051d0| 2e 20 54 68 65 20 63 6f | 6e 63 65 70 74 20 69 73 |. The co|ncept is|
|000051e0| 20 76 65 72 79 20 73 69 | 6d 69 6c 61 72 20 74 6f | very si|milar to|
|000051f0| 20 74 68 65 0a 63 6c 61 | 73 73 20 6e 6f 74 69 6f | the.cla|ss notio|
|00005200| 6e 20 6f 66 20 53 69 6d | 75 6c 61 20 36 37 20 5b |n of Sim|ula 67 [|
|00005210| 33 5d 2c 20 53 6d 61 6c | 6c 74 61 6c 6b 20 5b 34 |3], Smal|ltalk [4|
|00005220| 5d 2c 20 4f 62 6a 65 63 | 74 20 50 61 73 63 61 6c |], Objec|t Pascal|
|00005230| 20 5b 35 5d 2c 20 43 2b | 2b 20 5b 36 5d 2c 0a 61 | [5], C+|+ [6],.a|
|00005240| 6e 64 20 6f 74 68 65 72 | 73 2c 20 77 68 65 72 65 |nd other|s, where|
|00005250| 20 74 68 65 20 70 72 6f | 70 65 72 74 69 65 73 20 | the pro|perties |
|00005260| 6f 66 20 74 68 65 20 62 | 61 73 65 20 63 6c 61 73 |of the b|ase clas|
|00005270| 73 20 61 72 65 20 73 61 | 69 64 20 74 6f 20 62 65 |s are sa|id to be|
|00005280| 20 69 6e 68 65 72 69 74 | 65 64 0a 62 79 20 74 68 | inherit|ed.by th|
|00005290| 65 20 64 65 72 69 76 65 | 64 20 63 6c 61 73 73 65 |e derive|d classe|
|000052a0| 73 2e 20 54 68 65 20 63 | 6c 61 73 73 20 66 61 63 |s. The c|lass fac|
|000052b0| 69 6c 69 74 79 20 73 74 | 69 70 75 6c 61 74 65 73 |ility st|ipulates|
|000052c0| 20 74 68 61 74 20 61 6c | 6c 20 70 72 6f 63 65 64 | that al|l proced|
|000052d0| 75 72 65 73 0a 61 70 70 | 6c 69 63 61 62 6c 65 20 |ures.app|licable |
|000052e0| 74 6f 20 6f 62 6a 65 63 | 74 73 20 6f 66 20 74 68 |to objec|ts of th|
|000052f0| 65 20 63 6c 61 73 73 20 | 62 65 20 64 65 66 69 6e |e class |be defin|
|00005300| 65 64 20 74 6f 67 65 74 | 68 65 72 20 77 69 74 68 |ed toget|her with|
|00005310| 20 74 68 65 20 64 61 74 | 61 0a 64 65 66 69 6e 69 | the dat|a.defini|
|00005320| 74 69 6f 6e 2e 20 54 68 | 69 73 20 64 6f 67 6d 61 |tion. Th|is dogma|
|00005330| 20 73 74 65 6d 73 20 66 | 72 6f 6d 20 74 68 65 20 | stems f|rom the |
|00005340| 6e 6f 74 69 6f 6e 20 6f | 66 20 61 62 73 74 72 61 |notion o|f abstra|
|00005350| 63 74 20 64 61 74 61 20 | 74 79 70 65 2c 20 62 75 |ct data |type, bu|
|00005360| 74 20 69 74 0a 69 73 20 | 61 20 73 65 72 69 6f 75 |t it.is |a seriou|
|00005370| 73 20 6f 62 73 74 61 63 | 6c 65 20 69 6e 20 74 68 |s obstac|le in th|
|00005380| 65 20 64 65 76 65 6c 6f | 70 6d 65 6e 74 20 6f 66 |e develo|pment of|
|00005390| 20 6c 61 72 67 65 20 73 | 79 73 74 65 6d 73 2c 20 | large s|ystems, |
|000053a0| 77 68 65 72 65 20 74 68 | 65 0a 70 6f 73 73 69 62 |where th|e.possib|
|000053b0| 69 6c 69 74 79 20 74 6f | 20 61 64 64 20 66 75 72 |ility to| add fur|
|000053c0| 74 68 65 72 20 70 72 6f | 63 65 64 75 72 65 73 20 |ther pro|cedures |
|000053d0| 64 65 66 69 6e 65 64 20 | 69 6e 20 61 64 64 69 74 |defined |in addit|
|000053e0| 69 6f 6e 61 6c 20 6d 6f | 64 75 6c 65 73 20 69 73 |ional mo|dules is|
|000053f0| 0a 68 69 67 68 6c 79 20 | 64 65 73 69 72 61 62 6c |.highly |desirabl|
|00005400| 65 2e 20 49 74 20 69 73 | 20 61 77 6b 77 61 72 64 |e. It is| awkward|
|00005410| 20 74 6f 20 62 65 20 6f | 62 6c 69 67 65 64 20 74 | to be o|bliged t|
|00005420| 6f 20 72 65 64 65 66 69 | 6e 65 20 61 20 63 6c 61 |o redefi|ne a cla|
|00005430| 73 73 20 73 6f 6c 65 6c | 79 0a 62 65 63 61 75 73 |ss solel|y.becaus|
|00005440| 65 20 61 20 6d 65 74 68 | 6f 64 20 28 70 72 6f 63 |e a meth|od (proc|
|00005450| 65 64 75 72 65 29 20 68 | 61 73 20 62 65 65 6e 20 |edure) h|as been |
|00005460| 61 64 64 65 64 20 6f 72 | 20 63 68 61 6e 67 65 64 |added or| changed|
|00005470| 2c 20 70 61 72 74 69 63 | 75 6c 61 72 6c 79 20 77 |, partic|ularly w|
|00005480| 68 65 6e 0a 74 68 69 73 | 20 63 68 61 6e 67 65 20 |hen.this| change |
|00005490| 72 65 71 75 69 72 65 73 | 20 61 20 72 65 63 6f 6d |requires| a recom|
|000054a0| 70 69 6c 61 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |pilation| of the |
|000054b0| 63 6c 61 73 73 20 64 65 | 66 69 6e 69 74 69 6f 6e |class de|finition|
|000054c0| 20 61 6e 64 20 6f 66 20 | 61 6c 6c 20 69 74 73 0a | and of |all its.|
|000054d0| 63 6c 69 65 6e 74 20 6d | 6f 64 75 6c 65 73 2e 0a |client m|odules..|
|000054e0| 0a 57 65 20 65 6d 70 68 | 61 73 69 73 65 20 74 68 |.We emph|asise th|
|000054f0| 61 74 20 74 68 65 20 74 | 79 70 65 20 65 78 74 65 |at the t|ype exte|
|00005500| 6e 73 69 6f 6e 20 66 61 | 63 69 6c 69 74 79 20 2d |nsion fa|cility -|
|00005510| 20 61 6c 74 68 6f 75 67 | 68 20 67 61 69 6e 69 6e | althoug|h gainin|
|00005520| 67 20 69 74 73 20 6d 61 | 6a 6f 72 0a 72 6f 6c 65 |g its ma|jor.role|
|00005530| 20 69 6e 20 63 6f 6e 6e | 65 63 74 69 6f 6e 20 77 | in conn|ection w|
|00005540| 69 74 68 20 70 6f 69 6e | 74 65 72 73 20 74 6f 20 |ith poin|ters to |
|00005550| 62 75 69 6c 64 20 68 65 | 74 65 72 6f 67 65 6e 65 |build he|terogene|
|00005560| 6f 75 73 2c 20 64 79 6e | 61 6d 69 63 20 64 61 74 |ous, dyn|amic dat|
|00005570| 61 0a 73 74 72 75 63 74 | 75 72 65 73 20 61 73 20 |a.struct|ures as |
|00005580| 73 68 6f 77 6e 20 69 6e | 20 74 68 65 20 65 78 61 |shown in| the exa|
|00005590| 6d 70 6c 65 20 61 62 6f | 76 65 20 2d 20 61 6c 73 |mple abo|ve - als|
|000055a0| 6f 20 61 70 70 6c 69 65 | 73 20 74 6f 20 73 74 61 |o applie|s to sta|
|000055b0| 74 69 63 61 6c 6c 79 0a | 64 65 63 6c 61 72 65 64 |tically.|declared|
|000055c0| 20 6f 62 6a 65 63 74 73 | 20 75 73 65 64 20 61 73 | objects| used as|
|000055d0| 20 76 61 72 69 61 62 6c | 65 20 70 61 72 61 6d 65 | variabl|e parame|
|000055e0| 74 65 72 73 2e 20 53 75 | 63 68 20 6f 62 6a 65 63 |ters. Su|ch objec|
|000055f0| 74 73 20 61 72 65 20 61 | 6c 6c 6f 63 61 74 65 64 |ts are a|llocated|
|00005600| 20 69 6e 0a 61 20 77 6f | 72 6b 73 70 61 63 65 20 | in.a wo|rkspace |
|00005610| 6f 72 67 61 6e 69 7a 65 | 64 20 61 73 20 61 20 73 |organize|d as a s|
|00005620| 74 61 63 6b 20 6f 66 20 | 70 72 6f 63 65 64 75 72 |tack of |procedur|
|00005630| 65 20 61 63 74 69 76 61 | 74 69 6f 6e 20 72 65 63 |e activa|tion rec|
|00005640| 6f 72 64 73 2c 20 61 6e | 64 0a 74 68 65 72 65 66 |ords, an|d.theref|
|00005650| 6f 72 65 20 74 61 6b 65 | 20 61 64 76 61 6e 74 61 |ore take| advanta|
|00005660| 67 65 20 6f 66 20 61 6e | 20 65 78 74 72 65 6d 65 |ge of an| extreme|
|00005670| 6c 79 20 65 66 66 69 63 | 69 65 6e 74 20 61 6c 6c |ly effic|ient all|
|00005680| 6f 63 61 74 69 6f 6e 20 | 61 6e 64 0a 64 65 61 6c |ocation |and.deal|
|00005690| 6c 6f 63 61 74 69 6f 6e | 20 73 63 68 65 6d 65 2e |location| scheme.|
|000056a0| 0a 0a 49 6e 20 4f 62 65 | 72 6f 6e 2c 20 70 72 6f |..In Obe|ron, pro|
|000056b0| 63 65 64 75 72 65 20 74 | 79 70 65 73 20 72 61 74 |cedure t|ypes rat|
|000056c0| 68 65 72 20 74 68 61 6e | 20 70 72 6f 63 65 64 75 |her than| procedu|
|000056d0| 72 65 73 20 28 6d 65 74 | 68 6f 64 73 29 20 61 72 |res (met|hods) ar|
|000056e0| 65 20 63 6f 6e 6e 65 63 | 74 65 64 0a 77 69 74 68 |e connec|ted.with|
|000056f0| 20 6f 62 6a 65 63 74 73 | 20 69 6e 20 74 68 65 20 | objects| in the |
|00005700| 70 72 6f 67 72 61 6d 20 | 74 65 78 74 2e 20 54 68 |program |text. Th|
|00005710| 65 20 62 69 6e 64 69 6e | 67 20 6f 66 20 61 63 74 |e bindin|g of act|
|00005720| 75 61 6c 20 6d 65 74 68 | 6f 64 73 20 28 73 70 65 |ual meth|ods (spe|
|00005730| 63 69 66 69 63 0a 70 72 | 6f 63 65 64 75 72 65 73 |cific.pr|ocedures|
|00005740| 29 20 74 6f 20 6f 62 6a | 65 63 74 73 20 28 69 6e |) to obj|ects (in|
|00005750| 73 74 61 6e 63 65 73 29 | 20 69 73 20 64 65 6c 61 |stances)| is dela|
|00005760| 79 65 64 20 75 6e 74 69 | 6c 20 74 68 65 20 70 72 |yed unti|l the pr|
|00005770| 6f 67 72 61 6d 20 69 73 | 0a 65 78 65 63 75 74 65 |ogram is|.execute|
|00005780| 64 2e 20 54 68 65 20 61 | 73 73 6f 63 69 61 74 69 |d. The a|ssociati|
|00005790| 6f 6e 20 6f 66 20 61 20 | 70 72 6f 63 65 64 75 72 |on of a |procedur|
|000057a0| 65 20 74 79 70 65 20 77 | 69 74 68 20 61 20 64 61 |e type w|ith a da|
|000057b0| 74 61 20 74 79 70 65 20 | 6f 63 63 75 72 73 0a 74 |ta type |occurs.t|
|000057c0| 68 72 6f 75 67 68 20 74 | 68 65 20 64 65 63 6c 61 |hrough t|he decla|
|000057d0| 72 61 74 69 6f 6e 20 6f | 66 20 61 20 72 65 63 6f |ration o|f a reco|
|000057e0| 72 64 20 66 69 65 6c 64 | 2e 20 54 68 69 73 20 66 |rd field|. This f|
|000057f0| 69 65 6c 64 20 69 73 20 | 67 69 76 65 6e 20 61 20 |ield is |given a |
|00005800| 70 72 6f 63 65 64 75 72 | 65 0a 74 79 70 65 2e 20 |procedur|e.type. |
|00005810| 54 68 65 20 61 73 73 6f | 63 69 61 74 69 6f 6e 20 |The asso|ciation |
|00005820| 6f 66 20 61 20 6d 65 74 | 68 6f 64 20 2d 20 74 6f |of a met|hod - to|
|00005830| 20 75 73 65 20 53 6d 61 | 6c 6c 74 61 6c 6b 20 74 | use Sma|lltalk t|
|00005840| 65 72 6d 69 6e 6f 6c 6f | 67 79 20 2d 20 77 69 74 |erminolo|gy - wit|
|00005850| 68 20 61 6e 0a 6f 62 6a | 65 63 74 20 6f 63 63 75 |h an.obj|ect occu|
|00005860| 72 73 20 74 68 72 6f 75 | 67 68 20 74 68 65 20 61 |rs throu|gh the a|
|00005870| 73 73 69 67 6e 6d 65 6e | 74 20 6f 66 20 61 20 73 |ssignmen|t of a s|
|00005880| 70 65 63 69 66 69 63 20 | 70 72 6f 63 65 64 75 72 |pecific |procedur|
|00005890| 65 20 61 73 20 76 61 6c | 75 65 20 74 6f 0a 74 68 |e as val|ue to.th|
|000058a0| 65 20 66 69 65 6c 64 2c | 20 61 6e 64 20 6e 6f 74 |e field,| and not|
|000058b0| 20 74 68 72 6f 75 67 68 | 20 61 20 73 74 61 74 69 | through| a stati|
|000058c0| 63 20 64 65 63 6c 61 72 | 61 74 69 6f 6e 20 69 6e |c declar|ation in|
|000058d0| 20 74 68 65 20 65 78 74 | 65 6e 64 65 64 20 74 79 | the ext|ended ty|
|000058e0| 70 65 27 73 0a 64 65 66 | 69 6e 69 74 69 6f 6e 20 |pe's.def|inition |
|000058f0| 77 68 69 63 68 20 74 68 | 65 6e 20 22 6f 76 65 72 |which th|en "over|
|00005900| 72 69 64 65 73 22 20 74 | 68 65 20 64 65 63 6c 61 |rides" t|he decla|
|00005910| 72 61 74 69 6f 6e 20 67 | 69 76 65 6e 20 69 6e 20 |ration g|iven in |
|00005920| 74 68 65 20 62 61 73 65 | 20 74 79 70 65 2e 0a 53 |the base| type..S|
|00005930| 75 63 68 20 61 20 70 72 | 6f 63 65 64 75 72 65 20 |uch a pr|ocedure |
|00005940| 69 73 20 63 61 6c 6c 65 | 64 20 61 20 68 61 6e 64 |is calle|d a hand|
|00005950| 6c 65 72 2e 20 55 73 69 | 6e 67 20 74 79 70 65 20 |ler. Usi|ng type |
|00005960| 74 65 73 74 73 2c 20 74 | 68 65 20 68 61 6e 64 6c |tests, t|he handl|
|00005970| 65 72 20 69 73 0a 63 61 | 70 61 62 6c 65 20 6f 66 |er is.ca|pable of|
|00005980| 20 64 69 73 63 72 69 6d | 69 6e 61 74 69 6e 67 20 | discrim|inating |
|00005990| 61 6d 6f 6e 67 20 64 69 | 66 66 65 72 65 6e 74 20 |among di|fferent |
|000059a0| 65 78 74 65 6e 73 69 6f | 6e 73 20 6f 66 20 74 68 |extensio|ns of th|
|000059b0| 65 20 72 65 63 6f 72 64 | 27 73 0a 28 6f 62 6a 65 |e record|'s.(obje|
|000059c0| 63 74 27 73 29 20 62 61 | 73 65 20 74 79 70 65 2e |ct's) ba|se type.|
|000059d0| 20 49 6e 20 53 6d 61 6c | 6c 74 61 6c 6b 2c 20 74 | In Smal|ltalk, t|
|000059e0| 68 65 20 63 6f 6d 70 61 | 74 69 62 69 6c 69 74 79 |he compa|tibility|
|000059f0| 20 72 75 6c 65 73 20 62 | 65 74 77 65 65 6e 20 61 | rules b|etween a|
|00005a00| 20 63 6c 61 73 73 0a 61 | 6e 64 20 69 74 73 20 73 | class.a|nd its s|
|00005a10| 75 62 63 6c 61 73 73 65 | 73 20 61 72 65 20 63 6f |ubclasse|s are co|
|00005a20| 6e 66 69 6e 65 64 20 74 | 6f 20 70 6f 69 6e 74 65 |nfined t|o pointe|
|00005a30| 72 73 2c 20 74 68 65 72 | 65 62 79 20 69 6e 74 65 |rs, ther|eby inte|
|00005a40| 72 74 77 69 6e 69 6e 67 | 20 74 68 65 0a 63 6f 6e |rtwining| the.con|
|00005a50| 63 65 70 74 73 20 6f 66 | 20 61 63 63 65 73 73 20 |cepts of| access |
|00005a60| 6d 65 74 68 6f 64 20 61 | 6e 64 20 64 61 74 61 20 |method a|nd data |
|00005a70| 74 79 70 65 20 69 6e 20 | 61 6e 20 75 6e 64 65 73 |type in |an undes|
|00005a80| 69 72 61 62 6c 65 20 77 | 61 79 2e 20 49 6e 20 4f |irable w|ay. In O|
|00005a90| 62 65 72 6f 6e 2c 0a 74 | 68 65 20 72 65 6c 61 74 |beron,.t|he relat|
|00005aa0| 69 6f 6e 73 68 69 70 20 | 62 65 74 77 65 65 6e 20 |ionship |between |
|00005ab0| 61 20 74 79 70 65 20 61 | 6e 64 20 69 74 73 20 65 |a type a|nd its e|
|00005ac0| 78 74 65 6e 73 69 6f 6e | 73 20 69 73 20 62 61 73 |xtension|s is bas|
|00005ad0| 65 64 20 6f 6e 20 74 68 | 65 0a 65 73 74 61 62 6c |ed on th|e.establ|
|00005ae0| 69 73 68 65 64 20 6d 61 | 74 68 65 6d 61 74 69 63 |ished ma|thematic|
|00005af0| 61 6c 20 63 6f 6e 63 65 | 70 74 20 6f 66 20 70 72 |al conce|pt of pr|
|00005b00| 6f 6a 65 63 74 69 6f 6e | 2e 0a 0a 49 6e 20 4d 6f |ojection|...In Mo|
|00005b10| 64 75 6c 61 2c 20 69 74 | 20 69 73 20 70 6f 73 73 |dula, it| is poss|
|00005b20| 69 62 6c 65 20 74 6f 20 | 64 65 63 6c 61 72 65 20 |ible to |declare |
|00005b30| 61 20 70 6f 69 6e 74 65 | 72 20 74 79 70 65 20 77 |a pointe|r type w|
|00005b40| 69 74 68 69 6e 20 61 6e | 0a 69 6d 70 6c 65 6d 65 |ithin an|.impleme|
|00005b50| 6e 74 61 74 69 6f 6e 20 | 6d 6f 64 75 6c 65 2c 20 |ntation |module, |
|00005b60| 61 6e 64 20 74 6f 20 65 | 78 70 6f 72 74 20 69 74 |and to e|xport it|
|00005b70| 20 61 73 20 61 6e 20 6f | 70 61 71 75 65 20 74 79 | as an o|paque ty|
|00005b80| 70 65 20 62 79 20 6c 69 | 73 74 69 6e 67 20 74 68 |pe by li|sting th|
|00005b90| 65 0a 73 61 6d 65 20 69 | 64 65 6e 74 69 66 69 65 |e.same i|dentifie|
|00005ba0| 72 20 69 6e 20 74 68 65 | 20 63 6f 72 72 65 73 70 |r in the| corresp|
|00005bb0| 6f 6e 64 69 6e 67 20 64 | 65 66 69 6e 69 74 69 6f |onding d|efinitio|
|00005bc0| 6e 20 6d 6f 64 75 6c 65 | 2e 20 54 68 65 20 6e 65 |n module|. The ne|
|00005bd0| 74 20 65 66 66 65 63 74 | 20 69 73 0a 74 68 61 74 |t effect| is.that|
|00005be0| 20 74 68 65 20 74 79 70 | 65 20 69 73 20 65 78 70 | the typ|e is exp|
|00005bf0| 6f 72 74 65 64 20 77 68 | 69 6c 65 20 61 6c 6c 20 |orted wh|ile all |
|00005c00| 69 74 73 20 70 72 6f 70 | 65 72 74 69 65 73 20 72 |its prop|erties r|
|00005c10| 65 6d 61 69 6e 20 68 69 | 64 64 65 6e 20 28 69 6e |emain hi|dden (in|
|00005c20| 76 69 73 69 62 6c 65 0a | 74 6f 20 63 6c 69 65 6e |visible.|to clien|
|00005c30| 74 73 29 2e 20 49 6e 20 | 4f 62 65 72 6f 6e 2c 20 |ts). In |Oberon, |
|00005c40| 74 68 69 73 20 66 61 63 | 69 6c 69 74 79 20 69 73 |this fac|ility is|
|00005c50| 20 67 65 6e 65 72 61 6c | 69 7a 65 64 20 69 6e 20 | general|ized in |
|00005c60| 74 68 65 20 73 65 6e 73 | 65 20 74 68 61 74 20 74 |the sens|e that t|
|00005c70| 68 65 0a 73 65 6c 65 63 | 74 69 6f 6e 20 6f 66 20 |he.selec|tion of |
|00005c80| 74 68 65 20 72 65 63 6f | 72 64 20 66 69 65 6c 64 |the reco|rd field|
|00005c90| 73 20 74 6f 20 62 65 20 | 65 78 70 6f 72 74 65 64 |s to be |exported|
|00005ca0| 20 69 73 20 61 72 62 69 | 74 72 61 72 79 20 61 6e | is arbi|trary an|
|00005cb0| 64 20 69 6e 63 6c 75 64 | 65 73 20 74 68 65 0a 63 |d includ|es the.c|
|00005cc0| 61 73 65 73 20 61 6c 6c | 20 61 6e 64 20 6e 6f 6e |ases all| and non|
|00005cd0| 65 2e 20 54 68 65 20 63 | 6f 6c 6c 65 63 74 69 6f |e. The c|ollectio|
|00005ce0| 6e 20 6f 66 20 65 78 70 | 6f 72 74 65 64 20 66 69 |n of exp|orted fi|
|00005cf0| 65 6c 64 73 20 64 65 66 | 69 6e 65 73 20 61 20 70 |elds def|ines a p|
|00005d00| 61 72 74 69 61 6c 0a 76 | 69 65 77 20 2d 20 61 20 |artial.v|iew - a |
|00005d10| 70 75 62 6c 69 63 20 70 | 72 6f 6a 65 63 74 69 6f |public p|rojectio|
|00005d20| 6e 20 2d 20 74 6f 20 63 | 6c 69 65 6e 74 73 2e 0a |n - to c|lients..|
|00005d30| 0a 49 6e 20 63 6c 69 65 | 6e 74 20 6d 6f 64 75 6c |.In clie|nt modul|
|00005d40| 65 73 20 61 73 20 77 65 | 6c 6c 20 61 73 20 69 6e |es as we|ll as in|
|00005d50| 20 74 68 65 20 6d 6f 64 | 75 6c 65 20 69 74 73 65 | the mod|ule itse|
|00005d60| 6c 66 2c 20 69 74 20 69 | 73 20 70 6f 73 73 69 62 |lf, it i|s possib|
|00005d70| 6c 65 20 74 6f 20 64 65 | 66 69 6e 65 0a 65 78 74 |le to de|fine.ext|
|00005d80| 65 6e 73 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 62 |ensions |of the b|
|00005d90| 61 73 65 20 74 79 70 65 | 20 28 65 2e 67 2e 20 54 |ase type| (e.g. T|
|00005da0| 65 78 74 56 69 65 77 65 | 72 73 20 6f 72 20 47 72 |extViewe|rs or Gr|
|00005db0| 61 70 68 56 69 65 77 65 | 72 73 29 2e 20 4f 66 0a |aphViewe|rs). Of.|
|00005dc0| 69 6d 70 6f 72 74 61 6e | 63 65 20 69 73 20 61 6c |importan|ce is al|
|00005dd0| 73 6f 20 74 68 65 20 66 | 61 63 74 20 74 68 61 74 |so the f|act that|
|00005de0| 20 6e 6f 6e 2d 65 78 70 | 6f 72 74 65 64 20 63 6f | non-exp|orted co|
|00005df0| 6d 70 6f 6e 65 6e 74 73 | 20 28 66 69 65 6c 64 73 |mponents| (fields|
|00005e00| 29 20 6d 61 79 20 68 61 | 76 65 0a 74 79 70 65 73 |) may ha|ve.types|
|00005e10| 20 74 68 61 74 20 61 72 | 65 20 6e 6f 74 20 65 78 | that ar|e not ex|
|00005e20| 70 6f 72 74 65 64 20 65 | 69 74 68 65 72 2e 20 48 |ported e|ither. H|
|00005e30| 65 6e 63 65 2c 20 69 74 | 20 69 73 20 70 6f 73 73 |ence, it| is poss|
|00005e40| 69 62 6c 65 20 74 6f 20 | 68 69 64 65 20 63 65 72 |ible to |hide cer|
|00005e50| 74 61 69 6e 0a 64 61 74 | 61 20 74 79 70 65 73 20 |tain.dat|a types |
|00005e60| 65 66 66 65 63 74 69 76 | 65 6c 79 2c 20 61 6c 74 |effectiv|ely, alt|
|00005e70| 68 6f 75 67 68 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |hough co|mponents|
|00005e80| 20 6f 66 20 28 6f 70 61 | 71 75 65 6c 79 29 20 65 | of (opa|quely) e|
|00005e90| 78 70 6f 72 74 65 64 20 | 74 79 70 65 73 0a 72 65 |xported |types.re|
|00005ea0| 66 65 72 20 74 6f 20 74 | 68 65 6d 2e 0a 0a 54 79 |fer to t|hem...Ty|
|00005eb0| 70 65 20 69 6e 63 6c 75 | 73 69 6f 6e 0a 0a 4d 6f |pe inclu|sion..Mo|
|00005ec0| 64 65 72 6e 20 70 72 6f | 63 65 73 73 6f 72 73 20 |dern pro|cessors |
|00005ed0| 66 65 61 74 75 72 65 20 | 61 72 69 74 68 6d 65 74 |feature |arithmet|
|00005ee0| 69 63 20 6f 70 65 72 61 | 74 69 6f 6e 73 20 6f 6e |ic opera|tions on|
|00005ef0| 20 73 65 76 65 72 61 6c | 20 6e 75 6d 62 65 72 20 | several| number |
|00005f00| 66 6f 72 6d 61 74 73 2e | 0a 49 74 20 69 73 20 64 |formats.|.It is d|
|00005f10| 65 73 69 72 61 62 6c 65 | 20 74 6f 20 68 61 76 65 |esirable| to have|
|00005f20| 20 61 6c 6c 20 74 68 65 | 73 65 20 66 6f 72 6d 61 | all the|se forma|
|00005f30| 74 73 20 72 65 66 6c 65 | 63 74 65 64 20 69 6e 20 |ts refle|cted in |
|00005f40| 74 68 65 20 6c 61 6e 67 | 75 61 67 65 20 61 73 0a |the lang|uage as.|
|00005f50| 62 61 73 69 63 20 74 79 | 70 65 73 2e 20 4f 62 65 |basic ty|pes. Obe|
|00005f60| 72 6f 6e 20 66 65 61 74 | 75 72 65 73 20 66 69 76 |ron feat|ures fiv|
|00005f70| 65 20 6f 66 20 74 68 65 | 6d 3a 0a 0a 4c 4f 4e 47 |e of the|m:..LONG|
|00005f80| 49 4e 54 2c 20 49 4e 54 | 45 47 45 52 2c 20 53 48 |INT, INT|EGER, SH|
|00005f90| 4f 52 54 49 4e 54 20 20 | 28 69 6e 74 65 67 65 72 |ORTINT |(integer|
|00005fa0| 20 74 79 70 65 73 29 0a | 4c 4f 4e 47 52 45 41 4c | types).|LONGREAL|
|00005fb0| 2c 20 52 45 41 4c 09 28 | 72 65 61 6c 20 74 79 70 |, REAL.(|real typ|
|00005fc0| 65 73 29 0a 0a 57 69 74 | 68 20 74 68 65 20 70 72 |es)..Wit|h the pr|
|00005fd0| 6f 6c 69 66 65 72 61 74 | 69 6f 6e 20 6f 66 20 62 |oliferat|ion of b|
|00005fe0| 61 73 69 63 20 74 79 70 | 65 73 2c 20 61 20 72 65 |asic typ|es, a re|
|00005ff0| 6c 61 78 61 74 69 6f 6e | 20 6f 66 20 63 6f 6d 70 |laxation| of comp|
|00006000| 61 74 69 62 69 6c 69 74 | 79 20 72 75 6c 65 73 0a |atibilit|y rules.|
|00006010| 61 6d 6f 6e 67 20 74 68 | 65 6d 20 62 65 63 6f 6d |among th|em becom|
|00006020| 65 73 20 61 6c 6d 6f 73 | 74 20 6d 61 6e 64 61 74 |es almos|t mandat|
|00006030| 6f 72 79 2e 20 28 4e 6f | 74 65 20 74 68 61 74 20 |ory. (No|te that |
|00006040| 69 6e 20 4d 6f 64 75 6c | 61 20 74 68 65 20 6e 75 |in Modul|a the nu|
|00006050| 6d 65 72 69 63 20 74 79 | 70 65 73 0a 49 4e 54 45 |meric ty|pes.INTE|
|00006060| 47 45 52 2c 20 43 41 52 | 44 49 4e 41 4c 2c 20 61 |GER, CAR|DINAL, a|
|00006070| 6e 64 20 52 45 41 4c 20 | 61 72 65 20 69 6e 63 6f |nd REAL |are inco|
|00006080| 6d 70 61 74 69 62 6c 65 | 29 2e 20 54 6f 20 74 68 |mpatible|). To th|
|00006090| 69 73 20 65 6e 64 2c 20 | 74 68 65 20 6e 6f 74 69 |is end, |the noti|
|000060a0| 6f 6e 20 6f 66 0a 74 79 | 70 65 20 69 6e 63 6c 75 |on of.ty|pe inclu|
|000060b0| 73 69 6f 6e 20 69 73 20 | 69 6e 74 72 6f 64 75 63 |sion is |introduc|
|000060c0| 65 64 3a 20 61 20 74 79 | 70 65 20 54 20 69 6e 63 |ed: a ty|pe T inc|
|000060d0| 6c 75 64 65 73 20 61 20 | 74 79 70 65 20 54 27 2c |ludes a |type T',|
|000060e0| 20 69 66 20 74 68 65 20 | 76 61 6c 75 65 73 20 6f | if the |values o|
|000060f0| 66 0a 74 79 70 65 20 54 | 27 20 61 72 65 20 61 6c |f.type T|' are al|
|00006100| 73 6f 20 76 61 6c 75 65 | 73 20 6f 66 20 74 79 70 |so value|s of typ|
|00006110| 65 20 54 2e 20 4f 62 65 | 72 6f 6e 20 70 6f 73 74 |e T. Obe|ron post|
|00006120| 75 6c 61 74 65 73 20 74 | 68 65 20 66 6f 6c 6c 6f |ulates t|he follo|
|00006130| 77 69 6e 67 0a 68 69 65 | 72 61 72 63 68 79 3a 0a |wing.hie|rarchy:.|
|00006140| 0a 4c 4f 4e 47 52 45 41 | 4c 20 20 4a 20 20 52 45 |.LONGREA|L J RE|
|00006150| 41 4c 20 20 4a 20 20 4c | 4f 4e 47 49 4e 54 20 20 |AL J L|ONGINT |
|00006160| 4a 20 20 49 4e 54 45 47 | 45 52 20 20 4a 20 20 53 |J INTEG|ER J S|
|00006170| 48 4f 52 54 49 4e 54 0a | 0a 54 68 65 20 61 73 73 |HORTINT.|.The ass|
|00006180| 69 67 6e 6d 65 6e 74 20 | 72 75 6c 65 20 69 73 20 |ignment |rule is |
|00006190| 72 65 6c 61 78 65 64 20 | 61 63 63 6f 72 64 69 6e |relaxed |accordin|
|000061a0| 67 6c 79 3a 20 41 20 76 | 61 6c 75 65 20 6f 66 20 |gly: A v|alue of |
|000061b0| 74 79 70 65 20 54 27 20 | 63 61 6e 20 62 65 0a 61 |type T' |can be.a|
|000061c0| 73 73 69 67 6e 65 64 20 | 74 6f 20 61 20 76 61 72 |ssigned |to a var|
|000061d0| 69 61 62 6c 65 20 6f 66 | 20 74 79 70 65 20 54 2c |iable of| type T,|
|000061e0| 20 69 66 20 54 27 20 69 | 73 20 69 6e 63 6c 75 64 | if T' i|s includ|
|000061f0| 65 64 20 69 6e 20 54 20 | 28 6f 72 20 69 66 20 54 |ed in T |(or if T|
|00006200| 27 20 65 78 74 65 6e 64 | 73 0a 54 29 2c 20 69 2e |' extend|s.T), i.|
|00006210| 65 2e 20 69 66 20 20 54 | 20 4a 20 54 27 20 20 6f |e. if T| J T' o|
|00006220| 72 20 20 54 27 20 2e 20 | 54 2e 20 49 6e 20 74 68 |r T' . |T. In th|
|00006230| 69 73 20 72 65 73 70 65 | 63 74 2c 20 77 65 20 72 |is respe|ct, we r|
|00006240| 65 74 75 72 6e 20 74 6f | 20 28 61 6e 64 20 65 78 |eturn to| (and ex|
|00006250| 74 65 6e 64 29 0a 74 68 | 65 20 66 6c 65 78 69 62 |tend).th|e flexib|
|00006260| 69 6c 69 74 79 20 6f 66 | 20 41 6c 67 6f 6c 20 36 |ility of| Algol 6|
|00006270| 30 2e 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |0. For e|xample, |
|00006280| 67 69 76 65 6e 20 76 61 | 72 69 61 62 6c 65 73 0a |given va|riables.|
|00006290| 0a 69 3a 20 49 4e 54 45 | 47 45 52 3b 20 20 6b 3a |.i: INTE|GER; k:|
|000062a0| 20 4c 4f 4e 47 49 4e 54 | 3b 20 20 78 3a 20 52 45 | LONGINT|; x: RE|
|000062b0| 41 4c 0a 0a 74 68 65 20 | 61 73 73 69 67 6e 6d 65 |AL..the |assignme|
|000062c0| 6e 74 73 0a 0a 6b 20 3a | 3d 20 69 3b 20 20 78 20 |nts..k :|= i; x |
|000062d0| 3a 3d 20 6b 3b 20 20 78 | 20 3a 3d 20 31 3b 20 20 |:= k; x| := 1; |
|000062e0| 6b 20 3a 3d 20 6b 2b 69 | 3b 20 20 78 20 3a 3d 20 |k := k+i|; x := |
|000062f0| 78 2a 31 30 20 2b 20 69 | 0a 0a 63 6f 6e 66 6f 72 |x*10 + i|..confor|
|00006300| 6d 20 74 6f 20 74 68 65 | 20 72 75 6c 65 73 2c 20 |m to the| rules, |
|00006310| 77 68 65 72 65 61 73 20 | 74 68 65 20 73 74 61 74 |whereas |the stat|
|00006320| 65 6d 65 6e 74 73 20 20 | 69 20 3a 3d 20 6b 3b 20 |ements |i := k; |
|00006330| 20 6b 20 3a 3d 20 78 20 | 20 61 72 65 20 6e 6f 74 | k := x | are not|
|00006340| 0a 61 63 63 65 70 74 61 | 62 6c 65 2e 20 78 20 3a |.accepta|ble. x :|
|00006350| 3d 20 6b 20 6d 61 79 20 | 69 6e 76 6f 6c 76 65 20 |= k may |involve |
|00006360| 74 72 75 6e 63 61 74 69 | 6f 6e 2e 0a 0a 54 68 65 |truncati|on...The|
|00006370| 20 70 72 65 73 65 6e 63 | 65 20 6f 66 20 73 65 76 | presenc|e of sev|
|00006380| 65 72 61 6c 20 6e 75 6d | 65 72 69 63 20 74 79 70 |eral num|eric typ|
|00006390| 65 73 20 69 73 20 65 76 | 69 64 65 6e 74 6c 79 20 |es is ev|idently |
|000063a0| 61 20 63 6f 6e 63 65 73 | 73 69 6f 6e 20 74 6f 0a |a conces|sion to.|
|000063b0| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 73 20 |implemen|tations |
|000063c0| 77 68 69 63 68 20 63 61 | 6e 20 61 6c 6c 6f 63 61 |which ca|n alloca|
|000063d0| 74 65 20 64 69 66 66 65 | 72 65 6e 74 20 61 6d 6f |te diffe|rent amo|
|000063e0| 75 6e 74 73 20 6f 66 20 | 73 74 6f 72 61 67 65 20 |unts of |storage |
|000063f0| 74 6f 0a 76 61 72 69 61 | 62 6c 65 73 20 6f 66 20 |to.varia|bles of |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.