0 1. |picf| * 0 2. |head| * 0 3. |verf| * 0 4. |p||c||b|Revised Report on the Algorithmic Language|nc| * 0 5. |p||c|ALGOL 68|r||nc| * 0 6. |p||p||c|Edited by:|nc| * 0 7. |p||c|A.#van Wijngaarden, B.J.#Mailloux, J.E.L.#Peck, C.H.A.#Koster,|nc| * 0 8. |p||c|M.#Sintzoff, C.H.#Lindsey, L.G.L.T.#Meertens and R.G.#Fisker.|nc| * 0 9. |p||j||pa|This Report has been accepted by Working Group 2.1, * 0 10. reviewed by Technical Committee 2 on * 0 11. Programming and approved for publication * 0 12. by the General Assembly of * 0 13. the International Federation for Information Processing. * 0 14. Reproduction of the Report, for any purpose, but only of the whole * 0 15. text, is explicitly permitted without formality. * 0 16. |p||p||p||n||c| CONTENTS |nc| * 0 17. |e||pb|Acknowledgements|td4| * 0 18. |ht|0. Introduction|td1|? 0 19. |hu|0.1. Aims and principles of design|td1|? 0 20. |hv|0.1.1. Completeness and clarity of description|td1|? 0 21. |hv|0.1.2. Orthogonal design|td1|? 0 22. |hv|0.1.3. Security|td1|? 0 23. |hv|0.1.4. Efficiency|td1|? 0 24. |hu|0.2. Comparison with ALGOL 60|td1|? 0 25. |hu|0.3. Comparison with the language defined in 1968|td1|? 0 26. |hu|0.4. Changes in the method of description|td1|? 0 27. |e||e||e||c| PART#I |nc| * 0 28. |e||e| |c| Preliminary definitions |nc| * 0 29. |e| * 0 30. |ht|1. Language and metalanguage|td2|? 0 31. |hu|1.1. The method of description|td2|? 0 32. |hv|1.1.1. Introduction|td2|? 0 33. |hv|1.1.2. Pragmatics|td2|? 0 34. |hv|1.1.3. The syntax of the strict language|td2|? 0 35. |hw|1.1.3.1. Protonotions|td2|? 0 36. |hv|1.1.3.2. Production rules and production trees|td2|? 0 37. |hw|1.1.3.3. Metaproduction rules and simple substitution|td2|? 0 38. |hw|1.1.3.4. Hyper-rules and consistent substitution|td2|? 0 39. |hv|1.1.4. The semantics|td2|? 0 40. |hw|1.1.4.1. Hypernotions, designation and envelopment|td2|? 0 41. |hw|1.1.4.2. Paranotions|td2|? 0 42. |hw|1.1.4.3. Undefined|td2|? 0 43. |hv|1.1.5. Translations and variants|td2|? 0 44. |hu|1.2. General metaproduction rules|td2|? 0 45. |hu|1.3. General hyper-rules|td2|? 0 46. |ht|2. The computer and the program|td2|? 0 47. |hu|2.1. Terminology|td2|? 0 48. |hv|2.1.1. Objects|td2|? 0 49. |hw|2.1.1.1. Values, locales, environs and scenes|td2|? 0 50. |hw|2.1.1.2. Modes|td2|? 0 51. |hw|2.1.1.3. Scopes|td2|? 0 52. |hv|2.1.2. Relationships|td2|? 0 53. |hv|2.1.3. Values|td2|? 0 54. |hw|2.1.3.1. Plain values|td2|? 0 55. |hw|2.1.3.2. Names|td2|? 0 56. |hw|2.1.3.3. Structured values|td2|? 0 57. |hw|2.1.3.4. Multiple values|td2|? 0 58. |hw|2.1.3.5. Routines|td2|? 0 59. |hw|2.1.3.6. Acceptability of values|td2|? 0 60. |hv|2.1.4. Actions|td2|? 0 61. |hw|2.1.4.1. Elaboration|td2|? 0 62. |hw|2.1.4.2. Serial and collateral actions|td2|? 0 63. |hw|2.1.4.3. Initiation, completion and termination|td2|? 0 64. |hv|2.1.5. Abbreviations|td2|? 0 65. |hu|2.2. The program|td2|? 0 66. |e||e||e||c| PART#II |nc| * 0 67. |e||e| |c| Fundamental constructions |nc| * 0 68. |e||ht|3. Clauses|td2|? 0 69. |hu|3.1. Closed clauses|td2|? 0 70. |hu|3.2. Serial clauses|td2|? 0 71. |hu|3.3. Collateral and parallel clauses|td2|? 0 72. |hu|3.4. Choice clauses|td2|? 0 73. |hu|3.5. Loop clauses|td2|? 0 74. |ht|4. Declarations, declarers and indicators|td2|? 0 75. |hu|4.1. Declarations|td2|? 0 76. |hu|4.2. Mode declarations|td2|? 0 77. |hu|4.3. Priority declarations|td2|? 0 78. |hu|4.4. Identifier declarations|td2|? 0 79. |hu|4.5. Operation declarations|td2|? 0 80. |hu|4.6. Declarers|td2|? 0 81. |hu|4.7. Relationships between modes|td2|? 0 82. |hu|4.8. Indicators and field selectors|td2|? 0 83. |ht|5. Units|td2|? 0 84. |hu|5.1. Syntax|td2|? 0 85. |hu|5.2. Units associated with names|td2|? 0 86. |hv|5.2.1. Assignations|td2|? 0 87. |hv|5.2.2. Identity relations|td2|? 0 88. |hv|5.2.3. Generators|td2|? 0 89. |hv|5.2.4. Nihils|td2|? 0 90. |hu|5.3. Units associated with stowed values|td2|? 0 91. |hv|5.3.1. Selections|td2|? 0 92. |hv|5.3.2. Slices|td2|? 0 93. |hu|5.4. Units associated with routines|td2|? 0 94. |hv|5.4.1. Routine texts|td2|? 0 95. |hv|5.4.2. Formulas|td2|? 0 96. |hv|5.4.3. Calls|td2|? 0 97. |hv|5.4.4. Jumps|td2|? 0 98. |hu|5.5. Units associated with values of any mode|td2|? 0 99. |hv|5.5.1. Casts|td2|? 0 100. |hv|5.5.2. Skips|td2|? 0 101. |e||e||e||c| PART#III |nc| * 0 102. |e||e| |c| Context dependence |nc| * 0 103. |e||ht|6. Coercion|td2| * 0 104. |hu|6.1. Coercees|td2|? 0 105. |hu|6.2. Dereferencing|td2|? 0 106. |hu|6.3. Deproceduring|td2|? 0 107. |hu|6.4. Uniting|td2|? 0 108. |hu|6.5. Widening|td2|? 0 109. |hu|6.6. Rowing|td2|? 0 110. |hu|6.7. Voiding|td2|? 0 111. |ht|7. Modes and nests|td2|? 0 112. |hu|7.1. Independence of properties|td2|? 0 113. |hu|7.2. Identification in nests|td2|? 0 114. |hu|7.3. Equivalence of modes|td2|? 0 115. |hu|7.4. Well-formedness |td2|? 0 116. |e||e||e||c| PART#IV |nc| * 0 117. |e||e| |c| Elaboration-independent constructions |nc| * 0 118. |e||ht|8. Denotations|td2|? 0 119. |hu|8.1. Plain denotations|td2| * 0 120. |hv|8.1.1. Integral denotations|td3|? 0 121. |hv|8.1.2. Real denotations|td3|? 0 122. |hv|8.1.3. Boolean denotations|td3|? 0 123. |hv|8.1.4. Character denotations|td3|? 0 124. |hv|8.1.5. Void denotation|td3|? 0 125. |hu|8.2. Bits denotations|td3|? 0 126. |hu|8.3. String denotations|td3|? 0 127. |ht|9. Tokens and symbols|td3|? 0 128. |hu|9.1. Tokens|td3|? 0 129. |hu|9.2. Comments and pragmats|td3|? 0 130. |hu|9.3. Representations|td3|? 0 131. |hu|9.4. The reference language|td3|? 0 132. |hu|9.4.1. Representations of symbols|td3|? 0 133. |hu|9.4.2. Other TAX symbols|td3|? 0 134. |e||e||e||c| PART#V |nc| * 0 135. |e||e||c|Environment and examples|nc| * 0 136. |e||ht|10. Standard environment|td3| * 0 137. |e||hu|10.1. Program texts|td3|? 0 138. |hv|10.1.2. The environment condition|td3|? 0 139. |hv|10.1.3. The method of description of the standard environment|td3|? 0 140. |e||hu|10.2. The standard prelude|td3|? 0 141. |hv|10.2.1. Environment enquiries|n||td3|? 0 142. |hv|10.2.2. Standard modes|td3|? 0 143. |hv|10.2.3. Standard operators and functions|td3|? 0 144. |hw|10.2.3.0. Standard priorities|td3|? 0 145. |hw|10.2.3.1. Rows and associated operations|td3|? 0 146. |hw|10.2.3.2. Operations on boolean operands|td3|? 0 147. |hw|10.2.3.3. Operations on integral operands|td3|? 0 148. |hw|10.2.3.4. Operations on real operands|td3|? 0 149. |hw|10.2.3.5. Operations on arithmetic operands|td3|? 0 150. |hw|10.2.3.6. Operations on character operands|td3|? 0 151. |hw|10.2.3.7. Operations on complex operands|td3|? 0 152. |hw|10.2.3.8. Bits and associated operations|td3|? 0 153. |hw|10.2.3.9. Bytes and associated operations|td3|? 0 154. |hw|10.2.3.10. Strings and associated operations|td3|? 0 155. |hw|10.2.3.11. Operations combined with assignations|td3|? 0 156. |hw|10.2.3.12. Standard mathematical constants and functions|td3|? 0 157. |hv|10.2.4. Synchronization operations|td3|? 0 158. |e||hu|10.3. Transput declarations|td3|? 0 159. |hv|10.3.1. Books, channels and files|td3|? 0 160. |hw|10.3.1.1. Books and backfiles|td3|? 0 161. |hw|10.3.1.2. Channels|td3|? 0 162. |hw|10.3.1.3. Files|td3|? 0 163. |hw|10.3.1.4. Opening and closing files|td3|? 0 164. |hw|10.3.1.5. Position enquiries|td3|? 0 165. |hw|10.3.1.6. Layout routines|td3|? 0 166. |hv|10.3.2. Transput values|td3|? 0 167. |hw|10.3.2.1. Conversion routines|td3|? 0 168. |hw|10.3.2.2. Transput modes|td3|? 0 169. |hw|10.3.2.3. Straightening|td3|? 0 170. |hv|10.3.3. Formatless transput|td3|? 0 171. |hv|10.3.4. Format texts|td3|? 0 172. |hv|10.3.5. Formatted transput|td3|? 0 173. |hv|10.3.6. Binary transput|td3|? 0 174. |e||hu|10.4. The system prelude and task list|td3|? 0 175. |hv|10.4.1. The system prelude|td3|? 0 176. |hv|10.4.2. The system task list|td3|? 0 177. |e||hu|10.5. The particular preludes and postludes|td3|? 0 178. |hv|10.5.1. The particular preludes|td3|? 0 179. |hv|10.5.2. The particular postludes|td3|? 0 180. |ht|11. Examples|td3|? 0 181. |hu|11.1. Complex square root|td3|? 0 182. |hu|11.2. Innerproduct 1|td3|? 0 183. |hu|11.3. Innerproduct 2|td3|? 0 184. |hu|11.4. Largest element|td3|? 0 185. |hu|11.5. Euler summation|td3|? 0 186. |hu|11.6. The norm of a vector|td3|? 0 187. |hu|11.7. Determinant of a matrix|td3|? 0 188. |hu|11.8. Greatest common divisor|td3|? 0 189. |hu|11.9. Continued fraction|td3|? 0 190. |hu|11.10. Formula manipulation|td3|? 0 191. |hu|11.11. Information retrieval|td3|? 0 192. |hu|11.12. Cooperating sequential processes|td3|? 0 193. |hu|11.13. Towers of Hanoi|td3|? 0 194. |ht|12. Glossaries|td3|? 0 195. |hu|12.1. Technical terms|td3|? 0 196. |hu|12.2. Paranotions|td3|? 0 197. |hu|12.3. Predicates|td3|? 0 198. |hu|12.4. Index to the standard prelude|td3|? 0 199. |hu|12.5. Alphabetic listing of metaproduction rules|td3|? 0 200. * 0 201. |np| * 0 202. * 0 203. |nar||h|Acknowledgements * 0 204. * 0 205. |pq||j||w||co|Habent sua fata libelli. * 0 206. |ppp|De litteris,|pr|Terentianus Maurus.|r||cc||qq|? 0 207. |pa|Working Group 2.1 on ALGOL of the International Federation for * 0 208. Information Processing has discussed the development of "ALGOL X", a * 0 209. successor to ALGOL 60 |os|3|cs|, since 1963. At its meeting in * 0 210. Princeton in May 1965, WG#2.1 * 0 211. invited written descriptions of the language based on the previous * 0 212. discussions. At the meeting in St Pierre de Chartreuse near Grenoble in * 0 213. October 1965, three reports describing more or less complete languages * 0 214. were amongst the contributions, by Niklaus Wirth |os|8|cs|, * 0 215. Gerhard Seegmueller |os|6|cs|, and Aad van Wijngaarden * 0 216. |os|9|cs|. In |os|6|cs| and |os|8|cs|, the * 0 217. descriptional technique of |os|3|cs| was used, whereas * 0 218. |os|9|cs| featured a new technique for language design and * 0 219. definition. Other significant contributions available were papers by * 0 220. Tony Hoare |os|2|cs| and Peter Naur |os|4,#5|cs|. * 0 221. |pa|At subsequent meetings between April 1966 and December 1968, held in Kootwijk near Amsterdam, * 0 222. Warsaw, Zandvoort near Amsterdam, Tirrenia near Pisa and * 0 223. North Berwick near Edinburgh, * 0 224. a number of successive approximations to a final report, * 0 225. commencing with |os|10|cs| and followed by a series numbered MR#88, MR#92, * 0 226. MR#93, MR#95, MR#99 and MR#100, * 0 227. were submitted by a team working in Amsterdam, consisting first of A. * 0 228. van Wijngaarden and Barry Mailloux, later reinforced by * 0 229. John Peck, and finally by Kees Koster. * 0 230. Versions were used during courses on the * 0 231. language held at various centres, * 0 232. and the experience gained in * 0 233. explaining the language to skilled audiences and the reactions of the * 0 234. students influenced the succeeding versions. * 0 235. The final version, MR#101 |os|11|cs|, was adopted by the Working Group * 0 236. on December 20th 1968 in Munich, and was subsequently approved for publication by * 0 237. the General Assembly of I.F.I.P. * 0 238. Since that time, it has been published in Numerische Mathematik |os|12|cs|, * 0 239. and translations have been made into Russian |os|13|cs|, * 0 240. into German |os|14|cs|, into French |os|15|cs|, and into Bulgarian |os|16|cs|. * 0 241. An "Informal Introduction", for the benefit of the uninitiated reader, was also prepared at the * 0 242. request of the Working Group |os|18|cs|. * 0 243. |pa|The original authors acknowledged with pleasure and thanks the wholehearted * 0 244. cooperation, * 0 245. support, interest, criticism and violent objections from members of * 0 246. WG#2.1 and many other people interested in ALGOL. At the risk of * 0 247. embarrassing omissions, special mention should be made of Jan Garwick, * 0 248. Jack Merner, Peter Ingerman and Manfred Paul for |os|1|cs|, the * 0 249. Brussels group consisting of M.#Sintzoff, P.#Branquart, J.#Lewi and * 0 250. P.#Wodon for numerous brainstorms, A.J.M.#van#Gils of Apeldoorn, G.#Goos * 0 251. and his group at Munich, also for |os|7|cs|, G.S.#Tseytin of * 0 252. Leningrad, and L.G.L.T.#Meertens and J.W.#de Bakker of Amsterdam. An * 0 253. occasional choice of a, not inherently meaningful, identifier in the * 0 254. sequel may compensate for not mentioning more names in this section. * 0 255. |pa|Since the publication of the Original Report, much discussion has taken * 0 256. place in the Working Group concerning the further development of the * 0 257. language. This has been influenced by the experience of many people * 0 258. who saw disadvantages in the original proposals and suggested revised * 0 259. or extended features. Amongst these must be mentioned especially: * 0 260. I.R.#Currie, Susan G.#Bond, J.D.#Morison and D.#Jenkins * 0 261. of Malvern (see in |os|17|cs|), in whose dialect of ALGOL#68 * 0 262. many features of this Revision may already be found; * 0 263. P.#Branquart, J.P.#Cardinael and J.#Lewi of Brussels, who * 0 264. exposed many weaknesses (see in |os|17|cs|); * 0 265. Ursula Hill, H.#Woessner and H.#Scheidig of Munich, who discovered some unpleasant consequences; * 0 266. the contributors to the Rapport d|ap|Evaluation |os|19|cs|; * 0 267. and the many people who served * 0 268. on the Working Group subcommittees on Maintenance and Improvements * 0 269. (convened by M.#Sintzoff) and on Transput (convened by C.H.#Lindsey). * 0 270. During the later stages of the revision, much helpful advice was given by * 0 271. H.#Boom of Edmonton, W.#Freeman of York, W.J.#Hansen of Vancouver, * 0 272. Mary#Zosel of Livermore, N.#Yoneda of Tokyo, M.#Rain of Trondheim, * 0 273. L.#Ammeraal, D.#Grune, H.#van#Vliet and R.#van#Vliet of Amsterdam, * 0 274. G.#van#der#Mey of Delft, and A.A.#Baehrs and A.F.#Rar of Novosibirsk. * 0 275. The editors of this revision also wish to acknowledge that the wholehearted * 0 276. cooperation, support, interest, criticism and violent objections on the * 0 277. part of the members of WG#2.1 have continued unabated during this time. * 0 278. |pb||os|1|cs|#J.V.#Garwick, J.M.#Merner, P.Z.#Ingerman and * 0 279. M.#Paul, Report of the ALGOL|hy|X |hy| I|hy|O Subcommittee, WG#2.1 Working Paper, * 0 280. July 1966. * 0 281. |p||os|2|cs|#C.A.R.#Hoare, Record Handling, WG#2.1 Working * 0 282. Paper, October 1965; also AB.21.3.6, November 1965. * 0 283. |p||os|3|cs|#P.#Naur (Editor), Revised Report on the * 0 284. Algorithmic Language ALGOL 60, Regnecentralen, Copenhagen, 1962, and elsewhere. * 0 285. |p||os|4|cs|#P.#Naur, Proposals for a new * 0 286. language, AB.18.3.9, October 1964. * 0 287. |p||os|5|cs|#P.#Naur, Proposals for introduction on aims, WG * 0 288. 2.1 Working Paper, October 1965. * 0 289. |p||os|6|cs|#G.#Seegmueller, A proposal for a basis for a Report * 0 290. on a Successor to ALGOL 60, Bavarian Acad. Sci., Munich, October 1965. * 0 291. |p||os|7|cs|#G.#Goos, H.#Scheidig, G.#Seegmueller and * 0 292. H.#Walther, Another proposal for ALGOL#67, Bavarian Acad. Sci., Munich, May * 0 293. 1967. * 0 294. |p||os|8|cs|#N.#Wirth, A Proposal for a Report on a Successor * 0 295. of ALGOL#60, * 0 296. Mathematisch Centrum, Amsterdam, MR 75, October 1965. * 0 297. |p||os|9|cs|#A.#van#Wijngaarden, Orthogonal Design and * 0 298. Description of a Formal Language, Mathematisch Centrum, Amsterdam, MR * 0 299. 76, October 1965. * 0 300. |p||os|10|cs|#A.#van#Wijngaarden and B.J.#Mailloux, A Draft * 0 301. Proposal for the Algorithmic Language ALGOL#X, WG#2.1 Working Paper, * 0 302. October 1966. * 0 303. |p||os|11|cs|#A.#van#Wijngaarden (Editor), B.J.#Mailloux, * 0 304. J.E.L.#Peck and C.H.A.#Koster, Report on the Algorithmic * 0 305. Language ALGOL#68, * 0 306. Mathematisch Centrum, Amsterdam, MR#101, February 1969. * 0 307. |p||os|12|cs|#|i|idem|r|,#Numerische Mathematik, Vol. 14, pp. 79-218, 1969.? 0 308. |p||os|13|cs|#Soobshchenie ob algoritmicheskom yazyke ALGOL#68, translation into Russian by * 0 309. A.A.#Baehrs, A.P.#Ershov, L.L.#Zmievskaya and A.F.#Rar, * 0 310. Kybernetica, Kiev, Part 6 of 1969 and Part 1 of 1970. * 0 311. |p||os|14|cs|#Bericht ueber die Algorithmische Sprache ALGOL#68, * 0 312. translation into German by I.O.#Kerner, Akademie-Verlag, Berlin, 1972. * 0 313. |p||os|15|cs| * 0 314. D|fren|finition du Langage Algorithmique ALGOL#68, translation into French by * 0 315. J.#Buffet, P.#Arnal, A.#Qu|fren|r|fren| (Eds.), * 0 316. Hermann, Paris, 1972. * 0 317. |p||os|16|cs|#Algoritmichniyat yezik ALGOL#68, translation into Bulgarian by * 0 318. D.#Toshkov and St.#Buchvarov, Nauka i Yzkustvo, Sofia, 1971. * 0 319. |p||os|17|cs|#J.E.L.#Peck (Ed.), ALGOL#68 Implementation (proceedings of the I.F.I.P. working * 0 320. conference held in Munich in 1970), North Holland Publishing Company, 1971. * 0 321. |p||os|18|cs|#C.H.#Lindsey and S.G.#van#der#Meulen, Informal introduction to ALGOL#68, * 0 322. North Holland Publishing Company, 1971. * 0 323. |p||os|19|cs|#J.C.#Boussard and J.J.#Duby (Eds.), Rapport d|ap|Evaluation ALGOL#68, * 0 324. Revue d|ap|Informatique et de Recherche Op|fren|rationelle, B2, Paris, 1970. * 0 325. * 0 326. |page||np| * 0 327. |h|0. |bs|Introduction|rs| * 0 328. * 0 329. |h|0.1. Aims and principles of design * 0 330. * 0 331. |pb1||j|a)|tp1|In designing the Algorithmic Language ALGOL 68, Working Group * 0 332. 2.1 on ALGOL of the International Federation for Information Processing * 0 333. expresses its belief in the value of a common programming language * 0 334. serving many people in many countries. * 0 335. |pb1|b)|tp1|ALGOL 68 is designed to communicate algorithms, to execute * 0 336. them efficiently on a variety of different computers, and to aid in * 0 337. teaching them to students. * 0 338. |pb1|c)|tp1|This present Revision of the language is made in response to the * 0 339. directive of the parent committee, I.F.I.P.#TC#2, to the Working Group to * 0 340. "keep continually under review experience obtained as a consequence of * 0 341. this |co|original|cc| publication, so that it may institute such corrections * 0 342. and revisions to the Report as become desirable". In deciding to bring * 0 343. forward this Revision at the present time, the Working Group has tried to * 0 344. keep in balance the need to accumulate the maximum amount of experience * 0 345. of the problems which arose in the language originally defined, as opposed * 0 346. to the needs of the many teams at present engaged in implementation, for * 0 347. whom an early and simple resolution of those problems is imperative. * 0 348. |pb1|d)|tp1|Although the language as now revised differs in many ways from * 0 349. that defined originally, no attempt has been made to introduce extensive * 0 350. new features and, it is believed, the revised language is still clearly * 0 351. recognizable as "ALGOL 68". The Working Group has decided that this present * 0 352. revision should be "the final definition of the language ALGOL 68", and * 0 353. the hope is expressed that it will be possible for implementations at * 0 354. present in preparation to be brought into line with this standard. * 0 355. |pb1|e)|tp1|The Working Group may, from time to time, define sublanguages * 0 356. and extended capabilities, by means of Addenda to this Report, but these * 0 357. will always be built on the language here defined as a firm foundation. * 0 358. Moreover, variants more in conformity with natural languages * 0 359. other than English may be developed. * 0 360. To coordinate these activities, and to maintain contact with implementers and users, a Subcommittee * 0 361. on ALGOL 68 Support has been established by the Working Group. * 0 362. |pb1|f)|tp1|The members of the Group, influenced by several years of * 0 363. experience with ALGOL 60 and other programming languages, have always accepted the * 0 364. following as their aims: * 0 365. * 0 366. |h|0.1.1. Completeness and clarity of description * 0 367. * 0 368. |pa||j|The Group wishes to contribute to the solution of the problems of * 0 369. describing a language clearly and completely. The method adopted in this * 0 370. Report is based upon a formalized two-level grammar, with the semantics * 0 371. expressed in natural language, but making use of some carefully and * 0 372. precisely defined terms and concepts. * 0 373. It is recognized, * 0 374. however, that this method may be difficult for the uninitiated reader. * 0 375. * 0 376. |h|0.1.2. Orthogonal design * 0 377. * 0 378. |pa||j|The number of independent primitive concepts has been minimized in order * 0 379. that the language be easy to describe, to learn, and to implement. On * 0 380. the other hand, these concepts have been applied "orthogonally" in order * 0 381. to maximize the expressive power of the language while trying to avoid * 0 382. deleterious superfluities. * 0 383. * 0 384. |h|0.1.3. Security * 0 385. * 0 386. |pa||j|ALGOL 68 has been designed in such a way that most syntactical * 0 387. and many other errors can be detected easily before they lead to * 0 388. calamitous results. Furthermore, the opportunities for making such * 0 389. errors are greatly restricted. * 0 390. * 0 391. |h|0.1.4. Efficiency * 0 392. * 0 393. |pa||j|ALGOL 68 allows the programmer to specify programs which can be run * 0 394. efficiently on present-day computers and yet do not require * 0 395. sophisticated and time-consuming optimization features of a compiler; * 0 396. see, e.g., 11.7. * 0 397. * 0 398. |h|0.1.4.1. Static mode checking * 0 399. * 0 400. |pa||j|The syntax of ALGOL 68 is such that no mode checking during run time * 0 401. is necessary, except when the programmer declares a |b|UNITED-variable|r| * 0 402. and then, in a |b|conformity-clause|r|, explicitly demands a check on * 0 403. its mode. * 0 404. * 0 405. |h|0.1.4.2. Mode-independent parsing * 0 406. * 0 407. |pa||j|The syntax of ALGOL 68 is such that the parsing of a program can be * 0 408. performed independently of the modes of its constituents. Moreover, * 0 409. it can be determined in a finite number of steps * 0 410. whether an arbitrary given sequence of symbols is a program. * 0 411. * 0 412. |h|0.1.4.3. Independent compilation * 0 413. * 0 414. |pa||j|The syntax of ALGOL 68 is such that the main-line programs and * 0 415. procedures can be compiled independently of one another without loss of * 0 416. object-program efficiency provided that, during each independent * 0 417. compilation, specification of the mode of all nonlocal quantities * 0 418. is provided; see the remarks after 2.2.2.c. * 0 419. * 0 420. |h|0.1.4.4. Loop optimization * 0 421. * 0 422. |pa||j|Iterative processes are formulated in ALGOL 68 in such a way that * 0 423. straightforward application of well-known optimization techniques yields * 0 424. large gains during run time without excessive increase of compilation * 0 425. time. * 0 426. * 0 427. |h|0.1.4.5. Representations * 0 428. * 0 429. |pa||j|Representations of ALGOL 68 symbols have been chosen so that the * 0 430. language may be implemented on computers with a minimal character set. * 0 431. At the same time implementers may take advantage of a larger character * 0 432. set, if it is available. * 0 433. * 0 434. |h|0.2. Comparison with ALGOL 60 * 0 435. * 0 436. |pb1||j|a)|tp1|ALGOL 68 is a language of wider applicability and power than * 0 437. ALGOL 60. Although influenced by the lessons learned from ALGOL 60, ALGOL * 0 438. 68 has not been designed as an expansion of ALGOL 60 but rather as a * 0 439. completely new language based on new insight into the essential, * 0 440. fundamental concepts of computing and a new description technique. * 0 441. |pb1|b)|tp1|The result is that the successful features of ALGOL 60 * 0 442. reappear in ALGOL 68 but as special cases of more general constructions, * 0 443. along with completely new features. It is, therefore, difficult to * 0 444. isolate differences between the two languages; however, the following * 0 445. sections are intended to give insight into some of the more striking * 0 446. differences. * 0 447. * 0 448. |h|0.2.1. Values in ALGOL 68 * 0 449. * 0 450. |pb1||j|a)|tp1|Whereas ALGOL 60 has values of the types |i|INTEGER|r|, * 0 451. |i|REAL|r| and |u|B|i|OOLEAN|r|, ALGOL 68 features an infinity of "modes", * 0 452. i.e., generalizations of the concept "type". * 0 453. |pb1|b)|tp1|Each plain value is either arithmetic, i.e., of |b||ap|integral|ap||r| or * 0 454. |b||ap|real|ap||r| mode and then it is of one of several sizes, or it is of |b||ap|boolean|ap||r| * 0 455. or |b||ap|character|ap||r| or |b||ap|void|ap||r| mode. * 0 456. Machine words, considered as sequences of bits or of bytes, may also be handled. * 0 457. |pb1|c)|tp1|In ALGOL 60, values can be composed into arrays, * 0 458. whereas in ALGOL 68, in addition to such "multiple" values, also * 0 459. "structured" values, composed of values of possibly different modes, are * 0 460. defined and manipulated. An example of a multiple value is the character * 0 461. array, which corresponds approximately to the ALGOL 60 string; examples * 0 462. of structured values are complex numbers * 0 463. and symbolic formulae. * 0 464. |pb1|d)|tp1|In ALGOL 68 the concept of a "name" is introduced, i.e., a * 0 465. value which is said to "refer to" another value; such a name-value pair * 0 466. corresponds to the ALGOL 60 variable. However, a name may take the * 0 467. value position in a name-value pair, and thus chains of indirect * 0 468. addresses can be built up. * 0 469. |pb1|e)|tp1|The ALGOL 60 concept of procedure body is generalized in ALGOL * 0 470. 68 to the concept of "routine", which includes also the formal * 0 471. parameters, and which is itself a value and therefore can be manipulated * 0 472. like any other value. * 0 473. |pb1|f)|tp1|In contrast with plain values, * 0 474. the significance of a name or routine is, * 0 475. in general, dependent upon the existence of the storage cells referred to or accessed. * 0 476. Therefore, the use of names and routines is subject to some * 0 477. restrictions related to their "scope". * 0 478. However, the syntax of ALGOL 68 is such that in many cases the check on scope can be made * 0 479. at compile time, including all cases where no use is made of features whose expressive power * 0 480. transcends that of ALGOL 60. * 0 481. * 0 482. |h|0.2.2. Declarations in ALGOL 68 * 0 483. * 0 484. |pb1||j|a)|tp1|Whereas ALGOL 60 has type declarations, array declarations, * 0 485. switch declarations and procedure declarations, ALGOL 68 features the * 0 486. |b|identity-declaration|r| whose expressive power includes all of these, and * 0 487. more. The |b|identity-declaration|r|, although theoretically sufficient in * 0 488. itself, is augmented by the |b|variable-declaration|r| for the convenience * 0 489. of the user. * 0 490. |pb1|b)|tp1|Moreover, in ALGOL 68, a |b|mode-declaration|r| permits the * 0 491. construction of a new mode from already existing ones. In particular, the * 0 492. modes of multiple values and of structured values may be defined in this * 0 493. way; in addition, a union of modes may be defined, * 0 494. allowing each value referred to by a given name to * 0 495. be of any one of the uniting modes. * 0 496. |pb1|c)|tp1|Finally, in ALGOL 68, a |b|priority-declaration|r| and an * 0 497. |b|operation-declaration|r| permit the introduction of new operators, the * 0 498. definition of their operation and the extension of the class * 0 499. of operands of, and the revision of the meaning of, already established operators. * 0 500. * 0 501. |h|0.2.3. Dynamic storage allocation in ALGOL 68 * 0 502. * 0 503. |pa||j|Whereas ALGOL 60 (apart from "|i|OWN|r| dynamic arrays") * 0 504. implies a "stack"-oriented storage-allocation regime, sufficient to cope * 0 505. with objects having nested lifetimes (an object created before another object being * 0 506. guaranteed not to become inaccessible before that second one), ALGOL#68 * 0 507. provides, in addition, the ability to create and manipulate objects whose * 0 508. lifetimes are not so restricted. * 0 509. This ability implies the use of an additional * 0 510. area of storage, the "heap", in which garbage-collection techniques must be used. * 0 511. * 0 512. |h|0.2.4. Collateral elaboration in ALGOL 68 * 0 513. * 0 514. |pa||j|Whereas, in ALGOL 60, statements are "executed consecutively", in * 0 515. ALGOL 68, |b|phrases|r| are "elaborated serially" or "collaterally". This * 0 516. latter facility is conducive to more efficient object programs under many * 0 517. circumstances, since it allows discretion to the implementer to choose, * 0 518. in many cases, the order of elaboration of certain constructs or even, * 0 519. in some cases, whether they are to be elaborated at all. * 0 520. Thus the user who expects his "side effects" to take place in any well * 0 521. determined manner will receive no support from this Report. * 0 522. Facilities for parallel programming, though restricted to the essentials * 0 523. in view of the none-too-advanced state of the art, have been introduced. * 0 524. * 0 525. |h|0.2.5. Standard declarations in ALGOL 68 * 0 526. * 0 527. |pa||j|The ALGOL 60 standard * 0 528. functions are all included in ALGOL 68 along with many other standard * 0 529. declarations. Amongst these are "environment enquiries", which * 0 530. make it possible to determine certain properties of an implementation, * 0 531. and "transput" declarations, which make it possible, at run time, to * 0 532. obtain data from and to deliver results to external media. * 0 533. * 0 534. |h|0.2.6. Some particular constructions in ALGOL 68 * 0 535. * 0 536. |pb1||j|a)|tp1|The ALGOL 60 concepts of block, compound statement and * 0 537. parenthesized expression are unified in ALGOL 68 into the |b|serial-clause|r|. * 0 538. A |b|serial-clause|r| may be an |b|expression|r| and yield a value. Similarly, the * 0 539. ALGOL 68 |b|assignation|r|, which is a generalization of the ALGOL 60 * 0 540. assignment statement, may be an |b|expression|r| and, as such, also yield a value. * 0 541. |pb1|b)|tp1|The ALGOL 60 concept of subscripting is generalized to the * 0 542. ALGOL 68 concept of "indexing", which allows the selection not only of a * 0 543. single element of an array but also of subarrays with the same or any * 0 544. smaller dimensionality and with possibly altered bounds. * 0 545. |pb1|c)|tp1|ALGOL 68 provides * 0 546. |b|row-displays|r| and |b|structure-displays|r|, which serve to compose the multiple * 0 547. and structured values mentioned in 0.2.1.c from other, simpler, values. * 0 548. |pb1|d)|tp1|The ALGOL 60 for statement is modified into a more concise and * 0 549. efficient |b|loop-clause|r|. * 0 550. |pb1|e)|tp1|The ALGOL 60 conditional expression and conditional statement, * 0 551. unified into a |b|conditional-clause|r|, are improved by requiring them to * 0 552. end with a closing symbol whereby the two alternative clauses admit the * 0 553. same syntactic possibilities. Moreover, the |b|conditional-clause|r| is * 0 554. generalized into a |b|case-clause|r|, which allows the efficient selection * 0 555. from an arbitrary number of clauses depending on the value of an * 0 556. |b|integral-expression|r|, and a |b|conformity-clause|r|, * 0 557. which allows a selection depending upon the actual mode of a value. * 0 558. |pb1|f)|tp1|Some less successful ALGOL 60 concepts, such as |b|own|r| quantities * 0 559. and integer labels, have not been included in ALGOL 68, and some * 0 560. concepts, like designational expressions and switches, do not appear as * 0 561. such in ALGOL 68 but their expressive power is included in other, more * 0 562. general, constructions. * 0 563. * 0 564. |h|0.3. Comparison with the language defined in 1968 * 0 565. * 0 566. |pa||j|The more significant changes to the language are indicated in the sections which follow. * 0 567. The revised language will be described in a new * 0 568. edition of the "Informal Introduction to ALGOL 68" * 0 569. by C.H.#Lindsey and S.G.#van#der#Meulen, which accompanied the original Report. * 0 570. * 0 571. |h|0.3.1. Casts and routine texts * 0 572. * 0 573. |pa||j|Routines without parameters used to be constructed out of a |b|cast|r| in which the * 0 574. |b|cast-of-symbol|r| (|i|:|r|) appeared. This construct is now one of the forms of the new * 0 575. |b|routine-text|r|, which provides for procedures both with and without parameters. A new form of * 0 576. the |b|cast|r| has been provided which may be used in contexts previously not possible. * 0 577. Moreover, both |b|void-casts|r| and |b|procedure-PARAMETY-yielding-void-routine-texts|r| * 0 578. must now contain an explicit |b|void-symbol|r|. * 0 579. * 0 580. |h|0.3.2. Extended ranges * 0 581. * 0 582. |pa||j|The new |b|range|r| which is established by the |b|enquiry-clause|r| of a |b|choice-clause|r| * 0 583. (which encompasses the old |b|conditional-|r| and |b|case-clauses|r|) or of a |b|while-part|r| * 0 584. now extends into the controlled |b|serial-clause|r| or |b|do-part|r|. * 0 585. * 0 586. |h|0.3.3. Conformity clauses * 0 587. * 0 588. |pa||j|The |b|conformity-relation|r| and the |b|case-conformity|r| which was obtained * 0 589. by extension from it are now replaced by a new |b|conformity-clause|r|, * 0 590. which is a further example of the |b|choice-clause|r| mentioned above. * 0 591. * 0 592. |h|0.3.4. Modes of multiple values * 0 593. * 0 594. |pa||j|A new class of modes is introduced, for multiple values whose elements are themselves * 0 595. multiple values. Thus one may now write the |b|declarer|r| |i||so||thin||sc| STRING|r|. * 0 596. |pg|Moreover, multiple values no longer have "states" to distinguish their flexibility. Instead, * 0 597. flexibility is now a property of those names which refer to multiple values whose size may change, * 0 598. such names having distinctive modes of the form |b||ap|reference to flexible ROWS of MODE|ap||r|. * 0 599. * 0 600. |h|0.3.5. Identification of operators * 0 601. * 0 602. |pa||j|Not only may two |b|operators|r|, related to each other by the modes of their operands, not * 0 603. be declared in the same |b|range|r|, as before, but now, if two such |b|operators|r| be declared in * 0 604. different reaches, any attempt to identify from the inner reach * 0 605. the one in the outer reach will fail. * 0 606. This gives some benefit to the implementer and removes a source of possible confusion to the user. * 0 607. * 0 608. |h|0.3.6. Representations * 0 609. * 0 610. |pa||j|The manner in which |b|symbols|r| for newly defined |b|mode-indications|r| and * 0 611. |b|operators|r| are to be represented is now more closely defined. Thus it is clear that * 0 612. the implementer is to provide a special alphabet of bold-faced, or "stropped", marks * 0 613. from which |b|symbols|r| such as |i|PERSON|r| may be made, * 0 614. and it is also clear that |b|operators|r| such as |i||sgt||sgt||r| are to be allowed. * 0 615. * 0 616. |h|0.3.7. Standard prelude * 0 617. * 0 618. |pa||j|In order to ease the problems of implementers who might wish to provide variants of the * 0 619. language suitable for environments where English is not spoken, there are no longer any * 0 620. |b|field-selectors|r| known to the user in the |b|standard-prelude|r|, * 0 621. with the exception of |i|re|r| and |i|im|r| of the mode |i|COMPL|r|. * 0 622. The |b|identifiers|r| and other |b|indicators|r| declared in * 0 623. the |b|standard-prelude|r| could, of course, easily be defined again in some |b|library-prelude|r|, * 0 624. but this would not have been possible in the case of |b|field-selectors|r|. * 0 625. * 0 626. |h|0.3.8. Line length in transput * 0 627. * 0 628. |pa||j|The lines (and the pages also) of the "book" used during transput may now, * 0 629. at the discretion of the implementer, be of varying lengths. This models more * 0 630. closely the actual behaviour of most operating systems * 0 631. and of devices such as teleprinters and paper-tape readers. * 0 632. * 0 633. |h|0.3.9. Internal transput * 0 634. * 0 635. |pa||j|The transput routines, in addition to sending data to or from external media, may * 0 636. now be associated with |b|row-of-character-variables|r| declared by the user. * 0 637. * 0 638. |h|0.3.10. Elaboration of formats * 0 639. * 0 640. |pa||j|The dynamic |b|replicators|r| contained in |b|format-texts|r| are now elaborated as and when * 0 641. they are encountered during the formatted transput process. This should give an effect more natural * 0 642. to the user, and is easier to implement. * 0 643. * 0 644. |h|0.3.11. Features removed * 0 645. * 0 646. |pa||j|Certain features, such as proceduring, |b|gommas|r| and formal bounds, have not been * 0 647. included in the revision. * 0 648. * 0 649. * 0 650. |h|0.4. Changes in the method of description * 0 651. * 0 652. |pa||j|In response to the directive from the Working Group "to make its study easier * 0 653. for the uninitiated reader", the Editors of this revision have rewritten the original * 0 654. Report almost entirely, using the same basic descriptional technique, but applying it in * 0 655. new ways. It is their hope that less "initiation" will now be necessary. * 0 656. |pa|The more significant changes in the descriptional technique are indicated below. * 0 657. * 0 658. |h|0.4.1. Two-level grammar * 0 659. * 0 660. |pb1||j|a)|tp1|While the syntax is still described by a two-level grammar of the type now widely * 0 661. known by the name "Van Wijngaarden", new techniques for using such grammars have been applied. * 0 662. In particular, the entire identification process is now described in the syntax using the * 0 663. metanotion "|b|NEST|r|", whose terminal metaproductions are capable of describing, and of passing * 0 664. on to the descendent constructs, all the declared information which is available at any particular * 0 665. node of the production tree. * 0 666. |pb1|b)|tp1|In addition, extensive use is made of "predicates". These are notions which are * 0 667. deliberately made to yield blind alleys when certain conditions are not met, and which yield empty * 0 668. terminal productions otherwise. They have enabled the number of syntax rules to be reduced in many * 0 669. cases, while at the same time making the grammar easier to follow by reducing the number of places * 0 670. where a continuation of a given rule might be found. * 0 671. |pb1|c)|tp1|It has thus been possible to remove all * 0 672. the "context conditions" contained in the original Report. * 0 673. * 0 674. |h|0.4.2. Modes * 0 675. * 0 676. |pb1||j|a)|tp1|In the original Report, modes were protonotions of possibly infinite length. It was * 0 677. assumed that, knowing how an infinite mode had been obtained, it was decidable whether or not * 0 678. it was the same as some other infinite mode. However, counterexamples have come to light where * 0 679. this was not so. Therefore, it has been decided to remove all infinities from the process of * 0 680. producing a finite |b|program|r| and, indeed, this can now be done in a finite number of moves. * 0 681. |pb1|b)|tp1|A mode, essentially, has to represent a potentially infinite tree. * 0 682. To describe it as a protonotion of finite length * 0 683. requires the use of markers |co||b||ap|MU definition|ap||r|s|cc| and pointers back * 0 684. to those markers |co||b||ap|MU application|ap||r|s|cc| within the protonotion. * 0 685. However, a given infinite tree can be "spelled" in many ways by this method, and therefore a mode * 0 686. becomes an equivalence class comprised of all those equivalent spellings of that tree. The * 0 687. equivalence is defined in the syntax using the predicates mentioned earlier. * 0 688. * 0 689. |h|0.4.3. Extensions * 0 690. * 0 691. |pa||j|The need for many of the extensions given in the original Report had been removed by * 0 692. language changes. Some of the remainder had been a considerable source of confusion and * 0 693. surprises. The opportunity has therefore been taken to remove the extension as * 0 694. a descriptional mechanism, all the former extensions now being specified directly in the syntax. * 0 695. * 0 696. |h|0.4.4. Semantics * 0 697. * 0 698. |pb1||j|a)|tp1|In order to remove some rather repetitious phrases from the semantics, certain technical * 0 699. terms have been revised and others introduced. The grammar, instead of producing a terminal * 0 700. production directly, now does so by way of a production tree. The semantics is explained in terms * 0 701. of production trees. Paranotions, which designate constructs, may now contain metanotions and * 0 702. "hypernotions" have been introduced in order to designate protonotions. * 0 703. |pb1|b)|tp1|A model of the hypothetical computer much more closely related to a real one has been * 0 704. introduced. The elaboration of each construct is now presumed to take place in an "environ" and, * 0 705. when a new |b|range|r| is entered (and, in particular, when a routine is called), a new "locale" * 0 706. is added to the environ. The locale corresponds to the new |b|range|r| and, if recursive procedure * 0 707. calls arise, then there exist many locales corresponding to one same routine. * 0 708. This supersedes the method of "textual substitution" used before, and one consequence of this is * 0 709. that the concept of "protection" is no longer required. * 0 710. |pb1|c)|tp1|The concept of an "instance" of a value is no longer used. This simplifies certain * 0 711. portions of the semantics where, formerly, a "new instance" had to be taken, the effects of * 0 712. which were not always clear to see. * 0 713. * 0 714. |h|0.4.5. Translations * 0 715. * 0 716. |pa||j|The original Report has been translated into various natural * 0 717. languages. The translators were not always able to adhere strictly * 0 718. to the descriptional method, and so the opportunity has been * 0 719. taken to define more clearly and more liberally certain * 0 720. descriptional features which caused difficulties (see 1.1.5). * 0 721. |pq||co||w|True wisdom knows it must comprise * 0 722. |pp|some nonsense as a compromise, * 0 723. |pp|lest fools should fail to find it wise. * 0 724. |ppp|Grooks,|pr|Piet Hein.|r||cc||qq|? 0 10000. |np||e||e||c|PART#I|nc| * 0 10001. |e||e||e||c|Preliminary definitions|nc| * 0 10002. |e||e| * 0 10003. * 0 10004. |h|1. |bs|Language and metalanguage|rs| * 0 10005. * 0 10006. |h|1.1. The method of description * 0 10007. * 0 10008. |h|1.1.1. Introduction * 0 10009. * 0 10010. |pb1||j|a)|tp1|ALGOL 68 is a language in which * 0 10011. algorithms may be formulated for computers, i.e., for automata or * 0 10012. for human beings. It is defined by this Report in four stages, the "syntax" |co|b|cc|, the * 0 10013. "semantics" |co|c|cc|, the "representations" |co|d|cc| and the "standard environment" |co|e|cc|. * 0 10014. |pb1|b)|tp1|The syntax is * 0 10015. a mechanism whereby all the constructs of the language may be * 0 10016. produced. This mechanism proceeds as follows: * 0 10017. |pha10|(i)|thb0|A set of "hyper-rules" * 0 10018. and a set of "metaproduction rules" are given |co|1.1.3.4, 1.1.3.3|cc|, from which * 0 10019. "production rules" may be derived; * 0 10020. |pha20|(ii)|thb0|A "construct in the strict language" is a * 0 10021. "production tree" |co|1.1.3.2.f|cc| * 0 10022. which may be produced by the application of a subset of * 0 10023. those production rules; * 0 10024. this production tree contains static information * 0 10025. |co|i.e., information known at "compile time"|cc| concerning that construct; * 0 10026. it is composed of a hierarchy of descendent production trees, terminating * 0 10027. at the lowest level in the "|b|symbols|r|"; * 0 10028. with each production tree is associated a "nest" of properties, declared * 0 10029. in the levels above, which is passed on to the nests of its * 0 10030. descendents; * 0 10031. |pha30|(iii)|thb0|A "|b|program|r| in the strict language" is * 0 10032. a production tree for the notion |b||ap|program|ap||r| |co|2.2.1.a|cc|. * 0 10033. It must also satisfy the "environment condition" |co|10.1.2|cc|. * 0 10034. |pb1|c)|tp1|The semantics ascribes a "meaning" |co|2.1.4.1.a|cc| to each construct * 0 10035. |co|i.e., to each production tree|cc| by defining the effect (which may, however, be "undefined") * 0 10036. of its "elaboration" |co|2.1.4.1|cc|. * 0 10037. This proceeds as follows: * 0 10038. |pha10|(i)|thb0|A dynamic |co|i.e., run-time|cc| tree of active "actions" is * 0 10039. set up |co|2.1.4|cc|; * 0 10040. typically, an action is the elaboration of some production tree |w|T|r| * 0 10041. in an "environ" consistent with the nest of |w|T|r|, and it may bring * 0 10042. about the elaboration of descendents of |w|T|r| in suitable newly * 0 10043. created descendent environs; * 0 10044. |pha20|(ii)|thb0|The meaning of a |b|program|r| in the strict * 0 10045. language is the effect of its elaboration in the empty "primal environ". * 0 10046. |pb1|d)|tp1|A |b|program|r| in the strict language must be represented in some * 0 10047. "representation language" |co|9.3.a|cc| chosen by the implementer. * 0 10048. In most cases this will be the official "reference language". * 0 10049. |pha10|(i)|thb0|A |b|program|r| in a * 0 10050. representation language is obtained by replacing the |b|symbols|r| of a |b|program|r| in * 0 10051. the strict language by certain typographical marks |co|9.3|cc|. * 0 10052. |pha20|(ii)|thb0|Even the reference language allows considerable discretion to the * 0 10053. implementer |co|9.4.a,b,c|cc|. A restricted form of the reference language * 0 10054. in which such freedom has not been exercised may be termed the "canonical form" * 0 10055. of the language, and it is expected that this form will be used in * 0 10056. algorithms intended for publication. * 0 10057. |pha30|(iii)|thb0|The meaning of a |b|program|r| in a * 0 10058. representation language is the same * 0 10059. as that of the |b|program|r| |co|in the strict language|cc| from which it was * 0 10060. obtained.# * 0 10061. |pb1|e)|tp1|An algorithm is expressed by means of a * 0 10062. |b|particular-program|r|, which is considered to be embedded, * 0 10063. together with the standard environment, in a |b|program-text|r| |co|10.1.1.a|cc|. * 0 10064. The meaning of a |b|particular-program|r| |co|in the strict or a * 0 10065. representation language|cc| is the meaning of the * 0 10066. |b|program|r| "akin" to that |b|program-text|r| |co|10.1.2.a|cc|. * 0 10067. * 0 10068. |h2|1.1.2. Pragmatics * 0 10069. * 0 10070. |pq||j||w||co|Merely corroborative detail, intended to give * 0 10071. artistic verisimilitude to an otherwise bald and unconvincing narrative. * 0 10072. |ppp|Mikado, |pr|W.S.#Gilbert.|r||cc||qq|? 0 10073. |pa|Scattered throughout this Report are "pragmatic" * 0 10074. remarks included between the braces "|co|" and "|cc|". These are not part of the * 0 10075. definition of the language but serve to help the reader to understand * 0 10076. the intentions and implications of the definitions and to find corresponding sections or rules. * 0 10077. |pa| |co|Some of the pragmatic remarks contain examples written in the reference * 0 10078. language. In these examples, |b|applied-indicators|r| occur out of context from their * 0 10079. |b|defining-indicators|r|. Unless otherwise specified, these occurrences identify those in the * 0 10080. |b|standard-|r| or |b|particular-preludes|r| and the |b|particular-postlude|r| (10.2, 10.3, 10.5) * 0 10081. (e.g., see 10.2.3.12.a for |i|pi|r|, 10.5.1.b for |i|random|r| and 10.5.2.a for |i|stop|r|), * 0 10082. or those in: * 0 10083. |n||pb||ps||i|INT i, j, k, m, n; REAL a, b, x, y; BOOL p, q, overflow; CHAR c; FORMAT f; * 0 10084. BYTES r; STRING s; BITS t; COMPL w, z; REF REAL xx, yy; UNION (INT, REAL) uir; PROC VOID task1,#task2; * 0 10085. |p||ps||so|1 : n|sc| REAL x1, y1; FLEX |so|1 : n|sc| REAL a1; * 0 10086. |so|1 : m, 1 : n|sc| REAL x2; * 0 10087. |so|1 : n, 1 : n|sc| REAL y2; |so|1 : n|sc| INT i1; * 0 10088. |so|1 : m, 1 : n|sc| INT i2; |so|1 : n|sc| COMPL z1;? 0 10089. |p||ps|PROC x or y |uqe||g| REF REAL :|g| IF random |lt| .5 THEN x ELSE y FI; * 0 10090. |p||ps|PROC ncos |uqe||g| (INT i) REAL :|g| cos (2 |sx| pi |sx| i / n); * 0 10091. |p||ps|PROC nsin |uqe||g| (INT i) REAL :|g| sin (2 |sx| pi |sx| i / n); * 0 10092. |p||ps|PROC finish |uqe||g| VOID : GO TO stop; * 0 10093. |p||ps|MODE BOOK |uqe| STRUCT |ro|STRING text, REF BOOK next|rc|; BOOK draft; * 0 10094. |p||ps|princeton|lbl| |g|grenoble|lbl| |g|st pierre de chartreuse|lbl| |g|kootwijk|lbl| |g|? 0 10095. warsaw|lbl| |g|zandvoort|lbl| |g|amsterdam|lbl| |g|tirrenia|lbl| |g|north berwick|lbl| |g|? 0 10096. munich|lbl| |g|finish|r|.|cc| * 0 10097. * 0 10098. |h|1.1.3. The syntax of the strict language * 0 10099. * 0 10100. |h1|1.1.3.1. Protonotions * 0 10101. * 0 10102. |pb1||j|a)|tp1|In the definition of the syntax of the strict language, * 0 10103. a formal grammar is used in which certain syntactic marks appear. * 0 10104. These may be classified as follows: * 0 10105. |pha10||n|(i)|thb0|"small syntactic marks", written, in this Report, as * 0 10106. |e|"|b|a|r|", "|b|b|r|", "|b|c|r|", "|b|d|r|", "|b|e|r|", "|b|f|r|", * 0 10107. "|b|g|r|", "|b|h|r|", "|b|i|r|", "|b|j|r|", "|b|k|r|", "|b|l|r|", * 0 10108. "|b|m|r|", "|b|n|r|", "|b|o|r|", "|b|p|r|", "|b|q|r|", "|b|r|r|", * 0 10109. "|b|s|r|", "|b|t|r|", "|b|u|r|", "|b|v|r|", "|b|w|r|", "|b|x|r|", * 0 10110. "|b|y|r|", "|b|z|r|", "|b|(|r|", "|b|)|r|"; * 0 10111. |pha20|(ii)|thb0|"large syntactic marks", written, in this Report, as * 0 10112. |e|"|b|A|r|", "|b|B|r|", "|b|C|r|", "|b|D|r|", "|b|E|r|", "|b|F|r|", * 0 10113. "|b|G|r|", "|b|H|r|", "|b|I|r|", "|b|J|r|", "|b|K|r|", "|b|L|r|", * 0 10114. "|b|M|r|", "|b|N|r|", "|b|O|r|", "|b|P|r|", "|b|Q|r|", "|b|R|r|", * 0 10115. "|b|S|r|", "|b|T|r|", "|b|U|r|", "|b|V|r|", "|b|W|r|", "|b|X|r|", * 0 10116. "|b|Y|r|", "|b|Z|r|", "|b|0|r|", "|b|1|r|", "|b|2|r|", "|b|3|r|", "|b|4|r|", * 0 10117. "|b|5|r|", "|b|6|r|", "|b|7|r|", "|b|8|r|", "|b|9|r|"; * 0 10118. |pha30|(iii)|thb0|"other syntactic marks", written, in this Report, as * 0 10119. |e|"|b|.|r|"#("point"), "|b|,|r|"#("comma"), "|b|:|r|"#("colon"), * 0 10120. "|b|;|r|"#("semicolon"), "|b||ap||r|"#("apostrophe"), "|b|-|r|"#("hyphen") and "|b|*|r|"#("asterisk"). * 0 10121. |pb||j| |co|Note that these marks are in another type font than that of the * 0 10122. marks in this sentence.|cc| * 0 10123. |pb1|b)|tp1|A "protonotion" is a possibly empty * 0 10124. sequence of small syntactic marks. * 0 10125. |pb1|c)|tp1|A "notion" is a |co|nonempty|cc| protonotion for which a production rule can be * 0 10126. derived |co|1.1.3.2.a, 1.1.3.4.d|cc|. * 0 10127. |pb1|d)|tp1|A "metanotion" is a |co|nonempty|cc| sequence of large syntactic * 0 10128. marks for which a metaproduction rule is given or created |co|1.1.3.3.a|cc|. * 0 10129. |pb1|e)|tp1|A "hypernotion" is a possibly empty sequence each of whose * 0 10130. elements either is a small syntactic mark or is a metanotion. * 0 10131. |pg||co|Thus the class of protonotions (b) is a subclass of the class of * 0 10132. hypernotions. Hypernotions are used in metaproduction rules (1.1.3.3), * 0 10133. in hyper-rules (1.1.3.4), as paranotions (1.1.4.2) and, in their own * 0 10134. right, to "designate" certain classes of protonotions (1.1.4.1).|cc| * 0 10135. |pg||co|A "paranotion" is a hypernotion to which certain special conventions * 0 10136. and interpretations apply, as detailed in 1.1.4.2.|cc| * 0 10137. |pb1|f)|tp1|A "symbol" is a * 0 10138. protonotion ending with |b||ap|symbol|ap||r|. * 0 10139. |co|Note that the paranotion |b|symbol|r| (9.1.1.h) designates a * 0 10140. particular occurrence of such a protonotion.|cc| * 0 10141. |w5||exx||co|Examples: * 0 10142. |ex|b) |b||ap|variable point|ap||r| * 0 10143. |ey|c) |b||ap|variable point numeral|ap||r| (8.1.2.1.b) * 0 10144. |ey|d) "|b|INTREAL|r|" (1.2.1.C) * 0 10145. |ey|e) |b||ap|reference to INTREAL|ap||r| * 0 10146. |ey|f) |b||ap|letter a symbol|ap||r| . * 0 10147. |pa|Note that the protonotion |b||ap|twas brillig and the slithy toves|ap||r| is * 0 10148. neither a symbol nor a notion, in that it does not end with |b||ap|symbol|ap||r| and no production * 0 10149. rule can be derived for it. Likewise, "|b|LEWIS|r|" and "|b|CARROLL|r|" are not * 0 10150. metanotions in that no metaproduction rules are given for them.|cc| * 0 10151. |pb1|g)|tp1|In order to distinguish the various usages in the text of * 0 10152. this Report of the terms defined above, the following * 0 10153. conventions are adopted: * 0 10154. |pha10|(i)|thb0|No distinguishing marks |co|quotes, apostrophes or hyphens|cc| * 0 10155. are used in production rules, metaproduction rules or hyper-rules; * 0 10156. |pha20|(ii)|thb0|Metanotions, and hypernotions which stand for themselves |co|i.e., which do not * 0 10157. designate protonotions|cc|, are enclosed in quotes; * 0 10158. |pha30|(iii)|thb0|Paranotions are not enclosed in anything |co|but, as an aid * 0 10159. to the reader, are provided with hyphens where, otherwise, they would * 0 10160. have been provided with blanks|cc|; * 0 10161. |pha20|(iv)|thb0|All other hypernotions |co|including protonotions|cc| not covered above are enclosed in * 0 10162. apostrophes |co|in order to indicate that they designate some protonotion, * 0 10163. as defined in 1.1.4.1.a|cc|; * 0 10164. |pha10|(v)|thb0|Typographical display features, such as blank space, * 0 10165. hyphen, and change to a new line or new page, are of no significance (but see also 9.4.d). * 0 10166. |w5||exx||co|Examples: * 0 10167. |pha10|(i)|thb0||b|LEAP#:: local#; heap#; primal.|r|##is a metaproduction rule; * 0 10168. |pha20|(ii)|thb0|"|b|INTREAL|r|" is * 0 10169. a metanotion and designates nothing but itself; * 0 10170. |pha30|(iii)|thb0||b|reference-to-INTREAL-identifier|r|, which * 0 10171. is not enclosed in apostrophes but is provided with hyphens, is a * 0 10172. paranotion designating a construct (1.1.4.2.a); * 0 10173. |pha20|(iv)|thb0||b||ap|variable point|ap||r| * 0 10174. is both a hypernotion and a protonotion; regarded as a hypernotion, * 0 10175. it designates itself regarded as a protonotion; * 0 10176. |pha10|(v)|thb0||b||ap|reference#to#real|ap||r| means the same as |b||ap|referencetoreal|ap||r|.|cc| * 0 10177. * 0 10178. |h|1.1.3.2. Production rules and production trees * 0 10179. * 0 10180. |pb1||j|a)|tp1|The |co|derived|cc| "production rules" |co|b|cc| of the language are those * 0 10181. production rules which can be derived from the "hyper-rules" |co|1.1.3.4|cc|, * 0 10182. together with those specified informally in 8.1.4.1.d and 9.2.1.d. * 0 10183. |pb1|b)|tp1|A "production rule" consists of the following items, in order: * 0 10184. |p||tp1|an optional asterisk#; * 0 10185. |p||tp1|a nonempty protonotion |w|N|r|#; * 0 10186. |p||tp1|a colon#; * 0 10187. |p||tp1|a nonempty sequence of "alternatives" separated by semicolons#; * 0 10188. |p||tp1|a point. * 0 10189. |p|It is said to be a production rule "for" |co|the notion (1.1.3.1.c)|cc| * 0 10190. |w|N|r|. * 0 10191. |pg||co|The optional asterisk, if present, signifies that the notion is * 0 10192. not used in other production rules, but is provided to facilitate * 0 10193. discussion in the semantics. It also signifies that that notion may be used * 0 10194. as an "abstraction" (1.1.4.2.b) of one of its alternatives.|cc| * 0 10195. |pb1|c)|tp1|An "alternative" is a nonempty sequence of "members" separated by commas. * 0 10196. |pb1|d)|tp1|A "member" is either * 0 10197. |pha10|(i)|thb0|a notion |co|and may then be said to be productive, * 0 10198. or nonterminal|cc|, * 0 10199. |pha20|(ii)|thb0|a symbol |co|which is terminal|cc|, * 0 10200. |pha30|(iii)|thb0|empty, or * 0 10201. |pha20|(iv)|thb0|some other protonotion |co|for which no production rule can be * 0 10202. derived|cc|, which is then said to be a "blind alley". * 0 10203. |pg||co|For example, the member |b||ap|reference#to real denotation|ap||r| (derived from * 0 10204. the hyper-rule 8.0.1.a) is a blind alley.|cc| * 0 10205. |w5||exx||co|Examples: * 0 10206. |n||ex|b) |b|exponent part : times ten to the power choice, * 0 10207. power of ten.|r|#(8.1.2.1.g)|qs| * 0 10208. |eyy||b|times ten to the power choice : * 0 10209. |eyy|##times ten to the power symbol ; * 0 10210. |eyy|##letter e symbol.|r|#(8.1.2.1.h) * 0 10211. |ey|c) |b|times ten to the power choice, power of ten|r||qs| * 0 10212. |eyy||b|times ten to the power symbol|r||qs| * 0 10213. |eyy||b|letter e symbol|r| * 0 10214. |ey|d) |b|times ten to the power choice|r||qs| * 0 10215. |eyy||b|power of ten|r||qs| * 0 10216. |eyy||b|times ten to the power symbol|r||qs| * 0 10217. |eyy||b|letter e symbol|r| |cc| * 0 10218. |pb1||j|e)|tp1|A "construct in the strict language" is any "production tree" |co|f|cc| that may be * 0 10219. "produced" from a production rule of the language. * 0 10220. |pb1|f)|tp1|A "production tree" |w|T|r| for a notion |w|N|r|, * 0 10221. which is termed the "original" of |w|T|r|, is "produced" as follows: * 0 10222. |xi||bt|let |w|P|r| be some |co|derived|cc| production rule for |w|N|r|; * 0 10223. |et|a copy is taken of |w|N|r|; * 0 10224. |et|a sequence of production trees, the "direct descendents" of |w|T|r|, * 0 10225. one produced for each nonempty member of some alternative |w|A|r| of |w|P|r|, is attached * 0 10226. to the copy; the order of the sequence is the order of those members within |w|A|r|;? 0 10227. |et|the copy of the original, together with the attached direct descendents, comprise the * 0 10228. production tree |w|T|r|. * 0 10229. |pg|A "production tree" for a symbol consists of a copy of that symbol * 0 10230. |co|i.e., it consists of a |b|symbol|r||cc|. * 0 10231. |pa|The "terminal production" of a production tree |w|T|r| is a sequence consisting of the terminal * 0 10232. productions of the direct descendents of |w|T|r|, taken in order. * 0 10233. |pg|The "terminal production" of a production tree * 0 10234. consisting only of a |b|symbol|r| is that |b|symbol|r|. * 0 10235. |exx||co|Example:|b| * 0 1. |w30||wid||picn| * 0 2. |n||e|#|e|###############'exponent#part' |g|? 0 3. |e|################|ul4||ul||ul||ulb||ul4||ul||ul| |g|? 0 4. |e|###############|#############| |g|? 0 5. |e|######'times#ten#to#the###'power#of#ten' |g|? 0 6. |e|########power#choice'########|ul||ul||ul||ulb||ul||ul||ul| |g|? 0 7. |e|#############|##############|#######| |g|? 0 8. |e|#############|######'plusminus###'fixed#point |g|? 0 9. |e|#############|########option'######numeral' |g|? 0 10. |e|#############|#########|###############| |g|? 0 11. |e|#############|####'plusminus'#####'digit#cypher |g|? 0 12. |e|#############|#########|##############sequence' |g|? 0 13. |e|#############|#########|##############|ul||ul||ul||ulb||ul||ul||ul| |g|? 0 14. |e|#############|#########|#############|#######| |g|? 0 15. |e|#############|#########|########'digit####'digit#cypher |g|? 0 16. |e|#############|#########|#########cypher'#####sequence' |g|? 0 17. |e|#############|#########|###########|#############| |g|? 0 18. |e|#############|#########|########'digit########'digit |g|? 0 19. |e|#############|#########|#########zero'########cypher' |g|? 0 20. |e|#############|#########|###########|#############| |g|? 0 21. |e|#############|#########|###########|##########'digit |g|? 0 22. |e|#############|#########|###########|############two' |g|? 0 23. |e|#############|#########|###########|#############| |g|? 0 24. |e|########'letter#e####'plus####'digit#zero###'digit#two |g|? 0 25. |e|#########symbol'####symbol'#####symbol'#######symbol' * 0 26. |picf||nar| * 0 27. $ENDFILE? 0 100. |S186|S5'|S1'exponent#part|S5'|S1' * 0 101. |S25|S5'|S1'times#ten#to#the|S122|S5'|S1'power#of#ten|S5'|S1' * 0 102. |S40power#choice|S5'|S1' * 0 103. |S204|S5'|S1'plusminus|S130|S5'|S1'fixed#point * 0 104. |S223option|S5'|S1'|S159numeral|S5'|S1' * 0 105. |S204|S5'|S1'plusminus|S5'|S1'|S119|S5'|S1'digit#cypher * 0 106. |S444sequence|S5'|S1' * 0 107. |S380|S5'|S1'digit|S73|S5'|S1'digit#cypher * 0 108. |S369cypher|S5'|S1'|S93sequence|S5'|S1' * 0 109. |S380|S5'|S1'digit|S98|S5'|S1'digit * 0 110. |S381zero|S5'|S1'|S100cypher|S5'|S1' * 0 111. |S530|S5'|S1'digit * 0 112. |S539two|S5'|S1' * 0 113. |S66|S5'|S1'letter#e|S93|S5'|S1'plus|S83|S5'|S1'digit#zero|S66|S5'|S1'digit#two * 0 114. |S68symbol|S5'|S1'|S82symbol|S5'|S1'|S82symbol|S5'|S1'|S82symbol|S5'|S1' * 0 10237. |pr||r||cc|? 0 10238. |pa||j||co|The terminal production of this tree is the sequence of |b|symbols|r| * 0 10239. at the bottom of the tree. * 0 10240. In the reference language, its representation would be |i|e+02|r|.|cc| * 0 10241. |pa|A "terminal production" of a notion is the terminal production of some production tree * 0 10242. for that notion * 0 10243. |co|thus there are many other terminal productions of |b||ap|exponent part|ap||r| * 0 10244. besides the one shown|cc|. * 0 10245. |pa||co|The syntax of the strict language has been chosen in such a way * 0 10246. that a given sequence of |b|symbols|r| * 0 10247. which is a terminal production of some notion is so by virtue of a unique production tree, * 0 10248. or by a set of production trees which differ only in such a way * 0 10249. that the result of their elaboration * 0 10250. is the same (e.g., production trees derived from rules * 0 10251. 3.2.1.e (balancing), 1.3.1.d,e (predicates) and 6.7.1.a,b (choice of spelling * 0 10252. of the mode of a |b|coercend|r| to be voided); * 0 10253. see also 2.2.2.a). * 0 10254. |pg|Therefore, in practice, terminal productions (or representations thereof) * 0 10255. are used, in this Report and elsewhere, in place of production trees. * 0 10256. Nevertheless, it is really the production trees in terms of which the elaboration of programs is * 0 10257. defined by the semantics of this Report, which is concerned with explaining the meaning of those * 0 10258. constructs whose originals are the notion |b||ap|program|ap||r|.|cc| * 0 10259. |pb1||j|g)|tp1|A production tree |w|P|r| is a "descendent" * 0 10260. of a production tree |w|Q|r| if it is a direct * 0 10261. descendent |co|f|cc| either of |w|Q|r| or of a descendent of |w|Q|r|. * 0 10262. |w|Q|r| is said to "contain" its descendents * 0 10263. and those descendents are said to be "smaller" than |w|Q|r|. * 0 10264. |co|For example, the production tree * 0 1. |w10||n||e|#|e|######|b||ap|plusminus#option|ap| * 0 2. |e|##############|# * 0 3. |e|#########|ap|plusminus|ap| * 0 4. |e|##############|# * 0 5. |e|########|ap|plus#symbol|ap||r| * 0 7. $ENDFILE? 0 100. |S266|S5'|S1'plusminus option|S5'|S1' * 0 101. |S297|S5'|S1'plusminus|S5'|S1' * 0 102. |S288|S5'|S1'plus symbol|S5'|S1' * 0 10266. |e||j||e|occurs as a descendent in (and is contained within and is smaller than) the * 0 10267. production tree for |b||ap|exponent part|ap||r| given above.|cc| * 0 10268. |pb1|h)|tp1|A "visible" ("invisible") production tree is one whose * 0 10269. terminal production is not (is) empty. * 0 10270. |pb1|i)|tp1|A descendent |co|g|cc| |w|U|r| of a production tree |w|T|r| is "before" * 0 10271. ("after") a descendent |w|V|r| of |w|T|r| if the terminal production |co|f|cc| * 0 10272. of |w|U|r| is before (after) that of |w|V|r| in the terminal production of |w|T|r|. * 0 10273. The |co|partial|cc| ordering of the descendents of |w|T|r| thus defined * 0 10274. is termed the "textual order". * 0 10275. |co|In the example production tree for |b||ap|exponent part|ap||r| (f), * 0 10276. the production tree whose original is * 0 10277. |b||ap|plusminus|ap||r| is before that whose original is |b||ap|digit two|ap||r|.|cc| * 0 10278. |pb1|j)|tp1|A descendent |w|A|r| of a production tree * 0 10279. "follows" ("precedes") another descendent |w|B|r| in some textual order if |w|A|r| is after * 0 10280. (before) |w|B|r| in that textual order, and there exists no * 0 10281. visible |co|h|cc| descendent |w|C|r| * 0 10282. which comes between |w|A|r| and |w|B|r|. |co|Thus "immediately" following (preceding) * 0 10283. is implied.|cc| * 0 10284. |pb1|k)|tp1|A production tree |w|A|r| is "akin" to a production tree |w|B|r| if the terminal * 0 10285. production |co|f|cc| of |w|A|r| is identical to the terminal production of |w|B|r|. * 0 10286. * 0 10287. |h|1.1.3.3. Metaproduction rules and simple substitution * 0 10288. * 0 10289. |pa||j||co|The metaproduction rules of the language * 0 10290. form a set of context-free grammars defining a "metalanguage".|cc| * 0 10291. |pb1||j|a)|tp1|The "metaproduction rules" |co|b|cc| of the * 0 10292. language are those given in the sections of * 0 10293. this Report whose heading begins with "Syntax", "Metasyntax" * 0 10294. or "Metaproduction rules", together with those obtained as follows:? 0 10295. |xi||bt|for each given metaproduction rule, whose metanotion is * 0 10296. |w|M|r| say, additional rules are created * 0 10297. each of which consists of a * 0 10298. copy of |w|M|r| followed by one of the large syntactic marks * 0 10299. "|b|0|r|", "|b|1|r|", "|b|2|r|", "|b|3|r|", "|b|4|r|", * 0 10300. "|b|5|r|", "|b|6|r|", "|b|7|r|", "|b|8|r|" or "|b|9|r|", * 0 10301. followed by two colons, another copy of that |w|M|r| and a point. * 0 10302. |p||co|Thus, the metaproduction rule "|b|MODE1#::#MODE.|r|" is to be added.|cc| * 0 10303. |pb|b)|tp1|A "metaproduction rule" consists of * 0 10304. the following items, in order: * 0 10305. |n||p||ps|an optional asterisk ; * 0 10306. |p||ps|a nonempty sequence |w|M|r| of large syntactic marks#; * 0 10307. |p||ps|two colons#; * 0 10308. |p||ps|a nonempty sequence of hypernotions |co|1.1.3.1.e|cc| separated by semicolons#; * 0 10309. |p||ps|a point. * 0 10310. |p||j|It is said to be a metaproduction rule "for" |co|the metanotion * 0 10311. (1.1.3.1.d)|cc| |w|M|r|. * 0 10312. |pg||co|The asterisk, if present, signifies that the metanotion is not used * 0 10313. in other metaproduction rules or in hyper-rules, but is provided to * 0 10314. facilitate discussion in the semantics.|cc| * 0 10315. |w5||exx||co|Examples: * 0 10316. |n||ex||b|INTREAL#:: SIZETY#integral#; SIZETY#real.|r| (1.2.1.C)|qs| * 0 10317. |ey||b|SIZETY#:: long#LONGSETY#; short#SHORTSETY#; EMPTY.|r| (1.2.1.D)|cc|? 0 10318. |pb1||j|c)|tp1|A "terminal metaproduction" of a metanotion |w|M|r| is * 0 10319. any protonotion which is a "simple substitute" |co|d|cc| for * 0 10320. one of the hypernotions |co|on the right hand side|cc| of the metaproduction rule for * 0 10321. |w|M|r|. * 0 10322. |pb1|d)|tp1|A protonotion |w|P|r| is a "simple substitute" for a * 0 10323. hypernotion |w|H|r| if a copy of |w|H|r| can be transformed into * 0 10324. a copy of |w|P|r| by replacing each metanotion |w|M|r| in the copy * 0 10325. by some terminal metaproduction of |w|M|r|. * 0 10326. |pa||co|Thus two possible terminal metaproductions (c) of "|b|INTREAL|r|" * 0 10327. are |b||ap|integral|ap||r| and |b||ap|long long real|ap||r|. This is because * 0 10328. the hypernotions |b||ap|SIZETY integral|ap||r| and |b||ap|SIZETY real|ap||r| * 0 10329. (the hypernotions of the metaproduction rule for "|b|INTREAL|r|") * 0 10330. may, upon simple substitution (d), give rise to |b||ap|integral|ap||r| and |b||ap|long long real|ap||r|, which, * 0 10331. in turn, is because |b||ap|#|ap||r| (the empty protonotion) and * 0 10332. |b||ap|long long|ap||r| are terminal metaproductions of "|b|SIZETY|r|".|cc| * 0 10333. |pa||co|The metanotions used in this Report have been so chosen that * 0 10334. no concatenation of one or more of them gives * 0 10335. the same sequence of large syntactic marks as any other such concatenation. * 0 10336. Thus a source of possible ambiguity has been avoided. * 0 10337. |pa|Although the recursive nature of some of the metaproduction rules * 0 10338. makes it possible to produce terminal metaproductions of arbitrary * 0 10339. length, the length of the terminal metaproductions necessarily * 0 10340. involved in the production of any given |b|program|r| is finite.|cc| * 0 10341. * 0 10342. |h|1.1.3.4. Hyper-rules and consistent substitution * 0 10343. * 0 10344. |pb1||j|a)|tp1|The hyper-rules |co|b|cc| of the language are those * 0 10345. given in the sections of this Report whose heading begins with "Syntax". * 0 10346. |pb1|b)|tp1|A "hyper-rule" * 0 10347. consists of the following items, in order: * 0 10348. |n||p||ps|an optional asterisk#; * 0 10349. |p||ps|a nonempty hypernotion |w|H|r|#; * 0 10350. |p||ps|a colon#; * 0 10351. |p||ps|a nonempty sequence of "hyperalternatives" separated by semicolons#; * 0 10352. |p||ps|a point. * 0 10353. |p||j|It is said to be a hyper-rule "for" |co|the hypernotion (1.1.3.1.e)|cc| * 0 10354. |w|H|r|. * 0 10355. |pb1|c)|tp1|A "hyperalternative" is a nonempty * 0 10356. sequence of hypernotions separated by commas. * 0 10357. |w5||exx||co|Examples: * 0 10358. |ex||n|b) |b|NOTION#sequence#: * 0 10359. |e|NOTION#;#NOTION,#NOTION#sequence.|r|#(1.3.3.b) * 0 10360. |ey|c) |b|NOTION,#NOTION#sequence|r| |cc| * 0 10361. |pb1||j|d)|tp1|A production rule |w|PR|r| |co|1.1.3.2.b|cc| is derived from a * 0 10362. hyper-rule |w|HR|r| if a copy of |w|HR|r| can be transformed into a * 0 10363. copy of |w|PR|r| by replacing the set of all the hypernotions in the * 0 10364. copy by a "consistent substitute" |co|e|cc| for that set. * 0 10365. |pb1|e)|tp1|A set of |co|one or more|cc| protonotions |w|PP|r| is a * 0 10366. "consistent substitute" for a corresponding set of hypernotions * 0 10367. |w|HH|r| if a copy of |w|HH|r| can be transformed into a copy of * 0 10368. |w|PP|r| by means of the following step: * 0 10369. |pi|Step:#If the copy contains one or more metanotions then, for some terminal metaproduction * 0 10370. |w|T|r| of one such metanotion |w|M|r|, each occurrence of |w|M|r| in the copy * 0 10371. is replaced by a copy of |w|T|r| and the Step is taken again. * 0 10372. |p||co|See 1.1.4.1.a for another application of consistent substitution.|cc| * 0 10373. |pa||co|Applying this derivation process to the hyper-rule given above (c) may give rise to * 0 10374. |n||p||ps||b|digit#cypher#sequence#: * 0 10375. |e|digit#cypher#;#digit#cypher,#digit#cypher#sequence.|r| * 0 10376. |p|which is therefore a production rule of the language. Note that * 0 10377. |p||ps||b|digit#cypher#sequence#: * 0 10378. |e|digit#cypher#;#digit#cypher,#letter#b#sequence.|r| * 0 10379. |p||j| is not a production rule of the language, since the replacement of the * 0 10380. metanotion "|b|NOTION|r|" by one of its terminal metaproductions must be * 0 10381. consistent throughout.|cc| * 0 10382. |pa||co|Since some metanotions have an infinite number of * 0 10383. terminal metaproductions, the number of production rules which may be * 0 10384. derived is infinite. * 0 10385. The language is, however, so designed * 0 10386. that, for the production of any |b|program|r| of finite length, only a finite * 0 10387. number of those production rules is needed.|cc| * 0 10388. |pb1||co|f)|tp1|The rules under Syntax are provided with "cross-references" * 0 10389. to be interpreted as follows. * 0 10390. |pg|Each hypernotion |w|H|r| of a hyperalternative of a hyper-rule * 0 10391. |w|A|r| is followed by a reference to those hyper-rules |w|B|r| whose * 0 10392. derived production rules are for notions which could be substituted for that * 0 10393. |w|H|r|. Likewise, the hypernotions of each hyper-rule |w|B|r| are * 0 10394. followed by a reference back to |w|A|r|. Alternatively, if |w|H|r| is * 0 10395. to be replaced by a symbol, then it is followed by a reference to * 0 10396. its representation in section 9.4.1. * 0 10397. Moreover, in some cases, it is more convenient to give a cross-reference to one * 0 10398. metaproduction rule rather than to many hyper-rules, and in these cases the missing * 0 10399. cross-references will be found in the metaproduction rule. * 0 10400. |pg|Such a reference is, in principle, the section number followed by * 0 10401. a letter indicating the line where the rule or representation appears, with the * 0 10402. following conventions: * 0 10403. |pha10|(i)|thb0|the references whose section number is that of the section in * 0 10404. which they appear are given first and their section number is omitted; * 0 10405. e.g., "8.2.1.a" appears as "a" in section "8.2.1"; * 0 10406. |pha20|(ii)|thb0|all points and a final 1 are omitted, and 10 appears as A; e.g., "8.2.1.a" * 0 10407. appears as "82a" elsewhere and "10.3.4.1.1.i" appears as "A341i"; * 0 10408. |pha30|(iii)|thb0| a section number which is the same as that of the preceding * 0 10409. reference is omitted; e.g., "82a,82b,82c" appears as "82a,b,c"; * 0 10410. |pha20|(iv)|thb0|the presence of a blind alley derived from * 0 10411. that hypernotion * 0 10412. is indicated by "-"; e.g., in 8.0.1.a after "|b|MOID denotation|r|", * 0 10413. since "|b|MOID|r|" may be replaced by, for example, |b||ap|reference#to real|ap||r|, * 0 10414. but |b||ap|reference#to real denotation|ap||r| is not a notion.|cc| * 0 10415. * 0 10416. |h|1.1.4. The semantics * 0 10417. * 0 10418. |pa||j| The "meaning" of |b|programs|r| |co|2.2.1.a|cc| in the strict * 0 10419. language is defined in the semantics by means of sentences |co|in somewhat formalized * 0 10420. natural language|cc| which specify the "actions" to be carried * 0 10421. out during the "elaboration" |co|2.1.4.1|cc| of those |b|programs|r|. * 0 10422. The "meaning" of a |b|program|r| in a representation * 0 10423. language is the same as the meaning of the * 0 10424. |b|program|r| in the strict language which it represents |co|9.3|cc|. * 0 10425. |pa||co|The semantics makes extensive use of hypernotions and paranotions in order to "designate", * 0 10426. respectively, protonotions and constructs. * 0 10427. The word "designate" should be understood in the sense that the word * 0 10428. "flamingo" may "designate" any animal of the family * 0 10429. |u|p|i|hoenicopteridae|r|.|cc| * 0 10430. * 0 10431. |h|1.1.4.1. Hypernotions, designation and envelopment * 0 10432. * 0 10433. |pa||j||co|Hypernotions, when enclosed between apostrophes, are used to "designate" protonotions * 0 10434. belonging to certain classes; e.g., |b||ap|LEAP|ap||r| designates any of the protonotions |b||ap|local|ap||r|, * 0 10435. |b||ap|primal|ap||r| and |b||ap|heap|ap||r|.|cc| * 0 10436. |pb1|a)|tp1|Hypernotions standing in the text * 0 10437. of this Report, except those in hyper-rules |co|1.1.3.4.b|cc| or * 0 10438. metaproduction rules |co|1.1.3.3.b|cc|, "designate" any protonotions * 0 10439. which may be consistently substituted |co|1.1.3.4.e|cc| for them, * 0 10440. the consistent substitution being applied over all the hypernotions * 0 10441. contained in each complete * 0 10442. sub-section of the text (a sub-section being one of the lettered * 0 10443. sub-divisions, if any, or else the whole, of a numbered section). * 0 10444. |pa||co|Thus |b||ap|QUALITY#TAX|ap||r| is a hypernotion designating protonotions such as * 0 10445. |b||ap|integral#letter#i|ap||r|, |b||ap|real#letter#x|ap||r|, etc. If, in some particular * 0 10446. discussion, it in fact designates |b||ap|integral#letter#i|ap||r|, then all occurrences of * 0 10447. "|b|QUALITY|r|" in that subsection must, over the span of that discussion, designate * 0 10448. |b||ap|integral|ap||r| and all occurrences of * 0 10449. "|b|TAX|r|" must designate * 0 10450. |b||ap|letter#i|ap||r|. It may then be deduced from subsection 4.8.2.a that in order, * 0 10451. for example, to "ascribe to an |b|integral-defining-indicator-with-letter-i|r|", * 0 10452. it is |b||ap|integral#letter#i|ap||r| that must be "made to access |w|V|r| inside the locale".|cc| * 0 10453. |pa|Occasionally, where the context clearly so demands, consistent substitution may be applied over * 0 10454. less than a section. |co|For example, in the introduction to section 2.1.1.2, there are several * 0 10455. occurrences of "|b||ap|MOID|ap||r|", of which two are stated to designate * 0 10456. specific (and different) protonotions * 0 10457. spelled out in full, and of which others occur in the plural form "|b||ap|MOID|ap||r|s", which is clearly * 0 10458. intended to designate a set of different members of the class of * 0 10459. terminal metaproductions of |b|"MOID"|r|.|cc| * 0 10460. |pb|b)|tp1|If a protonotion (a hypernotion) |w|P|r| * 0 10461. consists of the concatenation of the protonotions (hypernotions) * 0 10462. |w|A|r|, |w|B|r| and |w|C|r|, where |w|A|r| and |w|C|r| are possibly * 0 10463. empty, then |w|P|r| "contains" |w|B|r| at the position * 0 10464. |co|in |w|P|r||cc| determined by the length of |w|A|r|. * 0 10465. |co|Thus, |b||ap|abcdefcdgh|ap||r| contains |b||ap|cd|ap||r| at its third * 0 10466. and seventh positions.|cc| * 0 10467. |pb1|c)|tp1|A protonotion |w|P1|r| "envelops" * 0 10468. a protonotion |w|P2|r| as specifically designated by a hypernotion |w|H2|r| if |w|P2|r|, * 0 10469. or some equivalent |co|2.1.1.2.a|cc| of it, is contained |co|b|cc| * 0 10470. at some position within |w|P1|r| but not, at that position, within any different * 0 10471. |co|intermediate|cc| protonotion |w|P3|r| also contained in |w|P1|r| * 0 10472. such that |w|H2|r| could also designate |w|P3|r|. * 0 10473. |pg||co|Thus the |b||ap|MODE|ap||r| enveloped by |b||ap|reference to real * 0 10474. closed clause|ap||r| is |b||ap|reference to real|ap||r| rather than * 0 10475. |b||ap|real|ap||r|; moreover, the mode (2.1.1.2.b) specified by * 0 10476. |i|STRUCT |ro|REAL a, STRUCT (BOOL b, CHAR c) d|rc||r| envelops * 0 10477. |b||ap|FIELD|ap||r| just twice.|cc| * 0 10478. * 0 10479. |h|1.1.4.2. Paranotions * 0 10480. * 0 10481. |pa||j||co|In order to facilitate discussion, in this Report, of constructs with specified * 0 10482. originals, the concept of a "paranotion" is introduced. * 0 10483. A paranotion is a noun that designates constructs (1.1.3.2.e); * 0 10484. its meaning is not necessarily that found in a dictionary but can be construed * 0 10485. from the rules which follow.|cc| * 0 10486. |pb1|a)|tp1|A "paranotion" |w|P|r| is a hypernotion |co|not between apostrophes|cc| which is used, * 0 10487. in the text of this Report, to "designate" * 0 10488. any construct whose original |w|O|r| satisfies the following: * 0 10489. |ph||bt||w|P|r|, regarded as a hypernotion |co|i.e., as if it had been enclosed in apostrophes|cc|, * 0 10490. designates |co|1.1.4.1.a|cc| an "abstraction" |co|b|cc| of |w|O|r|. * 0 10491. |pa||co|For example, the paranotion "|b|fixed-point-numeral|r|" could designate the construct * 0 10492. represented by |i|02|r|, since, had it been in apostrophes, it would have designated an abstraction * 0 10493. of the notion |b||ap|fixed point numeral|ap||r|, which is the original of that construct. * 0 10494. However, that same representation could also be described as a * 0 10495. |b|digit-cypher-sequence|r|, and as such * 0 10496. it would be a direct descendent of that |b|fixed-point-numeral|r|.|cc| * 0 10497. |pa||co|As an aid to the reader in distinguishing them from other hypernotions, paranotions are not * 0 10498. enclosed between apostrophes and are provided with hyphens where, otherwise, they would have been * 0 10499. provided with blanks.|cc| * 0 10500. |pa|The meaning of a paranotion to which the * 0 10501. small syntactic mark "|b|s|r|" has been appended * 0 10502. is the same as if the letter "s" * 0 10503. |co|which is in the same type font as the marks * 0 10504. in this sentence|cc| had been appended instead. * 0 10505. |co|Thus the |b|fixed-point-numeral |i|02|r| may be said to contain two |b|digit-cyphers|r|, * 0 10506. rather than two |b|digit-cypher|r|s.|cc| * 0 10507. Moreover, the "|b|s|r|" may be inserted elsewhere than at the end * 0 10508. if no ambiguity arises * 0 10509. |co|e.g., "|b|sources-for-MODINE|r|" means the same as * 0 10510. "|b|source-for-MODINEs|r|"|cc|. * 0 10511. |pg|An initial small syntactic mark of a paranotion is often replaced by the corresponding large * 0 10512. syntactic mark |co|in order to improve readability, * 0 10513. as at the start of a sentence|cc| without change * 0 10514. of meaning |co|;#e.g., "|b|Identifier|r|" means the same as "|b|identifier|r|"|cc|. * 0 10515. |pb1|b)|tp1|A protonotion |w|P2|r| is an "abstraction" of a protonotion |w|P1|r| if? 0 10516. |pha10|(i)|thb0||w|P2|r| is an abstraction of a notion whose production rule begins with an asterisk * 0 10517. and of which |w|P1|r| is an alternative * 0 10518. |xs||co|e.g., |b||ap|trimscript|ap||r| (5.3.2.1.h) is an abstraction of any of the notions designated by * 0 10519. |b||ap|NEST trimmer|ap||r|, |b||ap|NEST subscript|ap||r| and |b||ap|NEST revised lower bound option|ap||r||cc|, or * 0 10520. |pha20|(ii)|thb0||w|P1|r| envelops a protonotion |w|P3|r| which is designated * 0 10521. by one of the "elidible hypernotions" listed in section c below, * 0 10522. and |w|P2|r| is an abstraction of the protonotion consisting of * 0 10523. |w|P1|r| without that enveloped |w|P3|r| * 0 10524. |xs||co|e.g., |b||ap|choice using boolean start|ap||r| is an abstraction of the notions * 0 10525. |b||ap|choice using boolean brief start|ap||r| and |b||ap|choice using boolean bold start|ap||r| (by elision of * 0 10526. a |b||ap|STYLE|ap||r| from 9.1.1.a)|cc|, or * 0 10527. |pha30|(iii)|thb0||w|P2|r| is equivalent to |co|2.1.1.2.a|cc| |w|P1|r| * 0 10528. |xs||co|e.g., |b||ap|bold begin symbol|ap||r| is an abstraction of |b||ap|bold begin symbol|ap||r||cc|. * 0 10529. |pg||co|For an example invoking all three rules, it may be observed that * 0 10530. |b||ap|union of real integral mode defining indicator|ap||r| is an abstraction of * 0 10531. some |b||ap|union of integral real mode NEST defining identifier with letter#a|ap||r| (4.8.1.a). * 0 10532. Note, however, that |b||ap|choice using union of integral real mode brief start|ap||r| is not an * 0 10533. abstraction of the notion |b||ap|choice using union of integral real boolean mode brief start|ap||r|, * 0 10534. because the |b||ap|boolean|ap||r| that has apparently * 0 10535. been elided is not an enveloped |b||ap|MOID|ap||r| of that notion.|cc| * 0 10536. |pb1|c)|tp1|The "elidible hypernotions" mentioned in section b above * 0 10537. are the following: * 0 10538. |n||p||xi|"|b|STYLE|r|"|qs|"|b|TALLY|r|"|qs|"|b|LEAP|r|"|qs|"|b|DEFIED|r|"|qs|"|b|VICTAL|r|"|qs| * 0 10539. |e|"|b|SORT|r|"|qs|"|b|MOID|r|"|qs|"|b|NEST|r|"|qs|"|b|REFETY routine|r|"|qs|"|b|label|r|"|qs| * 0 10540. |e|"|b|with#TAX|r|"|qs|"|b|with#DECSETY#LABSETY|r|"|qs|"|b|of#DECSETY#LABSETY|r|"|qs|? 0 10541. "|b|defining#LAYER|r|". * 0 10542. |pa||j||co|Which one of several possible notions or symbols * 0 10543. is the original of a construct designated by a given paranotion * 0 10544. will be apparent from the context in which that paranotion appears. For example, * 0 10545. when speaking of the |b|formal-declarer|r| of an |b|identity-declaration|r|, * 0 10546. if the |b|identity-declaration|r| is one whose terminal production (1.1.3.2.f) happens to be * 0 10547. |i|REF#REAL#x#|uqe|#LOC#REAL|r|, then the original of that * 0 10548. |b|formal-declarer|r| is some notion designated by * 0 10549. |b||ap|formal reference to real NEST declarer|ap||r|.|cc| * 0 10550. |pa||co|Since a paranotion designates a construct, all technical terms which are * 0 10551. defined for constructs can be used with paranotions without formality.|cc| * 0 10552. |pb1|d)|tp1|If two paranotions |w|P|r| and |w|Q|r| designate, respectively, two constructs * 0 10553. |w|S|r| and |w|T|r|, and if |w|S|r| is a descendent of |w|T|r|, * 0 10554. then |w|P|r| is termed a "constituent" of |w|Q|r| unless * 0 10555. there exists some |co|intermediate construct|cc| |w|U|r| such that * 0 10556. |pha10|(i)|thb0||w|S|r| is a descendent of |w|U|r|, * 0 10557. |pha20|(ii)|thb0||w|U|r| is a descendent of |w|T|r|, and * 0 10558. |pha30|(iii)|thb0|either |w|P|r| or |w|Q|r| could |co|equally well|cc| designate |w|U|r|. * 0 10559. |pa||co|Hence |i|a|r| (|w|S1|r|) is a constituent |b|operand|r| * 0 10560. of the |b|formula|r| |i|a#|sx|#(b#+#2#|up|#(i#+#j))|r| (|w|T|r|), * 0 10561. but |i|b|r| (|w|S2|r|) is not, since it is a descendent of an * 0 10562. intermediate |b|formula|r| |i|b#+#2#|up|#(i#+#j)|r| (|w|U|r|), * 0 10563. which is itself descended from |w|T|r|. * 0 10564. Likewise, |i|(b#+#2#|up|#(i#+#j))|r| is a constituent |b|closed-clause|r| * 0 10565. of the |b|formula|r| |w|T|r|, but the |b|closed-clause|r| * 0 10566. |i|(i#+#j)|r| is not, because it is descended from an intermediate * 0 10567. |b|closed-clause|r|. * 0 10568. However, |i|(i + j)|r| is a constituent |b|integral-closed-clause|r| * 0 10569. of |w|T|r|, because the intermediate |b|closed-clause|r| is, in fact, * 0 10570. a |b|real-closed-clause|r|. * 0 10571. |exx||co|Example: * 0 1. |picn||wid||w25||n||pb|###############|b|formula|i| |g|? 0 2. |e|#########a |sx| (b + 2 |up| (i + j))|b| |g|? 0 3. |e|#############|ul||ul||ul||ul||ul||ul||ulb||ul||ul||ul||ul||ul||ul| |g|? 0 4. |e|############|#############| |g|? 0 5. |e|#########operand#######operand###|i| |g|? 0 6. |e|############a#####(b + 2 |up| (i + j))###|r| |g|? 0 7. |e|##########################| |g|? 0 8. |e|###############(|b|real-|r|)|b|#closed-clause###|i| |g|? 0 9. |e|##################(b + 2 |up| (i + j))###|b| |g|? 0 10. |e|##########################| |g|? 0 11. |e|#######################formula###|i| |g|? 0 12. |e|# #################b + 2 |up| (i + j)###|b| |g|? 0 13. |e|#####################|ul||ul||ul||ul||ul||ulb||ul||ul||ul||ul||ul||ul||ul| |g|? 0 14. |e|####################|#############| |g|? 0 15. |e|#################operand#######operand###|i| |g|? 0 16. |e|####################b########2#|up|#(i+ j)###|b| |g| * 0 17. |e|##################################| |g|? 0 18. |e|###############################formula |g|? 0 19. |e|############################|ul4||ul||ul||ulb||ul4||ul||ul| |g|? 0 20. |e|###########################|#############| |g|? 0 21. |e|########################operand#######operand####|i| |g|? 0 22. |e|###########################2##########(i + j)####|r| |g|? 0 23. |e|#########################################| |g|? 0 24. |e|###########################(|b|integral-|r|)#|b|closed-clause###|i| |g|? 0 25. |e|######################################(i + j)|r|###|cc| * 0 26. * 0 27. |picf||nar| * 0 29. $ENDFILE? 0 100. |S164formula * 0 101. |S127a |57<> (b + 2 |104<> (i + j))? 0 102. |S64operand|S127operand * 0 103. |S95a|S130(b + 2 |104<> (i + j))? 0 104. |S206(real-) closed-clause * 0 105. |S239(b + 2 |104<> (i + j)) * 0 106. |S264formula * 0 107. |S240b + 2 |104<> (i + j) * 0 108. |S164operand|S127operand * 0 109. |S195b|S155<>2 |104<> (i + j) * 0 110. |S364formula * 0 111. |S264operand|S127operand * 0 112. |S2952|S170(i + j) * 0 113. |S389(integral-) closed-clause * 0 114. |S475(i + j) * 0 10573. |pr||cc|? 0 10574. * 0 10575. |h|1.1.4.3. Undefined * 0 10576. * 0 10577. |pb1||j|a)|tp1|If something is left "undefined" or is said to be "undefined", * 0 10578. then this means that it is not defined by this Report alone and that, * 0 10579. for its definition, information from outside this Report has to be taken into account. * 0 10580. |pg||co|A distinction must be drawn between the yielding of an undefined * 0 10581. value (whereupon elaboration continues with possibly unpredictable * 0 10582. results) and the complete undefinedness of the further elaboration. * 0 10583. The action to be taken in this latter case is at the discretion of the * 0 10584. implementer, and may be some form of continuation * 0 10585. (but not necessarily the same as any other implementer|ap|s * 0 10586. continuation), or some form of interruption * 0 10587. (2.1.4.3.h) brought about by some run-time check.|cc| * 0 10588. |pb1|b)|tp1|If some condition is "required" to be satisfied during some elaboration * 0 10589. then, if it is not so satisfied, * 0 10590. the further elaboration is undefined. * 0 10591. |pb1|c)|tp1|A "meaningful" |b|program|r| is a |b|program|r| * 0 10592. |co|2.2.1.a|cc| whose elaboration is defined by this Report. * 0 10593. |pg||co|Whether all |b|programs|r|, only |b|particular-programs|r|, only meaningful * 0 10594. |b|programs|r|, or even only meaningful |b|particular-programs|r| are "ALGOL 68" |b|programs|r| * 0 10595. is a matter for individual taste.|cc| * 0 10596. * 0 10597. |h|1.1.5. Translations and variants * 0 10598. * 0 10599. |pb1||j|a)|tp1|The definitive version |w|D|r| of this Report is written in English. A translation * 0 10600. |w|T|r| of this Report into some other language is an acceptable * 0 10601. translation if: * 0 10602. |pb||bt||w|T|r| defines the same set of production trees as |w|D|r|, * 0 10603. except that * 0 10604. |pha10|(i)|thb0|the originals contained in each production tree of |w|T|r| * 0 10605. may be different protonotions obtained by some uniform translation of * 0 10606. the corresponding originals contained in the corresponding production * 0 10607. tree of |w|D|r|, and * 0 10608. |pha20|(ii)|thb0|descendents of those production trees need not be the * 0 10609. same if their originals are predicates |co|1.3.2|cc|; * 0 10610. |pb||bt||w|T|r| defines the meaning |co|2.1.4.1.a|cc| of each of its |b|programs|r| * 0 10611. to be the same as that of the corresponding |b|program|r| defined * 0 10612. by |w|D|r|; * 0 10613. |pb||bt||w|T|r| defines the same reference language |co|9.4|cc| and the * 0 10614. same standard environment |co|10|cc| as |w|D|r|; * 0 10615. |pb||bt||w|T|r| preserves, under another mode of expression, the meaning * 0 10616. of each section of |w|D|r| except that: * 0 10617. |pha10|(i)|thb0|different syntactic marks |co|1.1.3.1.a|cc| may be used * 0 10618. |co|with a correspondingly different metaproduction rule for "|b|ALPHA|r|" (1.3.1.B)|cc|; * 0 10619. |pha20|(ii)|thb0|the method of derivation of the production rules |co|1.1.3.4|cc| * 0 10620. and their interpretation |co|1.1.3.2|cc| may be changed to suit the * 0 10621. peculiarities of the particular natural language |co|;#e.g., in a * 0 10622. highly inflected natural language, it may be necessary to introduce * 0 10623. some inflections into the hypernotions, for which changes such as * 0 10624. the following might be required: * 0 10625. |p||ts1|1)#additional means for the creation of extra metaproduction * 0 10626. rules (1.1.3.3.a); * 0 10627. |p||ts1|2)#a more elaborate definition of "consistent substitute" * 0 10628. (1.1.3.4.e); * 0 10629. |p||ts1|3)#a more elaborate definition of "equivalence" between * 0 10630. protonotions (2.1.1.2.a); * 0 10631. |p||ts1|4)#different inflections for paranotions (1.1.4.2.a)|cc|; * 0 10632. |pha30|(iii)|thb0|some pragmatic remarks |co|1.1.2|cc| may be changed. * 0 10633. |pb1|b)|tp1|A version of this Report may, additionally, define a "variant of ALGOL 68" * 0 10634. by providing: * 0 10635. |pha10|(i)|thb0|additional or alternative representations in the reference language |co|9.4|cc|, * 0 10636. |pha20|(ii)|thb0|additional or alternative rules for the notion * 0 10637. |b||ap|character#glyph|ap||r| |co|8.1.4.1.c|cc| * 0 10638. and for the metanotions "|b|ABC|r|" |co|9.4.2.1.L|cc| and "|b|STOP|r|" |co|10.1.1.B|cc|, * 0 10639. |pha30|(iii)|thb0|additional or alternative declarations in the standard * 0 10640. environment which must, however, have the same meaning as the * 0 10641. ones provided in |w|D|r|, * 0 10642. |p|provided always that such additional or alternative items are * 0 10643. delineated in the text in such a way that the original language, as * 0 10644. defined in |w|D|r|, is still defined therein. * 0 10645. * 0 10646. |h|1.2. General metaproduction rules * 0 10647. * 0 10648. |pa||j||co|The reader may find it helpful to note that a metanotion ending * 0 10649. in "|b|ETY|r|" always has "|b|EMPTY|r|" as one of the hypernotions on its right-hand side.|cc| * 0 10650. * 0 10651. |h|1.2.1. Metaproduction rules of modes * 0 10652. * 0 10653. |pb1|A)|ts1||b|MODE :: PLAIN ; STOWED ; REF to MODE ; * 0 10654. PROCEDURE ; UNITED ; MU definition of MODE ; MU application.|r| * 0 10655. |p1|B)|ts1||b|PLAIN :: INTREAL ; boolean ; character.|r| * 0 10656. |p1|C)|ts1||b|INTREAL :: SIZETY integral ; SIZETY real.|r| * 0 10657. |p1|D)|ts1||b|SIZETY :: long LONGSETY ; short SHORTSETY ; EMPTY.|r| * 0 10658. |p1|E)|ts1||b|LONGSETY :: long LONGSETY ; EMPTY.|r| * 0 10659. |p1|F)|ts1||b|SHORTSETY :: short SHORTSETY ; EMPTY.|r|? 0 10660. |p1|G) |ts1||b|EMPTY :: .|r| * 0 10661. |p1|H)|ts1||b|STOWED :: structured with FIELDS mode ; FLEXETY ROWS of MODE.|r|? 0 10662. |p1|I)|ts1||b|FIELDS :: FIELD ; FIELDS FIELD.|r|? 0 10663. |p1|J)|ts1||b|FIELD :: MODE field TAG|co||r|942A|b||cc|.|r|? 0 10664. |p1|K)|ts1||b|FLEXETY :: flexible ; EMPTY.|r|? 0 10665. |p1|L)|ts1||b|ROWS :: row ; ROWS row.|r| * 0 10666. |p1|M)|ts1||b|REF :: reference ; transient reference.|r|? 0 10667. |p1|N)|ts1||b|PROCEDURE :: procedure PARAMETY yielding MOID.|r| * 0 10668. |p1|O)|ts1||b|PARAMETY :: with PARAMETERS ; EMPTY.|r| * 0 10669. |p1|P)|ts1||b|PARAMETERS :: PARAMETER ; PARAMETERS PARAMETER.|r| * 0 10670. |p1|Q)|ts1||b|PARAMETER :: MODE parameter.|r| * 0 10671. |p1|R)|ts1||b|MOID :: MODE ; void.|r|? 0 10672. |p1|S)|ts1||b|UNITED :: union of MOODS mode.|r| * 0 10673. |p1|T)|ts1||b|MOODS :: MOOD ; MOODS MOOD.|r|? 0 10674. |p1|U)|ts1||b|MOOD :: * 0 10675. |e|PLAIN ; * 0 10676. STOWED ; reference to MODE ; PROCEDURE ; void.|r|? 0 10677. |p1|V)|ts1||b|MU :: muTALLY.|r|? 0 10678. |p1|W)|ts1||b|TALLY :: i ; TALLY i.|r|? 0 10679. |pb1||j||tp1||co|The metaproduction rule for "|b|TAG|r|" is given in * 0 10680. section 9.4.2.1. * 0 10681. It suffices for the present that it produces an arbitrarily large number of terminal * 0 10682. * 0 10683. metaproductions.|cc| * 0 10684. * 0 10685. |h|1.2.2. Metaproduction rules associated with phrases and coercion * 0 10686. * 0 10687. |pb1|A)|ts1||b|ENCLOSED :: * 0 10688. |e|closed ; collateral ; parallel ; CHOICE|co||r|34A|b||cc| ; loop.|r| * 0 10689. |p1|B)|ts1||b|SOME :: SORT MOID NEST.|r|? 0 10690. |p1|C)|ts1||b|SORT :: strong ; firm ; meek ; weak ; soft.|r| * 0 10691. * 0 10692. |h|1.2.3. Metaproduction rules associated with nests * 0 10693. * 0 10694. |pb1|A)|ts1||b|NEST :: LAYER ; NEST LAYER.|r|? 0 10695. |p1|B)|ts1||b|LAYER :: new DECSETY LABSETY.|r|? 0 10696. |p1|C)|ts1||b|DECSETY :: DECS ; EMPTY.|r|? 0 10697. |p1|D)|ts1||b|DECS :: DEC ; DECS DEC.|r|? 0 10698. |p1|E)|ts1||b|DEC :: MODE TAG|co||r|942A|b||cc| ; priority PRIO TAD|co||r|942F|b||cc| ; * 0 10699. MOID TALLY TAB|co||r|942D|b||cc| ; * 0 10700. DUO TAD|co||r|942F|b||cc| ; MONO TAM|co||r|942K|b||cc|.|r| * 0 10701. |p1|F)|ts1||b|PRIO :: i ; ii ; iii ; iii i ; iii ii ; iii iii ; iii iii i ; * 0 10702. iii iii ii ; iii iii iii.|r| * 0 10703. |p1|G)|ts1||b|MONO :: procedure with PARAMETER|g| yielding MOID.|r|? 0 10704. |p1|H)|ts1||b|DUO :: procedure with PARAMETER1 PARAMETER2$#yielding MOID.|r|? 0 10705. |p1|I)|ts1||b|LABSETY :: LABS ; EMPTY.|r|? 0 10706. |p1|J)|ts1||b|LABS :: LAB ; LABS LAB.|r|? 0 10707. |p1|K)|ts1||b|LAB :: label TAG|co||r|942A|b||cc|.|r|? 0 10708. |j||pa||co|The metaproduction rules for "|b|TAB|r|", "|b|TAD|r|" and "|b|TAM|r|" are given in * 0 10709. section 9.4.2.1. It suffices for the present that each of them produces an * 0 10710. arbitrarily large number of terminal metaproductions, none of which is a terminal * 0 10711. metaproduction of "|b|TAG|r|".|cc| * 0 10712. |pq||j||co||w|"Well, |ap|slithy|ap| means |ap|lithe and slimy|ap|. ... You see it|ap|s like a * 0 10713. portmanteau |mi| there are two meanings packed up into one word." * 0 10714. |ppp|Through the Looking-glass, * 0 10715. |p||pr|Lewis Carroll.|r||cc||qq| * 0 10716. * 0 10717. |h|1.3. General hyper-rules * 0 10718. * 0 10719. |pa||j||co|Predicates are used in the syntax to enforce certain restrictions * 0 10720. on the production trees, such as that each |b|applied-indicator|r| should * 0 10721. identify a uniquely determined |b|defining-indicator|r|. A more modest use is to reduce * 0 10722. the number of hyper-rules by grouping several similar cases as * 0 10723. alternatives in one rule. * 0 10724. In these cases predicates are used to test which alternative applies.|cc| * 0 10725. * 0 10726. |h|1.3.1. Syntax of general predicates * 0 10727. * 0 10728. |pb1|A)|ts1||b|NOTION :: ALPHA ; NOTION ALPHA.|r| * 0 10729. |p1|B)|ts1||b|ALPHA :: a ; b ; c ; d ; e ; f ; g ; h ; i ; j ; k ; l ; m ; n ; o ; p ; * 0 10730. q ; r ; s ; t ; u ; v ; w ; x ; y ; z.|r| * 0 10731. |p1|C)|ts1||b|NOTETY :: NOTION ; EMPTY.|r| * 0 10732. |p1|D)|ts1||b|THING :: NOTION ; (NOTETY1) NOTETY2 ; * 0 10733. |e|THING (NOTETY1) NOTETY2.|r| * 0 10734. |p1|E)|ts1||b|WHETHER :: where ; unless.|r| * 0 10735. |pb1|a)|ts1||b|where true : EMPTY.|r| * 0 10736. |p1|b)|ts1||b|unless false : EMPTY.|r| * 0 10737. |p1|c)|ts1||b|where THING1 and THING2 : * 0 10738. where THING1, where THING2.|r| * 0 10739. |p1|d)|ts1||b|where THING1 or THING2 : * 0 10740. where THING1 ; where THING2.|r| * 0 10741. |p1|e)|ts1||b|unless THING1 and THING2 : * 0 10742. unless THING1 ; unless THING2.|r| * 0 10743. |p1|f)|ts1||b|unless THING1 or THING2 : * 0 10744. unless THING1, unless THING2.|r| * 0 10745. |pb1|g)|ts1||b|WHETHER (NOTETY1) is (NOTETY2) : * 0 10746. WHETHER (NOTETY1) begins with (NOTETY2)|co||r|h,i,j|b||cc|$#and * 0 10747. (NOTETY2) begins with (NOTETY1)|co||r|h,i,j|b||cc|.|r| * 0 10748. |p1|h)|ts1||b|WHETHER (EMPTY) begins with (NOTION)|co||r|g,j|b||cc| : * 0 10749. |e|WHETHER false|co||r|b,|mi||b||cc|.|r| * 0 10750. |p1|i)|ts1||b|WHETHER (NOTETY) begins with (EMPTY)|co||r|g,j|b||cc| : * 0 10751. |e|WHETHER true|co||r|a,|mi||b||cc|.|r| * 0 10752. |p1|j)|ts1||b|WHETHER (ALPHA1 NOTETY1) begins with$#(ALPHA2 NOTETY2)|co||r|g,j,m|b||cc| : * 0 10753. WHETHER (ALPHA1) coincides with (ALPHA2) in$#(abcdefghijklmnopqrstuvwxyz)|co||r|k,l,|mi||b||cc|$and * 0 10754. (NOTETY1) begins with (NOTETY2)|co||r|h,i,j|b||cc|.|r| * 0 10755. |p1|k)|ts1||b|where (ALPHA) coincides with$#(ALPHA) in (NOTION)|co||r|j|b||cc| :? 0 10756. |e|where true|co||r|a|b||cc|.|r| * 0 10757. |p1|l)|ts1||b|unless (ALPHA1) coincides with$#(ALPHA2) in (NOTION)|co||r|j|b||cc| : * 0 10758. where (NOTION) contains (ALPHA1 NOTETY ALPHA2)|co||r|m|b||cc|$#or * 0 10759. (NOTION) contains (ALPHA2 NOTETY ALPHA1)|co||r|m|b||cc|.|r| * 0 10760. |p1|m)|ts1||b|WHETHER (ALPHA NOTETY) contains (NOTION)|co||r|l,m|b||cc| : * 0 10761. WHETHER (ALPHA NOTETY) begins with (NOTION)|co||r|j|b||cc|$#or * 0 10762. (NOTETY) contains (NOTION)|co||r|m,n|b||cc|.|r| * 0 10763. |p1|n)|ts1||b|WHETHER (EMPTY) contains (NOTION)|co||r|m|b||cc| : * 0 10764. WHETHER false|co||r|b,|mi||b||cc|.|r| * 0 10765. |j||pa||co|The small syntactic marks "|b|(|r|" and "|b|)|r|" are used * 0 10766. to ensure, in a simple way, the unambiguous application of these predicates.|cc| * 0 10767. * 0 10768. |h1|1.3.2. The holding of predicates * 0 10769. * 0 10770. |pa||j|A "predicate" is a protonotion which begins with |b||ap|where|ap||r| * 0 10771. or |b||ap|unless|ap||r| |co|unified into |b||ap|WHETHER|ap||r||cc|. * 0 10772. For a predicate |w|P|r|, either one or more * 0 10773. production trees may be produced |co|1.1.3.2.f|cc| |co|all of which are then invisible|cc|, * 0 10774. in which case |w|P|r| "holds", or no production tree may be produced |co|since * 0 10775. each attempt to produce one runs into blind alleys|cc|, and then * 0 10776. |w|P|r| "does not hold". * 0 10777. |pa||co|For example, the predicate |b||ap|where (ab) is (ab)|ap||r| holds. * 0 10778. Its production tree may be depicted thus: * 0 1. |picn||wid||p||w25||n|? 0 2. |b| * 0 3. |e|######################'where#(ab)#is#(ab)' * 0 4. |e|###############################| * 0 5. |e|#####'where#(ab)#begins#with#(ab)#and#(ab)#begins#with#(ab)'? 0 6. |e|###############|ul4||ul4||ul4||ul4||ulb||ul|? 0 7. |ul4||ul4||ul4||ul4||ul||ul| * 0 8. |e|##############|####################################| * 0 9. |e|'where#(ab)#begins#with#(ab)'##########'where#(ab)#begins#with#(ab)'? 0 10. |e|##############|###########################|r|(same#as#left#branch|rc||b|? 0 11. |e|##############| * 0 12. |e|##############| * 0 13. |e|'where#(a)#coincides#with#(a)#in#(abc...z)#and#(b)#begins#with#(b)'? 0 14. |e|######################|ul4||ul4||ul||ul||ul||ulb|? 0 15. |ul4||ul4||ul4||ul||ul||ul| * 0 16. |e|#####################|###########################| * 0 17. |e|'where#(a)#coincides#with#(a)#in#(abc...z)'######| * 0 18. |e|#####################|###########################| * 0 19. |e|###############'where#true'#########'where#(b)#begins#with#(b)'? 0 20. |e|######################|ul4||ul4||ul4||ul|? 0 21. |ul4||ul4||ul4||ul||ul||ulb||ul4| * 0 22. |e|#####################|################################| * 0 23. |e|'where#(b)#coincides#with#(b)#in#(abc...z)'###########| * 0 24. |e|#####################|################################| * 0 25. |e|###############'where#true'###############'where#()#begins#with#()'? 0 26. |e|######################################################| * 0 27. |e|################################################'where#true'|r|? 0 28. |picf||nar| * 0 30. $ENDFILE? 0 100. |S264|S5'|S1'where (ab) is (ab)|S5'|S1' * 0 101. |S111|S5'|S1'where (ab) begins with (ab) and (ab) begins with (ab)|S5'|S1' * 0 102. |S18|S5'|S1'where (ab) begins with (ab)|S5'|S1'|S116|S5'|S1'where (ab) begins with (ab)|S5'|S1' * 0 103. |S437(sam|S10e as l|S10eft branch) * 0 104. |S43|S5'|S1'where (a) coincides with (a) in (abc...z) and (b) begins with (b)|S5'|S1' * 0 105. |S43|S5'|S1'where (a) coincides with (a) in (abc...z)|S5'|S1'? 0 106. |S204|S5'|S1'where true|S5'|S1'|S120|S5'|S1'where (b) begins with (b)|S5'|S1' * 0 107. |S37|S5'|S1'where (b) coincides with (b) in (abc...z)|S5'|S1' * 0 108. |S204|S5'|S1'where true|S5'|S1'|S122|S5'|S1'where () begins with ()|S5'|S1' * 0 109. |S504|S5'|S1'where true|S5'|S1' * 0 10780. |e||j||pa| If a predicate holds, then its production tree always terminates via * 0 10781. |b||ap|where true|ap||r| or |b||ap|unless false|ap||r|. * 0 10782. If it does not hold, then, in general, the blind alleys are |b||ap|where false|ap||r| * 0 10783. and |b||ap|unless true|ap||r|. * 0 10784. Although almost all the hyper-rules concerned are for hypernotions * 0 10785. beginning with "|b|WHETHER|r|" and so provide, each time, * 0 10786. production rules for pairs of predicates such as |b||ap|where THING1|ap||r| * 0 10787. and |b||ap|unless THING1|ap||r|, this does not mean that in each such case * 0 10788. one of the pair must hold. * 0 10789. For example, |b||ap|where digit four counts iii|ap||r| (4.3.1.c) does not * 0 10790. hold, but no care has been taken to make |b||ap|unless digit four counts * 0 10791. iii|ap||r| hold either, since there is no application for it in this Report. * 0 10792. |pg|In the semantics, no meaning is ascribed to constructs whose * 0 10793. originals are predicates. They serve purely syntactical purposes.|cc| * 0 10794. * 0 10795. |h|1.3.3. Syntax of general constructions * 0 10796. * 0 10797. |pb1|A)|ts1||b|STYLE :: brief ; bold ; style TALLY.|r|? 0 10798. |pb1|a)|ts1||b|NOTION option : NOTION ; EMPTY.|r| * 0 10799. |p1|b)|ts1||b|NOTION sequence|co||r|b|b||cc| : NOTION ; NOTION, NOTION sequence|co||r|b|b||cc|.|r| * 0 10800. |p1|c)|ts1||b|NOTION list|co||r|c|b||cc| : * 0 10801. |e|NOTION ; NOTION, and also|co||r|94f|b||cc| token, NOTION list|co||r|c|b||cc|.|r| * 0 10802. |p1|d)|ts1||b|NOTETY STYLE pack : * 0 10803. |e|STYLE begin|co||r|94f,|mi||b||cc| token, NOTETY, STYLE end|co||r|94f,|mi||b||cc| token.|r| * 0 10804. |p1|e)|ts1||b|NOTION STYLE bracket : * 0 10805. |e|STYLE sub|co||r|94f,|mi||b||cc| token, NOTION, STYLE bus|co||r|94f,|mi||b||cc| token.|r| * 0 10806. |p1|f)|ts1||b|THING1 or alternatively THING2 :? 0 10807. THING1 ; THING2.|r|? 0 10808. |pa||j||co|It follows from this syntax that production rules such as * 0 10809. |ps||b|digit cypher sequence : * 0 10810. |e|digit cypher ; digit cypher, digit cypher sequence.|r| * 0 10811. |p|(which was used in the production of the example in 1.1.3.2.f, * 0 10812. but for which no more explicit hyper-rule is given)? 0 10813. are immediately available. * 0 10814. * 0 10815. Thus the number of hyper-rules actually written in this Report * 0 10816. has been reduced and those that remain have, hopefully, been made * 0 10817. more readable, since these general constructions are so worded * 0 10818. as to suggest what their productions should be. * 0 10819. |pa|For this reason, cross-references (1.1.3.4.f) to these rules have been * 0 10820. replaced by more helpful references; * 0 10821. e.g., in 8.1.1.1.b, instead of "|b|digit cypher sequence|co||r|133b|cc|", the more helpful * 0 10822. "|b|digit cypher|co||r|c|b||cc| sequence|r|" is given.? 0 10823. Likewise, references within the general constructions themselves have been * 0 10824. restricted to a bare minimum.|cc| * 0 10825. * 0 10826. |h|2. |bs|The computer and the program|rs| * 0 10827. * 0 10828. |pa||j|The meaning of a |b|program|r| in the strict language is explained in terms of a * 0 10829. hypothetical computer which performs the set of actions |co|2.1.4|cc| which constitute * 0 10830. the elaboration |co|2.1.4.1|cc| of that |b|program|r|. The computer deals * 0 10831. with a set of "objects" |co|2.1.1|cc|. * 0 10832. * 0 10833. |h2|2.1. Terminology * 0 10834. * 0 10835. |pq||j||co||w|"When |u|i|w| use a word," Humpty Dumpty said, in rather a scornful tone, * 0 10836. "it means just what I choose it to mean |mi| neither more nor less." * 0 10837. |ppp|Through the Looking|r|-|w|glass, * 0 10838. |p||pr|Lewis Carroll.|r||cc||qq| * 0 10839. * 0 10840. |h|2.1.1. Objects * 0 10841. * 0 10842. |pa||j|An "object" is a construct |co|1.1.3.2.e|cc|, * 0 10843. a "value" |co|2.1.1.1.a|cc|, a "locale" |co|2.1.1.1.b|cc|, * 0 10844. an "environ" |co|2.1.1.1.c|cc| or a "scene" |co|2.1.1.1.d|cc|. * 0 10845. |pa||co|Constructs may be classified as "external objects", since * 0 10846. they correspond to the text of the |b|program|r|, which, in a more * 0 10847. realistic computer, would be compiled into some internal form in * 0 10848. which it could operate upon the "internal objects", namely * 0 10849. the values, the locales, the environs and the scenes. * 0 10850. However, the hypothetical computer has no need of a compilation * 0 10851. phase, it being presumed able to examine the |b|program|r| and all * 0 10852. of its descendent constructs at the same time as * 0 10853. it is manipulating the internal objects.|cc| * 0 10854. * 0 10855. |h|2.1.1.1. Values, locales, environs and scenes * 0 10856. * 0 10857. |pb1||j|a)|tp1|A "value" is a "plain value" |co|2.1.3.1|cc|, a "name" |co|2.1.3.2|cc|, * 0 10858. a "stowed value" (i.e., a "structured value" |co|2.1.3.3|cc| or * 0 10859. a "multiple value" |co|2.1.3.4|cc|) or a "routine" |co|2.1.3.5|cc|. * 0 10860. |pg||co|For example, a real number is a plain value. * 0 10861. A special font is used for values * 0 10862. appearing in the text of this Report, thus: |w|3.14|r|, |w|true|r|. * 0 10863. This is not to be confused with the italic and bold fonts used for * 0 10864. constructs. This same special font is also used for * 0 10865. letters designating such things as constructs and protonotions.|cc| * 0 10866. |pb1|b)|tp1|A "locale" |co|is an internal object which|cc| corresponds to * 0 10867. some |b||ap|DECSETY LABSETY|ap||r| |co|1.2.3.C,I|cc|. A "vacant locale" is one for which * 0 10868. that |b||ap|DECSETY LABSETY|ap||r| is |b||ap|EMPTY|ap||r|. * 0 10869. |pg||co|Each |b||ap|QUALITY TAX|ap||r| (4.8.1.F,G) enveloped by that |b||ap|DECSETY * 0 10870. LABSETY|ap||r| corresponds to a |b|QUALITY-defining-indicator-with-TAX|r| * 0 10871. (i.e., to an |b|identifier|r|, |b|operator|r| or |b|mode-indication|r|) * 0 10872. declared in the construct whose elaboration caused that locale to be * 0 10873. created. Such a |b||ap|QUALITY TAX|ap||r| may be made to "access" * 0 10874. a value or a scene "inside" that locale (2.1.2.c). * 0 10875. |pg|A locale may be thought of as a number of storage cells, into which such * 0 10876. accessed objects are placed.|cc| * 0 10877. |pa||co|The terminal metaproductions of the metanotions "|b|DEC|r|", "|b|LAB|r|" * 0 10878. and "|b|FIELD|r|" (or of the more frequently used "|b|PROP|r|", which includes them all) * 0 10879. are all of the form |b||ap|QUALITY TAX|ap||r|. These "properties" are used in the syntax and semantics * 0 10880. concerned with nests and locales in order to associate, in a particular situation, some * 0 10881. quality with that |b||ap|TAX|ap||r|.|cc| * 0 10882. |pb1|c)|tp1|An "environ" is either empty, or is composed of an * 0 10883. environ and a locale. * 0 10884. |pg||co|Hence, each environ is derived from a series of other * 0 10885. environs, stemming ultimately from the empty "primal environ" * 0 10886. in which the |b|program|r| is elaborated (2.2.2.a).|cc| * 0 10887. |pb1|d)|tp1|A "scene" |w|S|r| is an object which is * 0 10888. composed of a construct |w|C|r| |co|1.1.3.2.e|cc| and an environ |w|E|r|. * 0 10889. |w|C|r| is said to be the construct, and |w|E|r| the environ, "of" |w|S|r|. * 0 10890. |pg||co|Scenes may be accessed inside locales (2.1.2.c) by |b||ap|LAB|ap||r|s or |b||ap|DEC|ap||r|s * 0 10891. arising from |b|label-identifiers|r| or from |b|mode-indications|r|, * 0 10892. and they may also be values (2.1.3.5).|cc| * 0 10893. * 0 10894. |h|2.1.1.2. Modes * 0 10895. * 0 10896. |pa||j||co|Each value has an attribute, termed its "mode", which defines how that value relates * 0 10897. to other values and which actions may be applied to it. * 0 10898. This attribute is described, or "spelled", by means * 0 10899. of some |b||ap|MOID|ap||r| (1.2.1.R) (thus there is a mode spelled |b||ap|real|ap||r|, * 0 10900. and there is a mode spelled |b||ap|structured * 0 10901. with real field letter#r letter#e real field letter#i letter#m mode|ap||r|). * 0 10902. Since it is intended that the modes specified by the |b|mode-indications|r| * 0 10903. |i|A|r| and |i|B|r| in * 0 10904. |n||p||ps||i|MODE A |uqe| STRUCT (REF A b), * 0 10905. |p||ps|#MODE B |uqe| STRUCT (REF STRUCT (REF B b) b) |r| * 0 10906. |p||j|should in fact be the same mode, it is necessary that both the |b||ap|MOID|ap| * 0 10907. |n||p||ps||ap|mui#definition of$#structured with$#? 0 10908. reference#to$#mui#application$#field letter#b mode|ap||r| * 0 10909. |p|and the |b||ap|MOID|ap||r| * 0 10910. |p||ps||b||ap|muii#definition of$#structured with$#? 0 10911. reference#to$#structured with$#reference * 0 10912. to$#muii#application$#field letter#b mode$#field letter#b mode|ap||r| * 0 10913. |p||j|(and indeed many others) should be alternative * 0 10914. spellings of that same mode. Similarly, the mode specified by the |b|declarer|r| * 0 10915. |i|UNION (INT, REAL)|r| may be spelled as either |b||ap|union of integral * 0 10916. real mode|ap||r| or |b||ap|union of real integral mode|ap||r|. * 0 10917. All those |b||ap|MOID|ap||r|s which are spellings of one same mode are * 0 10918. said to be "equivalent to" one another (a). * 0 10919. |pg|Certain |b||ap|MOID|ap||r|s, such as |b||ap|reference to muiii application|ap||r|, * 0 10920. |b||ap|reference to muiiii definition of * 0 10921. reference to muiiii application|ap||r|, * 0 10922. |b||ap|union of real reference to real mode|ap||r|, and |b||ap|structured with integral field * 0 10923. letter#a real field letter#a mode|ap||r|, are ill formed (7.4, 4.7.1.f, 4.8.1.c) and do * 0 10924. not spell any mode. * 0 10925. |pg|Although for most practical purposes a "mode" can * 0 10926. be regarded as simply a |b||ap|MOID|ap||r|, its rigorous definition therefore * 0 10927. involves the whole class of |b||ap|MOID|ap||r|s, equivalent to each other, * 0 10928. any of which could describe it.|cc| * 0 10929. |pb1|a)|tp1||b||ap|MOID1|ap||r| |co|1.2.1.R|cc| is "equivalent to" * 0 10930. |b||ap|MOID2|ap||r| if * 0 10931. the predicate |b||ap|where MOID1 equivalent MOID2|ap||r| |co|7.3.1.a|cc| holds |co|1.3.2|cc|. * 0 10932. |pg||co|A well formed |b||ap|MOID|ap||r| is always equivalent to itself; * 0 10933. |b||ap|union of integral real mode|ap||r| is equivalent to * 0 10934. |b||ap|union of real integral mode|ap||r|.|cc| * 0 10935. |pa|A protonotion |w|P|r| is "equivalent to" a protonotion |w|Q|r| * 0 10936. if it is possible to transform a copy |w|Pc|r| of |w|P|r| into a copy |w|Qc|r| of |w|Q|r| * 0 10937. in the following step: * 0 10938. |pi|Step:#If |w|Pc|r| is not identical to |w|Qc|r|, then * 0 10939. some |b||ap|MOID1|ap||r| contained in |w|Pc|r|, * 0 10940. but not within any |co|larger|cc| |b||ap|MOID2|ap||r| contained in |w|Pc|r|, * 0 10941. is replaced by some equivalent |b||ap|MOID|ap||r|, and the Step is taken again. * 0 10942. |p||co|Thus |b||ap|union of integral real mode identifier|ap||r| is * 0 10943. equivalent to |b||ap|union of real integral mode identifier|ap||r|.|cc| * 0 10944. |pb1|b)|tp1|A "mode" is a class |w|C|r| of |b||ap|MOID|ap||r|s such that each member of |w|C|r| * 0 10945. is equivalent |co|a|cc| to each other member of |w|C|r| and also to itself |co|in order to ensure * 0 10946. well formedness|cc|, but not to any |b||ap|MOID1|ap||r| which is not a member of |w|C|r|. * 0 10947. |pg||co|However, it is possible (except when equivalence of modes is * 0 10948. specifically under discussion) to discuss a mode as if it were * 0 10949. simply a terminal metaproduction of "|b|MOID|r|", by virtue of the * 0 10950. abbreviation to be given in 2.1.5.f.|cc| * 0 10951. |pb1|c)|tp1|Each value is of one specific mode. * 0 10952. |pg||co|For example, the mode of the value |w|3.14|r| is |b||ap|real|ap||r|. * 0 10953. However, there are no values * 0 10954. whose mode begins with |b||ap|union of|ap||r|, |b||ap|transient reference#to|ap||r| or |b||ap|flexible ROWS#of|ap||r| * 0 10955. (see 2.1.3.6).|cc| * 0 10956. * 0 10957. |h|2.1.1.3. Scopes * 0 10958. * 0 10959. |pa||j||co|A value |w|V|r| may "refer to" (2.1.2.e), or be composed from (2.1.1.1.d), * 0 10960. another internal object |w|O|r| (e.g., a name may refer to a value; * 0 10961. a routine, which is a scene, is composed, in part, from an environ). Now the lifetime of * 0 10962. the storage cells containing (2.1.3.2.a) or implied by (2.1.1.1.b) * 0 10963. |w|O|r| may be limited (in order that they may * 0 10964. be recovered after a certain time), and therefore it must not be * 0 10965. possible to preserve |w|V|r| beyond that lifetime, for otherwise * 0 10966. an attempt to reach some no-longer-existent storage cell via |w|V|r| might still be made. * 0 10967. This restriction is expressed by saying that, if |w|V|r| is to be * 0 10968. "assigned" (5.2.1.2.b) to some name |w|W|r|, * 0 10969. then the "scope" of |w|W|r| must not be "older" than * 0 10970. the scope of |w|V|r|. * 0 10971. Thus, the scope of |w|V|r| is a measure of the age of * 0 10972. those storage cells, and hence of their lifetime.|cc| * 0 10973. |pb1|a)|tp1|Each value has one specific "scope" * 0 10974. |co|which depends upon its mode or upon the manner of its creation; * 0 10975. the scope of a value is defined to be the same as that * 0 10976. of some environ|cc|. * 0 10977. |pb1|b)|tp1|Each environ has one specific "scope". * 0 10978. |co|The scope of each * 0 10979. environ is "newer" (2.1.2.f) than that of the environ from which * 0 10980. it is composed (2.1.1.1.c).|cc| * 0 10981. |pg||co|The scope of an environ is not to be confused with the scopes * 0 10982. of the values accessed inside its locale. Rather, the scope of an environ * 0 10983. is used when defining the scope of scenes for which it is necessary (7.2.2.c) * 0 10984. or of the yields of generators for which it is "local" (5.2.3.2.b). The scope of an environ * 0 10985. is defined relative (2.1.2.f) to the scope of some other environ, * 0 10986. so that hierarchies of scopes are created * 0 10987. depending ultimately upon the scope of the primal environ (2.2.2.a).|cc| * 0 10988. * 0 10989. |h|2.1.2. Relationships * 0 10990. * 0 10991. |pb1||j|a)|tp1|Relationships either are "permanent", i.e., independent of * 0 10992. the |b|program|r| and of its elaboration, or actions may cause * 0 10993. them to "hold" or to cease to hold. * 0 10994. Relationships may also be "transitive"; i.e., if * 0 10995. "|i|*|r|" is such a relationship * 0 10996. and |w|A|i|*|w|B|r| and |w|B|i|*|w|C|r| hold, then |w|A|i|*|w|C|r| holds also. * 0 10997. |pb1|b)|tp1|"To be the yield of" is a relationship between a value and an action, viz., * 0 10998. the elaboration of a scene. * 0 10999. This relationship is made to hold upon the * 0 11000. completion of that elaboration |co|2.1.4.1.b|cc|. * 0 11001. |pb1|c)|tp1|"To access" is a relationship between a |b||ap|PROP|ap||r| |co|4.8.1.E|cc| * 0 11002. and a value or a scene |w|V|r| which may hold "inside" some specified locale |w|L|r| * 0 11003. |co|whose |b||ap|DECSETY LABSETY|ap||r| envelops |b||ap|PROP|ap||r||cc|. * 0 11004. This relationship is made to hold when |b||ap|PROP|ap||r| is "made to * 0 11005. access" |w|V|r| inside |w|L|r| |co|3.5.2.Step#4, 4.8.2.a|cc| and it then * 0 11006. holds also between any |b||ap|PROP1|ap||r| equivalent to |co|2.1.1.2.a|cc| * 0 11007. |b||ap|PROP|ap||r| and |w|V|r| inside |w|L|r|. * 0 11008. |pb1|d)|tp1|The permanent relationships between values are: * 0 11009. "to be of the same mode as" |co|2.1.1.2.c|cc|, * 0 11010. "to be smaller than", "to be widenable to", "to be lengthenable to" |co|2.1.3.1.e|cc| * 0 11011. and "to be equivalent to" |co|2.1.3.1.g|cc|. * 0 11012. If one of these relationships is defined at all for a given pair * 0 11013. of values, then it either holds or does not hold permanently. * 0 11014. These relationships are all transitive. * 0 11015. |pb1|e)|tp1|"To refer to" is a relationship between a "name" |co|2.1.3.2.a|cc| * 0 11016. |w|N|r| and some other value. * 0 11017. This relationship is made to hold when |w|N|r| is "made to refer to" that value * 0 11018. and ceases to hold when |w|N|r| is made to * 0 11019. refer to some other value. * 0 11020. |pb1|f)|tp1|There are three transitive relationships between scopes, viz., * 0 11021. a scope |w|A|r| |co|2.1.1.3|cc| may be either * 0 11022. "newer than", or "the same as" or "older than" a scope |w|B|r|. * 0 11023. If |w|A|r| is newer than |w|B|r|, then |w|B|r| is * 0 11024. older than |w|A|r| and vice-versa. * 0 11025. If |w|A|r| is the same as |w|B|r|, then |w|A|r| is neither newer * 0 11026. nor older than |w|B|r| |co|but the converse is not necessarily true, * 0 11027. since the relationship is not defined at all for some pairs of scopes|cc|. * 0 11028. |pb1|g)|tp1|"To be a subname of" is a relationship between a name and a "stowed name" * 0 11029. |co|2.1.3.2.b|cc|. This relationship is made to hold * 0 11030. when that stowed name is "endowed with subnames" |co|2.1.3.3.e, 2.1.3.4.g|cc| * 0 11031. or when it is "generated" |co|2.1.3.4.j,l|cc|, and it continues to hold until * 0 11032. that stowed name is endowed with a different set of subnames. * 0 11033. * 0 11034. |h|2.1.3. Values * 0 11035. * 0 11036. |h|2.1.3.1. Plain values * 0 11037. * 0 11038. |pb1||j|a)|tp1|A plain value is either an "arithmetic value", i.e., an * 0 11039. "integer" or a "real number", or is a "truth value" |co|f|cc|, * 0 11040. a "character" |co|g|cc| or a "void value" |co|h|cc|. * 0 11041. |pb1|b)|tp1|An arithmetic value has a "size", i.e., an * 0 11042. integer characterizing the degree of discrimination with which it * 0 11043. is kept in the computer. * 0 11044. |pb1|c)|tp1|The mode of an integer or of a real number of size |w|n|r| * 0 11045. is, respectively, some |b||ap|SIZETY integral|ap||r| or |b||ap|SIZETY real|ap||r| where, * 0 11046. if |w|n|r| is positive (zero, negative), that |b||ap|SIZETY|ap||r| * 0 11047. is |w|n|r| times |b||ap|long|ap||r| (is empty, is |w||mi|n|r| times |b||ap|short|ap||r|). * 0 11048. |pb1|d)|tp1|The number of integers or of real numbers of a given * 0 11049. size that can be distinguished increases (decreases) with that size * 0 11050. until a certain size is reached, viz., the "number of extra lengths" * 0 11051. (minus the "number of extra shorths") of * 0 11052. integers or of real numbers, respectively, |co|10.2.1.a,b,d,e|cc| after which it is constant. * 0 11053. |pq||co||w|Taking Three as the subject to reason about- * 0 11054. |pp|A convenient number to state- |r||pr||cc| * 0 11055. |pb1|e)|tp1|For the purpose of explaining the meaning of the widening coercion and of the |b|operators|r| * 0 11056. declared in the |b|standard-prelude|r|, the following properties of arithmetic values are assumed: * 0 11057. |xi||bt|for each pair of integers or of real numbers * 0 11058. of the same size, the relationship "to be smaller than" is defined * 0 11059. with its usual mathematical meaning |co|10.2.3.3.a, * 0 11060. 10.2.3.4.a|cc|; |xi||bt|for each pair of integers of the same size, a third distinguishable * 0 11061. integer of that size may exist, the first integer "minus" the * 0 11062. other |co|10.2.3.3.g|cc|; * 0 11063. |pq||co||w|We add Seven, and Ten, and then multiply out * 0 11064. |pp|By One Thousand diminished by Eight. |r||pr||cc| * 0 11065. |xi||bt|for each pair of real numbers of the same * 0 11066. size, three distinguishable real numbers of that size may exist, the * 0 11067. first real number "minus" ("times", "divided by") the other one * 0 11068. |co|10.2.3.4.g,l,m|cc|; * 0 11069. |xi||bt|in the foregoing, the terms "minus", "times" and "divided by" have their usual * 0 11070. mathematical meaning but, in the case of real numbers, their results are obtained * 0 11071. "in the sense of numerical analysis", i.e., by performing those operations on numbers which may * 0 11072. deviate slightly from the given ones * 0 11073. |co|; this deviation is left undefined in this Report|cc|; * 0 11074. |pq||co||w|The result we proceed to divide, as you see, * 0 11075. |pp|By Nine Hundred and Ninety and Two|r||pr||cc| * 0 11076. |xi||bt|each integer of a given size is "widenable to" a real * 0 11077. number close to it and of that same size |co|6.5|cc|; * 0 11078. |xi||bt|each integer (real number) of a given size can be "lengthened to" an integer (real number) * 0 11079. close to it whose size is greater by one * 0 11080. |co|10.2.3.3.q, 10.2.3.4.n|cc|. * 0 11081. |pb1|f)|tp1|A "truth value" is either "|w|true|r|" or "|w|false|r|". * 0 11082. Its mode is |b||ap|boolean|ap||r|. * 0 11083. |pq||co||w|Then subtract Seventeen, and the answer must be * 0 11084. |pp|Exactly and perfectly true. * 0 11085. |ppp|The Hunting of the Snark, * 0 11086. |pr|Lewis Carroll.|r||cc||qq| * 0 11087. |pb1|g)|tp1|Each "character" is "equivalent" to a nonnegative integer of * 0 11088. size zero, its "integral equivalent" |co|10.2.1.n|cc|; this relationship * 0 11089. is defined only to the extent that different characters have different * 0 11090. integral equivalents, and that there exists a * 0 11091. "largest integral equivalent" |co|10.2.1.p|cc|. * 0 11092. The mode of a character is |b||ap|character|ap||r|. * 0 11093. |pb1|h)|tp1|The only "void value" is "|w|empty|r|". Its mode is |b||ap|void|ap||r|. * 0 11094. |pg||co|The elaboration of a construct yields a void value when no * 0 11095. more useful result is needed. Since the syntax does not * 0 11096. provide for |b|void-variables|r|, |b|void-identity-declarations|r| * 0 11097. or |b|void-parameters|r|, * 0 11098. the programmer cannot make use of void values, except those arising from * 0 11099. uniting (6.4).|cc| * 0 11100. |pb1|i)|tp1|The scope of a plain value is the scope of the primal environ |co|2.2.2.a|cc|. * 0 11101. * 0 11102. |h|2.1.3.2. Names * 0 11103. * 0 11104. |pq||j||co||w|What|ap|s in a name|qe| that which we call a rose * 0 11105. |pp|By any other name would smell as sweet. * 0 11106. |ppp|Romeo and Juliet, * 0 11107. |pr|William Shakespeare.|r||cc||qq| * 0 11108. |pb1||j|a)|tp1|A "name" is a value which can be "made to refer to" |co|d, 5.2.3.2.a, 5.2.1.2.b|cc| * 0 11109. some other value, or which can be "nil" |co|and then refers to no value|cc|; * 0 11110. moreover, for each mode beginning with |b||ap|reference to|ap||r|, there is * 0 11111. exactly one nil name of that mode. * 0 11112. |pg|A name may be "newly created" |co|by the elaboration of a * 0 11113. |b|generator|r| (5.2.3.2) or a |b|rowed-to-FORM|r| (6.6.2), * 0 11114. when a stowed name is endowed with subnames (2.1.3.3.e, 2.1.3.4.g) and, * 0 11115. possibly, when a name is "generated" (2.1.3.4.j, l)|cc|. * 0 11116. The name so created is different from all names already in existence. * 0 11117. |pg||co|A name may be thought of as the address of the storage cell or cells, in the computer, * 0 11118. used to contain the value referred to. * 0 11119. The creation of a * 0 11120. name implies the reservation of storage space to hold that value.|cc| * 0 11121. |pb1|b)|tp1|The mode of a name |w|N|r| is some |b||ap|reference#to MODE|ap||r| * 0 11122. and any value which is referred to by * 0 11123. |w|N|r| must be "acceptable to" |co|2.1.3.6.d|cc| that |b||ap|MODE|ap||r|. * 0 11124. If |b||ap|MODE|ap||r| is some |b||ap|STOWED|ap||r|, then |w|N|r| is said to be a "stowed name". * 0 11125. |pb1|c)|tp1|The scope of a name is the scope of some specific environ * 0 11126. |co|usually the "local environ" (5.2.3.2.b) of some |b|generator|r||cc|. * 0 11127. The scope of a name which is nil is the scope of the primal environ |co|2.2.2.a|cc|. * 0 11128. |pb1|d)|tp1|If |w|N|r| is a stowed name referring to a structured * 0 11129. (multiple) value |w|V|r| |co|2.1.3.3, 2.1.3.4|cc|, and if a subname * 0 11130. |co|2.1.2.g|cc| of |w|N|r| selected |co|2.1.3.3.e, 2.1.3.4.g|cc| by a * 0 11131. |b||ap|TAG|ap||r| (an index) |w|I|r| is made to refer to a |co|new|cc| value |w|X|r|, * 0 11132. then |w|N|r| is made to refer to a structured (multiple) * 0 11133. value which is the same as |w|V|r| except for its field (element) selected by |w|I|r|, * 0 11134. which is |co|now made to be|cc| |w|X|r|. * 0 11135. |pg||co|For the mode of a subname, see 2.1.3.3.d and 2.1.3.4.f.|cc| * 0 11136. * 0 11137. |h|2.1.3.3. Structured values * 0 11138. * 0 11139. |pb1||j|a)|tp1|A "structured value" is composed of a sequence of other values, its * 0 11140. "fields", each of which is "selected" |co|b|cc| by a specific * 0 11141. |b||ap|TAG|ap||r| |co|9.4.2.1.A|cc|. * 0 11142. |co|For the selection of a field by a |b|field-selector|r|, see 2.1.5.g.|cc| * 0 11143. |pg||co|The ordering of the fields of a structured value is utilized * 0 11144. in the semantics of |b|structure-displays|r| (3.3.2.b) and |b|format-texts|r| (10.3.4), and in * 0 11145. straightening (10.3.2.3.c).|cc| * 0 11146. |pb1|b)|tp1|The mode of a structured value |w|V|r| is some * 0 11147. |b||ap|structured with FIELDS mode|ap||r|. * 0 11148. If the |w|n|r||hy|th |b||ap|FIELD|ap||r| enveloped by that |b||ap|FIELDS|ap||r| is some |b||ap|MODE field TAG|ap||r|, * 0 11149. then the |w|n|r||hy|th field of |w|V|r| is "selected" by |b||ap|TAG|ap||r| * 0 11150. and is acceptable to |co|2.1.3.6.d|cc| |b||ap|MODE|ap||r|. * 0 11151. |pb1|c)|tp1|The scope of a structured value is the newest of the * 0 11152. scopes of its fields. * 0 11153. |pb1|d)|tp1|If the mode of a name |w|N|r| |co|referring to a structured value|cc| is some * 0 11154. |b||ap|reference to structured with FIELDS mode|ap||r|, and if the predicate * 0 11155. |b||ap|where MODE field TAG resides in FIELDS|ap||r| holds |co|7.2.1.b,c|cc|, then the mode of * 0 11156. the subname of |w|N|r| selected |co|e|cc| by |b||ap|TAG|ap||r| is |b||ap|reference to MODE|ap||r|. * 0 11157. |pb1|e)|tp1|When a name |w|N|r| which refers to a structured value |w|V|r| * 0 11158. is "endowed with subnames" |co|e, 2.1.3.4.g, 4.4.2.b, 5.2.3.2.a|cc|, then, * 0 11159. |pi|For each |b||ap|TAG|ap||r| selecting a field |w|F|r| in |w|V|r|, * 0 11160. |et|a new subname |w|M|r| is created of the same scope as |w|N|r|; * 0 11161. |et||w|M|r| is made to refer to |w|F|r|; * 0 11162. |et||w|M|r| is said to be the name "selected" by |b||ap|TAG|ap||r| in |w|N|r|; * 0 11163. |et|if |w|M|r| is a stowed name |co|2.1.3.2.b|cc|, then it * 0 11164. is itself endowed with subnames |co|e, 2.1.3.4.g|cc|. * 0 11165. * 0 11166. |h|2.1.3.4. Multiple values * 0 11167. * 0 11168. |pb1||j|a)|tp1|A "multiple value" |co|of |w|n|r| dimensions|cc| is composed of a "descriptor" * 0 11169. and a sequence of other values, its "elements", each of which * 0 11170. may be "selected" by a specific |w|n|r|-tuple of integers, its "index". * 0 11171. |pb1|b)|tp1|The "descriptor" is of the form * 0 11172. |p||ps||w|((l|s0|1|s1|,#u|s0|1|s1|),? 0 11173. (l|s0|2|s1|,#u|s0|2|s1|), ...#, (l|s0|n|s1|,#u|s0|n|s1|))|r|? 0 11174. |p|where each |w|(l|s0|i|s1|,#u|s0|i|s1|)|r|, |w|i#|uqe|#1, ...#,#n|r|, * 0 11175. is a "bound pair" * 0 11176. of integers in which |w|l|s0|i|s1||r| is the * 0 11177. |w|i|r||hy|th "lower bound" and |w|u|s0|i|s1||r| is the |w|i|r||hy|th "upper bound".? 0 11178. |pb1|c)|tp1|If for any |w|i, i#|uqe|#1, ...#,#n|r|, |w|u|s0|i|s1|#|lt|#l|s0|i|s1||r|, * 0 11179. then the descriptor is said to be "flat" and there is one element, * 0 11180. termed a "ghost element" |co|, and not selected by any index; see also 5.2.1.2.b|cc|; * 0 11181. otherwise, the number of elements is |w|(u|s0|1|s1|#|mi|#l|s0|1|s1|#+#1)#|sx| (u|s0|2|s1|#|mi|#l|s0|2|s1|#+#1)#|sx| * 0 11182. ...#|sx| (u|s0|n|s1|#|mi|#l|s0|n|s1|#+#1)|r| and each is selected by a specific index * 0 11183. |w|(r|s0|1|s1|, ...#, r|s0|n|s1|)|r| where |w|l|s0|i|s1|#|le|#r|s0|i|s1|#|le|#u|s0|i|s1||r|, * 0 11184. |w|i#|uqe|#1, ...#,#n|r|. * 0 11185. |pb1|d)|tp1|The mode of a multiple value |w|V|r| is some |b||ap|ROWS of * 0 11186. MODE|ap||r|, where that |b||ap|ROWS|ap||r| is composed of as many times * 0 11187. |b||ap|row|ap||r| as there are bound pairs in the descriptor of |w|V|r| and * 0 11188. where each element of |w|V|r| is acceptable to |co|2.1.3.6.d|cc| that |b||ap|MODE|ap||r|. * 0 11189. |pg||co|For example, given |i||so||thin||sc| UNION (INT, REAL) ruir |uqe| (1, 2.0)|r|, * 0 11190. the mode of the yield of |i|ruir|r| is |b||ap|row of union of integral real mode|ap||r|, * 0 11191. the mode of its first element is |b||ap|integral|ap||r| and that of its second * 0 11192. element is |b||ap|real|ap||r|.|cc| * 0 11193. |pb1|e)|tp1|The scope of a multiple value is the newest of the * 0 11194. scopes of its elements, if its descriptor is not flat, and, otherwise, * 0 11195. is the scope of the primal environ |co|2.2.2.a|cc|. * 0 11196. |pb1|f)|tp1|A multiple value, of mode |b||ap|ROWS of MODE|ap||r|, * 0 11197. may be referred to either by a "flexible" name of mode * 0 11198. |b||ap|reference#to flexible ROWS of MODE1|ap||r|, * 0 11199. or by a "fixed" name of mode |b||ap|reference#to * 0 11200. ROWS of MODE1|ap||r| where |co|in either case|cc| |b||ap|MODE1|ap||r| "deflexes" * 0 11201. |co|2.1.3.6.b|cc| to |b||ap|MODE|ap||r|. * 0 11202. |pg||co|The difference implies a possible difference in the method whereby * 0 11203. the value is stored in the computer. The flexible case must allow a multiple value * 0 11204. with different bounds to be assigned (5.2.1.2.b) to that name, whereas the fixed case * 0 11205. can rely on the fact that those bounds will remain fixed during the * 0 11206. lifetime of that name. * 0 11207. Note that the "flexibility" is a property of the name: the * 0 11208. underlying multiple value is the same value in both cases.|cc| * 0 11209. |pg|If the mode of a name |w|N|r| |co|referring to a multiple value|cc| is some * 0 11210. |b||ap|reference#to FLEXETY ROWS of MODE|ap||r|, then the mode of each subname of |w|N|r| * 0 11211. is |b||ap|reference#to MODE|ap||r|. * 0 11212. |pb1|g)|tp1|When a name |w|N|r| which refers to a multiple value |w|V|r| * 0 11213. is "endowed with subnames" |co|g, 2.1.3.3.e, 4.4.2.b, 5.2.1.2.b, 5.2.3.2.a|cc|, then, * 0 11214. |pi|For each index selecting an element |w|E|r| of |w|V|r|, * 0 11215. |et|a new subname |w|M|r| is created of the same scope as |w|N|r|; * 0 11216. |et||w|M|r| is made to refer to |w|E|r|; * 0 11217. |et||w|M|r| is said to be the name "selected" by that * 0 11218. index in |w|N|r|; * 0 11219. |et|if |w|M|r| is a stowed name |co|2.1.3.2.b|cc|, then it is itself * 0 11220. endowed with subnames |co|g, 2.1.3.3.e|cc|. * 0 11221. |pa||co|In addition to the selection of an element (a) or a name (g) by means of an index, * 0 11222. it is also possible to select a value, or to generate a new name referring to such a value, by * 0 11223. means of a trim (h,i,j) or a |b||ap|TAG|ap||r| (k,l). * 0 11224. Both indexes and trims are used in the elaboration of |b|slices|r| * 0 11225. (5.3.2.2).|cc| * 0 11226. |pb1|h)|tp1|A "trim" * 0 11227. is an |w|n|r|-tuple, * 0 11228. each element of which is either an integer |co|corresponding to a |b|subscript|r||cc| * 0 11229. or a triplet |w|(l,#u,#d)|r| |co|corresponding to a * 0 11230. |b|trimmer|r| or a |b|revised-lower-bound-option|r||cc|, such that at least * 0 11231. one of those elements is a triplet |co|if all the elements are integers, then the |w|n|r|-tuple * 0 11232. is an index (a)|cc|. * 0 11233. Each element of such a triplet is either an integer or is "|w|absent|r|". * 0 11234. |pg||co|A trim (or an index) is yielded by the elaboration of an |b|indexer|r| (5.3.2.2.b).|cc| * 0 11235. |pb1|i)|tp1|The multiple value |w|W|r| |co|of |w|m|r| dimensions|cc| "selected" by a trim |w|T|r| * 0 11236. in a multiple value |w|V|r| |co|of |w|n|r| dimensions, |w|1#|le|#m#|le|#n|r||cc| * 0 11237. is determined as follows: * 0 11238. |xi||bt|Let |w|T|r| be composed of integers and triplets * 0 11239. |w|T|s0|i|s1||r|, |w|i#|uqe|#1, ...#,#n|r|, of which |w|m|r| are actually triplets; * 0 11240. let the |w|j-|r|th triplet be |w|(l|s0|j|s1|,#u|s0|j|s1|,#d|s0|j|s1|)|r|, |w|j#|uqe|#1, ...#,#m|r|; * 0 11241. |et||w|W|r| is composed of? 0 11242. |pha11|(i)|thb1|a descriptor |w|((l|s0|1|s1|#|mi|#d|s0|1|s1|, u|s0|1|s1|#|mi|#d|s0|1|s1|), * 0 11243. (l|s0|2|s1|#|mi|#d|s0|2|s1|, u|s0|2|s1|#|mi|#d|s0|2|s1|), * 0 11244. ...#, (l|s0|m|s1|#|mi|#d|s0|m|s1|, u|s0|m|s1|#|mi|#d|s0|m|s1|))|r|; * 0 11245. |pha21|(ii)|thb1|elements of |w|V|r|, where the element, if any, * 0 11246. selected in |w|W|r| by an index |w|(w|s0|1|s1|, ...#, w|s0|m|s1|)|r| * 0 11247. |co||w|l|s0|j|s1|#|mi|#d|s0|j|s1|#|le|#w|s0|j|s1|#|le|#u|s0|j|s1|#|mi|#d|s0|j|s1||r||cc| * 0 11248. is that selected in |w|V|r| by the index |w|(v|s0|1|s1|, ...#, v|s0|n|s1|)|r| determined as follows:? 0 11249. |pc|For |w|i#|uqe|#1, ...#,#n|r|, * 0 11250. |pd|Case#A:#|w|T|s0|i|s1||r| is an integer: * 0 11251. |et||w|v|s0|i|s1|#|uqe|#T|s0|i|s1||r|; * 0 11252. |pd|Case#B:#|w|T|s0|i|s1||r| is the |w|j|r||hy|th triplet |w|(l|s0|j|s1|,#u|s0|j|s1|,#d|s0|j|s1|)|r| * 0 11253. of |w|T|r|: |et||w|v|s0|i|s1|#|uqe|#w|s0|j|s1|#+#d|s0|j|s1||r|. * 0 11254. |pb1||j|j)|tp1|The name |w|M|r| "generated" by a trim |w|T|r| from a name |w|N|r| * 0 11255. which refers to a multiple value |w|V|r| is a |co|fixed|cc| name, of the same * 0 11256. scope as |w|N|r|, |co|not necessarily newly created|cc| which refers * 0 11257. to the multiple value |w|W|r| selected |co|i|cc| by |w|T|r| in |w|V|r|. * 0 11258. Each subname of |w|M|r|, as selected by an index |w|Iw|r|, is one of the * 0 11259. |co|already existing|cc| subnames of |w|N|r|, as selected by an index |w|Iv|r|, * 0 11260. where each |w|Iv|r| is determined from |w|T|r| and the * 0 11261. corresponding |w|Iw|r| using the method given in the previous sub-section. * 0 11262. |pb1|k)|tp1|The multiple value |w|W|r| "selected" by a |b||ap|TAG|ap||r| in a * 0 11263. multiple value |w|V|r| |co|each of whose elements is a structured value|cc| * 0 11264. is composed of * 0 11265. |pha10|(i)|thb0|the descriptor of |w|V|r|, and * 0 11266. |pha20|(ii)|tnb0|the fields selected by |b||ap|TAG|ap||r| in the elements of |w|V|r|, where the element, * 0 11267. if any, selected in |w|W|r| by an index |w|I|r| is the field selected by |b||ap|TAG|ap||r| * 0 11268. in the element of |w|V|r| selected by |w|I|r|. * 0 11269. |pb1|l)|tp1|The name |w|M|r| "generated" by a |b||ap|TAG|ap||r| from a name |w|N|r| which * 0 11270. refers to a multiple value |w|V|r| |co|each of whose elements is a structured * 0 11271. value|cc| is a |co|fixed|cc| name, of the same scope as |w|N|r|, * 0 11272. |co|not necessarily newly created|cc| which refers to the multiple value selected * 0 11273. |co|k|cc| by |b||ap|TAG|ap||r| in |w|V|r|. Each subname of |w|M|r| selected by an index |w|I|r| * 0 11274. is the |co|already existing|cc| name selected |co|2.1.3.3.e|cc| * 0 11275. by |b||ap|TAG|ap||r| in the subname of |w|N|r| selected |co|g|cc| by |w|I|r|. * 0 11276. * 0 11277. |h|2.1.3.5. Routines * 0 11278. * 0 11279. |pb1||j|a)|tp1|A "routine" is a scene |co|2.1.1.1.d|cc| composed of a |b|routine-text|r| * 0 11280. |co|5.4.1.1.a,b|cc| together with an environ |co|2.1.1.1.c|cc|. * 0 11281. |pg||co|A routine may be "called" (5.4.3.2.b), whereupon the |b|unit|r| of * 0 11282. its |b|routine-text|r| is elaborated.|cc| * 0 11283. |pb1|b)|tp1|The mode of a routine composed of a |b|PROCEDURE-? 0 11284. routine-text|r| is |b||ap|PROCEDURE|ap||r|. * 0 11285. |pb1|c)|tp1|The scope of a routine is the scope of its environ. * 0 11286. * 0 11287. |h|2.1.3.6. Acceptability of values * 0 11288. * 0 11289. |pb1||j|a)|tp1||co|There are no values whose mode begins with |b||ap|union of|ap||r|. * 0 11290. There exist names whose modes begin with |b||ap|reference#to union of|ap||r|, * 0 11291. e.g., |i|u|r| in |i|UNION (INT, REAL) u;|r|#. Here, however, |i|u|r|, * 0 11292. whose mode is |b||ap|reference#to union of integral real mode|ap||r|, * 0 11293. refers either to a value whose mode is |b||ap|integral|ap||r| or to a * 0 11294. value whose mode is |b||ap|real|ap||r|. It is possible to discover which of * 0 11295. these situations obtains, at a given moment, by means of a * 0 11296. |b|conformity-clause|r| (3.4.1.q).|cc| * 0 11297. |pa|The mode |b||ap|MOID|ap||r| is "united from" the mode |b||ap|MOOD|ap||r| if * 0 11298. |b||ap|MOID|ap||r| is some |b||ap|union of MOODSETY1 MOOD MOODSETY2 mode|ap||r|. * 0 11299. |pb1|b)|tp1||co|There are no values whose mode begins with |b||ap|flexible|ap||r|. * 0 11300. There exist flexible names whose modes begin with |b||ap|reference to flexible|ap||r|, * 0 11301. e.g., |i|a1|r| in |i|FLEX |so|1 : n|sc| REAL a1;|r|#. * 0 11302. Here |i|a1|r|, whose mode is |b||ap|reference to flexible row of real|ap||r|, refers to a multiple * 0 11303. value whose mode is |b||ap|row of real|ap||r| (see also 2.1.3.4.f). * 0 11304. In general, there exist values only for those modes obtainable by "deflexing".|cc| * 0 11305. |pa|The mode |b||ap|MOID1|ap||r| "deflexes" to the mode |b||ap|MOID2|ap||r| if * 0 11306. the predicate |b||ap|where MOID1 * 0 11307. deflexes to MOID2|ap||r| holds |co|4.7.1.a,b,c|cc|. * 0 11308. |pg||co|The deflexing process obtains |b||ap|MOID2|ap||r| by removing all * 0 11309. |b||ap|flexible|ap||r|s contained at positions in |b||ap|MOID1|ap||r| where * 0 11310. they are not also contained in any |b||ap|REF#to MOID3|ap||r|. Thus * 0 11311. |n||p||ps||b||ap|structured with$#flexible row of * 0 11312. character$#field letter#a mode|ap||r|, * 0 11313. |p|which is not the mode of any value, deflexes to * 0 11314. |p||ps||b||ap|structured with$#row of character$#field letter#a mode|ap||r| * 0 11315. |p||j|which is therefore the mode of a value referable to by a flexible * 0 11316. name of mode * 0 11317. |n||p||ps||b||ap|reference#to structured with$#flexible * 0 11318. row of character$#field letter#a mode|ap||r|. * 0 11319. |p||j|This mode is already the mode of a name and * 0 11320. therefore it cannot be deflexed any further.|cc| * 0 11321. |pb1|c)|tp1||co|There are no names whose mode begins with |b||ap|transient reference#to|ap||r|. * 0 11322. |pg|The yield of a |b|transient-reference-to-MODE-FORM|r| is a "transient name" of mode * 0 11323. |b||ap|reference#to MODE|ap||r|, but, there being no |b|transient-reference-to-MODE-declarators|r| * 0 11324. in the language (4.6.1), * 0 11325. the syntax ensures that transient names can never be * 0 11326. assigned, ascribed or yielded by the calling of a routine. * 0 11327. |pg|E.g., |i|xx |bec| a1 |so|i|sc||r| is not an |b|assignation|r| * 0 11328. because |i|xx|r| is not a |b|reference-to-transient-reference-to-real-identifier|r|. * 0 11329. Transient names originate from the slicing, multiple selection or rowing of a flexible name.|cc| * 0 11330. |pb1|d)|tp1|A value of mode |w|M1|r| is "acceptable to" a mode |w|M2|r| if * 0 11331. |pha10|(i)|thb0||w|M1|r| is the same as |w|M2|r|, or * 0 11332. |pha20|(ii)|thb0||w|M2|r| is united |co|a|cc| from |w|M1|r| * 0 11333. |co|thus the mode specified by |i|UNION#(REAL,#INT)|r| accepts values * 0 11334. whose mode is that specified by either * 0 11335. |i|REAL|r| or |i|INT|r||cc|, or * 0 11336. |pha30|(iii)|thb0||w|M2|r| deflexes |co|b|cc| to |w|M1|r| * 0 11337. |co|thus the mode |b||ap|flexible row of real|ap||r| (a mode of which there are no values) * 0 11338. accepts values such as the yield of the |b|actual-declarer|r| |i|FLEX |so|1 : n|sc| REAL|r| * 0 11339. which is a value of mode |b||ap|row of real|ap||r||cc|, or * 0 11340. |pha20|(iv)|thb0||w|M1|r| is some |b||ap|reference to MODE|ap||r| and |w|M2|r| * 0 11341. is |b||ap|transient reference#to MODE|ap||r| * 0 11342. |co|thus the mode |b||ap|transient reference to real|ap||r| accepts values * 0 11343. (such as the yield of |i|a1 |so|i|sc||r|) whose mode is |b||ap|reference to real|ap||r||cc|. * 0 11344. |p||co|See 2.1.4.1.b for the acceptability of the yield of a scene.|cc| * 0 11345. * 0 11346. |h2|2.1.4. Actions * 0 11347. * 0 11348. |pq||j||w||co|Suit the action to the word, the word to the action. * 0 11349. |ppp|Hamlet, |pr|William Shakespeare.|r||cc||qq|? 0 11350. * 0 11351. |h|2.1.4.1. Elaboration * 0 11352. * 0 11353. |pb1||j|a)|tp1|The "elaboration" of certain scenes |co|those whose constructs * 0 11354. are designated by certain paranotions|cc| * 0 11355. is specified in the * 0 11356. sections of this Report headed "Semantics", which describe the sequence of * 0 11357. "actions" which are to be carried out during the elaboration of each such scene. * 0 11358. |pg||co|Examples of actions which may be specified are: * 0 11359. |et|the causing to hold of relationships, * 0 11360. |et|the creation of new names, and * 0 11361. |et|the elaboration of other scenes.|cc| * 0 11362. |pg|The "meaning" of a scene is the effect of the actions carried out * 0 11363. during its elaboration. Any of these actions or any combination thereof may be replaced * 0 11364. by any action or combination which causes the same effect. * 0 11365. |pb1|b)|tp1|The elaboration of a scene |w|S|r| may "yield" * 0 11366. a value. If the construct of |w|S|r| is a * 0 11367. |b|MOID-NOTION|r|, then that value is, unless otherwise specified, |co|of such a mode that * 0 11368. it is|cc| acceptable to |co|2.1.3.6.d|cc| |b||ap|MOID|ap||r|. * 0 11369. |pg||co|This rule makes it possible, in the semantics, to discuss yields * 0 11370. without explicitly prescribing their modes.|cc| * 0 11371. |pb1|c)|tp1|If the elaboration of some construct |w|A|r| * 0 11372. in some environ |w|E|r| is not * 0 11373. otherwise specified in the semantics of this Report, and if |w|B|r| is the * 0 11374. only direct descendent of |w|A|r| which needs elaboration |co|see below|cc|, * 0 11375. then the elaboration of |w|A|r| in |w|E|r| consists of the elaboration of |w|B|r| in |w|E|r| * 0 11376. and the yield, if any, of |w|A|r| is the yield, if any, * 0 11377. of |w|B|r| |co|; this automatic elaboration is termed the * 0 11378. "pre-elaboration" of |w|A|r| in |w|E|r||cc|. * 0 11379. |pg|A construct needs no elaboration if it is invisible |co|1.1.3.2.h|cc|, if it is a |b|symbol|r| * 0 11380. |co|9.1.1.h|cc|, or if its elaboration is not otherwise specified in the semantics of this Report * 0 11381. and none of its direct descendents needs elaboration. * 0 11382. |pg||co|Thus the elaboration of the |b|reference-to-real-closed-clause|r| * 0 11383. (3.1.1.a) |i|(x |bec| 3.14)|r| is (and yields the same value as) * 0 11384. the elaboration of its constituent |b|reference-to-real-serial-clause|r| (3.2.1.a) * 0 11385. |i|x#|bec|#3.14|r|.|cc| * 0 11386. * 0 11387. |h|2.1.4.2. Serial and collateral actions * 0 11388. * 0 11389. |pb1||j|a)|tp1|An action may be "inseparable", "serial" or "collateral". * 0 11390. A serial or collateral action consists of one or more other actions, termed its * 0 11391. "direct actions". An inseparable action does not consist of other actions * 0 11392. |co|; what actions are inseparable is left undefined by this Report|cc|. * 0 11393. |pb1|b)|tp1|A "descendent action" of another action |w|B|r| is a direct * 0 11394. action either of |w|B|r|, or of a descendent action of |w|B|r|. * 0 11395. |pb1|c)|tp1|An action |w|A|r| is the "direct parent" of an action * 0 11396. |w|B|r| if |w|B|r| is a direct action |co|a|cc| of |w|A|r|. * 0 11397. |pb1|d)|tp1|The direct actions of a serial action |w|S|r| take place one after * 0 11398. the other; i.e., the completion |co|2.1.4.3.c,d|cc| of a direct action of |w|S|r| is * 0 11399. followed by the initiation |co|2.1.4.3.b,c|cc| of the next direct action, if any, * 0 11400. of |w|S|r|. |co|The elaboration of a scene, being in general composed of a sequence of * 0 11401. actions, is a serial action.|cc| * 0 11402. |pb1|e)|tp1|The direct actions of a collateral action are merged in time; * 0 11403. i.e., one of its descendent inseparable actions which, at that moment, is * 0 11404. "active" |co|2.1.4.3.a|cc| is chosen and carried out, upon the completion |co|2.1.4.3.c|cc| * 0 11405. of which another such action is chosen, and so on |co|until all are completed|cc|. * 0 11406. |pa|If two actions |co|collateral with each other|cc| have been said to be * 0 11407. "incompatible with" |co|10.2.4|cc| each other, then |co|they shall not be * 0 11408. merged; i.e.,|cc| no descendent inseparable action of the one * 0 11409. shall (then the one |co|if it is already inseparable|cc| shall not) be * 0 11410. chosen if, at that moment, the other is active and one or more, but not all, of its * 0 11411. descendent inseparable actions have already been completed; * 0 11412. otherwise, the method of choice is left undefined in this Report. * 0 11413. |pb1|f)|tp1|If one or more scenes are to be "elaborated * 0 11414. collaterally", then this elaboration is the collateral action * 0 11415. consisting of the |co|merged|cc| elaboration of those scenes. * 0 11416. * 0 11417. |h|2.1.4.3. Initiation, completion and termination * 0 11418. * 0 11419. |pb1||j|a)|tp1|An action is either "active" or "inactive". * 0 11420. |pg|An action becomes active when it is "initiated" |co|b,c|cc| or * 0 11421. "resumed" |co|g|cc| and it becomes inactive when it is "completed" |co|c,d|cc|, * 0 11422. "terminated" |co|e|cc|, "halted" |co|f|cc| or "interrupted" |co|h|cc|. * 0 11423. |pb1|b)|tp1|When a serial action is "initiated", * 0 11424. then the first of its direct actions is initiated. * 0 11425. When a collateral action is "initiated", then all of its * 0 11426. direct actions are initiated. * 0 11427. |pb1|c)|tp1|When an inseparable action is "initiated", it may then * 0 11428. be carried out |co|see 2.1.4.2.e|cc|, whereupon it is "completed". * 0 11429. |pb1|d)|tp1|A serial action is "completed" when its last direct action * 0 11430. has been completed. A collateral action is "completed" when all of * 0 11431. its direct actions have been completed. * 0 11432. |pb1|e)|tp1|When an action |w|A|r| |co|whether serial or collateral|cc| is * 0 11433. "terminated", then all of its direct actions |co|and hence all of its * 0 11434. descendent actions|cc| are terminated |co|whereupon another action * 0 11435. may be initiated in its place|cc|. * 0 11436. |co|Termination of * 0 11437. an action is brought about by the elaboration of a |b|jump|r| * 0 11438. (5.4.4.2).|cc| * 0 11439. |pb1|f)|tp1|When an action is "halted", then all of its active direct actions * 0 11440. |co|and hence all of its active descendent actions|cc| are halted. |co|An action * 0 11441. may be halted during a "calling" of the routine yielded by the * 0 11442. |b|operator|r| |i|DOWN|r| (10.2.4.d), whereupon it may subsequently * 0 11443. be resumed during a calling of the routine yielded by the |b|operator|r| * 0 11444. |i|UP|r| (10.2.4.e).|cc| * 0 11445. |pa|If, at any time, some action is halted and it is not descended from * 0 11446. a "process" of a "parallel action" |co|10.2.4|cc| of whose other process(es) * 0 11447. there still exist descendent active inseparable actions, then the further * 0 11448. elaboration is undefined. |co|Thus it is not defined that the elaboration * 0 11449. of the |b|collateral-clause|r| in * 0 11450. |e||n||p||ps||i|BEGIN SEMA sergei |uqe| LEVEL 0; * 0 11451. |pc|(PAR BEGIN (DOWN sergei; print (pokrovsky)), SKIP END, * 0 11452. |e|(read (pokrovsky); UP sergei)) * 0 11453. |p||ps|END|r| * 0 11454. |p||p||j|will ever be completed.|cc| * 0 11455. |pb1|g)|tp1|When an action |w|A|r| is "resumed", then those of its direct * 0 11456. actions which had been halted consequent upon the * 0 11457. halting of |w|A|r| are resumed. * 0 11458. |pb1|h)|tp1|An action may be "interrupted" by an event |co|e.g., * 0 11459. "overflow"|cc| not specified by the semantics of this Report but caused * 0 11460. by the computer if its limitations |co|2.2.2.b|cc| do not permit satisfactory * 0 11461. elaboration. When an action is interrupted, then all of its direct * 0 11462. actions, and possibly its direct parent also, are interrupted. * 0 11463. |co|Whether, after an interruption, that action is resumed, some other * 0 11464. action is initiated or the elaboration of the |b|program|r| ends, * 0 11465. is left undefined by this Report.|cc| * 0 11466. |pa||co|The effect of the definitions given above is as follows: * 0 11467. |pg|During the * 0 11468. elaboration of a |b|program|r| (2.2.2.a) the elaboration of its * 0 11469. |b|closed-clause|r| in the empty primal environ is active. At any given moment, * 0 11470. the elaboration of one scene may have called for the elaboration of * 0 11471. some other scene or of several other scenes collaterally. If and when * 0 11472. the elaboration of that other scene or scenes has * 0 11473. been completed, the next step of the elaboration of the original scene * 0 11474. is taken, and so on until it, in turn, is completed. * 0 11475. |pg|It will be seen that all this is analogous to the calling of * 0 11476. one subroutine by another; upon the completion of the execution of * 0 11477. the called subroutine, the execution of the calling subroutine is * 0 11478. continued; the semantic rules given in this Report for the elaboration * 0 11479. of the various paranotions correspond to the texts of the subroutines; * 0 11480. the semantic rules may even, in suitable circumstances, invoke * 0 11481. themselves recursively (but with a different construct or in a * 0 11482. different environ on each occasion). * 0 11483. |pg|Thus there exists, at each moment, a tree of active actions * 0 11484. descended (2.1.4.2.b) from the elaboration of the |b|program|r|.|cc| * 0 11485. * 0 11486. |h|2.1.5. Abbreviations * 0 11487. * 0 11488. |pa||j||co|In order to avoid some long and turgid phrases which would * 0 11489. otherwise have been necessary in the Semantics, certain abbreviations * 0 11490. are used freely throughout the text of this Report.|cc| * 0 11491. |pb1|a)|tp1|The phrase "the |w|A|r| of |w|B|r|", where |w|A|r| and |w|B|r| are * 0 11492. paranotions, stands for "the |w|A|r| which is a direct descendent * 0 11493. |co|1.1.3.2.f|cc| of |w|B|r|". * 0 11494. |pg||co|This permits the abbreviation * 0 11495. of "direct descendent of" to "of" or "its", e.g., in the * 0 11496. |b|assignation|r| (5.2.1.1.a) |i|i |bec| 1|r|, |i|i|r| is "its" * 0 11497. |b|destination|r| (or |i|i|r| is the, or a, |b|destination|r| "of" the * 0 11498. |b|assignation|r| |i|i |bec| 1|r|), whereas |i|i|r| is not a * 0 11499. |b|destination|r| of the |b|serial-clause|r| |i|i |bec| 1; j |bec| 2|r| * 0 11500. (although it is a constituent |b|destination|r| (1.1.4.2.d) of it).|cc| * 0 11501. |pb1|b)|tp1|The phrase "|w|C|r| in |w|E|r|", where |w|C|r| is a construct and |w|E|r| * 0 11502. is an environ, stands for "the scene composed |co|2.1.1.1.d|cc| of |w|C|r| * 0 11503. and |w|E|r|". It is sometimes even further shortened to just * 0 11504. "|w|C|r|" when it is clear which environ is meant. * 0 11505. |pg||co|Since the process of elaboration (2.1.4.1.a) may be applied only to scenes, * 0 11506. this abbreviation appears most frequently in forms such as * 0 11507. "A |b|loop-clause|r| |w|C|r|, in an environ |w|E1|r|, is elaborated#...#" * 0 11508. (3.5.2) and "An |b|assignation|r| |w|A|r| is elaborated#...#" * 0 11509. (5.2.1.2.a, where it is the elaboration of |w|A|r| in any appropriate * 0 11510. environ that is being discussed).|cc| * 0 11511. |pb1|c)|tp1|The phrase "the yield of |w|S|r|", where |w|S|r| is a scene whose * 0 11512. elaboration is not explicitly prescribed, stands for * 0 11513. "the yield obtained by initiating the elaboration of |w|S|r| and * 0 11514. awaiting its completion". * 0 11515. |pg||co|Thus the sentence (3.2.2.c): * 0 11516. |p||ps|"|w|W|r| is the yield of that |b|unit|r|;" * 0 11517. |p|(which also makes use of the abbreviation defined in b above) * 0 11518. is to be interpreted as meaning: * 0 11519. |p||ps|"|w|W|r| is the yield obtained upon the completion of the * 0 11520. elaboration, hereby initiated, of the scene composed of that |b|unit|r| and the * 0 11521. environ under discussion;"#.|cc| * 0 11522. |pb1|d)|tp1|The phrase "the yields of |w|S|s0|1|s1|, ...#, S|s0|n|s1||r|", where * 0 11523. |w|S|s0|1|s1|, ...#, S|s0|n|s1||r| are scenes whose elaboration is not explicitly * 0 11524. prescribed, stands for "the yields obtained by * 0 11525. initiating the collateral elaboration |co|2.1.4.2.f|cc| of |w|S|s0|1|s1|, * 0 11526. ...#, S|s0|n|s1||r| and awaiting its completion |co|which implies the * 0 11527. completion of the elaboration of them all|cc|". * 0 11528. |pg|If some or all of |w|S|s0|1|s1|, ...#, S|s0|n|s1||r| * 0 11529. are described as being, in some environ, certain constituents of some * 0 11530. construct, then their yields are to be considered as being taken in the * 0 11531. textual order |co|1.1.3.2.i|cc| of those constituents * 0 11532. within that construct. * 0 11533. |pg||co|Thus the sentence (3.3.2.b): * 0 11534. |p||ps|"let |w|V|s0|1|s1||r|, ...#, |w|V|s0|m|s1||r| be the |co|collateral|cc| yields * 0 11535. of the constituent |b|units|r| of |w|C|r|;" * 0 11536. |p|is to be interpreted as meaning: * 0 11537. |p||ps|"let |w|V|s0|1|s1||r|, ...#, |w|V|s0|m|s1||r| be the respective yields * 0 11538. obtained upon the completion of the collateral elaboration, hereby initiated, of * 0 11539. the scenes composed of the constituent |b|units|r| of |w|C|r|, * 0 11540. considered in their textual order, together with the environ * 0 11541. in which |w|C|r| was being elaborated;" .|cc| * 0 11542. |pb1|e)|tp1|The phrase "if |w|A|r| is |w|B|r|", where |w|A|r| and |w|B|r| are * 0 11543. hypernotions, stands for "if |w|A|r| is equivalent |co|2.1.1.2.a|cc| * 0 11544. to |w|B|r|". * 0 11545. |pg||co|Thus, in "Case#C: |b||ap|CHOICE|ap||r| is some |b||ap|choice using UNITED|ap||r|" * 0 11546. (3.4.2.b), it matters not whether |b||ap|CHOICE|ap||r| * 0 11547. happens to begin with |b||ap|choice using union of|ap||r| or with some * 0 11548. |b||ap|choice using MU#definition of union of|ap||r|.|cc| * 0 11549. |pb1|f)|tp1|The phrase "the mode is |w|A|r|", where |w|A|r| is a hypernotion, * 0 11550. stands for "the mode |co|is a class of |b||ap|MOID|ap||r|s which|cc| includes |w|A|r|". * 0 11551. |pg||co|This permits such shortened forms as "the mode is some |b||ap|structured * 0 11552. with FIELDS mode|ap||r|", "the mode begins with |b||ap|union of|ap||r|", and * 0 11553. "the mode envelops a |b||ap|FIELD|ap||r|"; in general, a mode may be * 0 11554. specified by quoting just one of the |b||ap|MOID|ap||r|s included in it.|cc| * 0 11555. |pb1|g)|tp1|The phrase "the value selected (generated) by the |b|field-selector|r| |w|F|r|" * 0 11556. stands for "if |w|F|r| is a |b|field-selector-? 0 11557. with-TAG|r| |co|4.8.1.f|cc|, then the value selected |co|2.1.3.3.a,e, 2.1.3.4.k|cc| * 0 11558. (generated |co|2.1.3.4.l|cc|) by that |b||ap|TAG|ap||r|". * 0 11559. * 0 11560. |h|2.2. The program * 0 11561. * 0 11562. |h|2.2.1. Syntax * 0 11563. * 0 11564. |pb1|a)|ts1||b|program : strong void new closed clause|co||r|31a|b||cc|.|r| * 0 11565. |p||co|See also 10.1.|cc| * 0 11566. * 0 11567. |h2|2.2.2. Semantics * 0 11568. * 0 11569. |pq||j||w||co|"I can explain all the poems that ever were * 0 11570. invented |mi| and a good many that haven|ap|t been invented just yet." * 0 11571. |ppp|Through the Looking-glass, * 0 11572. |p||pr|Lewis Carroll.|r||cc||qq| * 0 11573. |pb1|a)|tp1|The elaboration of a |b|program|r| is the elaboration of * 0 11574. its |b|strong-void-new-closed-clause|r| in an empty environ |co|2.1.1.1.c|cc| * 0 11575. termed the "primal environ". * 0 11576. |pg||co|Although the purpose of this Report is to define the meaning of a * 0 11577. |b|particular-program|r| |co|10.1.1.g|cc|, that meaning is established only by * 0 11578. first defining the meaning of a |b|program|r| in which that * 0 11579. |b|particular-program|r| is embedded (10.1.2).|cc| * 0 11580. |pa||co|In this Report, the syntax says which sequences of symbols * 0 11581. are terminal productions of |b||ap|program|ap||r|, * 0 11582. and the semantics which actions are performed by the computer * 0 11583. when elaborating a |b|program|r|. Both syntax and semantics are * 0 11584. recursive. Though certain sequences of symbols may be terminal * 0 11585. productions of |b||ap|program|ap||r| in more than one way (see also 1.1.3.2.f), this * 0 11586. syntactic ambiguity does not lead to a semantic ambiguity.|cc| * 0 11587. |pb1|b)|tp1|In ALGOL 68, a specific syntax for constructs is provided * 0 11588. which, together with its recursive definition, makes it possible to * 0 11589. describe and to distinguish between arbitrarily large production trees, * 0 11590. to distinguish between arbitrarily many different values of a given mode * 0 11591. (except certain modes like |b||ap|boolean|ap||r| and |b||ap|void|ap||r|) and to distinguish between * 0 11592. arbitrarily many modes, which allows arbitrarily many objects to exist within the * 0 11593. computer and which allows the elaboration of a |b|program|r| to involve * 0 11594. an arbitrarily large, not necessarily finite, number of actions. This is * 0 11595. not meant to imply that the notation of the objects in the computer is * 0 11596. that used in this Report nor that it has the same possibilities. * 0 11597. It is not assumed that these two * 0 11598. notations are the same nor even that a one-to-one correspondence exists * 0 11599. between them; in fact, the set of different notations of objects of a * 0 11600. given category may be finite. * 0 11601. It is not assumed that the computer can handle arbitrary * 0 11602. amounts of presented information. * 0 11603. It is not assumed that the speed of the * 0 11604. computer is sufficient to elaborate a given |b|program|r| within a * 0 11605. prescribed lapse of time, nor that the number of objects and relationships * 0 11606. that can be established is sufficient to elaborate it at all. * 0 11607. |pb1|c)|tp1|A model of the hypothetical computer, using a physical * 0 11608. machine, is said to be an "implementation" of ALGOL 68 if it does not * 0 11609. restrict the use of the language in other respects than those mentioned * 0 11610. above. Furthermore, if a language |w|A|r| is defined whose * 0 11611. |b|particular-programs|r| are also |b|particular-programs|r| of a language |w|B|r|, and * 0 11612. if each such |b|particular-program|r| for which a meaning is defined in |w|A|r| has the same * 0 11613. defined meaning in |w|B|r|, then |w|A|r| is said to be * 0 11614. a "sublanguage" of |w|B|r|, and |w|B|r| a "superlanguage" of |w|A|r|. * 0 11615. |pg||co|Thus a sublanguage of ALGOL 68 might be defined by omitting some * 0 11616. part of the syntax, by omitting some part of the |b|standard-prelude|r|, * 0 11617. and/or by leaving undefined something which is defined in this Report, * 0 11618. so as to enable more efficient solutions to certain classes of * 0 11619. problem or to permit implementation on smaller machines. * 0 11620. |pg|Likewise, a superlanguage of ALGOL 68 might be defined by * 0 11621. additions to the syntax, semantics or |b|standard-prelude|r|, * 0 11622. so as to improve efficiency (by allowing the user to provide * 0 11623. additional information) or to permit the solution of problems * 0 11624. not readily amenable to ALGOL 68.|cc| * 0 11625. |pg|A model is said to be an implementation of a sublanguage if it * 0 11626. does not restrict the use of the sublanguage in other respects than * 0 11627. those mentioned above. * 0 11628. |pg||co|See 9.3.c for the term "implementation of the reference language".|cc| * 0 11629. |pa||co|A sequence of |b|symbols|r| which is not a |b|particular-program|r| but can be * 0 11630. turned into one by deleting or inserting a certain number of |b|symbols|r| and * 0 11631. not a smaller number could be regarded as a |b|particular-program|r| with that * 0 11632. number of syntactical errors. Any |b|particular-program|r| that can be obtained by * 0 11633. deleting or inserting that number of symbols may be termed a "possibly * 0 11634. intended" |b|particular-program|r|. Whether a |b|particular-program|r| or one of the possibly * 0 11635. intended |b|particular-programs|r| has the effect its author in fact intended it to * 0 11636. have is a matter which falls outside this Report.|cc| * 0 11637. |pa||co|In an implementation, the |b|particular-program|r| may be * 0 11638. "compiled", i.e., translated into an "object program" in the code of the * 0 11639. physical machine. Under certain circumstances, it may be advantageous to * 0 11640. compile parts of the |b|particular-program|r| independently, e.g., parts * 0 11641. which are common to several |b|particular-programs|r|. If such a part * 0 11642. contains |b|applied-indicators|r| which identify |b|defining-indicators|r| * 0 11643. not contained in that part, then compilation into an * 0 11644. efficient object program may be assured by preceding the part by a sequence * 0 11645. of |b|declarations|r| containing those |b|defining-indicators|r|.|cc| * 0 11646. |pa||co|The definition of specific sublanguages and also the specification * 0 11647. of actions not definable by any |b|program|r| (e.g., compilation or * 0 11648. initiation of the elaboration) is not given in this Report. * 0 11649. See, however, 9.2 for the suggested use of |b|pragmats|r| to * 0 11650. control such actions.|cc| * 0 20000. |np||e||e||c|PART#II|nc| * 0 20001. * 0 20002. |h||c|Fundamental Constructions |nc| * 0 20003. * 0 20004. |e||j||pa||co|This part presents the essential structure of |b|programs|r|: * 0 20005. |et|the general rules for constructing them; * 0 20006. |et|the ways of defining |b|indicators|r| and * 0 20007. their properties, at each new level of construction; * 0 20008. |et|the constructs available for programming primitive * 0 20009. actions.|cc| * 0 20010. * 0 20011. |h|3. |bs|Clauses|rs| * 0 20012. * 0 20013. |pa||j||co|Clauses provide * 0 20014. |et|a hierarchical structure for |b|programs|r|, * 0 20015. |et|the introduction of new |b|ranges|r| of definitions, * 0 20016. |et|serial or collateral composition, * 0 20017. parallelism, choices and loops.|cc| * 0 20018. * 0 20019. |h1|3.0.1. Syntax * 0 20020. * 0 20021. |pb1|a)|ts1||star||b|phrase : SOME unit|co||r|32d|b||cc| ; NEST declaration of DECS|co||r|41a|b||cc|.|r|? 0 20022. |p1|b)|ts1||star||b|SORT MODE expression : SORT MODE NEST UNIT|co||r|5A|b||cc|.|r| * 0 20023. |p1|c)|ts1||star||b|statement : strong void NEST UNIT|co||r|5A|b||cc|.|r| * 0 20024. |p1|d)|ts1||star||b|MOID constant : MOID NEST DEFIED identifier with TAG|co||r|48a,b|b||cc| ; * 0 20025. MOID NEST denoter|co||r|80a|b||cc|.|r| * 0 20026. |p1|e)|ts1||star||b|MODE variable : * 0 20027. reference to MODE NEST DEFIED identifier with TAG|co||r|48a,b|b||cc|.|r| * 0 20028. |p1|f)|ts1||star||b|NEST range : SOID NEST serial clause defining LAYER|co||r|32a|b||cc| ; * 0 20029. SOID NEST chooser CHOICE STYLE clause|co||r|34b|b||cc| ; * 0 20030. SOID NEST case part of choice using UNITED|co||r|34i|b||cc| ; * 0 20031. NEST STYLE repeating part with DEC|co||r|35e|b||cc| ; * 0 20032. NEST STYLE while do part|co||r|35f|b||cc| ; * 0 20033. PROCEDURE NEST routine text|co||r|541a,b|b||cc|.|r| * 0 20034. |j||pa||co||b|NEST-ranges|r| arise in the definition of "identification" (7.2.2.b).|cc| * 0 20035. * 0 20036. |h|3.0.2. Semantics * 0 20037. * 0 20038. |pa||j|A "nest" is a |b||ap|NEST|ap||r|. The nest "of" a construct is the |b||ap|NEST|ap||r| enveloped by the * 0 20039. original of that construct, but not by any |b||ap|defining LAYER|ap||r| contained in that * 0 20040. original. * 0 20041. |pa||co|The nest of a construct carries a record of all the |b|declarations|r| * 0 20042. forming the environment in which that construct is to be interpreted. * 0 20043. |pg|Those constructs which are contained in a |b|range|r| |w|R|r|, but not in * 0 20044. any smaller |b|range|r| contained within |w|R|r|, may be said to comprise a "reach". * 0 20045. All constructs in a given reach have the same nest, which is that of the immediately * 0 20046. surrounding reach with the addition of one extra |b||ap|LAYER|ap||r|. * 0 20047. The syntax ensures (3.2.1.b, 3.4.1.i,j,k, 3.5.1.e, 5.4.1.1.b) that * 0 20048. each |b||ap|PROP|ap||r| (4.8.1.E) or "property" in the extra |b||ap|LAYER|ap||r| is matched by a * 0 20049. |b|defining-indicator|r| (4.8.1.a) contained in a |b|definition|r| in that reach.|cc| * 0 20050. * 0 20051. |h|3.1. Closed clauses * 0 20052. * 0 20053. |pa||j||co||b|Closed-clauses|r| are usually used to construct * 0 20054. |b|units|r| from |b|serial-clauses|r| as, e.g., * 0 20055. |e||i|(REAL x; read#(x); x)|r| in? 0 20056. |e||i|(REAL x; read (x); x) + 3.14|r|.|cc| * 0 20057. * 0 20058. |h1|3.1.1. Syntax * 0 20059. * 0 20060. |pb1|A)|ts1||b|SOID :: SORT MOID.|r|? 0 20061. |p1|B)|ts1||b|PACK :: STYLE pack.|r|? 0 20062. |pb1|a)|ts1||b|SOID NEST closed clause|co||r|22a,5D,551a,A341h,A349a|b||cc| : * 0 20063. SOID NEST serial clause defining LAYER|co||r|32a|b||cc| PACK.|r| * 0 20064. |p||ps||co||b|LAYER :: new DECSETY LABSETY.|r||cc| * 0 20065. |exx||co|Example:? 0 20066. |ex|a) |i|BEGIN x#|bec|#1; y#|bec|#2 END|r|#|cc|? 0 20067. |pa||j||co|The yield of a |b|closed-clause|r| is that of its constituent * 0 20068. |b|serial-clause|r|, by way of pre-elaboration (2.1.4.1.c).|cc| * 0 20069. * 0 20070. |h|3.2. Serial clauses * 0 20071. * 0 20072. |pa||j||co|The purposes of |b|serial-clauses|r| are * 0 20073. |et|the construction of new |b|ranges|r| of definitions, and * 0 20074. |et|the serial composition of actions. * 0 20075. |pg|A |b|serial-clause|r| consists of a possibly empty sequence of * 0 20076. unlabelled |b|phrases|r|, the last of which, if any, is a |b|declaration|r|, followed * 0 20077. by a sequence of possibly labelled |b|units|r|. * 0 20078. The |b|phrases|r| and the |b|units|r| are separated by |b|go-on-tokens|r|, viz., semicolons. * 0 20079. Some of the |b|units|r| may instead be separated by |b|completers|r|, * 0 20080. viz., |i|EXIT|r|s; after a |b|completer|r|, the next * 0 20081. |b|unit|r| must be labelled so that it can be reached. * 0 20082. The value of the final |b|unit|r|, or of a |b|unit|r| preceding an |i|EXIT|r|, * 0 20083. determines the value of the |b|serial-clause|r|. * 0 20084. |pg|For example, the following |b|serial-clause|r| yields |w|true|r| if * 0 20085. and only if the vector |i|a|r| contains the integer |w|8|r|: * 0 20086. |xh||i|INT n; read (n); * 0 20087. |e||so|1 : n|sc| INT a; read (a); * 0 20088. |e|FOR i TO n DO IF a |so|i|sc| |uqe| 8 THEN GOTO success FI OD; * 0 20089. |e|FALSE EXIT * 0 20090. |e|success|lbl| TRUE |r|.|cc|? 0 20091. * 0 20092. |h1|3.2.1. Syntax * 0 20093. * 0 20094. |pb1|a)|ts1||b|SOID NEST serial clause defining$#new PROPSETY|co||r|31a,34f,l,35h|b||cc| : * 0 20095. SOID NEST new PROPSETY series with PROPSETY|co||r|b|b||cc|. * 0 20096. |p||ts1||co||r|Here |b|PROPSETY :: DECSETY LABSETY.|r||cc|? 0 20097. |p1|b)|ts1||b|SOID NEST series with PROPSETY|co||r|a,b,34c|b||cc| : * 0 20098. |e|strong void NEST unit|co||r|d|b||cc|, go on|co||r|94f|b||cc| token, * 0 20099. SOID NEST series with PROPSETY|co||r|b|b||cc| ; * 0 20100. where (PROPSETY) is (DECS DECSETY LABSETY), * 0 20101. NEST declaration of DECS|co||r|41a|b||cc|, * 0 20102. go on|co||r|94f|b||cc| token, SOID NEST series with DECSETY LABSETY|co||r|b|b||cc| ; * 0 20103. where (PROPSETY) is (LAB LABSETY), * 0 20104. NEST label definition of LAB|co||r|c|b||cc|, * 0 20105. SOID NEST series with LABSETY|co||r|b|b||cc| ; * 0 20106. where (PROPSETY) is (LAB LABSETY)$#? 0 20107. and SOID balances SOID1 and SOID2|co||r|e|b||cc|, * 0 20108. SOID1 NEST unit|co||r|d|b||cc|, completion|co||r|94f|b||cc| token, * 0 20109. NEST label definition of LAB|co||r|c|b||cc|, * 0 20110. SOID2 NEST series with LABSETY|co||r|b|b||cc| ; * 0 20111. |e|where (PROPSETY) is (EMPTY), * 0 20112. |e|SOID NEST unit|co||r|d|b||cc|.|r| * 0 20113. |p1|c)|ts1||b|NEST label definition of label TAG|co||r|b|b||cc| :? 0 20114. label NEST defining identifier with TAG|co||r|48a|b||cc|, label|co||r|94f|b||cc| token.|r| * 0 20115. |p1|d)|ts1||b|SOME unit|co||r|b,33b,g,34i,35d,46m,n,521c,532e,541a,b,543c,A34Ab,c,d|b||cc| : * 0 20116. SOME UNIT|co||r|5A,|mi||b||cc|.|r| * 0 20117. |pb1|e)|ts1||b|WHETHER SORT MOID balances$#SORT1 MOID1 and SORT2 MOID2|co||r|b,33b,34d,h|b||cc| : * 0 20118. WHETHER SORT balances SORT1 and SORT2|co||r|f|b||cc|$#and * 0 20119. MOID balances MOID1 and MOID2|co||r|g|b||cc|.|r| * 0 20120. |p1|f)|ts1||b|WHETHER SORT balances$#SORT1 and SORT2|co||r|e,522a|b||cc| : * 0 20121. where (SORT1) is (strong), WHETHER (SORT2) is (SORT) ; * 0 20122. where (SORT2) is (strong), WHETHER (SORT1) is (SORT).|r| * 0 20123. |p1|g)|ts1||b|WHETHER MOID balances MOID1 and MOID2|co||r|e|b||cc| : * 0 20124. where (MOID1) is (MOID2), WHETHER (MOID) is (MOID1) ; * 0 20125. where (MOID1) is (transient MOID2), WHETHER (MOID) is (MOID1) ; * 0 20126. where (MOID2) is (transient MOID1), WHETHER (MOID) is (MOID2).|r| * 0 20127. |pb1|h)|ts1||star||b|SOID unitary clause : SOID NEST unit|co||r|d|b||cc|.|r| * 0 20128. |p1|i)|ts1||star||b|establishing clause : * 0 20129. SOID NEST serial clause defining LAYER|co||r|32a|b||cc| ;? 0 20130. MODE NEST enquiry clause defining LAYER|co||r|34c|b||cc|.|r|? 0 20131. |w5||exx||co|Examples: * 0 20132. |ex|b) |pl||i|read (x1); REAL s |bec| 0;? 0 20133. |p||pm|sum|lbl| FOR i TO n DO * 0 20134. (x1#|so|i|sc| |sgt| 0 |#s +|bec|#x1 |so|i|sc| |#nonpos)#OD#EXIT * 0 20135. |p||pm|nonpos|lbl| print (s)|qs| * 0 20136. |ptwo||pl|REAL s |bec| 0; * 0 20137. |p||pm|sum|lbl| FOR i TO n DO * 0 20138. (x1#|so|i|sc| |sgt| 0 |#s +|bec| x1#|so|i|sc| |#nonpos)#OD EXIT * 0 20139. |p||pm|nonpos|lbl| print (s)|qs| * 0 20140. |ptwo||pl|sum|lbl| FOR i TO n DO * 0 20141. (x1#|so|i|sc| |sgt| 0 |#s +|bec| x1#|so|i|sc| |#nonpos)#OD#EXIT * 0 20142. |p||pm|nonpos|lbl| print (s)|qs| * 0 20143. |ptwo||pl|FOR i TO n DO (x1#|so|i|sc| |sgt| 0 |#s +|bec| x1#|so|i|sc| |#nonpos)#OD#EXIT * 0 20144. |p||pm|nonpos|lbl| print (s)|qs| * 0 20145. |ptwo||pl|print (s) |r| * 0 20146. |ey|c) |i|sum|lbl||r| * 0 20147. |ez|d) |i|print (s)|r|#|cc| * 0 20148. |pa||j||co|Often, a |b|series|r| must be "balanced" (3.2.1.e). For remarks concerning * 0 20149. balancing, see 3.4.1.|cc| * 0 20150. * 0 20151. |h|3.2.2. Semantics? 0 20152. * 0 20153. |pb1||j|a)|tp1|The yield of a |b|serial-clause|r|, in an environ |w|E|r|, is the yield of the * 0 20154. elaboration of its |b|series|r|, or of any |b|series|r| elaborated "in its place" |co|5.4.4.2|cc|, * 0 20155. in the environ "established" |co|b|cc| around |w|E|r| according to that |b|serial-clause|r|; * 0 20156. it is required that the yield be not newer in scope than |w|E|r|. * 0 20157. |pb|b)|pv|The environ |w|E|r| "established" |et|upon an environ |w|E1|r|, possibly not specified, * 0 20158. |co|which determines its scope,|cc| * 0 20159. |et|around an environ |w|E2|r| |co|which determines its composition|cc|, * 0 20160. |et|according to a |b|NOTION-defining-new-PROPSETY|r| |w|C|r|, possibly absent, * 0 20161. |co|which prescribes its locale,|cc| * 0 20162. |et|with values |w|V|s0|1|s1|,#...#,#V|s0|n|s1||r|, possibly absent, * 0 20163. |co|which are possibly to be ascribed,|cc| * 0 20164. |p|is determined as follows: * 0 20165. |et|if |w|E1|r| is not specified, then let |w|E1|r| be |w|E2|r|; * 0 20166. |et||w|E|r| is newer in scope than |w|E1|r| and is composed of |w|E2|r| and a new locale * 0 20167. corresponding to |b||ap|PROPSETY|ap||r|, if |w|C|r| is present, and to |b||ap|EMPTY|ap||r| otherwise; * 0 20168. |pi|Case#A: |w|C|r| is an |b|establishing-clause|r|: * 0 20169. |ph|For each constituent |b|mode-definition|r| |w|M|r|, if any, of |w|C|r|, * 0 20170. |et|the scene composed of * 0 20171. |pha12|(i)|thb2|the |b|actual-declarer|r| of |w|M|r|, and * 0 20172. |pha22|(ii)|thb2|the environ necessary for |co|7.2.2.c|cc| that |b|actual-declarer|r| in |w|E|r|, * 0 20173. |xh|is ascribed in |w|E|r| to the |b|mode-indication|r| of |w|M|r|; * 0 20174. |ph|For each constituent |b|label-definition|r| |w|L|r|, if any, of |w|C|r|, * 0 20175. |et|the scene composed of * 0 20176. |pha12|(i)|thb2|the |b|series|r| of which |w|L|r| is a direct descendent, and * 0 20177. |pha21|(ii)|thb1|the environ |w|E|r|, * 0 20178. |xh|is ascribed in |w|E|r| to the |b|label-identifier|r| of |w|L|r|; * 0 20179. |ph|If each |b||ap|PROP|ap||r| * 0 20180. enveloped by |b||ap|PROPSETY|ap||r| is some |b||ap|DYADIC TAD|ap||r| or |b||ap|label TAG|ap||r|,? 0 20181. |ph|then |w|E|r| is said to be "nonlocal" |co|see 5.2.3.2.b|cc|; * 0 20182. |pi|Case#B: |w|C|r| is a |b|declarative|r|, a |b|for-part|r| or * 0 20183. a |b|specification|r|: * 0 20184. |ph|For |w|i#|uqe|#1,#...#,#n|r|, * 0 20185. where |w|n|r| is the number of |b||ap|DEC|ap||r|s enveloped by |b||ap|PROPSETY|ap||r|, * 0 20186. |et||w|V|s0|i|s1||r| is ascribed |co|4.8.2.a|cc| in |w|E|r| to the |w|i|r||hy|th * 0 20187. constituent |b|defining-identifier|r|, if any, of |w|C|r| * 0 20188. and, otherwise |co|in the case of an invisible |b|for-part|r||cc|, to an * 0 20189. |b|integral-defining-indicator-with-letter-aleph|r|; * 0 20190. |ph|If |w|C|r| is a |b|for-part|r| or a |b|specification|r|, * 0 20191. |ph|then |w|E|r| is nonlocal. * 0 20192. |pi||co|Other cases, i.e., when |w|C|r| is absent: * 0 20193. |et||w|E|r| is local (see 5.2.3.2.b), but not further defined.|cc| * 0 20194. |pb1|c)|tp1|The yield |w|W|r| of a |b|series|r| |w|C|r| is determined as follows: * 0 20195. |pi|If |w|C|r| contains a direct descendent |b|unit|r| which is not followed * 0 20196. by a |b|go-on-token|r|, * 0 20197. |pi|then * 0 20198. |et||w|W|r| is the yield of that |b|unit|r|; * 0 20199. |pi|otherwise, * 0 20200. |et|the |b|declaration|r| or the |b|unit|r|, if any, of |w|C|r| is elaborated; * 0 20201. |et||w|W|r| is the yield of the |b|series|r| of |w|C|r|. * 0 20202. |pi||co|See also 5.4.4.2.Case#A.|cc|? 0 20203. * 0 20204. |h|3.3. Collateral and parallel clauses * 0 20205. * 0 20206. |pa||j||co||b|Collateral-clauses|r| allow an arbitrary merging of streams * 0 20207. of actions. |b|Parallel-clauses|r| provide, moreover, levels of coordination * 0 20208. for the synchronization (10.2.4) of that merging. * 0 20209. |pg|A |b|collateral-|r| or |b|parallel-clause|r| consists of a * 0 20210. sequence of |b|units|r| separated by |b|and-also-symbols|r| (viz., |i|","|r|), and is enclosed * 0 20211. by parentheses or by a |i|BEGIN|r|-|i|END|r| pair; a |b|parallel-clause|r| * 0 20212. begins moreover with |i|PAR|r|. * 0 20213. |pg||b|Collateral-clauses|r|, but not |b|parallel-clauses|r|, may yield * 0 20214. stowed values composed from the yields of the constituent |b|units|r|. * 0 20215. |p|Examples of |b|collateral-clauses|r| yielding stowed values: * 0 20216. |xi||i||so||thin||sc| INT q |uqe| (1, 4, 9, 16, 25); * 0 20217. |e|STRUCT (INT price, STRING category) bike |bec| (150, "sport")|r|. * 0 20218. |p|Example of a |b|parallel-clause|r| which synchronizes eating and speaking: * 0 20219. |n||p||ps||i|PROC VOID eat, speak; SEMA mouth |uqe| LEVEL 1; * 0 20220. |p||ps|PAR BEGIN * 0 20221. |pc|DO * 0 20222. |e|DOWN mouth; * 0 20223. |e|eat; * 0 20224. |e|UP mouth * 0 20225. |pc|OD, * 0 20226. |pc|DO * 0 20227. |e|DOWN mouth; * 0 20228. |e|speak; * 0 20229. |e|UP mouth * 0 20230. |xs|OD * 0 20231. |p||ps|END|r|#.|cc| * 0 20232. * 0 20233. |h1|3.3.1. Syntax * 0 20234. * 0 20235. |pb1|a)|ts1||b|strong void NEST collateral clause|co||r|5D,551a|b||cc| : * 0 20236. |e|strong void NEST joined portrait|co||r|b|b||cc| PACK.|r| * 0 20237. |p1|b)|ts1||b|SOID NEST joined portrait|co||r|a,b,c,d,34g|b||cc| :? 0 20238. where SOID balances SOID1 and SOID2|co||r|32e|b||cc|, * 0 20239. SOID1 NEST unit|co||r|32d|b||cc|, * 0 20240. and also|co||r|94f|b||cc| token, SOID2 NEST unit|co||r|32d|b||cc|$#? 0 20241. or alternatively SOID2 NEST joined portrait|co||r|b|b||cc|.|r|? 0 20242. |p1|c)|ts1||b|strong void NEST parallel clause|co||r|5D,551a|b||cc| : * 0 20243. |e|parallel|co||r|94f|b||cc| token, strong void NEST joined portrait|co||r|b|b||cc| PACK.|r|? 0 20244. |p1|d)|ts1||b|strong ROWS of MODE NEST collateral clause|co||r|5D,551a|b||cc| : * 0 20245. where (ROWS) is (row), strong MODE NEST joined portrait|co||r|b|b||cc| PACK ; * 0 20246. where (ROWS) is (row ROWS1), strong ROWS1 of MODE NEST joined portrait|co||r|b|b||cc| PACK ;? 0 20247. EMPTY PACK.|r|? 0 20248. |p1|e)|ts1||b|strong structured with$#FIELDS FIELD mode NEST * 0 20249. collateral clause|co||r|5D,551a|b||cc| : NEST FIELDS FIELD portrait|co||r|f|b||cc| PACK.|r| * 0 20250. |p1|f)|ts1||b|NEST FIELDS FIELD portrait|co||r|e,f|b||cc| : * 0 20251. |e|NEST FIELDS portrait|co||r|f,g|b||cc|, and also|co||r|94f|b||cc| * 0 20252. token, NEST FIELD portrait|co||r|g|b||cc|.|r| * 0 20253. |p||ps||co||b|FIELD :: MODE field TAG.|r||cc| * 0 20254. |p1|g)|ts1||b|NEST MODE field TAG portrait|co||r|f|b||cc| : * 0 20255. strong MODE NEST unit|co||r|32d|b||cc|.|r| * 0 20256. |pb1|h)|ts1||star||b|structure display : strong structured with$#FIELDS * 0 20257. FIELD mode NEST collateral clause|co||r|e|b||cc|.|r| * 0 20258. |p1|i)|ts1||star||b|row display : strong ROWS of MODE NEST collateral clause|co||r|d|b||cc|.|r| * 0 20259. |p1|j)|ts1||star||b|display : strong STOWED NEST collateral clause|co||r|d,e|b||cc|.|r|? 0 20260. |p1|k)|ts1||star||b|vacuum : EMPTY PACK.|r| * 0 20261. |w5||exx||co|Examples: * 0 20262. |ex|a) |i|(x |bec| 1, y |bec| 2)|r|? 0 20263. |ez|b) |i|x |bec| 1, y |bec| 2 |r|? 0 20264. |ey|c) |i|PAR (task1, task2)|r|? 0 20265. |ez|d) |i|(1, 2) |r|(in |i||so||thin||sc| REAL (1, 2)|r|)? 0 20266. |ey|e) |i|(1, 2) |r|(in |i|COMPL (1, 2)|r|)? 0 20267. |ez|f) |i|1, 2|r|? 0 20268. |ey|g) |i|1 |r||cc|? 0 20269. |j||pa||co||b|Structure-displays|r| must contain at least two |b|FIELD-portraits|r|, * 0 20270. for, otherwise, in the reach of * 0 20271. |xh||i|MODE M |uqe| STRUCT (REF M m); M nobuo, yoneda;|r|, * 0 20272. |p|the |b|assignation|r| |i|nobuo |bec| (yoneda)|r| would be syntactically * 0 20273. ambiguous and could produce different effects; however, |i|m OF nobuo * 0 20274. |bec| yoneda|r| is unambiguous. * 0 20275. |pg||b|Row-displays|r| contain zero, two or more constituent |b|units|r|. * 0 20276. It is also possible to present a single value as a multiple value, * 0 20277. e.g., |i||so|1 : 1|sc| INT v |bec| 123|r|, but this uses a * 0 20278. coercion known as rowing (6.6).|cc| * 0 20279. * 0 20280. |h|3.3.2. Semantics * 0 20281. * 0 20282. |pb1||j|a)|tp1|The elaboration of a |b|void-collateral-clause|r| or |b|void-parallel-clause|r| * 0 20283. consists of the collateral elaboration of its constituent |b|units|r| * 0 20284. and yields |w|empty|r|. * 0 20285. |pb1|b)|tp1|The yield |w|W|r| of a |b|STOWED-collateral-clause|r| |w|C|r| * 0 20286. is determined as follows: * 0 20287. |e|If the direct descendent of |w|C|r| is a |b|vacuum|r|, * 0 20288. |pi|then |co||b||ap|STOWED|ap||r| is some |b||ap|ROWS of MODE|ap||r| * 0 20289. and|cc| each bound pair in the descriptor of |w|W|r| is |w|(1, 0)|r| * 0 20290. |co|and it has one ghost element whose value is irrelevant|cc|; * 0 20291. |pi|otherwise, * 0 20292. |et|let |w|V|s0|1|s1|,#...#,#V|s0|m|s1||r| be the |co|collateral|cc| yields of * 0 20293. the constituent |b|units|r| of |w|C|r|; * 0 20294. |ph|Case#A: |b||ap|STOWED|ap||r| is some |b||ap|structured with FIELDS mode|ap||r|: * 0 20295. |et|the fields of |w|W|r|, taken in order, * 0 20296. are |w|V|s0|1|s1|,#...#,#V|s0|m|s1||r|;? 0 20297. |ph|Case#B: |b||ap|STOWED|ap||r| is some |b||ap|row of MODE1|ap||r|: * 0 20298. |et||w|W|r| is composed of * 0 20299. |pha12|(i)|thb2|a descriptor |w|((1,m))|r|, * 0 20300. |pha22|(ii)|thb2||w|V|s0|1|s1|,#...#,#V|s0|m|s1||r|;? 0 20301. |ps|For |w|i#|uqe|#1,#...#,#m|r|, * 0 20302. |et|the element selected by the index |w|(i)|r| in |w|W|r| is |w|V|s0|i|s1||r|; * 0 20303. |ph|Case#C: |b||ap|STOWED|ap||r| is some |b||ap|row ROWS of MODE2|ap||r|: * 0 20304. |et|it is required that * 0 20305. the descriptors of |w|V|s0|1|s1|,#...#,#V|s0|m|s1||r| be identical;? 0 20306. |et||n|let the descriptor of |co|say|cc| |w|V|s0|1|s1||r| be * 0 20307. |ef||w|((l|s0|1|s1|,#u|s0|1|s1|),#...#,#(l|s0|n|s1|,#u|s0|n|s1|))|r|;# * 0 20308. |et||w|W|r| is composed of * 0 20309. |pha12|(i)|thb2|a descriptor * 0 20310. |w|((1,#m),#(l|s0|1|s1|,#u|s0|1|s1|),#...#,#(l|s0|n|s1|,#u|s0|n|s1|))|r|;? 0 20311. |pha22|(ii)|thb2|the elements of |w|V|s0|1|s1|,#...#,#V|s0|m|s1||r|;? 0 20312. |xh|For |w|i#|uqe|#1,#...#,#m|r|, * 0 20313. |xs||bt|the element selected by an index? 0 20314. |w|(i,#i|s0|1|s1|,#...#,#i|s0|n|s1|)|r| in |w|W|r| * 0 20315. is that selected by |w|(i|s0|1|s1|,#...#,#i|s0|n|s1|)|r| in |w|V|s0|i|s1||r|.? 0 20316. |pa||co|Note that in |i||so|#,#,#|sc| CHAR block |uqe| ("abc", "def")|r|, * 0 20317. the descriptor of the three-dimensional yield |w|W|r| will be |w|((1,#2), (1,#1), (1,#3))|r|, * 0 20318. since the |b|units|r| |i|"abc"|r| and |i|"def"|r| are first rowed (6.6), * 0 20319. so that |w|V|s0|1|s1||r| and |w|V|s0|2|s1||r| have descriptors * 0 20320. |w|((1,#1), (1,#3))|r|.|cc| * 0 20321. * 0 20322. |h|3.4. Choice clauses * 0 20323. * 0 20324. |pa||j||co||b|Choice-clauses|r| enable a dynamic choice to be made * 0 20325. among different paths in a computation. * 0 20326. The choice among the alternatives (the |b|in|hy|CHOICE|hy||r| and the |b|out|hy|CHOICE|hy|clause|r|) is * 0 20327. determined by the * 0 20328. success or failure of a test on a truth value, on an integer or on a mode. * 0 20329. The value under test is computed by an |b|enquiry-clause|r| before the choice is made.? 0 20330. |pa|A |b|choice-using-boolean-clause|r| (or |b|conditional-clause|r|) is * 0 20331. of the form * 0 20332. |n||p|#######|i|(#x#|sgt|#0#|#x#|#0#)|r| in the "brief" style, or * 0 20333. |p|#######|i|IF#x#|sgt|#0#THEN#x#ELSE#0#FI|r| in the "bold" style; * 0 20334. |p||j||i|x#|sgt|#0|r| is the |b|enquiry-clause|r|, |i|THEN x|r| is the * 0 20335. |b|in-CHOICE-clause|r| and |i|ELSE 0|r| is the * 0 20336. |b|out-CHOICE-clause|r|; all three may have the syntactical structure of a |b|series|r|,? 0 20337. because all |b|choice-clauses|r| are well closed. * 0 20338. A |b|choice-using-boolean-clause|r| may also be reduced to * 0 20339. |n||p|#######|i|(#x#|lt|#0#| x#|bec|#|mi|x#)|r| * 0 20340. or |p|#######|i|IF#x#|lt|#0 THEN#x#|bec|#|mi|x#FI|r|; * 0 20341. |p||j| the omitted |b|out-CHOICE-clause|r| is then * 0 20342. understood to be an |i|ELSE#SKIP|r|. On the other hand,? 0 20343. the choice can be reiterated by writing * 0 20344. |n||p|#######|i|(#x |sgt| 0#|#1 + x#|:#x |lt| 0#|#1 |mi| x#|#1#)|r| * 0 20345. or |p|#######|i|IF#x |sgt| 0#THEN#1 + x#ELIF#x |lt| 0#THEN#1 |mi| x#ELSE#1#FI|r|, * 0 20346. |p| and so on; this is to be understood as * 0 20347. |p|#######|i|(#x |sgt| 0#|#1 + x#|#(#x |lt| 0#|#1 |mi| x#|#1#))|r|. * 0 20348. |pa||j||b|CASE-clauses|r|, which define choices depending on an integer or on a mode, * 0 20349. are different in that the * 0 20350. |b|in-CASE-clause|r| is * 0 20351. further decomposed into |b|units|r|. * 0 20352. The general pattern is * 0 20353. |n||p|#######|i|(#---#|#---#,#...#,#---#|#---#)|r| * 0 20354. or |p|#######|i|CASE#---#IN#---#,#...#,#---#OUT#---#ESAC|r|. * 0 20355. |p||j| The choice may also be reiterated by use * 0 20356. of |i|OUSE|r|. * 0 20357. |pa||j|In a |b|choice-using-integral-clause|r| (or |b|case-clause|r|), * 0 20358. the parts are simply |b|units|r| and there must be at least two of them; * 0 20359. the choice among the |b|units|r| follows their textual ordering. * 0 20360. |p|Example: * 0 20361. |xh||i|PROC VOID work, relax, enjoy; * 0 20362. |e|CASE INT day; read (day); day * 0 20363. |e|IN work, work, work, work, work, relax, enjoy * 0 20364. |e|OUT print ((day, "is not in the week")) |e|ESAC|r|. * 0 20365. |pa|In a |b|choice-using-UNITED-clause|r| (or |b|conformity-clause|r|), which tests modes, * 0 20366. each |b|case-part-of-CHOICE|r| is of the form |i|(DECLARER identifier) : unit|r| * 0 20367. or |i|(DECLARER) : unit|r|. * 0 20368. The mode specified by the |b|declarer|r| is compared with the mode * 0 20369. of the value under test; the |b|identifier|r|, if present, is available inside the |b|unit|r| to * 0 20370. access that value, with the full security of syntactical mode checking. * 0 20371. The |b||ap|UNITED|ap||r| mode * 0 20372. provides the required freedom for the mode of the value under test; moreover, * 0 20373. that |b||ap|UNITED|ap||r| mode must contain the mode of each |b|specification|r| * 0 20374. for, otherwise, the corresponding |b|case-part-of-CHOICE|r| could never be chosen. * 0 20375. |p|Example: * 0 20376. |n||xh||i|MODE BOY |uqe| STRUCT (INT age, REAL weight), * 0 20377. |e|MODE GIRL |uqe| STRUCT (INT age, REAL beauty); * 0 20378. |e|PROC UNION (BOY, GIRL) newborn; * 0 20379. |p||ps|CASE newborn IN * 0 20380. |e|(BOY john): print (weight OF john), * 0 20381. |e|(GIRL mary): print (beauty OF mary)? 0 20382. |p||ps|ESAC|r|.|cc| * 0 20383. |pq||j||co||w|The flowers that bloom in the spring, * 0 20384. |pp|Tra la, * 0 20385. |pp|Have nothing to do with the case. * 0 20386. |ppp|Mikado, |pr|W.S. Gilbert.|r||cc||qq|? 0 20387. |pa||co|The hierarchy of |b|ranges|r| in |b|conditional-clauses|r| is illustrated by * 0 1. |i||e||w10||wid||picn| * 0 2. |pg|##########|ul4||ul4||ul4||ul4||ul4|IF|ul4||ul4||ul4||ul4||ul4|# * 0 3. |pg|#########|##########################################| * 0 4. |pg|#########|####|ul4|THEN|ul4|##########|ul4|ELSE|ul4|####| * 0 5. |pg|#########|###|############|########|############|###| * 0 6. |pg|#########|###|############|########|############|###| * 0 7. |pg|#########|###||ul4||ul4||ul4||########||ul4||ul4||ul4||###| * 0 8. |pg|#########||ul4||ul4||ul4||ul4||ul4|FI|ul4||ul4||ul4||ul4||ul4|| #####|r|? 0 9. |picf||nar| * 0 11. $ENDFILE? 0 100. |S319IF * 0 101. |S169THEN|S245ELSE * 0 102. |S319FI * 0 20389. |p||p|and similarly for the other kinds of choice. Thus the nest and the environ of the * 0 20390. |b|enquiry-clause|r| remain valid over the |b|in-CHOICE-clause|r| * 0 20391. and the |b|out-CHOICE-clause|r|. * 0 20392. However, no transfer back from the |b|in-|r| or |b|out-CHOICE-clause|r| into the * 0 20393. |b|enquiry-clause|r| is possible, since the latter can contain no |b|label-definitions|r| * 0 20394. (except within a |b|closed-clause|r| contained within it).|cc| * 0 20395. * 0 20396. |h1|3.4.1. Syntax * 0 20397. * 0 20398. |pb1|A)|ts1||b|CHOICE :: choice using boolean ; CASE.|r|? 0 20399. |p1|B)|ts1||b|CASE :: choice using integral ; choice using UNITED.|r|? 0 20400. |pb1|a)|ts1||b|SOID NEST1 CHOICE clause|co||r|5D,551a,A341h,A349a|b||cc| : * 0 20401. CHOICE STYLE start|co||r|91a,|mi||b||cc|, * 0 20402. SOID NEST1 chooser CHOICE STYLE clause|co||r|b|b||cc|,? 0 20403. CHOICE STYLE finish|co||r|91e,|mi||b||cc|.|r|? 0 20404. |p1|b)|ts1||b|SOID NEST1 chooser choice$#using MODE STYLE clause|co||r|a,l|b||cc| : * 0 20405. MODE NEST1 enquiry clause defining LAYER2|co||r|c,|mi||b||cc|,? 0 20406. SOID NEST1 LAYER2 alternate choice using MODE$#STYLE clause|co||r|d|b||cc|.|r|? 0 20407. |p1|c)|ts1||b|MODE NEST1 enquiry clause$#defining new DECSETY2|co||r|b,35g|b||cc| : * 0 20408. meek MODE NEST1 new DECSETY2 series with DECSETY2|co||r|32b|b||cc|.|r|? 0 20409. |p1|d)|ts1||b|SOID NEST2 alternate CHOICE STYLE clause|co||r|b|b||cc| : * 0 20410. SOID NEST2 in CHOICE STYLE clause|co||r|e|b||cc| ; * 0 20411. where SOID balances SOID1 and SOID2|co||r|32e|b||cc|, * 0 20412. SOID1 NEST2 in CHOICE STYLE clause|co||r|e|b||cc|, * 0 20413. SOID2 NEST2 out CHOICE STYLE clause|co||r|l|b||cc|.|r| * 0 20414. |pb1|e)|ts1||b|SOID NEST2 in CHOICE STYLE clause|co||r|d|b||cc| : * 0 20415. |e|CHOICE STYLE in|co||r|91b,|mi||b||cc|, SOID NEST2 in part of CHOICE|co||r|f,g,h|b||cc|.|r|? 0 20416. |p1|f)|ts1||b|SOID NEST2 in part of choice using boolean|co||r|e|b||cc| : * 0 20417. SOID NEST2 serial clause defining LAYER3|co||r|32a|b||cc|.|r|? 0 20418. |p1|g)|ts1||b|SOID NEST2 in part of choice using integral|co||r|e|b||cc| :? 0 20419. SOID NEST2 joined portrait|co||r|33b|b||cc|.|r|? 0 20420. |p1|h)|ts1||b|SOID NEST2 in part of choice using UNITED|co||r|e,h|b||cc| :? 0 20421. SOID NEST2 case part of choice using UNITED|co||r|i|b||cc| ;? 0 20422. where SOID balances SOID1 and SOID2|co||r|32e|b||cc|,? 0 20423. SOID1 NEST2 case part of choice using UNITED|co||r|i|b||cc|, and also|co||r|94f|b||cc| token, * 0 20424. SOID2 NEST2 in part of choice using UNITED|co||r|h|b||cc|.|r| * 0 20425. |p1|i)|ts1||b|SOID NEST2 case part of choice using UNITED|co||r|h|b||cc| : * 0 20426. MOID NEST2 LAYER3 specification defining LAYER3|co||r|j,k,|mi||b||cc|, * 0 20427. where MOID unites to UNITED|co||r|64b|b||cc|, * 0 20428. SOID NEST2 LAYER3 unit|co||r|32d|b||cc|.|r|? 0 20429. |p||ps||co|Here |b|LAYER3 :: new MODE TAG ; new EMPTY.|r||cc|? 0 20430. |p1|j)|ts1||b|MODE NEST3 specification defining new MODE TAG3|co||r|i|b||cc| : * 0 20431. NEST3 declarative defining new MODE TAG3|co||r|541e|b||cc| brief pack, * 0 20432. colon|co||r|94f|b||cc| token.|r| * 0 20433. |p1|k)|ts1||b|MOID NEST3 specification defining new EMPTY|co||r|i|b||cc| : * 0 20434. formal MOID NEST3 declarer|co||r|46b|b||cc| brief pack, * 0 20435. colon|co||r|94f|b||cc| token.|r| * 0 20436. |pb1|l)|ts1||b|SOID NEST2 out CHOICE STYLE clause|co||r|d|b||cc| : * 0 20437. CHOICE STYLE out|co||r|91d,|hy||b||cc|, * 0 20438. SOID NEST2 serial clause defining LAYER3|co||r|32a|b||cc| ; * 0 20439. CHOICE STYLE again|co||r|91c,|hy||b||cc|, * 0 20440. SOID NEST2 chooser CHOICE2 STYLE clause|co||r|b|b||cc|, * 0 20441. where CHOICE2 may follow CHOICE|co||r|m|b||cc|.|r| * 0 20442. |p1|m)|ts1||b|WHETHER choice using MODE2 may follow$#choice using MODE1|co||r|l|b||cc| : * 0 20443. |e|where (MODE1) is (MOOD),#WHETHER (MODE2) is (MODE1) ;? 0 20444. where (MODE1) begins with (union of), WHETHER (MODE2) begins with (union of).|r|? 0 20445. |pb1|n)|ts1||star||b|SOME choice clause : SOME CHOICE clause|co||r|a|b||cc|.|r|? 0 20446. |p1|o)|ts1||star||b|SOME conditional clause : SOME choice using boolean clause|co||r|a|b||cc|.|r|? 0 20447. |p1|p)|ts1||star||b|SOME case clause : SOME choice using integral clause|co||r|a|b||cc|.|r|? 0 20448. |p1|q)|ts1||star||b|SOME conformity clause : SOME choice using UNITED clause|co||r|a|b||cc|.|r|? 0 20449. |w5||exx||co|Examples: * 0 20450. |ex|a) |i|(x |sgt| 0 | x | 0)|q| * 0 20451. |e|CASE i IN princeton, grenoble OUT finish ESAC|q| * 0 20452. |e|CASE uir IN (INT i): print (i), * 0 20453. (REAL): print ("no") ESAC|r|? 0 20454. |ey|b) |i|x |sgt| 0 | x | 0|r|? 0 20455. |ez|c) |i|x |sgt| 0|q|? 0 20456. |i|i|q|? 0 20457. |i|uir|r|? 0 20458. |ey|d) |i|| x|q|| x | 0|r|? 0 20459. |ey|e)#|i|| x|q||e|IN princeton, grenoble|q||e|IN (INT i): print (i), (REAL): print ("no") |r|? 0 20460. |ey|f) |i|x|r|? 0 20461. |ez|g) |i| princeton, grenoble|r|? 0 20462. |ey|h) |i|(INT i): print (i), (REAL): print ("no")|r|? 0 20463. |ey|i) |i|(INT i): print (i)|r|? 0 20464. |ez|j) |i|(INT i): |r|? 0 20465. |ey|k) |i|(REAL):|r|? 0 20466. |ey|l) |i|OUT finish|q||: x |lt| 0 | |mi|x | 0|r|#|cc|? 0 20467. |pq||j||co||w|I would to God they would either conform, * 0 20468. or be more wise, and not be catched! * 0 20469. |ppp|Diary, 7 Aug. 1664, |pr|Samuel Pepys.|r||cc||qq|? 0 20470. |pa||j||co|Rule d illustrates why |b||ap|SORT MOID|ap||r|s should be "balanced".? 0 20471. If an |b|alternate-CHOICE-clause|r| is, say, * 0 20472. firm, then at least its |b|in-CHOICE-clause|r| or its |b|out-CHOICE-clause|r| must be firm, * 0 20473. while the other may be strong. For example, in |i|(p | x | SKIP) + (p | SKIP | y)|r|, the * 0 20474. |b|conditional-clause|r| |i|(p | x | SKIP)|r| is balanced by making |i|| x|r| firm and * 0 20475. |i|| SKIP|r| strong whereas |i|(p | SKIP | y)|r| is balanced by making |i|| SKIP|r| strong * 0 20476. and |i||#y|r| firm. The counterexample |i|(p#|#SKIP#|#SKIP)#+#y|r| illustrates that not both * 0 20477. may be strong, for otherwise the |b|operator|r| |i|+|r| could not be identified.|cc| * 0 20478. * 0 20479. |h|3.4.2. Semantics * 0 20480. * 0 20481. |pb1||j|a)|tp1|The yield |w|W|r| of a |b|chooser-CHOICE-clause|r| |w|C|r|, in an environ |w|E1|r|, * 0 20482. is determined as follows: * 0 20483. |et|let |w|E2|r| be the environ established |co|3.2.2.b|cc| around |w|E1|r| according to * 0 20484. the |b|enquiry-clause|r| of |w|C|r|; * 0 20485. |et|let |w|V|r| be the yield, in |w|E2|r|, of that |b|enquiry-clause|r|; * 0 20486. |et||w|W|r| is the yield of the scene "chosen" |co|b|cc| by |w|V|r| from |w|C|r| in |w|E2|r|; * 0 20487. it is required that |w|W|r| be not newer in scope than |w|E1|r|. * 0 20488. |pb1|b)|tp1|The scene |w|S|r| "chosen" by a value |w|V|r| from a |b|MOID-chooser-CHOICE-clause|r| * 0 20489. |w|C|r|, in an environ |w|E2|r|, is determined as follows: * 0 20490. |pi|Case#A: |b||ap|CHOICE|ap||r| is |b||ap|choice using boolean|ap||r| and |w|V|r| is |w|true|r|: * 0 20491. |et||w|S|r| is the constituent |b|in-CHOICE-clause|r| of |w|C|r|, in |w|E2|r|; * 0 20492. |pi|Case#B: |b||ap|CHOICE|ap||r| is |b||ap|choice using integral|ap||r| and * 0 20493. |w|1#|le|#V#|le|#n|r|, where |w|n|r| is the number of constituent |b|units|r| * 0 20494. of the constituent |b|in-part-of-CHOICE|r| of |w|C|r|: * 0 20495. |et||w|S|r| is the |w|V|r||hy|th such |b|unit|r|, in |w|E2|r|; * 0 20496. |pi|Case#C: |b||ap|CHOICE|ap||r| is some |b||ap|choice using UNITED|ap||r| and |w|V|r| is * 0 20497. acceptable to |co|2.1.3.6.d|cc| the |b||ap|MOID2|ap||r| of some constituent * 0 20498. |b|MOID2-specification|r| |w|D|r| of |w|C|r| |co|; if there * 0 20499. exists more than one such constituent |b|specification|r|, * 0 20500. it is not defined which one is chosen as |w|D|r||cc|: * 0 20501. |et||w|S|r| is the |b|unit|r| following that |w|D|r|, in an environ * 0 20502. established |co|nonlocally (3.2.2.b)|cc| around |w|E2|r|, according to |w|D|r|, with |w|V|r|; * 0 20503. |pi|Other Cases |co|when the |b|enquiry-clause|r| has been unsuccessful|cc|: * 0 20504. |e|If |w|C|r| contains a constituent |b|out-CHOICE-clause|r| |w|O|r|, * 0 20505. |e|then * 0 20506. |w|S|r| is |w|O|r| in |w|E2|r|; * 0 20507. |e|otherwise, * 0 20508. |w|S|r| is a |b|MOID-skip|r| in |w|E2|r|. * 0 20509. * 0 20510. |h|3.5. Loop clauses * 0 20511. * 0 20512. |pa||j||co||b|Loop-clauses|r| are used for repeating dynamically one same sequence of instructions. * 0 20513. The number of repetitions is controlled by a finite sequence of equidistant integers, * 0 20514. by a condition to be tested each time, or by both. * 0 20515. |p|Example 1: * 0 20516. |n||xh||i|INT fac |bec| 1; * 0 20517. |xh|FOR i FROM n BY |mi|1 TO 1 * 0 20518. |xh|DO fac |sx||bec| i OD|r|. * 0 20519. |p|Example 2: * 0 20520. |xh||i|INT a, b; read ((a, b)) PR ASSERT a |sge| 0 |and| b |sgt| 0 PR; * 0 20521. |e|INT q |bec| 0, r |bec| a; * 0 20522. |e|WHILE r |sge| b PR ASSERT a |uqe| b |sx| q + r |and| 0 |le| r PR * 0 20523. |e|DO (q +|bec| 1, r |mi||bec| b) OD * 0 20524. |e|PR ASSERT a |uqe| b |sx| q + r |and| 0 |le| r |and| r |lt| b PR|r| * 0 20525. |p||j|(see 9.2 for an explanation of the |b|pragmats|r|). * 0 20526. |pa|The controlled |b|identifier|r|, e.g., |i|i|r| in Example 1, is defined over * 0 20527. the |b|repeating-part|r|. Definitions introduced in the |b|while-part|r| * 0 20528. are also valid over the |b|do-part|r|. * 0 20529. |pg|If the controlled |b|identifier|r| is not applied in the |b|repeating-part|r|, * 0 20530. then the |b|for-part|r| may be omitted. A |b|from-part|r| |i|FROM 1|r| may be omitted; similarly, * 0 20531. |i|BY 1|r| may be omitted. The |b|to-part|r| may be omitted if no test on the final value of * 0 20532. the control-integer is required. A |b|while-part|r| |i|WHILE TRUE|r| may be omitted. * 0 20533. For example, |pg||i|FOR i FROM 1 BY 1 TO n WHILE TRUE DO print ("a") OD|r| * 0 20534. |p|may be written |pg||i|TO n DO print ("a") OD|r|.? 0 20535. |pa|The hierarchy of |b|ranges|r| is illustrated by: * 0 1. #####|i||wid||picn||e||w15| * 0 2. |pg|##############|ul||ul|################# * 0 3. |pg|#####1##|ul|FOR|ul||##|#FROM##BY##TO###? 0 4. |pg|#######|########||ul4||ul4||ul4||ul||ul||ul| * 0 5. |pg|#######|########################| * 0 6. |pg|#######|#2#|ul4||ul||ul||ul|WHILE|ul4||ul||ul|###|? 0 7. |pg|#######|##|##################|##|? 0 8. |pg|#######|##|#3#|ul4||ul|DO|ul4||ul|###|##| * 0 9. |pg|#######|##|##|############|##|##| * 0 10. |pg|#######|##|##|############|##|##| * 0 11. |pg|#######|##|##||ul4||ul|OD|ul4||ul||##|##| * 0 12. |pg|#######|##||ul4||ul4||ul4||ul4||ul||ul||##| * 0 13. |pg|#######||ul4||ul4||ul4||ul4||ul4||ul4|| ####|r||cc| * 0 14. |picf||nar| * 0 16. $ENDFILE? 0 100. |S1951|S24FOR|S52FROM|S59BY|S60TO * 0 101. |S2432|S64WHILE * 0 102. |S2933|S31DO * 0 103. |S333OD * 0 104. * 0 20537. |pr||cc|? 0 20538. |h1|3.5.1. Syntax * 0 20539. * 0 20540. |pb1|A)|ts1||b|FROBYT :: from ; by ; to.|r| * 0 20541. |pb1|a)|ts1||b|strong void NEST1 loop clause|co||r|5D,551a|b||cc| : * 0 20542. |e|NEST1 STYLE for part defining new integral TAG2|co||r|b|b||cc|, * 0 20543. NEST1 STYLE intervals|co||r|c|b||cc|, * 0 20544. NEST1 STYLE repeating part with integral TAG2|co||r|e|b||cc|.|r| * 0 20545. |p1|b)|ts1||b|NEST1 STYLE for part defining new integral TAG2|co||r|a|b||cc| : * 0 20546. STYLE for|co||r|94g,|mi||b||cc| token, * 0 20547. integral NEST1 new integral TAG2 defining identifier$# * 0 20548. with TAG2|co||r|48a|b||cc| ; * 0 20549. |e|where (TAG2) is (letter aleph), EMPTY.|r| * 0 20550. |p1|c)|ts1||b|NEST1 STYLE intervals|co||r|a|b||cc| : * 0 20551. NEST1 STYLE from part|co||r|d|b||cc| option, * 0 20552. NEST1 STYLE by part|co||r|d|b||cc| option, * 0 20553. NEST1 STYLE to part|co||r|d|b||cc| option.|r| * 0 20554. |p1|d)|ts1||b|NEST1 STYLE FROBYT part|co||r|c|b||cc| : * 0 20555. |e|STYLE FROBYT|co||r|94g,|mi||b||cc| token, * 0 20556. meek integral NEST1 unit|co||r|32d|b||cc|.|r| * 0 20557. |p1|e)|ts1||b|NEST1 STYLE repeating part with DEC2|co||r|a|b||cc| : * 0 20558. |e|NEST1 new DEC2 STYLE while do part|co||r|f|b||cc| ; * 0 20559. NEST1 new DEC2 STYLE do part|co||r|h|b||cc|.|r| * 0 20560. |p1|f)|ts1||b|NEST2 STYLE while do part|co||r|e|b||cc| : * 0 20561. NEST2 STYLE while part defining LAYER3|co||r|g|b||cc|, * 0 20562. NEST2 LAYER3 STYLE do part|co||r|h|b||cc|.|r| * 0 20563. |p1|g)|ts1||b|NEST2 STYLE while part defining LAYER3|co||r|f|b||cc| : * 0 20564. |e|STYLE while|co||r|94g,|mi||b||cc| token, * 0 20565. |e|boolean NEST2 enquiry clause defining LAYER3|co||r|34c,|mi||b||cc|.|r| * 0 20566. |p1|h)|ts1||b|NEST3 STYLE do part|co||r|e,f|b||cc| : * 0 20567. |e|STYLE do|co||r|94g,|mi||b||cc| token, * 0 20568. strong void NEST3 serial clause defining LAYER4|co||r|32a|b||cc|, * 0 20569. STYLE od|co||r|94g,|mi||b||cc| token.|r| * 0 20570. |w5||exx||co|Examples: * 0 20571. |ex|a) |i|FOR i WHILE i |lt| n DO task1 OD|q|TO n DO task1; task2 OD|r|? 0 20572. |ey|b) |i|FOR i|r|? 0 20573. |ez|c) |i|FROM |mi|5 TO +5|r|? 0 20574. |ey|d) |i|FROM |mi|5|r|? 0 20575. |ey|e) |i|WHILE i |lt| n DO task1 OD|qs|DO task1; task2 OD|r|? 0 20576. |ey|f) |i|WHILE i |lt| n DO task1; task2 OD|r|? 0 20577. |ey|g) |i|WHILE i |lt| n |r|? 0 20578. |ez|h) |i|DO task1; task2 OD|r|#|cc|? 0 20579. * 0 20580. |h|3.5.2. Semantics * 0 20581. * 0 20582. |pa||j|A |b|loop-clause|r| |w|C|r|, in an environ |w|E1|r|, is elaborated in * 0 20583. the following Steps: * 0 20584. |pi|Step#1: All the constituent |b|FROBYT-parts|r|, if any, of |w|C|r| * 0 20585. are elaborated collaterally in |w|E1|r|; * 0 20586. |et|let |w|f|r| be the yield of the constituent * 0 20587. |b|from-part|r|, if any, of |w|C|r|, and be |w|1|r| otherwise; * 0 20588. |et|let |w|b|r| be the yield of the constituent * 0 20589. |b|by-part|r|, if any, of |w|C|r|, and be |w|1|r| otherwise; * 0 20590. |et|let |w|t|r| be the yield of the constituent * 0 20591. |b|to-part|r|, if any, of |w|C|r|, and be |w|absent|r| otherwise; * 0 20592. |et|let |w|E2|r| be the environ established |co|nonlocally (3.2.2.b)|cc| around |w|E1|r|, * 0 20593. according to the |b|for-part-defining-new-integral-TAG2|r| of |w|C|r|, * 0 20594. and with the integer |w|f|r|; * 0 20595. |pi|Step#2: Let |w|i|r| be the integer accessed |co|2.1.2.c|cc| * 0 20596. by |b||ap|integral TAG2|ap||r| inside the locale of |w|E2|r|; * 0 20597. |p||ps|If |w|t|r| is not |w|absent|r|, * 0 20598. |p||ps|then * 0 20599. |e|If |w|b |sgt| 0|r| and |w|i |sgt| t|r| or if |w|b |lt| 0|r| and |w|i |lt| t|r|, * 0 20600. |e|then |w|C|r| in |w|E1|r| |co|is completed and|cc| yields * 0 20601. |w|empty|r|; * 0 20602. |p||ps||co|otherwise, Step#3 is taken;|cc| * 0 20603. |pi|Step#3: Let an environ |w|E3|r| and a truth value |w|w|r| * 0 20604. be determined as follows: * 0 20605. |p||ps|Case#A: |w|C|r| does not contain a constituent |b|while-part|r|: * 0 20606. |et||w|E3|r| is |w|E2|r|; * 0 20607. |et||w|w|r| is |w|true|r|; * 0 20608. |p||ps|Case#B: |w|C|r| contains a constituent |b|while-part|r| |w|P|r|: * 0 20609. |et||w|E3|r| is established |co|perhaps nonlocally (3.2.2.b)|cc| * 0 20610. around |w|E2|r| according to the |b|enquiry-clause|r| of |w|P|r|; * 0 20611. |et||w|w|r| is the yield in |w|E3|r| of that |b|enquiry-clause|r|; * 0 20612. |pi|Step#4: If |w|w|r| is |w|true|r|, * 0 20613. |p||ps|then * 0 20614. |et|the constituent |b|do-part|r| of |w|C|r| is elaborated in |w|E3|r|; * 0 20615. |et||b||ap|integral TAG2|ap||r| is made to access |w|i#+#b|r| * 0 20616. inside the locale of |w|E2|r|; * 0 20617. |et|Step#2 is taken again; * 0 20618. |p||ps|otherwise, * 0 20619. |et||w|C|r| in |w|E1|r| |co|is completed and|cc| yields |w|empty|r|. * 0 20620. |pa||w15||co|The |b|loop-clause|r| |e|##|i|FOR i FROM u1 BY u2 TO u3 WHILE condition DO action OD|r| * 0 20621. |e|is thus equivalent to the following |b|void-closed-clause|r|: * 0 20622. |n||xh||i|BEGIN INT f |bec| u1, INT b |uqe| u2, t |uqe| u3; * 0 20623. |xs|step2|lbl| |pd|IF (b |sgt| 0 |and| f |le| t) |or| (b |lt| 0 |and| f |sge| t) |or| b |uqe| 0 * 0 20624. |pd|THEN * 0 20625. INT i |uqe| f; * 0 20626. |pe|IF condition |pe|THEN action; f +|bec| b; GO TO step2 |pe|FI * 0 20627. |pd|FI * 0 20628. |xh|END|r|. * 0 20629. |pb||j|This equivalence might not hold, of course, if the |b|loop-clause|r| * 0 20630. contains |b|local-generators|r|, or if some of the |b|operators|r| above * 0 20631. do not identify those in the standard environment(10).|cc| * 0 20632. * 0 20633. |h|4. |bs|Declarations, declarers and indicators|rs| * 0 20634. * 0 20635. |pa||j||co||b|Declarations|r| serve * 0 20636. |et|to announce new |b|indicators|r|, e.g., |b|identifiers|r|, * 0 20637. |et|to define their modes or priorities, and * 0 20638. |et|to ascribe values to those |b|indicators|r| and to initialize |b|variables|r|.|cc| * 0 20639. * 0 20640. |h|4.1. Declarations? 0 20641. * 0 20642. |h1|4.1.1. Syntax * 0 20643. * 0 20644. |pb1|A)|ts1||b|COMMON :: mode ; priority ; MODINE identity ; reference to MODINE variable ; * 0 20645. MODINE operation ; PARAMETER ; MODE FIELDS.|r|? 0 20646. |p||ts1||co||b|MODINE :: MODE ; routine.|r||cc| * 0 20647. |pb1|a)|ts1||b|NEST declaration of DECS|co||r|a,32b|b||cc| : * 0 20648. NEST COMMON declaration of DECS|co||r|42a,43a,44a,e,45a,|mi||b||cc| ; * 0 20649. where (DECS) is (DECS1 DECS2), * 0 20650. NEST COMMON declaration of DECS1|co||r|42a,43a,44a,e,45a,|mi||b||cc|, * 0 20651. and also|co||r|94f|b||cc| token, * 0 20652. NEST declaration of DECS2|co||r|a|b||cc|.|r| * 0 20653. |p1|b)|ts1||b|NEST COMMON joined definition of PROPS PROP$#|co||r|b,42a,43a,44a,e,45a,46e,541e|b||cc| : * 0 20654. NEST COMMON joined definition of PROPS$|co||r|b,c|b||cc|, and also|co||r|94f|b||cc| token, * 0 20655. NEST COMMON joined definition of PROP|co||r|c|b||cc|.|r| * 0 20656. |p1|c)|ts1||b|NEST COMMON joined definition of PROP$#|co||r|b,42a,43a,44a,e,45a,46e,541e|b||cc| : * 0 20657. NEST COMMON definition of PROP$|co||r|42b,43b,44c,f,45c,46f,541f,|mi||b||cc|.|r|? 0 20658. |pb1|d)|ts1||star||b|definition of PROP : * 0 20659. NEST COMMON definition of PROP$#|co||r|42b,43b,44c,f,45c,46f,541f|b||cc| ; * 0 20660. |e|NEST label definition of PROP|co||r|32c|b||cc|.|r| * 0 20661. |w5||exx||co|Examples: * 0 20662. |ex|a) |i|MODE R |uqe| REF REAL, S |uqe| CHAR|q||g|PRIO |or| |uqe| 2, |and| |uqe| 3|q||g|INT m |uqe| 4096|q||g|? 0 20663. REAL x,#y|q||g| * 0 20664. |e|OP |or| |uqe| (BOOL a,#b) BOOL#: (a#|#TRUE#|#b)|r| * 0 20665. |ey|b) |i|R |uqe| REF REAL, S |uqe| CHAR|q||g||or| |uqe| 2, |and| |uqe| 3|q||g|m |uqe| 4096|q||g|x, y|q||g|? 0 20666. |e||or| |uqe| (BOOL a, b) BOOL : (a | TRUE | b)|r| * 0 20667. |ey|c) |i|R |uqe| REF REAL|q||g||or| |uqe| 2|q||g|m |uqe| 4096|q||g|x|q||g|? 0 20668. |e||or| |uqe| (BOOL a, b) BOOL : (a | TRUE | b)|r|#|cc| * 0 20669. * 0 20670. |h|4.1.2. Semantics * 0 20671. * 0 20672. |pb1||j||tp1|The elaboration of a |b|declaration|r| * 0 20673. consists of the collateral elaboration of * 0 20674. its |b|COMMON-declaration|r| and of its |b|declaration|r|, if any. * 0 20675. |co|Thus, all the |b|COMMON-declarations|r| separated by * 0 20676. |b|and-also-tokens|r| are elaborated collaterally.|cc| * 0 20677. * 0 20678. |h|4.2. Mode declarations? 0 20679. * 0 20680. |pa||j||co||b|Mode-declarations|r| provide the |b|defining-mode-indications|r|, * 0 20681. which act as abbreviations * 0 20682. for |b|declarers|r| constructed from the more primitive ones, or from other |b|declarers|r|, * 0 20683. or even from themselves. * 0 20684. |pg|For example,? 0 20685. |pg||i|MODE ARRAY |uqe| |so|m, n|sc| REAL|r|, and? 0 20686. |pg||i|MODE BOOK |uqe| STRUCT (STRING#text, REF#BOOK#next)|r| * 0 20687. |pg|In the latter example, the |b|applied-mode-indication|r| |i|BOOK|r| is not only a convenient * 0 20688. abbreviation, but is essential to the |b|declaration|r|.|cc| * 0 20689. * 0 20690. |h1|4.2.1. Syntax * 0 20691. * 0 20692. |pb1|a)|ts1||b|NEST mode declaration of DECS|co||r|41a|b||cc| : * 0 20693. |e|mode|co||r|94d|b||cc| token, * 0 20694. NEST mode joined definition of DECS|co||r|41b,c|b||cc|.|r|? 0 20695. |p1|b)|ts1||b|NEST mode definition of MOID TALLY TAB|co||r|41c|b||cc| : * 0 20696. where (TAB) is (bold TAG) or (NEST) is (new LAYER),? 0 20697. MOID TALLY NEST defining mode indication$#with TAB|co||r|48a|b||cc|, * 0 20698. is defined as|co||r|94d|b||cc| token, * 0 20699. actual MOID TALLY NEST declarer|co||r|c|b||cc|.|r|? 0 20700. |p1|c)|ts1||b|actual MOID TALLY1 NEST declarer|co||r|b|b||cc| : * 0 20701. |e|where (TALLY1) is (i), * 0 20702. |e|actual MOID NEST declarator|co||r|46c,d,g,h,o,s,|mi||b||cc| ; * 0 20703. |e|where (TALLY1) is (TALLY2 i), * 0 20704. |e|MOID TALLY2 NEST applied mode indication with TAB2$#|co||r|48b|b||cc|.|r| * 0 20705. |w5||exx||co|Examples: * 0 20706. |ex|a) |i|MODE R |uqe| REF#REAL, S |uqe| CHAR|r|? 0 20707. |ey|b) |i|R |uqe| REF#REAL|r| * 0 20708. |ez|c) |i|REF#REAL|qs|CHAR|r|#|cc| * 0 20709. |pa||j||co||r|The use of |b||ap|TALLY|ap||r| excludes circular chains of |b|mode-definitions|r| such as * 0 20710. |i|MODE A |uqe| B, B |uqe| A|r|. * 0 20711. |pg||b|Defining-mode-indications-with-SIZETY-STANDARD|r| may * 0 20712. be declared only in the |b|standard-prelude|r|, where the nest is of the * 0 20713. form |b||ap|new LAYER|ap||r| (10.1.1.b).|cc| * 0 20714. * 0 20715. |h|4.2.2. Semantics * 0 20716. * 0 20717. |pa||j|The elaboration of a |b|mode-declaration|r| |co|involves no action, yields no value and|cc| * 0 20718. is completed. * 0 20719. * 0 20720. |h|4.3. Priority declarations? 0 20721. * 0 20722. |pa||j||co||b|Priority-declarations|r| are used to specify the priority of |b|operators|r|. Priorities * 0 20723. from |w|1|r| to |w|9|r| are available. * 0 20724. |pg|Since |b|monadic-operators|r| have effectively * 0 20725. only one priority-level, which is higher than that of all |b|dyadic-operators|r|, * 0 20726. |b|monadic-operators|r| do not require |b|priority-declarations|r|.|cc| * 0 20727. * 0 20728. |h1|4.3.1. Syntax * 0 20729. * 0 20730. |pb1|a)|ts1||b|NEST priority declaration of DECS|co||r|41a|b||cc| : * 0 20731. |e|priority|co||r|94d|b||cc| token, NEST priority joined definition of DECS|co||r|41b,c|b||cc|.|r| * 0 20732. |p1|b)|ts1||b|NEST priority definition of$#priority PRIO TAD|co||r|41c|b||cc| : * 0 20733. priority PRIO NEST defining operator with TAD|co||r|48a|b||cc|, * 0 20734. is defined as|co||r|94d|b||cc| token, DIGIT|co||r|94b|b||cc| token,? 0 20735. where DIGIT counts PRIO|co||r|c,d|b||cc|.|r|? 0 20736. |p||ps||co||b|DIGIT :: digit zero ; digit one ; digit two ; digit three ; digit four ; * 0 20737. digit five ; digit six ; digit seven ; digit eight ; digit nine.|r||cc| * 0 20738. |p1|c)|ts1||b|WHETHER DIGIT1 counts PRIO i|co||r|b,c|b||cc| :? 0 20739. WHETHER DIGIT2 counts PRIO|co||r|c,d|b||cc|, where * 0 20740. (digit one digit two digit three digit four$#digit five digit six digit seven digit eight digit nine)$#? 0 20741. contains (DIGIT2 DIGIT1).|r|? 0 20742. |p1|d)|ts1||b|WHETHER digit one counts i|co||r|b,c|b||cc| : WHETHER true.|r|? 0 20743. |w5||exx||co|Examples: * 0 20744. |ex|a) |i|PRIO |or| |uqe| 2, |and| |uqe| 3|r|? 0 20745. |ez|b) |i||or| |uqe| 2|r||cc|? 0 20746. * 0 20747. |h|4.3.2. Semantics * 0 20748. * 0 20749. |pa||j|The elaboration of a |b|priority-declaration|r| |co|involves no action, yields no value * 0 20750. and|cc| is completed. * 0 20751. * 0 20752. |h|4.4. Identifier declarations? 0 20753. * 0 20754. |pa||j||co||b|Identifier-declarations|r| provide |b|MODE-defining-identifiers|r|, by means of either * 0 20755. |b|identity-definitions|r| or |b|variable-definitions|r|. * 0 20756. |exx|Examples: * 0 20757. |xh||i|REAL pi |uqe| 3.1416|r||qs| * 0 20758. |xh||i|REAL scan |bec| 0.05|r|. * 0 20759. |p|The latter example, which is a |b|variable-declaration|r|, may * 0 20760. be considered as an equivalent form of the |b|identity-declaration|r| * 0 20761. |xh||i|REF REAL scan |uqe| LOC REAL |bec| 0.05|r|. * 0 20762. |pg|The elaboration of |b|identifier-declarations|r| causes values to be ascribed to their * 0 20763. |b|identifiers|r|; in the examples given above, |w|3.1416|r| is ascribed to |i|pi|r| and a new * 0 20764. local name which refers to |w|0.05|r| is ascribed to |i|scan|r|.|cc| * 0 20765. * 0 20766. |h1|4.4.1. Syntax * 0 20767. * 0 20768. |pb1|A)|ts1||b|MODINE :: MODE ; routine.|r|? 0 20769. |p1|B)|ts1||b|LEAP :: local ; heap ; primal.|r|? 0 20770. |pb1|a)|ts1||b|NEST MODINE identity declaration of DECS|co||r|41a|b||cc| :? 0 20771. formal MODINE NEST declarer|co||r|b,46b|b||cc|,? 0 20772. NEST MODINE identity joined$#definition of DECS|co||r|41b,c|b||cc|.|r|? 0 20773. |p1|b)|ts1||b|VICTAL routine NEST declarer|co||r|a,523b|b||cc| :? 0 20774. procedure|co||r|94d|b||cc| token.|r|? 0 20775. |p1|c)|ts1||b|NEST MODINE identity definition of MODE TAG|co||r|41c|b||cc| :? 0 20776. MODE NEST defining identifier with TAG|co||r|48a|b||cc|,? 0 20777. is defined as|co||r|94d|b||cc| token, MODE NEST source for MODINE|co||r|d|b||cc|.|r|? 0 20778. |p1|d)|ts1||b|MODE NEST source for MODINE|co||r|c,f,45c|b||cc| :? 0 20779. |e|where (MODINE) is (MODE), MODE NEST source|co||r|521c|b||cc| ;? 0 20780. where (MODINE) is (routine), MODE NEST routine text|co||r|541a,b,|mi||b||cc|.|r|? 0 20781. |pb1|e)|ts1||b|NEST reference to MODINE variable declaration of DECS|co||r|41a|b||cc| : * 0 20782. reference to MODINE NEST LEAP$#sample generator|co||r|523b|b||cc|, * 0 20783. NEST reference to MODINE variable joined$#definition of DECS|co||r|41b,c|b||cc|.|r| * 0 20784. |p1|f)|ts1||b|NEST reference to MODINE variable definition$#? 0 20785. of reference to MODE TAG|co||r|41c|b||cc| :? 0 20786. |e|reference to MODE NEST defining identifier with TAG|co||r|48a|b||cc|,? 0 20787. becomes|co||r|94c|b||cc| token, MODE NEST source for MODINE|co||r|d|b||cc| ;? 0 20788. |e|where (MODINE) is (MODE), * 0 20789. reference to MODE NEST defining identifier with TAG|co||r|48a|b||cc|.|r|? 0 20790. |pb1|g)|ts1||star||b|identifier declaration : NEST MODINE identity declaration of DECS|co||r|a|b||cc| ; * 0 20791. |e|NEST reference to MODINE variable declaration of DECS|co||r|e|b||cc|.|r| * 0 20792. |w5||exx||co|Examples: * 0 20793. |ex|a) |i|INT m |uqe| 4096|q|PROC r10 |uqe| REAL : random |sx| 10|r|? 0 20794. |ey|b) |i|PROC|r|? 0 20795. |ez|c) |i|m |uqe| 4096|r|? 0 20796. |ey|d) |i|4096|q|REAL : random |sx| 10|r|? 0 20797. |ey|e) |i|REAL x, y|q|PROC pp |bec| REAL : random |sx| 10|r|? 0 20798. |ey|f) |i|pp |bec| REAL : random |sx| 10 |qs| x|r|#|cc|? 0 20799. * 0 20800. |h|4.4.2. Semantics * 0 20801. * 0 20802. |pb1||j|a)|tp1|An |b|identity-declaration|r| |w|D|r| is * 0 20803. elaborated as follows: * 0 20804. |et|the constituent |b|sources-for-MODINE|r| of |w|D|r| are elaborated * 0 20805. collaterally; * 0 20806. |pi|For each constituent |b|identity-definition|r| |w|D1|r| of |w|D|r|,? 0 20807. |et|the yield |w|V|r| of the |b|source-for-MODINE|r| of |w|D1|r| is * 0 20808. ascribed |co|4.8.2.a|cc| to the |b|defining-identifier|r| of |w|D1|r|. * 0 20809. |pb1|b)|tp1|A |b|variable-declaration|r| |w|D|r| is elaborated as * 0 20810. follows: * 0 20811. |et|the |b|sample-generator|r| |co|5.2.3.1.b|cc| |w|G|r| of |w|D|r| and all the * 0 20812. |b|sources-for-MODINE|r|, if any, * 0 20813. of the constituent |b|variable-definitions|r| of |w|D|r| are elaborated collaterally; * 0 20814. |pi|For each constituent |b|variable-definition-of-reference-to-MODE-TAG|r| * 0 20815. |w|D1|r| of |w|D|r|, * 0 20816. |et|let |w|W1|r| be a "variant" |co|c|cc|, for |b||ap|MODE|ap||r|, of the value referred to by * 0 20817. the yield |w|N|r| of |w|G|r|; * 0 20818. |et|let |w|N1|r| be a newly created name equal in scope to |w|N|r| * 0 20819. and referring to |w|W1|r|; * 0 20820. |et|if |w|N1|r| is a stowed name |co|2.1.3.2.b|cc|, then |w|N1|r| is endowed * 0 20821. with subnames |co|2.1.3.3.e, 2.1.3.4.g|cc|; * 0 20822. |et||w|N1|r| * 0 20823. is ascribed |co|4.8.2.a|cc| to the |b|defining-identifier|r| of |w|D1|r|; * 0 20824. |et|the yield of the |b|source-for-MODINE|r|, if any, * 0 20825. of |w|D1|r| is assigned |co|5.2.1.2.b|cc| to |w|N1|r|. * 0 20826. |e||pg||co|An |b|actual-declarer|r| which is common to a number of |b|variable-definitions|r| * 0 20827. is elaborated only once. For example, the elaboration of * 0 20828. |n||p||ps||i|INT m |bec| 10; |so|1 : m +|bec| 1|sc| INT p, q; * 0 20829. print (m)|r||j||p| causes |w|11|r| to be printed, and not |w|12|r|; moreover, two new local names * 0 20830. referring to multiple values with descriptor |w|((1, 11))|r|, and undefined elements, * 0 20831. are ascribed to |i|p|r| and to |i|q|r|.|cc| * 0 20832. |pb1|c)|tp1|A "variant" of a value |w|V|r|, * 0 20833. for a mode |w|M|r|, is a value |w|W|r| acceptable to |co|2.1.3.6.d|cc| |w|M|r|, * 0 20834. and determined as follows: * 0 20835. |pi|Case#A: |w|M|r| is some |b||ap|structured with FIELDS mode|ap||r|: * 0 20836. |ph|For each |b||ap|MODE field TAG|ap||r| enveloped by |b||ap|FIELDS|ap||r|, * 0 20837. |et|the field selected by |b||ap|TAG|ap||r| in |w|W|r| is a variant, for |b||ap|MODE|ap||r|, * 0 20838. of the field selected by |b||ap|TAG|ap||r| in |w|V|r|; * 0 20839. |pi|Case#B: |w|M|r| is some |b||ap|FLEXETY ROWS of MODE1|ap||r|: * 0 20840. |et|the descriptor of |w|W|r| is that of |w|V|r|; * 0 20841. |et|each element of |w|W|r| is a variant, for |b||ap|MODE1|ap||r|, * 0 20842. of some element * 0 20843. of |w|V|r|; * 0 20844. |pi|Other Cases: * 0 20845. |et||w|W|r| is any value acceptable to |w|M|r|. * 0 20846. |pb1|d)|tp1|The yield of an |b|actual-routine-declarer|r| is some routine * 0 20847. |co|whose mode is of no relevance|cc|.? 0 20848. * 0 20849. |h|4.5. Operation declarations? 0 20850. * 0 20851. |pa||j||co||b|Operation-declarations|r| provide |b|defining-operators|r|. * 0 20852. |exx|Example: * 0 20853. |n||p||ps||i|OP#MC |uqe| (REAL a, b) REAL : (3 |sx| a |lt| b | a | b)|r|. * 0 20854. |pg||j|Unlike the case with, e.g., |b|identifier-declarations|r|, * 0 20855. more than one |b|operation-declaration|r| involving the same |b|TAO-token|r| may occur in the * 0 20856. same reach; e.g., the previous example may very well be in the same reach as * 0 20857. |n||p||ps||i|OP MC |uqe| (COMPL carthy, john) COMPL : * 0 20858. (random |lt| .5 | carthy | john)|r|; * 0 20859. |p|the |b|operator|b| |i|MC|r| is then said to be "overloaded".|cc| * 0 20860. * 0 20861. |h1|4.5.1. Syntax * 0 20862. * 0 20863. |pb1|A)|ts1||b|PRAM :: DUO ; MONO.|r|? 0 20864. |p1|B)|ts1||b|TAO :: TAD ; TAM.|r|? 0 20865. |pb1|a)|ts1||b|NEST MODINE operation declaration of DECS|co||r|41a|b||cc| : * 0 20866. operator|co||r|94d|b||cc| token, formal MODINE NEST plan|co||r|b,46p,|mi||b||cc|, * 0 20867. NEST MODINE operation joined definition of DECS|co||r|41b,c|b||cc|.|r|? 0 20868. |p1|b)|ts1||b|formal routine NEST plan|co||r|a|b||cc| : EMPTY.|r|? 0 20869. |p1|c)|ts1||b|NEST MODINE operation definition of PRAM TAO|co||r|41c|b||cc| :? 0 20870. PRAM NEST defining operator with TAO|co||r|48a|b||cc|, * 0 20871. is defined as|co||r|94d|b||cc| token, PRAM NEST source for MODINE|co||r|44d|b||cc|.|r|? 0 20872. |w5||exx||co|Examples: * 0 20873. |ex|a) |i|OP |or| |uqe| (BOOL a, b) BOOL : (a | TRUE | b)|r|? 0 20874. |ey|c) |i||or| |uqe| (BOOL a, b) BOOL : (a | TRUE | b)|r| |cc|? 0 20875. * 0 20876. |h|4.5.2. Semantics * 0 20877. * 0 20878. |pb1||j|a)|tp1|The elaboration of an |b|operation-declaration|r| consists of the collateral * 0 20879. elaboration of its constituent |b|operation-definitions|r|. * 0 20880. |pb1|b)|tp1|An |b|operation-definition|r| is elaborated by ascribing |co|4.8.2.a|cc| * 0 20881. the routine yielded by its |b|source-for-MODINE|r| to its |b|defining-operator|r|. * 0 20882. * 0 20883. |h|4.6. Declarers * 0 20884. * 0 20885. |pa||j||co||b|Declarers|r| specify modes. A |b|declarer|r| is either a |b|declarator|r|, * 0 20886. which explicitly constructs a mode, or * 0 20887. an |b|applied-mode-indication|r|, which stands for some |b|declarator|r| by way of a * 0 20888. |b|mode-declaration|r|. |b|Declarators|r| are built from |i|VOID|r|, |i|INT|r|, |i|REAL|r|, * 0 20889. |i|BOOL|r| and |i|CHAR|r| (10.2.2), with the assistance of other symbols such as |i|REF|r|, * 0 20890. |i|STRUCT|r|, |i||so||thin||sc||r|, |i|PROC|r|, and |i|UNION|r|. For example, |i|PROC#(REAL)#BOOL|r| * 0 20891. specifies the mode |b||ap|procedure with real parameter yielding boolean|ap||r|. * 0 20892. |pa||b|Actual-declarers|r|, used typically in |b|generators|r|, require the presence of bounds. * 0 20893. |b|Formal-declarers|r|, used typically in |b|formal-parameters|r| and |b|casts|r|, are without * 0 20894. bounds. The |b|declarer|r| following a |i|REF|r| is always |b||ap|virtual|ap||r|; it may then specify * 0 20895. a |b||ap|flexible ROWS of MODE|ap||r|, because flexibility is a property of names. Since * 0 20896. |b|actual-declarers|r| follow an implicit |b||ap|reference to|ap||r| in |b|generators|r|, they may also * 0 20897. specify |b||ap|flexible ROWS of MODE|ap||r|.|cc| * 0 20898. * 0 20899. |h1|4.6.1. Syntax * 0 20900. * 0 20901. |pb1|A)|ts1||b|VICTAL :: VIRACT ; formal.|r| * 0 20902. |p1|B)|ts1||b|VIRACT :: virtual ; actual.|r|? 0 20903. |p1|C)|ts1||b|MOIDS :: MOID ; MOIDS MOID.|r|? 0 20904. |pb1|a)|ts1||b|VIRACT MOID NEST declarer|co||r|c,e,g,h,523a,b|b||cc| : * 0 20905. VIRACT MOID NEST declarator|co||r|c,d,g,h,o,s,|mi||b||cc| ; * 0 20906. MOID TALLY NEST applied mode indication with TAB|co||r|48b,|mi||b||cc|.|r| * 0 20907. |p1|b)|ts1||b|formal MOID NEST declarer|co||r|e,h,p,r,u,34k,44a,541a,b,e,551a|b||cc| : * 0 20908. where MOID deflexes to MOID|co||r|47a,b,c,|mi||b||cc|, * 0 20909. formal MOID NEST declarator|co||r|c,d,h,o,s,|mi||b||cc| ; * 0 20910. MOID1 TALLY NEST applied mode indication with TAB|co||r|48b,|mi||b||cc|,? 0 20911. where MOID1 deflexes to MOID|co||r|47a,b,c,|mi||b||cc|.|r|? 0 20912. |pb1|c)|ts1||b|VICTAL reference to MODE NEST declarator|co||r|a,b,42c|b||cc| :? 0 20913. |e|reference to|co||r|94d|b||cc| token, virtual MODE NEST declarer|co||r|a|b||cc|.|r|? 0 20914. |pb1|d)|ts1||b|VICTAL structured with FIELDS mode NEST declarator$|co||r|a,b,42c|b||cc| : * 0 20915. |e|structure|co||r|94d|b||cc| token, * 0 20916. VICTAL FIELDS NEST portrayer of FIELDS|co||r|e|b||cc| brief pack.|r| * 0 20917. |p1|e)|ts1||b|VICTAL FIELDS NEST portrayer of FIELDS1|co||r|d,e|b||cc| :? 0 20918. VICTAL MODE NEST declarer|co||r|a,b|b||cc|,? 0 20919. NEST MODE FIELDS joined definition of FIELDS1|co||r|41b,c|b||cc| ;? 0 20920. |e|where (FIELDS1) is (FIELDS2 FIELDS3), VICTAL MODE NEST declarer|co||r|a,b|b||cc|,? 0 20921. NEST MODE FIELDS joined definition of FIELDS2|co||r|41b,c|b||cc|, * 0 20922. and also|co||r|94f|b||cc| token, * 0 20923. VICTAL FIELDS NEST portrayer of FIELDS3|co||r|e|b||cc|.|r| * 0 20924. |p1|f)|ts1||b|NEST MODE FIELDS definition of MODE field TAG|co||r|41c|b||cc| : * 0 20925. MODE field FIELDS defining field selector with TAG|co||r|48c|b||cc|.|r| * 0 20926. |pb1|g)|ts1||b|VIRACT flexible ROWS of MODE NEST declarator|co||r|a,42c|b||cc| :? 0 20927. flexible|co||r|94d|b||cc| token, VIRACT ROWS of MODE NEST declarer|co||r|a|b||cc|.|r|? 0 20928. |p1|h)|ts1||b|VICTAL ROWS of MODE NEST declarator|co||r|a,b,42c|b||cc| :? 0 20929. VICTAL ROWS NEST rower|co||r|i,j,k,l|b||cc| STYLE bracket,? 0 20930. VICTAL MODE NEST declarer|co||r|a,b|b||cc|.|r|? 0 20931. |p1|i)|ts1||b|VICTAL row ROWS NEST rower|co||r|h,i|b||cc| : * 0 20932. |e|VICTAL row NEST rower|co||r|j,k,l|b||cc|, and also|co|94f|cc| token, VICTAL ROWS NEST * 0 20933. rower|co||r|i,j,k,l|b||cc|.|r| * 0 20934. |p1|j)|ts1||b|actual row NEST rower|co||r|h,i|b||cc| : * 0 20935. NEST lower bound|co||r|m|b||cc|, up to|co||r|94f|b||cc| token, * 0 20936. NEST upper bound|co||r|n|b||cc| ; * 0 20937. NEST upper bound|co||r|n|b||cc|.|r|? 0 20938. |p1|k)|ts1||b|virtual row NEST rower|co||r|h,i|b||cc| : up to|co||r|94f|b||cc| token option.|r| * 0 20939. |p1|l)|ts1||b|formal row NEST rower|co||r|h,i|b||cc| : up to|co||r|94f|b||cc| token option.|r| * 0 20940. |p1|m)|ts1||b|NEST lower bound|co||r|j,532f,g|b||cc| : meek integral NEST unit|co||r|32d|b||cc|.|r| * 0 20941. |p1|n)|ts1||b|NEST upper bound|co||r|j,532f|b||cc| : meek integral NEST unit|co||r|32d|b||cc|.|r| * 0 20942. |pb1|o)|ts1||b|VICTAL PROCEDURE NEST declarator|co||r|a,b,42c|b||cc| : * 0 20943. |e|procedure|co||r|94d|b||cc| token, formal PROCEDURE NEST plan|co||r|p|b||cc|.|r| * 0 20944. |p1|p)|ts1||b|formal procedure PARAMETY yielding MOID NEST plan|co||r|o,45a|b||cc| : * 0 20945. where (PARAMETY) is (EMPTY), formal MOID NEST declarer|co||r|b|b||cc| ;? 0 20946. where (PARAMETY) is (with PARAMETERS), * 0 20947. PARAMETERS NEST joined declarer|co||r|q,r|b||cc| brief pack, * 0 20948. formal MOID NEST declarer|co||r|b|b||cc|.|r|? 0 20949. |p1|q)|ts1||b|PARAMETERS PARAMETER NEST joined declarer|co||r|p,q|b||cc| :? 0 20950. PARAMETERS NEST joined declarer|co||r|q,r|b||cc|, and also|co||r|94f|b||cc| token, * 0 20951. PARAMETER NEST joined declarer|co||r|r|b||cc|.|r|? 0 20952. |p1|r)|ts1||b|MODE parameter NEST joined declarer|co||r|p,q|b||cc| :? 0 20953. |g|formal MODE NEST declarer|co||r|b|b||cc|.|r| * 0 20954. |pb1|s)|ts1||b|VICTAL union of MOODS1 MOOD1 mode$#NEST declarator|co||r|a,b,42c|b||cc| : * 0 20955. unless EMPTY with MOODS1 MOOD1 incestuous|co||r|47f|b||cc|, * 0 20956. union#of|co||r|94d|b||cc|#token, * 0 20957. MOIDS NEST joined declarer|co||r|t,u|b||cc| brief pack, * 0 20958. where MOIDS ravels to MOODS2|co||r|47g|b||cc|$#? 0 20959. and safe MOODS1 MOOD1 subset of$#safe MOODS2|co||r|73l|b||cc|$#? 0 20960. and safe MOODS2 subset of safe MOODS1 MOOD1|co||r|73l,m|b||cc|.|r| * 0 20961. |p1|t)|ts1||b|MOIDS MOID NEST joined declarer|co||r|s,t|b||cc| : * 0 20962. MOIDS NEST joined declarer|co||r|t,u|b||cc|, * 0 20963. and also|co||r|94f|b||cc| token, MOID NEST joined declarer|co||r|u|b||cc|.|r|? 0 20964. |p1|u)|ts1||b|MOID NEST joined declarer|co||r|s,t|b||cc| : * 0 20965. formal MOID NEST declarer|co||r|b|b||cc|.|r| * 0 20966. |w5||exx||co|Examples: * 0 20967. |ex|a) |i||so|1 : n|sc|#REAL|q|PERSON|r|? 0 20968. |ez|b) |i||so||thin||sc|#REAL|qs|STRING|r|? 0 20969. |ey|c) |i|REF REAL|r|? 0 20970. |ey|d) |i|STRUCT (INT age, REF PERSON father, son)|r|? 0 20971. |ey|e) |i|REF PERSON father, son|q||g| * 0 20972. |i|INT age, REF PERSON father, son|r|? 0 20973. |ey|f) |i|age|r|? 0 20974. |ez|g) |i|FLEX |so|1 : n|sc|#REAL|r|? 0 20975. |ey|h) |i||so|1 : m, 1 : n|sc| REAL|r|? 0 20976. |ez|i) |i|1 : m, 1 : n|r|? 0 20977. |ey|j) |i|1 : n|r|? 0 20978. |ez|k) |i|:|r|? 0 20979. |ey|l) |i|:|r|? 0 20980. |ez|m) |i|1|r|? 0 20981. |ey|n) |i|n|r|? 0 20982. |ez|o) |i|PROC (BOOL, BOOL) BOOL|r|? 0 20983. |ey|p) |i|(BOOL, BOOL) BOOL|r|? 0 20984. |ez|q) |i|BOOL, BOOL|r|? 0 20985. |ey|r) |i|BOOL|r|? 0 20986. |ez|s) |i|UNION (INT, CHAR)|r|? 0 20987. |ey|t) |i|INT, CHAR|r|? 0 20988. |ez|u) |i|INT|r|#|cc|? 0 20989. |pa||j||co|For |b|actual-MOID-TALLY-declarers|r|, see 4.2.1.c; for |b|actual-routine-declarers|r|, * 0 20990. see 4.4.1.b. * 0 20991. |pg|There are no |b|declarers|r| specifying modes such as * 0 20992. |b||ap|union of integral union of integral real mode mode|ap||r| or * 0 20993. |b||ap|union of integral real integral mode|ap||r|. * 0 20994. The |b|declarers|r| |i|UNION (INT, UNION (INT, REAL))|r| and * 0 20995. |i|UNION (INT, REAL, INT)|r| may indeed be written, but in both cases * 0 20996. the mode specified is |b||ap|union of integral real mode|ap||r| * 0 20997. (which can as well be spelled |b||ap|union of real integral mode|ap||r|).|cc| * 0 20998. * 0 20999. |h|4.6.2. Semantics * 0 21000. * 0 21001. |pb1||j|a)|tp1|The yield |w|W|r| of an |b|actual-MODE-declarer|r| |w|D|r|, in an environ |w|E|r|, * 0 21002. is determined as follows: * 0 21003. |pi|If |b||ap|MODE|ap||r| is some |b||ap|STOWED|ap||r|, * 0 21004. |pi|then * 0 21005. |et|let |w|D1|r| in |w|E1|r| be "developed" |co|c|cc| from |w|D|r| in |w|E|r|; * 0 21006. |et||w|W|r| is the yield of |co|the |b|declarator|r||cc| |w|D1|r| in an * 0 21007. environ established |co|locally, see 3.2.2.b|cc| upon |w|E|r| and around |w|E1|r|; * 0 21008. |pi|otherwise, * 0 21009. |et||w|W|r| is any value |co|acceptable to |b||ap|MODE|ap||r||cc|. * 0 21010. |pb1|b)|tp1|The yield |w|W|r| of an |b|actual-STOWED-declarator|r| |w|D|r| is * 0 21011. determined as follows: * 0 21012. |pi|Case#A: |b||ap|STOWED|ap||r| is some |b||ap|structured with FIELDS mode|ap||r|: * 0 21013. |et|the constituent |b|declarers|r| of |w|D|r| are elaborated collaterally; * 0 21014. |et|each field of |w|W|r| is a variant |co|4.4.2.c|cc| * 0 21015. |pha11|(i)|thb1|of the yield of the last * 0 21016. constituent |b|MODE-declarer|r| of |w|D|r| occurring before the constituent * 0 21017. |b|defining-field-selector|r| of |w|D|r| selecting |co|2.1.5.g|cc| that field, * 0 21018. |pha21|(ii)|thb1|for that |b||ap|MODE|ap||r|; * 0 21019. |pi|Case#B: |b||ap|STOWED|ap||r| is some |b||ap|ROWS of MODE|ap||r|: * 0 21020. |et|all the constituent |b|lower-bounds|r| and |b|upper-bounds|r| of |w|D|r| * 0 21021. and the |b|declarer|r| |w|D1|r| * 0 21022. of |w|D|r| are elaborated collaterally; * 0 21023. |ph|For |w|i |uqe| 1, ...#, n|r|, * 0 21024. where |w|n|r| is the number of |b||ap|row|ap||r|s contained in |b||ap|ROWS|ap||r|, * 0 21025. |et|let |w|l|s0|i|s1||r| be the yield of the |b|lower-bound|r|, * 0 21026. if any, of the |w|i|r||hy|th constituent * 0 21027. |b|row-rower|r| of |w|D|r|, and be |w|1|r| otherwise; * 0 21028. |et|let |w|u|s0|i|s1||r| be the yield of the |b|upper-bound|r| of that |b|row-rower|r|;? 0 21029. |xi||bt||w|W|r| is composed of * 0 21030. |pha11|(i)|thb1|a descriptor |w|((l|s0|1|s1|,#u|s0|1|s1|), ...#, (l|s0|n|s1|,#u|s0|n|s1|))|r|,? 0 21031. |pha21|(ii)|thb1|variants of the yield of |w|D1|r|, for |b||ap|MODE|ap||r|; * 0 21032. |pi|Case#C: |b||ap|STOWED|ap||r| is some |b||ap|flexible ROWS of MODE|ap||r|: * 0 21033. |et||w|W|r| is the yield of the |b|declarer|r| of |w|D|r|. * 0 21034. |pb1|c)|tp1|The scene |w|S|r| "developed from" * 0 21035. an |b|actual-STOWED-declarer|r| |w|D|r| in an environ |w|E|r| is determined as follows: * 0 21036. |pi|If the visible direct descendent |w|D1|r| of |w|D|r| is a |b|mode-indication|r|, * 0 21037. |pi|then |et||w|S|r| is the scene developed from that yielded by |w|D1|r| in |w|E|r|; * 0 21038. |pi|otherwise |co||w|D1|r| is a |b|declarator|r||cc|, * 0 21039. |et||w|S|r| is composed of |w|D1|r| and |w|E|r|. * 0 21040. |pb1|d)|tp1|A given |b|MOID-declarer|r| "specifies" the mode |b||ap|MOID|ap||r|. * 0 21041. * 0 21042. |h|4.7. Relationships between modes * 0 21043. * 0 21044. |pa||j||co|Some modes must be deflexed because the mode of a value may * 0 21045. not be flexible (2.1.3.6.b). Incestuous unions must be prevented in * 0 21046. order to avoid ambiguities. * 0 21047. A set of |b||ap|UNITED|ap||r|s and |b||ap|MOODS|ap||r|s may be ravelled by * 0 21048. replacing all those |b||ap|UNITED|ap||r|s by their component * 0 21049. |b||ap|MOODS|ap||r|s.|cc| * 0 21050. * 0 21051. |h1|4.7.1. Syntax * 0 21052. * 0 21053. |pb1|A)|ts1||b|NONSTOWED :: PLAIN ; REF to MODE ; PROCEDURE ; UNITED ; void.|r| * 0 21054. |p1|B)|ts1||b|MOODSETY :: MOODS ; EMPTY.|r|? 0 21055. |p1|C)|ts1||b|MOIDSETY :: MOIDS ; EMPTY.|r| * 0 21056. |pb1|a)|ts1||b|WHETHER NONSTOWED deflexes to NONSTOWED$#|co||r|b,e,46b,521c,62a,71n|b||cc| : * 0 21057. WHETHER true.|r| * 0 21058. |p1|b)|ts1||b|WHETHER FLEXETY ROWS of MODE1 deflexes to$#? 0 21059. ROWS of MODE2$|co||r|b,e,46b,521c,62a,71n|b||cc| : * 0 21060. |e|WHETHER MODE1 deflexes to MODE2$|co||r|a,b,c,|mi||b||cc|.|r| * 0 21061. |p1|c)|ts1||b|WHETHER structured with FIELDS1 mode deflexes to$#? 0 21062. structured with FIELDS2 mode|co||r|b,e,46b,521c,62a,71n|b||cc| : * 0 21063. WHETHER FIELDS1 deflexes to FIELDS2|co||r|d,e,|mi||b||cc|.|r|? 0 21064. |p1|d)|ts1||b|WHETHER FIELDS1 FIELD1 deflexes to$#? 0 21065. FIELDS2 FIELD2|co||r|c,d|b||cc| : * 0 21066. WHETHER FIELDS1 deflexes to FIELDS2|co||r|d,e,|hy||b||cc|$#and * 0 21067. FIELD1 deflexes to FIELD2|co||r|e,|mi||b||cc|.|r| * 0 21068. |p1|e)|ts1||b|WHETHER MODE1 field TAG deflexes to$#? 0 21069. MODE2 field TAG|co||r|c,d|b||cc| : * 0 21070. WHETHER MODE1 deflexes to MODE2|co||r|a,b,c,|mi||b||cc|.|r|? 0 21071. |pb1|f)|ts1||b|WHETHER MOODSETY1 with MOODSETY2 incestuous|co||r|f,46s|b||cc| : * 0 21072. where (MOODSETY2) is (MOOD MOODSETY3), * 0 21073. |ga|WHETHER MOODSETY1 MOOD with MOODSETY3$#incestuous|co||r|f|b||cc|$#? 0 21074. or MOOD is firm union of$#MOODSETY1 MOODSETY3 mode$|co||r|71m|b||cc| ; * 0 21075. |xs|where (MOODSETY2) is (EMPTY), WHETHER false.|r|? 0 21076. |pb1|g)|ts1||b|WHETHER MOIDS ravels to MOODS|co||r|g,46s|b||cc| : * 0 21077. where (MOIDS) is (MOODS), WHETHER true ; * 0 21078. |e|where (MOIDS) is$#(MOODSETY union of MOODS1 mode MOIDSETY), * 0 21079. WHETHER MOODSETY MOODS1 MOIDSETY$#ravels to MOODS|co||r|g|b||cc|.|r|? 0 21080. |pa||j||co|A component mode of a union may not be firmly coerced to one * 0 21081. of the other component modes or to the union of those others (rule f) * 0 21082. for, otherwise, ambiguities could arise. For example, * 0 21083. |p||ps||i|UNION (REF INT, INT) (LOC INT)|r|, * 0 21084. |p|is ambiguous in that dereferencing may or may not occur before the uniting. * 0 21085. Similarly, * 0 21086. |n||p||ps||i|MODE SZP |uqe| UNION (SZEREDI, PETER); * 0 21087. |p||ps|UNION (REF SZP, SZP) (LOC SZP)|r| * 0 21088. |j||p|is ambiguous. Note that, because of ravelling (rule g), * 0 21089. the mode specified by the declarer of the |b|cast|r| is more * 0 21090. closely suggested by |i|UNION (REF SZP, SZEREDI, PETER)|r|.|cc| * 0 21091. * 0 21092. |h|4.8. Indicators and field selectors * 0 21093. * 0 21094. |h1|4.8.1. Syntax * 0 21095. * 0 21096. |pb1|A)|ts1||b|INDICATOR :: identifier ; mode indication ; operator.|r|? 0 21097. |p1|B)|ts1||b|DEFIED :: defining ; applied.|r|? 0 21098. |p1|C)|ts1||b|POPSETY :: PROPS ; EMPTY.|r| * 0 21099. |p1|D)|ts1||b|POPS :: PROP ; PROPS PROP.|r| * 0 21100. |p1|E)|ts1||b|POP :: DEC ; LAB ; FIELD.|r| * 0 21101. |p1|F)|ts1||b|QUALITY :: * 0 21102. |e|MODE ; MOID TALLY ; DYADIC ; label ; MODE field.|r| * 0 21103. |p1|G)|ts1||b|TX :: TAG ; TAB ; TAD ; TAM.|r| * 0 21104. |pb1|a)|ts1||b|QUALITY NEST new PROPSETY1 QUALITY TAX PROPSETY2$#defining INDICATOR with TAX$|co||r|32c,? 0 21105. 35b,42b,43b,44c,f,45c,541f|b||cc| : * 0 21106. |e|where QUALITY TAX independent PROPSETY1 PROPSETY2$#|co||r|71a,b,c|b||cc|, * 0 21107. TAX|co||r|942A,D,F,K|b||cc| token.|r| * 0 21108. |p1|b)|ts1||b|QUALITY NEST applied INDICATOR with TAX$#|co||r|42c,46a,b,5D,542a,b,544a|b||cc| :? 0 21109. |e|where QUALITY TAX identified in NEST|co||r|72a|b||cc|, * 0 21110. TAX|co||r|942A,D,F,K|b||cc| token.|r| * 0 21111. |p1|c)|ts1||b|MODE field PROPSETY1 MODE field TAG PROPSETY2 * 0 21112. defining$#field selector with TAG|co||r|46f|b||cc| : * 0 21113. where MODE field TAG independent PROPSETY1 PROPSETY2$#|co||r|71a,b,c|b||cc|, * 0 21114. TAG |co||r|942A|b||cc| token.|r| * 0 21115. |p1|d)|ts1||b|MODE field FIELDS applied field selector with TAG|co||r|531a|b||cc| :? 0 21116. where MODE field TAG resides in FIELDS|co||r|72b,c,|mi||b||cc|, * 0 21117. TAG|co||r|942A|b||cc| token.|r| * 0 21118. |pb1|e)|ts1||star||b|QUALITY NEST DEFIED indicator with TAX : * 0 21119. QUALITY NEST DEFIED INDICATOR with TAX|co||r|a,b|b||cc|.|r|? 0 21120. |p1|f)|ts1||star||b|MODE DEFIED field selector with TAG : * 0 21121. |e|MODE field FIELDS DEFIED field selector with TAG|co||r|c,d|b||cc|.|r| * 0 21122. |w5||exx||co|Examples: * 0 21123. |ex|a) |i|x|r| (in |i|REAL x, y|r|) * 0 21124. |ez|b) |i|x|r| (in |i|x + y|r|) * 0 21125. |ey|c) |i|next|r| (see 1.1.2) * 0 21126. |ez|d) |i|next|r| (in |i|next OF draft|r|) |cc|? 0 21127. * 0 21128. |h|4.8.2. Semantics * 0 21129. * 0 21130. |pb1||j|a)|tp1|When a value or a scene |w|V|r| is "ascribed" to a * 0 21131. |b|QUALITY-defining-indicator-with-TAX|r|, in an environ |w|E|r|, then * 0 21132. |b||ap|QUALITY TAX|ap||r| is made to access |w|V|r| inside * 0 21133. the locale of |w|E|r| |co|2.1.2.c|cc|. * 0 21134. |pb1|b)|tp1|The yield |w|W|r| of a |b|QUALITY-applied-indicator-with-TAX|r| |w|I|r| in an environ * 0 21135. |w|E|r| composed of an environ |w|E1|r| and a locale |w|L|r| is determined as follows: * 0 21136. |pi|If |w|L|r| corresponds to a |b||ap|DECSETY LABSETY|ap||r| which envelops |co|1.1.4.1.c|cc| * 0 21137. that |b||ap|QUALITY TAX|ap||r|, * 0 21138. |pi|then |w|W|r| is the value or scene, if any, accessed inside |w|L|r| by |b||ap|QUALITY TAX|ap||r| * 0 21139. and, otherwise, is undefined; * 0 21140. |pi|otherwise, |w|W|r| is the yield of |w|I|r| in |w|E1|r|. * 0 21141. |pa||co|Consider the following |b|closed-clause|r|, which contains another one: * 0 21142. |n||p||ps||i|BEGIN CO range 1 CO * 0 21143. |e|INT i |uqe| 421, * 0 21144. INT a |bec| 5, * 0 21145. PROC p |uqe| VOID : print (a); * 0 21146. |pc|BEGIN CO range 2 CO * 0 21147. |e|REAL a; a |bec| i; p * 0 21148. |pc|END * 0 21149. |xh|END|r|. * 0 21150. |pg||j|By the time |i|a |bec| i|r| is encountered during the elaboration, two new environs * 0 21151. have been created, one for each range. The |b|defining-identifier|r| |i|i|r| is first sought in the * 0 21152. newer one, |w|E2|r|, is not found there, and then is sought and found in the older one, |w|E1|r|. * 0 21153. The locale of |w|E1|r| corresponds to |b||ap|integral letter i reference to integral letter a procedure * 0 21154. yielding void letter p|ap||r|. The yield of the |b|applied-identifier|r| |i|i|r| is therefore the value * 0 21155. |w|421|r| which has been ascribed (a) to |b||ap|integral letter i|ap||r| inside the locale of |w|E1|r|. * 0 21156. The yield of |i|a|r|, in |i|a |bec| i|r|, however, is found from the locale of |w|E2|r|. |pg|When * 0 21157. |i|p|r| is called (5.4.3.2.b), its |b|unit|r| is elaborated in an environ |w|E3|r| * 0 21158. established around |w|E1|r| but upon |w|E2|r| (3.2.2.b). This means that, * 0 21159. for scope purposes, |w|E3|r| is newer than |w|E2|r|, but the component environ of |w|E3|r| * 0 21160. is |w|E1|r|. When |i|a|r| comes to be printed, it is the yield |w|5|r| of the * 0 21161. |b|reference-to-integral-identifier|r| |i|a|r| declared in the outer |b|range|r| that is obtained. * 0 21162. |pa|Thus, the meaning of an |b|indicator|r| applied but not defined within * 0 21163. a routine is determined by the context in which the routine was created, rather * 0 21164. than that in which it is called.|cc| * 0 21165. * 0 21166. |h|5. |bs|Units|rs| * 0 21167. * 0 21168. |pa||j||co||b|Units|r| are used to program the more primitive actions or to put into one single piece * 0 21169. the larger constructs of Chapter 3. * 0 21170. |pg||b|NOTION-coercees|r| are the results of coercion (Chapter 6), but |b|hips|r| are not; * 0 21171. in the case of |b|ENCLOSED-clauses|r|, any coercions needed are performed inside them. * 0 21172. |pg|The syntax below implies, for example, that * 0 21173. |i|text#OF#draft#+ "the|ivs|end"|r| * 0 21174. is parsed as |i|(text#OF#draft)#+ "the|ivs|end"|r| * 0 21175. since a |b|selection|r| is a |b||ap|SECONDARY|ap||r| whereas a |b|formula|r| is a |b||ap|TERTIARY|ap||r|.|cc| * 0 21176. * 0 21177. |h|5.1. Syntax? 0 21178. * 0 21179. |pb1|A)|ts1||b|UNIT|co||r|32d|b||cc| :: assignation|co||r|521a|b||cc| coercee ; * 0 21180. identity relation|co||r|522a|b||cc| coercee ; routine text|co||r|541a,b|b||cc| coercee ; * 0 21181. jump|co||r|544a|b||cc| ; skip|co||r|552a|b||cc| ; TERTIARY|co||r|B|b||cc|.|r| * 0 21182. |p1|B)|ts1||b|TERTIARY|co||r|A,521b,522a|b||cc| :: * 0 21183. ADIC formula|co||r|542a,b|b||cc| coercee ; nihil|co||r|524a|b||cc| ; SECONDARY|co||r|C|b||cc|.|r| * 0 21184. |p1|C)|ts1||b|SECONDARY|co||r|B,531a,542c|b||cc| :: * 0 21185. LEAP generator|co||r|523a|b||cc| coercee ; * 0 21186. selection|co||r|531a|b||cc| coercee ; * 0 21187. PRIMARY|co||r|D|b||cc|.|r| * 0 21188. |p1|D)|ts1||b|PRIMARY|co||r|C,532a,543a|b||cc| :: * 0 21189. slice|co||r|532a|b||cc| coercee ; call|co||r|543a|b||cc| coercee ; * 0 21190. cast|co||r|551a|b||cc| coercee ; denoter|co||r|80a|b||cc| coercee ; * 0 21191. format text|co||r|A341a|b||cc| coercee ; * 0 21192. applied identifier with TAG|co||r|48b|b||cc| coercee ;? 0 21193. ENCLOSED clause|co||r|31a,33a,c,d,e,34a,35a|b||cc|.|r| * 0 21194. |pa||j||co|The hyper-rules for |b||ap|SORT MOID FORM coercee|ap||r| are given * 0 21195. in 6.1.1.a, b, c, d and e, the entry rules of the coercion syntax. * 0 21196. When the coercion syntax is invoked for some |b||ap|SORT MOID FORM coercee|ap||r|, * 0 21197. it will eventually return to a rule in this chapter for some |b||ap|MOID1 FORM|ap||r| (blind * 0 21198. alleys apart). It is the cross-reference to that rule that is given in the * 0 21199. metaproduction rules above. No other visible descendent has been produced in the meantime; * 0 21200. the coercion syntax merely transforms |b||ap|MOID|ap||r| into |b||ap|MOID1|ap||r| for semantical purposes.|cc| * 0 21201. |pb1||n|a)|ts1||star||b|SOME hip : * 0 21202. |e|SOME jump|co||r|544a|b||cc| ; SOME skip|co||r|552a|b||cc| ; SOME nihil|co||r|524a|b||cc|.|r| * 0 21203. |pa||j||co|The mode of a |b|hip|r| is always that required, a posteriori, * 0 21204. by its context, and its yield * 0 21205. is acceptable to that mode. Since any mode is so easily accommodated, no coercion is permitted.|cc| * 0 21206. * 0 21207. |h|5.2. Units associated with names * 0 21208. * 0 21209. |pa||j||co|Names may be assigned to (5.2.1), compared with other names (5.2.2) and created(5.2.3).|cc| * 0 21210. * 0 21211. |h|5.2.1. Assignations * 0 21212. * 0 21213. |pa||j||co|In |b|assignations|r|, a value is "assigned" to a name. E.g., in |i|x |bec| 3.14|r|, * 0 21214. the real number yielded by the * 0 21215. |b|source|r| |i|3.14|r| is assigned to the name yielded by the |b|destination|r| |i|x|r|.|cc| * 0 21216. * 0 21217. |h1|5.2.1.1. Syntax * 0 21218. * 0 21219. |pb1|a)|ts1||b|REF to MODE NEST assignation|co||r|5A|b||cc| : |e|REF to MODE NEST * 0 21220. destination|co||r|b|b||cc|, becomes|co||r|94c|b||cc| token, MODE NEST source|co||r|c|b||cc|.|r| * 0 21221. |p1|b)|ts1||b|REF to MODE NEST destination|co||r|a|b||cc| : * 0 21222. |e|soft REF to MODE NEST TERTIARY|co||r|5B|b||cc|.|r| * 0 21223. |p1|c)|ts1||b|MODE1 NEST source|co||r|a,44d|b||cc| : strong MODE2 NEST unit|co||r|32d|b||cc|, * 0 21224. where MODE1 deflexes to MODE2|co||r|47a,b,c,|mi||b||cc|.|r|? 0 21225. |w5||exx||co|Examples: * 0 21226. |ex|a) |i|x |bec| 3.14|r|? 0 21227. |ez|b) |i|x|r|? 0 21228. |ey|c) |i|3.14|r| |cc|? 0 21229. * 0 21230. |h|5.2.1.2. Semantics * 0 21231. * 0 21232. |pb1||j|a)|tp1|An |b|assignation|r| |w|A|r| is elaborated * 0 21233. as follows: * 0 21234. |et|let |w|N|r| and |w|W|r| be the |co|collateral|cc| yields |co|a name and another value|cc| * 0 21235. of the |b|destination|r| and |b|source|r| of |w|A|r|; * 0 21236. |et||w|W|r| is assigned to |co|b|cc| |w|N|r|; * 0 21237. |et|the yield of |w|A|r| is |w|N|r|.? 0 21238. |pb1|b)|tp1|A value |w|W|r| is "assigned to" a name |w|N|r|, * 0 21239. whose mode is some |b||ap|REF to MODE|ap||r|, as follows: * 0 21240. |pi|It is required that * 0 21241. |et||w|N|r| be not nil, and that * 0 21242. |et||w|W|r| be not newer in scope than |w|N|r|; * 0 21243. |pi|Case#A: |b||ap|MODE|ap||r| is some |b||ap|structured with FIELDS mode|ap||r|: * 0 21244. |ph|For each |b||ap|TAG|ap||r| selecting a field in |w|W|r|, * 0 21245. |et|that field is assigned to the subname selected by |b||ap|TAG|ap||r| in |w|N|r|; * 0 21246. |pi|Case#B: |b||ap|MODE|ap||r| is some |b||ap|ROWS of MODE1|ap||r|: * 0 21247. |et|let |w|V|r| be the |co|old|cc| value referred to by |w|N|r|; * 0 21248. |et|it is required that the descriptors of |w|W|r| and |w|V|r| be identical; * 0 21249. |ph|For each index |w|I|r| selecting an element in |w|W|r|, * 0 21250. |et|that element is assigned to the subname selected by |w|I|r| in |w|N|r|; * 0 21251. |pi|Case#C: |b||ap|MODE|ap||r| is some |b||ap|flexible ROWS of MODE1|ap||r|: * 0 21252. |et|let |w|V|r| be the |co|old|cc| value referred to by |w|N|r|; * 0 21253. |et||w|N|r| is made to refer to a multiple value * 0 21254. composed of * 0 21255. |pha11|(i)|thb1|the descriptor of |w|W|r|, * 0 21256. |pha21|(ii)|thb1|variants |co|4.4.2.c|cc| of some element * 0 21257. |co|possibly a ghost element|cc| of |w|V|r|; * 0 21258. |xi||bt||w|N|r| is endowed with subnames |co|2.1.3.4.g|cc|; * 0 21259. |ph|For each index |w|I|r| selecting an element in |w|W|r|, * 0 21260. |et|that element is assigned to the subname selected by |w|I|r| in |w|N|r|;? 0 21261. |pi|Other Cases |co|e.g., where |b||ap|MODE|ap||r| is some |b||ap|PLAIN|ap||r| or some |b||ap|UNITED|ap||r||cc|: * 0 21262. |et||w|N|r| is made to refer |co|2.1.3.2.a|cc| to |w|W|r|. * 0 21263. |pa||co|Observe how, given * 0 21264. |xh||i|FLEX |so|1 : 0|sc| |so|1 : 3|sc| INT flexfix|r|, * 0 21265. |p|the presence of the ghost element (2.1.3.4.c) ensures that the meaning of * 0 21266. |i|flexfix |bec| LOC |so|1 : 1|sc| |so|1 : 3|sc| INT|r| is well defined, but that of * 0 21267. |i|flexfix |bec| LOC |so|1 : 1|sc| |so|1 : 4|sc| INT|r| is not, * 0 21268. since the bound pairs of the second dimension are different.|cc| * 0 21269. * 0 21270. |h|5.2.2. Identity relations * 0 21271. * 0 21272. |pa||j||co||b|Identity-relations|r| may be used to ask whether two names of the same mode * 0 21273. are the same. |pg|E.g., after the |b|assignation|r| |i|draft |bec| ("abc", NIL)|r|, * 0 21274. the |b|identity-relation|r| * 0 21275. |i|next OF draft |bec|: REF BOOK (NIL)|r| yields |w|true|r|. However, |i|next OF draft |bec|: NIL|r| * 0 21276. yields |w|false|r| because it is equivalent to |i|next OF draft |bec|: REF REF BOOK (NIL)|r|: * 0 21277. the yield of |i|next OF draft|r|, without any coercion, is the name referring to the * 0 21278. second field of the structured value referred to by the value of * 0 21279. |i|draft|r| and, hence, is not nil.|cc| * 0 21280. * 0 21281. |h1|5.2.2.1. Syntax * 0 21282. * 0 21283. |pb1|a)|ts1||b|boolean NEST identity relation|co||r|5A|b||cc| : * 0 21284. where soft balances SORT1 and SORT2|co||r|32f|b||cc|,? 0 21285. SORT1 reference to MODE NEST TERTIARY1|co||r|5B|b||cc|, identity relator|co||r|b|b||cc|, * 0 21286. SORT2 reference to MODE NEST TERTIARY2|co||r|5B|b||cc|.|r| * 0 21287. |p1|b)|ts1||b|identity relator|co||r|a|b||cc| : * 0 21288. is|co||r|94f|b||cc| token ; is not|co||r|94f|b||cc| token.|r| * 0 21289. |w5||exx||co|Examples: * 0 21290. |ex|a) |i|next OF draft |bec|: REF BOOK (NIL)|r| * 0 21291. |ey|b) |i||bec|:|q|:|ne|:|r|#|cc|? 0 21292. |pa||j||co|Observe that |i|a1 |so|i|sc| |bec|: a1 |so|j|sc||r| is not produced by this syntax. * 0 21293. The comparison, by an |b|identity-relation|r|, of transient names (2.1.3.6.c) * 0 21294. is thus prevented.|cc| * 0 21295. * 0 21296. |h|5.2.2.2. Semantics * 0 21297. * 0 21298. |pa||j|The yield |w|W|r| of an |b|identity-relation|r| |w|I|r| is * 0 21299. determined as follows: * 0 21300. |et|let |w|N1|r| and |w|N2|r| be the |co|collateral|cc| yields of the * 0 21301. |b|TERTIARY|r|s of |w|I|r|; * 0 21302. |pi|Case#A: The |b|token|r| of the |b|identity-relator|r| of |w|I|r| is an |b|is-token|r|: * 0 21303. |et||w|W|r| is |w|true|r| if |co|the name|cc| |w|N1|r| is the same as |w|N2|r|, * 0 21304. and is |w|false|r| otherwise; * 0 21305. |pi|Case#B: The |b|token|r| of the |b|identity-relator|r| of |w|I|r| is an |b|is-not-token|r|: * 0 21306. |et||w|W|r| is |w|true|r| if |w|N1|r| is not the same as |w|N2|r|, * 0 21307. and is |w|false|r|, otherwise. * 0 21308. * 0 21309. |h|5.2.3. Generators * 0 21310. * 0 21311. |pq||j||co||w|And as imagination bodies forth * 0 21312. |pp|The forms of things unknown, the poet|ap|s pen * 0 21313. |pp|Turns them to shapes, and gives to airy nothing * 0 21314. |pp|A local habitation and a name. * 0 21315. |ppp|A Midsummer-night|ap|s Dream, * 0 21316. |p||pr|William Shakespeare.|r||cc||qq| * 0 21317. |pa||co|The elaboration of a |b|generator|r|, e.g., |i|LOC REAL|r| in |i|xx |bec| LOC REAL |bec| 3.14|r|, * 0 21318. or of a |b|sample-generator|r|, e.g., |i||so|1 : n|sc| CHAR|r| in * 0 21319. |i||so|1 : n|sc| CHAR u, v;|r|, involves the creation of a name, i.e., the reservation of storage. * 0 21320. |pg|The use of a |b|local-generator|r| implies (with most implementations) the reservation * 0 21321. of storage on a run-time stack, whereas |b|heap-generators|r| imply the reservation of storage in * 0 21322. another region, termed the "heap", in which garbage-collection techniques may be used for storage * 0 21323. retrieval. Since this is less efficient, |b|local-generators|r| are preferable; this is * 0 21324. why only |i|LOC|r| may be omitted from |b|sample-generators|r| of |b|variable-declarations|r|.|cc|? 0 21325. * 0 21326. |h1|5.2.3.1. Syntax * 0 21327. * 0 21328. |pb||ps||co||b|LEAP :: local ; heap ; primal.|r||cc| * 0 21329. |pb1|a)|ts1||b|reference to MODE NEST LEAP generator|co||r|5C|b||cc| :? 0 21330. LEAP|co||r|94d,|mi||b||cc| token, actual MODE NEST declarer|co||r|46a|b||cc|.|r| * 0 21331. |p1|b)|ts1||b|reference to MODINE$#NEST LEAP sample generator|co||r|44e|b||cc| :? 0 21332. LEAP|co||r|94d,|mi||b||cc| token, actual MODINE NEST declarer|co||r|44b,46a|b||cc| ;? 0 21333. |e|where (LEAP) is (local),? 0 21334. actual MODINE NEST declarer|co||r|44b,46a|b||cc|.|r|? 0 21335. |w5||exx||co|Examples: * 0 21336. |ex|a) |i|LOC REAL|r| |ez|b) |i|LOC REAL|qs|REAL|r|#|cc|? 0 21337. |pa||co|There is no representation for the |b|primal-symbol|r| (see 9.4.a).|cc| * 0 21338. * 0 21339. |h|5.2.3.2. Semantics * 0 21340. * 0 21341. |pb1||j|a)|tp1|The yield |w|W|r| of a |b|LEAP-generator|r| * 0 21342. or |b|LEAP-sample-generator|r| |w|G|r|, * 0 21343. in an environ |w|E|r|, is determined as follows: * 0 21344. |et||w|W|r| is a newly created name which is made to refer |co|2.1.3.2.a|cc| * 0 21345. to the yield in |w|E|r| of the * 0 21346. |b|actual-declarer|r| |co|4.4.2.d, 4.6.2.a|cc| of |w|G|r|; * 0 21347. |et||w|W|r| is equal in scope to the environ |w|E1|r| determined as follows: * 0 21348. |ph|Case#A: |b||ap|LEAP|ap||r| is |b||ap|local|ap||r|: * 0 21349. |et||w|E1|r| is the "local environ" |co|b|cc| accessible from |w|E|r|; * 0 21350. |ph|Case#B: |b||ap|LEAP|ap||r| is |b||ap|heap|ap||r|: * 0 21351. |et||w|E1|r| is |co|the first environ created during the elaboration of the * 0 21352. |b|particular-program|r|, which is|cc| such that * 0 21353. |pha12|(i)|thb2|the primal environ |co|2.2.2.a|cc| is the environ of * 0 21354. the environ of the environ of |w|E1|r| |co|sic|cc|, and * 0 21355. |pha22|(ii)|thb2||w|E1|r| is, or is older than, |w|E|r|; * 0 21356. |ph|Case#C: |b||ap|LEAP|ap||r| is |b||ap|primal|ap||r|: * 0 21357. |et||w|E1|r| is the primal environ; * 0 21358. |p||bt|if |w|W|r| is a stowed name |co|2.1.3.2.b|cc|, then |w|W|r| is * 0 21359. endowed with subnames |co|2.1.3.3.e, 2.1.3.4.g|cc|. * 0 21360. |pa||co|The only examples of |b|primal-generators|r| occur in the * 0 21361. |b|standard-|r| and |b|system-preludes|r| (10.3.1.1.h, 10.3.1.4.b,n,o, 10.4.1.a). * 0 21362. |pg|When |w|G|r| is a |b|reference-to-routine-sample-generator|r|, the mode of |w|W|r| is * 0 21363. of no relevance.|cc| * 0 21364. |pb1|b)|tp1|The "local environ" accessible from an environ |w|E|r| * 0 21365. is an environ |w|E1|r| determined as follows: * 0 21366. |ph|If |w|E|r| is "nonlocal" |co|3.2.2.b|cc|, * 0 21367. |ph|then * 0 21368. |w|E1|r| is the local environ accessible from the environ of |w|E|r|; * 0 21369. |ph|otherwise, * 0 21370. |w|E1|r| is |w|E|r|. * 0 21371. |pa||co|An environ is nonlocal if it has been established according to a * 0 21372. |b|serial-clause|r| or |b|enquiry-clause|r| which contains no constituent * 0 21373. |b|mode-|r|, |b|identifier-|r|, or |b|operation-declaration|r|, or * 0 21374. according to a |b|for-part|r| (3.5.1.b) or a |b|specification|r| (3.4.1.j,k).|cc|? 0 21375. * 0 21376. |h|5.2.4. Nihils * 0 21377. * 0 21378. |h1|5.2.4.1. Syntax? 0 21379. * 0 21380. |pb1|a)|ts1||b|strong reference to MODE NEST nihil|co||r|5B|b||cc| : nil|co||r|94f|b||cc| token.|r| * 0 21381. |pa||co|Example: * 0 21382. |ex|a) |i|NIL|r| |cc| * 0 21383. * 0 21384. |h|5.2.4.2. Semantics * 0 21385. * 0 21386. |pa||j|The yield of a |b|nihil|r| is a nil name. * 0 21387. * 0 21388. |w10||h|5.3. Units associated with stowed values * 0 21389. * 0 21390. |pq||j||co||w|In Flanders fields the poppies blow? 0 21391. |pp|Between the crosses, row on row, ... * 0 21392. |ppp|In Flanders Fields, |pr|John McCrae.|r||cc||qq|? 0 21393. |pa||co|The fields of structured values may be obtained by |b|selections|r| (5.3.1) * 0 21394. and the elements of multiple values by |b|slices|r| (5.3.2); the corresponding effects on * 0 21395. stowed names are defined also.|cc| * 0 21396. * 0 21397. |h|5.3.1. Selections * 0 21398. * 0 21399. |pa||j||co|A |b|selection|r| selects a field from a structured value * 0 21400. or (if it is a "multiple selection") it selects a multiple value from a * 0 21401. multiple value whose elements are structured values. For example, |i|re OF z|r| selects the first * 0 21402. real field (usually termed the real part) of the yield of |i|z|r|. If |i|z|r| yields a name, then * 0 21403. |i|re OF z|r| also yields a name, but if |i|g|r| yields a complex value, then |i|re OF g|r| * 0 21404. yields a real value, not a name referring to one.|cc| * 0 21405. * 0 21406. |h1|5.3.1.1. Syntax * 0 21407. * 0 21408. |pb1|A)|ts1||b|REFETY :: REF to ; EMPTY.|r|? 0 21409. |p1|B)|ts1||b|REFLEXETY :: REF to ; REF to flexible ; EMPTY.|r|? 0 21410. |p||ps||co||b|REF :: reference ; transient reference.|r||cc|? 0 21411. |pb1|a)|ts1||b|REFETY MODE1 NEST selection|co||r|5C|b||cc| : * 0 21412. MODE1 field FIELDS applied field selector with TAG|co||r|48d|b||cc|, * 0 21413. of |co||r|94f|b||cc| token, * 0 21414. weak REFETY structured with FIELDS mode$#NEST SECONDARY|co||r|5C|b||cc| ; * 0 21415. |e|where (MODE1) is (ROWS of MODE2), * 0 21416. MODE2 field FIELDS applied field selector with TAG|co||r|48d|b||cc|, of|co||r|94f|b||cc| token, * 0 21417. weak REFLEXETY ROWS of structured with$#FIELDS mode NEST SECONDARY|co||r|5C|b||cc|, * 0 21418. where (REFETY) is derived from (REFLEXETY)|co||r|b,c,|mi||b||cc|.|r|? 0 21419. |p1|b)|ts1||b|WHETHER (transient reference to) is derived from$#? 0 21420. (REF to flexible)|co||r|a,532a,66a|b||cc| : * 0 21421. WHETHER true.|r| * 0 21422. |p1|c)|ts1||b|WHETHER (REFETY) is derived from (REFETY)|co||r|a,532a,66a|b||cc| : WHETHER true.|r|? 0 21423. |w5||exx||co|Examples: * 0 21424. |ex|a) |i|re OF z|q|? 0 21425. re OF z1|r|#|cc|? 0 21426. |j||pa||co|The mode of |i|re OF z|r| begins with |b||ap|reference to|ap||r| because that of |i|z|r| * 0 21427. does. * 0 21428. |exx|Example: * 0 21429. |xh||i|INT age |bec| 7; STRUCT (BOOL sex, INT age) jill; * 0 21430. |e|age OF jill |bec| age|r|; * 0 21431. |p|Note that the |b|destination|r| |i|age OF jill|r| * 0 21432. yields a name because |i|jill|r| yields one. After the |b|identity-declaration|r| * 0 21433. |xh||i|STRUCT (BOOL sex, INT age) jack |uqe| (TRUE, 9)|r|, |p||i|age OF jack|r| cannot be assigned to * 0 21434. since |i|jack|r| is not a |b|variable|r|.|cc| * 0 21435. * 0 21436. |h|5.3.1.2. Semantics * 0 21437. * 0 21438. |pa||j|The yield |w|W|r| of a |b|selection|r| |w|S|r| is * 0 21439. determined as follows: * 0 21440. |et|let |w|V|r| be the yield of the |b|SECONDARY|r| of |w|S|r|; * 0 21441. |et|it is required that |w|V|r| |co|if it is a name|cc| be not nil;? 0 21442. |et||w|W|r| is the value selected in |co|2.1.3.3.a,e, 2.1.3.4.k|cc| or * 0 21443. the name generated from |co|2.1.3.4.l|cc| |w|V|r| * 0 21444. by the |b|field-selector|r| of |w|S|r|. * 0 21445. |pa||co|A selection in a name referring to a structured value * 0 21446. yields an existing subname (2.1.3.3.e) of that name. * 0 21447. The name generated from a name referring to a multiple value, by way of a * 0 21448. |b|selection|r| with a |b|ROWS-of-MODE-SECONDARY|r| (as in |i|re OF z1|r|), * 0 21449. is a name which may or may not be newly created for the purpose.|cc| * 0 21450. * 0 21451. |h|5.3.2. Slices? 0 21452. * 0 21453. |pa||j||co||b|Slices|r| are obtained by subscripting, e.g., |i|x1#|so|i|sc||r|, by trimming, e.g., * 0 21454. |i|x1#|so|2 : n|sc||r| or by both, e.g., |i|x2#|so|j : n,#j|sc||r| or |i|x2#|so|#,#k|sc||r|. * 0 21455. Subscripting and trimming * 0 21456. may be done only to |b|PRIMARYs|r|, e.g., |i|x1|r| or |i|(p#|#x1#|#y1)|r| * 0 21457. but not |i|re#OF#z1|r|. The value of a |b|slice|r| * 0 21458. may be either one element of the yield of its |b|PRIMARY|r| or a subset of the elements; * 0 21459. e.g., |i|x1#|so|i|sc||r| * 0 21460. is a real number from the row of real numbers |i|x1|r|, * 0 21461. |i|x2#|so|i,#|sc||r| is the |i|i|r||hy|th row of the matrix * 0 21462. |i|x2|r| and |i|x2#|so|#,#k|sc||r| is its |i|k|r||hy|th column.|cc| * 0 21463. * 0 21464. |h1|5.3.2.1. Syntax * 0 21465. * 0 21466. |pb1|A)|ts1||b|ROWSETY :: ROWS ; EMPTY.|r|? 0 21467. |pb1|a)|ts1||b|REFETY MODE1 NEST slice|co||r|5D|b||cc| :? 0 21468. weak REFLEXETY ROWS1 of MODE1 NEST PRIMARY|co||r|5D|b||cc|,? 0 21469. ROWS1 leaving EMPTY NEST indexer|co||r|b,c,|mi||b||cc| STYLE bracket, * 0 21470. where (REFETY) is derived from (REFLEXETY)|co||r|531b,c,|mi||b||cc| ;? 0 21471. where (MODE1) is (ROWS2 of MODE2), * 0 21472. weak REFLEXETY ROWS1 of MODE2 NEST PRIMARY|co||r|5D|b||cc|, * 0 21473. ROWS1 leaving ROWS2 NEST indexer|co||r|b,d,|mi||b||cc| * 0 21474. STYLE bracket, * 0 21475. where (REFETY) is derived from (REFLEXETY)|co||r|531b,c,|mi||b||cc|.|r|? 0 21476. |p||ps||co||b|ROWS :: row ; ROWS row.|r||cc| * 0 21477. |p1|b)|ts1||b|row ROWS leaving ROWSETY1 ROWSETY2 NEST indexer|co||r|a,b|b||cc| :? 0 21478. row leaving ROWSETY1 NEST indexer|co||r|c,d,|mi||b||cc|, and also|co||r|94f|b||cc| token,? 0 21479. ROWS leaving ROWSETY2 NEST indexer|co||r|b,c,d,|mi||b||cc|.|r|? 0 21480. |p1|c)|ts1||b|row leaving EMPTY NEST indexer|co||r|a,b|b||cc| : NEST subscript|co||r|e|b||cc|.|r|? 0 21481. |p1|d)|ts1||b|row leaving row NEST indexer|co||r|a,b|b||cc| : * 0 21482. NEST trimmer|co||r|f|b||cc| ; NEST revised lower bound|co||r|g|b||cc| option.|r| * 0 21483. |p1|e)|ts1||b|NEST subscript|co||r|c|b||cc| : meek integral NEST unit|co||r|32d|b||cc|.|r| * 0 21484. |p1|f)|ts1||b|NEST trimmer|co||r|d|b||cc| : * 0 21485. NEST lower bound|co||r|46m|b||cc| option, up to|co||r|94f|b||cc| token, * 0 21486. NEST upper bound|co||r|46n|b||cc| option, NEST revised lower bound|co||r|g|b||cc| option.|r| * 0 21487. |p1|g)|ts1||b|NEST revised lower bound|co||r|d,f|b||cc| : * 0 21488. |e|at|co||r|94f|b||cc| token, NEST lower bound|co||r|46m|b||cc|.|r| * 0 21489. |pb1|h)|ts1||star||b|trimscript : NEST subscript|co||r|e|b||cc| ; * 0 21490. NEST trimmer|co||r|f|b||cc| ; NEST revised lower bound|co||r|g|b||cc| option.|r| * 0 21491. |p1|i)|ts1||star||b|indexer : ROWS leaving ROWSETY NEST indexer|co||r|b,c,d|b||cc|.|r| * 0 21492. |p1|j)|ts1||star||b|boundscript : NEST subscript|co||r|e|b||cc| ; * 0 21493. NEST lower bound|co||r|46m|b||cc| ; * 0 21494. NEST upper bound|co||r|46n|b||cc| ; * 0 21495. NEST revised lower bound|co||r|g|b||cc|.|r| * 0 21496. |w5||exx||co|Examples: * 0 21497. |ex|a) |i|x2 |so|i, j|sc||q|x2 |so| , j|sc||r| * 0 21498. |ey|b) |i|1 : 2, j |r|(in |i|x2 |so|1 : 2, j|sc||r|)|q| * 0 21499. |i|i, j |r|(in |i|x2 |so|i, j|sc||r|) * 0 21500. |ey|c) |i|j|r| (in |i|x2 |so|1 : 2, j|sc||r|) * 0 21501. |ez|d) |i|1 : 2|q||at|0 |r|(in |i|x1 |so||at|0|sc||r|) * 0 21502. |ey|e) |i|j|r| * 0 21503. |ez|f) |i|1 : 2 |at|0|r| * 0 21504. |ey|g) |i||at|0|r|#|cc| * 0 21505. |j||pa||co|A |b|subscript|r| decreases the number of dimensions by one, * 0 21506. but a |b|trimmer|r| leaves it unchanged. * 0 21507. In rule a, |b||ap|ROWS1|ap||r| reflects the number of |b|trimsripts|r| in the |b|slice|r|, * 0 21508. and |b||ap|ROWS2|ap||r| the number of these which are * 0 21509. |b|trimmers|r| or |b|revised-lower-bound-options|r|. * 0 21510. |pg|If the value to be sliced is a name, then the yield of the |b|slice|r| is also a name. * 0 21511. Moreover, if the mode of the former name is |b||ap|reference to flexible ROWS1 of MODE|ap||r|, then * 0 21512. that yield is a transient name (see 2.1.3.6.c).|cc| * 0 21513. * 0 21514. |h|5.3.2.2. Semantics * 0 21515. * 0 21516. |pb1||j|a)|tp1|The yield |w|W|r| of a |b|slice|r| |w|S|r| is * 0 21517. determined as follows: * 0 21518. |et|let |w|V|r| and |w|(I|s0|1|s1|, ...#, I|s0|n|s1|)|r| * 0 21519. be the |co|collateral|cc| yields of * 0 21520. the |b|PRIMARY|r| of |w|S|r| and of the |b|indexer|r| |co|b|cc| of |w|S|r|; * 0 21521. |et|it is required that |w|V|r| |co|if it is a name|cc| be not nil;? 0 21522. |et|let |w|((r|s0|1|s1|,#s|s0|1|s1|), ...#, (r|s0|n|s1|,#s|s0|n|s1|))|r| * 0 21523. be the descriptor of |w|V|r| or of the value referred to by |w|V|r|; * 0 21524. |e|For |w|i |uqe| 1, ...#, n|r|, * 0 21525. |ph|Case#A: |w|I|s0|i|s1||r| is an integer:? 0 21526. |et|it is required that |w|r|s0|i|s1| |le| I|s0|i|s1| |le| s|s0|i|s1||r|;? 0 21527. |ph|Case#B: |w|I|s0|i|s1||r| is some triplet |w|(l,#u,#l|ap|)|r|:? 0 21528. |et|let |w|L|r| be |w|r|s0|i|s1||r|, if |w|l|r| is |w|absent|r|, * 0 21529. and be |w|l|r| otherwise; * 0 21530. |et|let |w|U|r| be |w|s|s0|i|s1||r|, if |w|u|r| is |w|absent|r|, and be |w|u|r| otherwise; * 0 21531. |et|it is required that |w|r|s0|i|s1| |le| L|r| and |w|U#|le|#s|s0|i|s1||r|;? 0 21532. |et|let |w|D|r| be |w|0|r| if |w|l|ap||r| is |w|absent|r|, and be |w|L |mi| l|ap||r| otherwise; * 0 21533. |co||w|D|r| is the amount to be subtracted from |w|L|r| in order to * 0 21534. get the revised lower bound;|cc| * 0 21535. |xh||bt||w|I|s0|i|s1||r| is replaced by |w|(L,#U,#D)|r|;? 0 21536. |p||bt||w|W|r| is the value selected in |co|2.1.3.4.a,g,i|cc| or the name * 0 21537. generated from |co|2.1.3.4.j|cc| |w|V|r| by * 0 21538. |w|(I|s0|1|s1|, ...#, I|s0|n|s1|)|r|.? 0 21539. |pb1|b)|tp1|The yield of an |b|indexer|r| |w|I|r| of a |b|slice|r| |w|S|r| is * 0 21540. a trim |co|2.1.3.4.h|cc| or an index |co|2.1.3.4.a|cc| * 0 21541. |w|(I|s0|1|s1|, ...#, I|s0|n|s1|)|r| * 0 21542. determined as follows: * 0 21543. |et|the constituent |b|boundscripts|r| of |w|S|r| are elaborated collaterally; * 0 21544. |pi|For |w|i#|uqe|#1, ...#, n|r|, where |w|n|r| is the number of * 0 21545. constituent |b|trimscripts|r| of |w|S|r|, * 0 21546. |ph|Case#A:#the |w|i|r||hy|th |b|trimscript|r| is a |b|subscript|r|: * 0 21547. |et||w|I|s0|i|s1||r| is |co|the integer which is|cc| the yield of that |b|subscript|r|;? 0 21548. |ph|Case#B:#the |w|i|r||hy|th |b|trimscript|r| is a |b|trimmer|r| |w|T|r|: * 0 21549. |et||w|I|s0|i|s1||r| is the triplet |w|(l, u, l|ap|)|r|, where * 0 21550. |xs||bt||w|l|r| is the yield of the constituent |b|lower-bound|r|, if any, of |w|T|r|, * 0 21551. and is |w|absent|r|, otherwise, * 0 21552. |et||w|u|r| is the yield of the constituent |b|upper-bound|r|, if any, of |w|T|r|, * 0 21553. and is |w|absent|r|, otherwise, * 0 21554. |et||w|l|ap||r| is the yield of the constituent |b|revised-lower-bound|r|, if any, of |w|T|r|, * 0 21555. and is |w|1|r|, otherwise; * 0 21556. |ph|Case#C:#the |w|i|r||hy|th |b|trimscript|r| is a |b|revised-lower-bound-option|r| |w|N|r|: * 0 21557. |et||w|I|s0|i|s1||r| is the triplet |w|(absent, absent, l|ap|)|r|, where? 0 21558. |xs||bt||w|l|ap||r| is the yield of the |b|revised-lower-bound|r|, if any, of |w|N|r|, * 0 21559. and is |w|absent|r| otherwise. * 0 21560. |pa||co|Observe that, if |w|(I|s0|1|s1|, ...#, I|s0|n|s1|)|r|? 0 21561. contains no triplets, it is an index, * 0 21562. and selects one element; otherwise, it is a trim, and selects a subset of the elements.|cc| * 0 21563. |pa||co|A |b|slice|r| from a name referring to a multiple value * 0 21564. yields an existing subname (2.1.3.4.j) of that name if all the constituent * 0 21565. |b|trimscripts|r| of that |b|slice|r| are |b|subscripts|r|. * 0 21566. Otherwise, it yields a generated name which may or may not be newly created * 0 21567. for the purpose. Hence, the yield of |i|x1#|so|1#:#2|sc|#|bec|:#x1#|so|1#:#2|sc||r| * 0 21568. is not defined, although |i|x1#|so|1|sc|#|bec|:#x1#|so|1|sc||r| * 0 21569. must always yield |w|true|r|.|cc| * 0 21570. |pa||co|The various possible bounds in the yield of a |b|slice|r| are illustrated * 0 21571. by the following examples, for each of which the descriptor of the value * 0 21572. referred to by the yield is shown: * 0 21573. |xh||i||so|0 : 9, 2 : 11|sc| INT i3 ; * 0 21574. |e|i3 |so|1, 3 : 10 |at|3|sc| ###~J#((3, 10))#~J; * 0 21575. |e|i3 |so|1, 3 : 10|sc| ###~J#((1, 8))#~J; * 0 21576. |e|i3 |so|1, 3 : |sc| ###~J#((1, 9))#~J; * 0 21577. |e|i3 |so|1, : |sc| ###~J#((1, 10))#~J; * 0 21578. |e|i3 |so|1, |sc| ###~J#((2, 11))#~J; * 0 21579. |e|i3 |so| , 2|sc| ###~J#((0, 9))#~J|r|.|cc| * 0 21580. * 0 21581. |h|5.4. Units associated with routines * 0 21582. * 0 21583. |pa||j||co|Routines are created from |b|routine-texts|r| (5.4.1) or from |b|jumps|r| (5.4.4), and * 0 21584. they may be "called" by |b|calls|r| (5.4.3), |b|formulas|r| (5.4.2) or by deproceduring (6.3).|cc| * 0 21585. * 0 21586. |h|5.4.1. Routine texts * 0 21587. * 0 21588. |pa||j||co|A |b|routine-text|r| always has a |b|formal-declarer|r|, specifying the mode of the result, * 0 21589. and a |b|routine-token|r|, viz., a colon. To the right of this colon stands a |b|unit|r|, which * 0 21590. prescribes the computations to be performed when the routine is called. If there are parameters, * 0 21591. then to the left of the |b|formal-declarer|r| stands a |b|declarative|r| containing the various * 0 21592. |b|formal-parameters|r| required. * 0 21593. |exx|Examples: * 0 21594. |xh||i|VOID : print (x)|r|; * 0 21595. |e||i|(REF REAL a, REAL b) BOOL : (a |lt| b | a |bec| b; TRUE | FALSE)|r|.|cc| * 0 21596. * 0 21597. |h1|5.4.1.1. Syntax * 0 21598. * 0 21599. |pb1|a)|ts1||b|procedure yielding MOID NEST1 routine text|co||r|44d,5A|b||cc| : formal MOID * 0 21600. NEST1 declarer|co||r|46b|b||cc|, routine|co||r|94f|b||cc| token, * 0 21601. strong MOID NEST1 unit|co||r|32d|b||cc|.|r| * 0 21602. |p1|b)|ts1||b|procedure with PARAMETERS yielding$#MOID NEST1 routine text|co||r|44d,5A|b||cc| : * 0 21603. NEST1 new DECS2 declarative defining$#new DECS2|co||r|e|b||cc| brief pack, * 0 21604. where DECS2 like PARAMETERS|co||r|c,d,|mi||b||cc|, * 0 21605. |e|formal MOID NEST1 declarer|co||r|46b|b||cc|, routine|co||r|94f|b||cc| token, * 0 21606. strong MOID NEST1 new DECS2 unit|co||r|32d|b||cc|.|r| * 0 21607. |p1|c)|ts1||b|WHETHER DECS DEC like PARAMETERS PARAMETER|co||r|b,c|b||cc| : * 0 21608. WHETHER DECS like PARAMETERS|co||r|c,d,|mi||b||cc|$#and DEC like PARAMETER|co||r|d,|mi||b||cc|.|r| * 0 21609. |p||ps||co||b|PARAMETER :: MODE parameter.|r||cc| * 0 21610. |p1|d)|ts1||b|WHETHER MODE TAG like MODE parameter|co||r|b,c|b||cc| : WHETHER true.|r|? 0 21611. |p1|e)|ts1||b|NEST2 declarative defining new DECS2|co||r|b,e,34j|b||cc| : * 0 21612. formal MODE NEST2 declarer|co||r|46b|b||cc|, * 0 21613. NEST2 MODE parameter joined definition of DECS2|co||r|41b,c|b||cc| ;? 0 21614. where (DECS2) is (DECS3 DECS4), * 0 21615. formal MODE NEST2 declarer|co||r|46b|b||cc|, * 0 21616. NEST2 MODE parameter joined definition of DECS3|co||r|41b,c|b||cc|, * 0 21617. and also|co||r|94f|b||cc| token, NEST2 declarative defining new DECS4|co||r|e|b||cc|.|r|? 0 21618. |p1|f)|ts1||b|NEST2 MODE parameter definition of MODE TAG2|co||r|41c|b||cc| :? 0 21619. MODE NEST2 defining identifier with TAG2|co||r|48a|b||cc|.|r|? 0 21620. |p1|g)|ts1||star||b|formal MODE parameter : * 0 21621. NEST MODE parameter definition of MODE TAG|co||r|f|b||cc|.|r|? 0 21622. |w5||exx||co|Examples: * 0 21623. |ex|a) |i|REAL : random |sx| 10|r|? 0 21624. |ez|b) |i|(BOOL a, b) BOOL : (a | b | FALSE)|r|? 0 21625. |ey|e) |i|BOOL a, b|q|BOOL a, BOOL b|r|? 0 21626. |ez|f) |i|a|r|#|cc|? 0 21627. * 0 21628. |h|5.4.1.2. Semantics * 0 21629. * 0 21630. |pa||j|The yield of a |b|routine-text|r| |w|T|r|, in an environ |w|E|r|, is * 0 21631. the routine composed of * 0 21632. |pha10|(i)|thb0||w|T|r|, and * 0 21633. |pha20|(ii)|thb0|the environ necessary for |co|7.2.2.c|cc| |w|T|r| in |w|E|r|. * 0 21634. * 0 21635. |h|5.4.2. Formulas * 0 21636. * 0 21637. |pa||j||co||b|Formulas|r| are either dyadic or monadic: e.g., |i|x + i|r| or |i|ABS x|r|. The order * 0 21638. of elaboration of a |b|formula|r| is determined by the priority of its |b|operators|r|; * 0 21639. monadic |b|formulas|r| are elaborated first and then the dyadic ones from the highest to the * 0 21640. lowest priority.|cc| * 0 21641. |h1| 5.4.2.1. Syntax * 0 21642. * 0 21643. |pb1|A)|ts1||b|DYADIC :: priority PRIO.|r|? 0 21644. |p1|B)|ts1||b|MONADIC :: priority iii iii iii i.|r|? 0 21645. |p1|C)|ts1||b|ADIC :: DYADIC ; MONADIC.|r| * 0 21646. |p1|D)|ts1||b|TALLETY :: TALLY ; EMPTY.|r| * 0 21647. |pb1|a)|ts1||b|MOID NEST DYADIC formula|co||r|c,5B|b||cc| :? 0 21648. MODE1 NEST DYADIC TALLETY operand|co||r|c,|mi||b||cc|,? 0 21649. procedure with MODE1 parameter MODE2 parameter$#yielding MOID NEST * 0 21650. applied operator with TAD|co||r|48b|b||cc|, * 0 21651. where DYADIC TAD identified in NEST|co||r|72a|b||cc|,? 0 21652. MODE2 NEST DYADIC TALLY operand|co||r|c,|mi||b||cc|.|r|? 0 21653. |p1|b)|ts1||b|MOID NEST MONADIC formula|co||r|c,5B|b||cc| :? 0 21654. |e|procedure with$#MODE parameter|g| yielding MOID$#NEST applied operator|g| * 0 21655. with TAM |co||r|48b|b||cc|, MODE NEST MONADIC operand|co||r|c|b||cc|.|r|? 0 21656. |p1|c)|ts1||b|MODE NEST ADIC operand|co||r|a,b|b||cc| :? 0 21657. firm MODE NEST ADIC formula|co||r|a,b|b||cc| coercee|co||r|61b|b||cc| ;? 0 21658. where (ADIC) is (MONADIC), * 0 21659. firm MODE NEST SECONDARY|co||r|5C|b||cc|.|r|? 0 21660. |pb1|d)|ts1||star||b|MOID formula : MOID NEST ADIC formula|co||r|a,b|b||cc|.|r| * 0 21661. |p1|e)|ts1||star||b|DUO dyadic operator with TAD : DUO NEST DEFIED operator with TAD|co||r|48a,b|b||cc|.|r|? 0 21662. |p1|f)|ts1||star||b|MONO monadic operator with TAM : * 0 21663. MONO NEST DEFIED operator with TAM|co||r|48a,b|b||cc|.|r| * 0 21664. |p1|g)|ts1||star||b|MODE operand : MODE NEST ADIC operand|co||r|c|b||cc|.|r| * 0 21665. |w5||exx||co|Examples: * 0 21666. |ex|a) |i||mi|x + 1|r|? 0 21667. |ez|b) |i||mi|x|r||ey|c) |i||mi|x|qs|1|r|#|cc|? 0 21668. |h|5.4.2.2. Semantics * 0 21669. * 0 21670. |pa||j|The yield |w|W|r| of a |b|formula|r| |w|F|r|, in an environ |w|E|r|, * 0 21671. is determined as follows: * 0 21672. |et|let |w|R|r| be the routine yielded in |w|E|r| by the |b|operator|r| of |w|F|r|; * 0 21673. |et|let |w|V|s0|1|s1|, ...#, V|s0|n|s1||r| |co||w|n|r| is |w|1|r| or * 0 21674. |w|2|r||cc| be the |co|collateral|cc| * 0 21675. yields of the |b|operands|r| of |w|F|r|, * 0 21676. in an environ |w|E1|r| established |co|locally, see 3.2.2.b|cc| around |w|E|r|; * 0 21677. |et||w|W|r| is the yield of the calling |co|5.4.3.2.b|cc| of |w|R|r| * 0 21678. in |w|E1|r|, with |w|V|s0|1|s1|, ...#, V|s0|n|s1||r|; * 0 21679. |et|it is required that |w|W|r| be not newer in scope than |w|E|r|. * 0 21680. |pa||co||r|Observe that |i|a#|up|#b|r| is not precisely the same as |i|a|s2|b|s1||r| * 0 21681. in the usual notation; indeed, the value of |i|(|mi|#1#|up|#2#+#4#|uqe|#5)|r| * 0 21682. and that of |i|(4#|mi|#1#|up|#2#|uqe|#3)|r| both are |w|true|r|, since the first * 0 21683. |b|minus-symbol|r| is a |b|monadic-operator|r|, whereas the second is a * 0 21684. |b|dyadic-operator|r|.|cc| * 0 21685. * 0 21686. |h|5.4.3. Calls? 0 21687. * 0 21688. |pa||j||co||b|Calls|r| are used to command the elaboration of * 0 21689. routines parametrized with |b|actual-parameters|r|. * 0 21690. |exx|Examples: * 0 21691. |xh||i|sin (x)|q|? 0 21692. (p | sin | cos) (x)|r|.|cc| * 0 21693. * 0 21694. |h1|5.4.3.1. Syntax * 0 21695. * 0 21696. |pb1|a)|ts1||b|MOID NEST call|co||r|5D|b||cc| : meek procedure with PARAMETERS yielding$#MOID * 0 21697. NEST PRIMARY|co||r|5D|b||cc|, actual NEST PARAMETERS|co||r|b,c|b||cc| brief pack.|r| * 0 21698. |p1|b)|ts1||b|actual NEST PARAMETERS PARAMETER|co||r|a,b|b||cc| : * 0 21699. actual NEST PARAMETERS|co||r|b,c|b||cc|, and also|co||r|94f|b||cc| token, * 0 21700. actual NEST PARAMETER|co||r|c|b||cc|.|r| * 0 21701. |p1|c)|ts1||b|actual NEST MODE parameter|co||r|a,b|b||cc| : * 0 21702. strong MODE NEST unit|co||r|32d|b||cc|.|r| * 0 21703. |w5||exx||co|Examples: * 0 21704. |ex|a) |i|put (stand out, x)|r| (see 10.3.3.1.a) * 0 21705. |ey|b) |i|stand out, x|r| * 0 21706. |ez|c) |i|x|r|#|cc|? 0 21707. * 0 21708. |h|5.4.3.2. Semantics * 0 21709. * 0 21710. |pb1||j|a)|tp1|The yield |w|W|r| of a |b|call|r| |w|C|r|, in an environ |w|E|r|, is determined * 0 21711. as follows: * 0 21712. |et|let |w|R|r| |co|a routine|cc| and |w|V|s0|1|s1|, ...#, V|s0|n|s1||r| * 0 21713. be the |co|collateral|cc| yields of * 0 21714. the |b|PRIMARY|r| of |w|C|r|, in |w|E|r|, and of the constituent * 0 21715. |b|actual-parameters|r| * 0 21716. of |w|C|r|, in an environ |w|E1|r| established |co|locally, see 3.2.2.b|cc| around |w|E|r|; * 0 21717. |et||w|W|r| is the yield of the calling |co|b|cc| of |w|R|r| * 0 21718. in |w|E1|r| with |w|V|s0|1|s1|, ...#, V|s0|n|s1||r|;? 0 21719. |et|it is required that |w|W|r| be not newer in scope than |w|E|r|. * 0 21720. |pb1|b)|tp1|The yield |w|W|r| of the "calling" of a routine |w|R|r| in an environ |w|E1|r|, possibly * 0 21721. with |co|parameter|cc| values |w|V|s0|1|s1|, ...#, V|s0|n|s1||r|, * 0 21722. is determined as follows: * 0 21723. |et|let |w|E2|r| be the environ established |co|3.2.2.b|cc| upon |w|E1|r|, * 0 21724. around the environ of |w|R|r|, * 0 21725. according to the |b|declarative|r| of the |b|declarative-pack|r|, * 0 21726. if any, of the |b|routine-text|r| * 0 21727. of |w|R|r|, with the values |w|V|s0|1|s1|, ...#, V|s0|n|s1||r|, if any;? 0 21728. |et||w|W|r| is the yield in |w|E2|r| of the |b|unit|r| of the |b|routine-text|r| of |w|R|r|. * 0 21729. |pa||co|Consider the following |b|serial-clause|r|: * 0 21730. |n||xh||i|PROC samelson |uqe| (INT n, PROC (INT) REAL f) REAL : * 0 21731. |xs|BEGIN LONG REAL s |bec| LONG 0; * 0 21732. |xc|FOR i TO n DO s +|bec| LENG f (i) |up| 2 OD; * 0 21733. |e|SHORTEN long sqrt (s) * 0 21734. |xs|END; * 0 21735. |xh|samelson (m, (INT j) REAL : x1 |so|j|sc|)|r|. * 0 21736. |p||j|In that context, the last |b|call|r| has the same effect as the following |b|cast|r|: * 0 21737. |n||xh||i|REAL#(? 0 21738. |pc|INT n |uqe| m, * 0 21739. PROC (INT) REAL f |uqe| (INT j) REAL : x1 |so|j|sc|; * 0 21740. |pc|BEGIN LONG REAL s |bec| LONG 0; * 0 21741. |e|FOR i TO n DO s +|bec| LENG f (i) |up| 2 OD; * 0 21742. |e|SHORTEN long sqrt (s) * 0 21743. |pc|END )|r|. * 0 21744. |pg||j|The transmission of |b|actual-parameters|r| is thus similar to the elaboration of * 0 21745. |b|identity-declarations|r| (4.4.2.a); * 0 21746. see also establishment (3.2.2.b) and ascription (4.8.2.a).|cc| * 0 21747. * 0 21748. |h|5.4.4. Jumps * 0 21749. * 0 21750. |pa||j||co|A |b|jump|r| may terminate the elaboration of a |b|series|r| and cause * 0 21751. some other labelled |b|series|r| to be elaborated in its place. * 0 21752. |exx|Examples: * 0 21753. |xh||i|y |bec| IF x |sge| 0 THEN sqrt (x) ELSE GOTO princeton FI|qs| * 0 21754. |e|GOTO st pierre de chartreuse|r|. * 0 21755. |pg|Alternatively, if the context expects the mode |b||ap|procedure yielding MOID|ap||r|, then * 0 21756. a routine whose |b|unit|r| is that |b|jump|r| is yielded instead, as in * 0 21757. |i|PROC VOID m |bec| GOTO north berwick|r|.|cc| * 0 21758. * 0 21759. |h1|5.4.4.1. Syntax? 0 21760. * 0 21761. |pb1|a)|ts1||b|strong MOID NEST jump|co||r|5A|b||cc| : go to|co||r|b|b||cc| option, * 0 21762. label NEST applied identifier with TAG|co||r|48b|b||cc|.|r| * 0 21763. |p1|b)|ts1||b|go to|co||r|a|b||cc| : STYLE go to|co||r|94f,|mi||b||cc| token ; * 0 21764. |e|STYLE go|co||r|94f,|mi||b||cc| token, STYLE to symbol|co||r|94g,|mi||b||cc|.|r| * 0 21765. |w5||exx||co|Examples: * 0 21766. |ex|a) |i|GOTO kootwijk|q|GO TO warsaw|q|zandvoort|r| * 0 21767. |ey|b) |i|GOTO|qs|GO TO|r|#|cc| * 0 21768. * 0 21769. |h|5.4.4.2. Semantics * 0 21770. * 0 21771. |pa||j|A |b|MOID-NEST-jump|r| |w|J|r|, in an environ |w|E|r|, is elaborated as follows: * 0 21772. |et|let the scene yielded in |w|E|r| by the |b|label-identifier|r| of |w|J|r| * 0 21773. be composed of a |b|series|r| |w|S2|r| and an environ |w|E1|r|; * 0 21774. |pi|Case#A: |b||ap|MOID|ap||r| is not any |b||ap|procedure yielding MOID1|ap||r|: * 0 21775. |et|let |w|S1|r| be the |b|series|r| of the smallest |co|1.1.3.2.g|cc| * 0 21776. |b|serial-clause|r| containing |w|S2|r|;? 0 21777. |et|the elaboration of |w|S1|r| in |w|E1|r|, * 0 21778. or of any series in |w|E1|r| elaborated in its place, is terminated |co|2.1.4.3.e|cc|; * 0 21779. |et||w|S2|r| in |w|E1|r| is elaborated "in place of" |w|S1|r| in |w|E1|r|; * 0 21780. |pi|Case#B: |b||ap|MOID|ap||r| is some |b||ap|procedure yielding MOID1|ap||r|: * 0 21781. |et||w|J|r| in |w|E|r| |co|is completed and|cc| yields the routine composed of * 0 21782. |pha11|(i)|thb1|a new |b|MOID-NEST-routine-text|r| whose |b|unit|r| is akin |co|1.1.3.2.k|cc| to |w|J|r|, * 0 21783. |pha21|(ii)|thb1||w|E1|r|. * 0 21784. * 0 21785. |h|5.5. Units associated with values of any mode * 0 21786. * 0 21787. |h|5.5.1. Casts * 0 21788. * 0 21789. |pa||j||co||b|Casts|r| may be used to provide a strong position. * 0 21790. For example, |i|REF REAL (xx)|r| in |i|REF REAL (xx) |bec| 1|r|, * 0 21791. |i|REF BOOK (NIL)|r| in |i|next OF draft |bec|: REF BOOK (NIL)|r| and * 0 21792. |i|STRING (p | c | r)|r| in |i|s +|bec| STRING (p | c | r)|r|.|cc| * 0 21793. * 0 21794. |h1|5.5.1.1. Syntax * 0 21795. * 0 21796. |pb1|a)|ts1||b|MOID NEST cast|co||r|5D|b||cc| : formal MOID NEST declarer|co||r|46b|b||cc|, * 0 21797. strong MOID NEST ENCLOSED clause|co||r|31a,33a,c,d,e,34a,35a,|mi||b||cc|.|r|? 0 21798. |pa||co|Example: * 0 21799. |ex|a) |i|REF BOOK (NIL)|r|#|cc|? 0 21800. |pa||co|The yield of a |b|cast|r| is that of its |b|ENCLOSED-clause|r|, * 0 21801. by way of pre-elaboration (2.1.4.1.c).|cc| * 0 21802. * 0 21803. |h|5.5.2. Skips? 0 21804. * 0 21805. |h1|5.5.2.1. Syntax? 0 21806. * 0 21807. |pb1|a)|ts1||b|strong MOID NEST skip|co||r|5A|b||cc| : skip|co||r|94f|b||cc| token.|r| * 0 21808. * 0 21809. |h|5.5.2.2. Semantics * 0 21810. * 0 21811. |pa||j|The yield of a |b|skip|r| is * 0 21812. some |co|undefined|cc| value equal in scope to the primal environ. * 0 21813. |pa||co|The mode of the yield of a |b|MOID-skip|r| is |b||ap|MOID|ap||r|. A |b|void-skip|r| * 0 21814. serves as a dummy statement and may be used, for example, after a |b|label|r| which marks the end * 0 21815. of a |b|serial-clause|r|.|cc| * 0 30000. |np||e||e||c|PART#III|nc| * 0 30001. |e||e||c|Context Dependence |nc| * 0 30002. |e||j|#|e||pa||co|This Part deals with those rules which do not alter * 0 30003. the underlying syntactical structure: * 0 30004. |et|the transformations of modes implicitly defined by the context, with their * 0 30005. accompanying actions; * 0 30006. |et|the syntax needed for the equivalence of modes and for * 0 30007. the safe application of the properties kept in the nests.|cc|? 0 30008. * 0 30009. |h|6. |bs|Coercion|rs| * 0 30010. * 0 30011. |pa||j||co|The coercions produce a |b|coercend|r| from a |b|coercee|r| according to three criteria: * 0 30012. the a priori mode of the |b|coercend|r| before the application of any coercion, * 0 30013. the a posteriori mode of the |b|coercee|r| required after those coercions, * 0 30014. and the syntactic position or "sort" of the |b|coercee|r|. * 0 30015. Coercions may be cascaded. * 0 30016. |pa|There are six possible coercions, termed "deproceduring", * 0 30017. "dereferencing", "uniting", "widening", "rowing" and "voiding". * 0 30018. Each coercion, except "uniting", prescribes * 0 30019. a corresponding dynamic effect on the associated values. * 0 30020. Hence, a number of primitive actions can be programmed * 0 30021. implicitly by coercions.|cc|? 0 30022. * 0 30023. |h|6.1. Coercees * 0 30024. * 0 30025. |pa||j||co|A |b|coercee|r| is a construct whose production tree may begin a * 0 30026. sequence of coercions ending in a |b|coercend|r|. The order of (completion of) * 0 30027. the elaboration of the coercions is therefore from the |b|coercend|r| to the * 0 30028. |b|coercee|r| (hence the choice of these paranotions). For example, |i|i|r| in * 0 30029. |i|REAL#(i)|r| is a |b|coercee|r| whose production tree involves * 0 30030. |b||ap|widened#to|ap||r| and |b||ap|dereferenced#to|ap||r|, in that order, in passing * 0 30031. from the |b|coercee|r| to the |b|coercend|r|. Note that the * 0 30032. dereferencing must be completed before the widening takes place. * 0 30033. |w25||pa|The relevant production tree (with elision of |b||ap|NEST|ap||r|, |b||ap|applied|ap||r| * 0 30034. and |b||ap|with#TAG|ap||r|, and with invisible subtrees omitted) is: * 0 1. |w25||e|#|n||wid||picn||g|? 0 2. |e|################|b|'strong#real#identifier#coercee'|g| * 0 3. |e|###########################||g| * 0 4. |e|###########################|##|r|6.1.1.a|b||g| * 0 5. |e|###########################||g| * 0 6. |e|########|clg|------|sgt|#'widened#to#real#identifier'|g| * 0 7. |e|########|##################||g| * 0 8. |e||r|widening coercion|b|########|##|r|6.5.1.a|b||g| * 0 9. |e|########|up|##################||g| * 0 10. |e|########|flr|-------#'dereferenced#to#integral#identifier'|g| * 0 11. |e|########|##################||g| * 0 12. |e||r|dereferencing coercion|b|###|##|r|6.2.1.a|b||g| * 0 13. |e|########|up|##################||g| * 0 14. |e|########|flr|-------#'unchanged#from#reference#to#integral#identifier'|g| * 0 15. |e|###########################||g| * 0 16. |e|###########################|##|r|6.1.1.f|b||g| * 0 17. |e|###########################||g| * 0 18. |e|#################'reference#to#integral#identifier'##|r|(|b|coercend|r|)|b||g| * 0 19. |e|###########################||g| * 0 20. |e|###########################|##|r|4.8.1.b,#9.1.f|b||g|? 0 21. |e|###########################||g| * 0 22. |e|#################'letter#i#symbol'###|r|.|cc||g| * 0 23. |nar||picf| * 0 25. $ENDFILE? 0 100. |S264|S5'|S1'strong real identifier coercee|S5'|S1' * 0 101. |S3936.1.1.a * 0 102. |S264|S5'|S1'widened to real identifier|S5'|S1' * 0 103. |S43wid|S10ening co|S10ercion|S1856.5.1.a * 0 105. |S242|S5'|S1'dereferenced to integral identifier|S5'|S1' * 0 106. |S43d|S10er|S10ef|S10er|S10encing co|S10ercion|S1996.2.1.a * 0 107. |S178|S5'|S1'unchanged from reference to integral identifier|S5'|S1' * 0 108. |S3936.1.1.f * 0 109. |S258|S5'|S1'reference to integral identifier|S5'|S1'|S15(coercend) * 0 110. |S3934.8.1.b, 9.1.k * 0 111. |S334|S5'|S1'letter i symbol|S5'|S1'<-T10F0>|15<> * 0 30036. * 0 30037. |h1|6.1.1. Syntax * 0 30038. * 0 30039. |pb1|A)|ts1||b|STRONG|co||r|a,66a|b||cc| :: FIRM|co||r|B|b||cc| ; * 0 30040. widened to|co||r|65a,b,c,d|b||cc| ; rowed to|co||r|66a|b||cc| ; voided to|co||r|67a,b|b||cc|.|r| * 0 30041. |p1|B)|ts1||b|FIRM|co||r|A,b|b||cc| :: MEEK|co||r|C|b||cc| ; united to|co||r|64a|b||cc|.|r| * 0 30042. |p1|C)|ts1||b|MEEK|co||r|B,c,d,62a,63a,64a,65a,b,c,d|b||cc| :: * 0 30043. unchanged from|co||r|f|b||cc| ; dereferenced to|co||r|62a|b||cc| ; * 0 30044. deprocedured to|co||r|63a|b||cc|.|r| * 0 30045. |p1|D)|ts1||b|SOFT|co||r|e,63b|b||cc| :: unchanged from|co||r|f|b||cc| ; * 0 30046. softly deprocedured to|co||r|63b|b||cc|.|r| * 0 30047. |p1|E)|ts1||b|FORM :: MORF ; COMORF.|r|? 0 30048. |p1|F)|ts1||b|MORF :: NEST selection ; NEST slice ; NEST routine text ; * 0 30049. NEST ADIC formula ; NEST call ; NEST applied identifier with TAG.|r|? 0 30050. |p1|G)|ts1||b|COMORF :: NEST assignation ; NEST identity relation ; NEST * 0 30051. LEAP generator ; NEST cast ; NEST denoter ; NEST format text.|r| * 0 30052. |pb1|a)|ts1||b|strong MOID FORM coercee|co||r|5A,B,C,D,A341i|b||cc| : * 0 30053. where (FORM) is (MORF), STRONG|co||r|A|b||cc| MOID MORF ;? 0 30054. where (FORM) is (COMORF), STRONG|co||r|A|b||cc| MOID COMORF, * 0 30055. unless (STRONG MOID) is (deprocedured to void).|r|? 0 30056. |p1|b)|ts1||b|firm MODE FORM coercee|co||r|5A,B,C,D,542c|b||cc| : FIRM|co||r|B|b||cc| MODE FORM.|r| * 0 30057. |p1|c)|ts1||b|meek MOID FORM coercee|co||r|5A,B,C,D|b||cc| : MEEK|co||r|C|b||cc| MOID FORM.|r| * 0 30058. |p1|d)|ts1||b|weak REFETY STOWED FORM coercee|co||r|5A,B,C,D|b||cc| : * 0 30059. MEEK|co||r|C|b||cc| REFETY STOWED FORM,? 0 30060. unless (MEEK) is (dereferenced to)$#and (REFETY) is (EMPTY).|r|? 0 30061. |p1|e)|ts1||b|soft MODE FORM coercee|co||r|5A,B,C,D|b||cc| : SOFT|co||r|D|b||cc| MODE FORM.|r|? 0 30062. |p1|f)|ts1||b|unchanged from MOID FORM|co||r|C,D,67a,b|b||cc| : MOID FORM.|r|? 0 30063. |pb1|g)|ts1||star||b|SORT MOID coercee : SORT MOID FORM coercee|co||r|a,b,c,d,e|b||cc|.|r|? 0 30064. |p1|h)|ts1||star||b|MOID coercend : MOID FORM.|r| * 0 30065. |w5||exx||co|Examples: * 0 30066. |ex|a) |i|3.14 |r|(in |i|x |bec| 3.14|r|)? 0 30067. |ey|b) |i|3.14 |r|(in |i|x + 3.14|r|) * 0 30068. |ey|c) |i|sin |r|(in |i|sin (x)|r|)? 0 30069. |ey|d) |i|x1 |r|(in |i|x1 |so|2|sc| |bec| 3.14|r|)? 0 30070. |ey|e) |i|x |r|(in |i|x |bec| 3.14|r|) |cc|? 0 30071. |pa||j||co|For |b||ap|MOID FORM|ap||r| (rule f), see the cross-references inserted * 0 30072. in sections 5.1.A,B,C,D before "|b|coercee|r|". Note, however, that a |b||ap|MOID FORM|ap||r| * 0 30073. may be a blind alley. Blind alleys within this chapter are not indicated.|cc|? 0 30074. |pa||co|There are five sorts of syntactic position. * 0 30075. They are:|xi||bt|"strong" positions, i.e., |b|actual-parameters|r|, * 0 30076. e.g., |i|x|r| in |i|sin#(x)|r|, |b|sources|r|, e.g., |i|x|r| in * 0 30077. |i|y#|bec|#x|r|, the |b|ENCLOSED-clause|r| of a |b|cast|r|, e.g., * 0 30078. |i|(NIL)|r| in |i|REF#BOOK#(NIL)|r|, and |b|statements|r|, e.g., * 0 30079. |i|y#|bec|#x|r| in |i|(y#|bec|#x;#x#|bec|#0)|r|; * 0 30080. |et|"firm" positions, i.e., |b|operands|r|, e.g., |i|x|r| in |i|x#+#y|r|; * 0 30081. |et|"meek" positions, i.e., |b|enquiry-clauses|r|, e.g., |i|x#|sgt|#0|r| in * 0 30082. |i|(x#|sgt|#0#|#x#|#0)|r|, |b|boundscripts|r|, e.g., |i|i|r| in * 0 30083. |i|x1#|so|i|sc||r|, and the |b|PRIMARY|r| of a |b|call|r|, e.g., * 0 30084. |i|sin|r| in |i|sin#(x)|r|; * 0 30085. |et|"weak" positions, i.e., the |b|SECONDARY|r| of a |b|selection|r| * 0 30086. and the |b|PRIMARY|r| of a |b|slice|r|, e.g., |i|x1|r| in * 0 30087. |i|x1 |so|i|sc||r|; * 0 30088. |et|"soft" positions, i.e., |b|destinations|r|, e.g., |i|x|r| in * 0 30089. |i|x |bec| y|r| and one of the |b|TERTIARYs|r| of an |b|identity-relation|r|, * 0 30090. e.g., |i|x|r| in |i|xx |bec|: x|r|. * 0 30091. |p|Strong positions also arise in balancing (3.2.1.e). * 0 30092. |pa|In strong positions, all six coercions may occur; * 0 30093. in firm positions, rowing, widening and voiding are forbidden; * 0 30094. in meek and weak positions, uniting is forbidden also, and in * 0 30095. soft positions only deproceduring is allowed. * 0 30096. However, a |b|dereferenced-to-STOWED-FORM|r| may not be directly * 0 30097. descended from a |b|weak-STOWED-FORM-coercee|r| (rule d) for, otherwise, * 0 30098. |i|x#|bec|#x1#|so|i|sc||r| would be syntactically ambiguous (although, * 0 30099. in this case, not semantically). Also, a |b|deprocedured-to-void-COMORF|r| * 0 30100. may not be directly descended from a * 0 30101. |b|strong-void-COMORF-coercee|r| (rule a) for, otherwise, * 0 30102. |xh||n||i|(PROC VOID engelfriet; * 0 30103. PROC VOID rijpens |uqe| SKIP; * 0 30104. engelfriet |bec| rijpens; * 0 30105. SKIP)|r| * 0 30106. |p|would be ambiguous.|cc|? 0 30107. * 0 30108. |h|6.2. Dereferencing * 0 30109. * 0 30110. |pa||j||co|Dereferencing serves to obtain the value referred to by a name, * 0 30111. as in |i|x#|bec|#y|r|, where |i|y|r| * 0 30112. yields a name referring to a real number and it is this number which is assigned to the name * 0 30113. yielded by |i|x|r|. The a priori mode of |i|y|r|, regarded as a |b|coercend|r|, * 0 30114. is |b||ap|reference to real|ap||r| and its a posteriori mode, * 0 30115. when |i|y|r| is regarded as a |b|coercee|r|, is |b||ap|real|ap||r|.|cc| * 0 30116. * 0 30117. |h1|6.2.1. Syntax * 0 30118. * 0 30119. |pb1|a)|ts1||b|dereferenced to|co||r|61C|b||cc| MODE1 FORM : * 0 30120. MEEK|co||r|61C|b||cc| REF to MODE2 FORM, * 0 30121. where MODE2 deflexes to MODE1|co||r|47a,b,c,|mi||b||cc|.|r|? 0 30122. |pa||co|Example: * 0 30123. |e||ey|a) |i|x |r|(in |i|REAL (x)|r|)|cc| * 0 30124. * 0 30125. |h|6.2.2. Semantics * 0 30126. * 0 30127. |pa||j|The yield |w|W|r| of a |b|dereferenced-to-MODE-FORM|r| |w|F|r| is determined as follows: * 0 30128. |et|let |co|the name|cc| |w|N|r| be the yield of the |b|MEEK-FORM|r| of |w|F|r|; * 0 30129. |et|it is required that |w|N|r| be not nil;? 0 30130. |et||w|W|r| is the value referred to by |w|N|r|. * 0 30131. * 0 30132. |h|6.3. Deproceduring * 0 30133. * 0 30134. |pa||j||co|Deproceduring is used when a routine without parameters is to be called. E.g., in * 0 30135. |i|x |bec| random|r|, the routine yielded by |i|random|r| is called and the real number yielded * 0 30136. is assigned: the a posteriori mode of |i|random|r| is |b||ap|real|ap||r|. * 0 30137. Syntactically, an initial |b||ap|procedure yielding|ap||r| is removed from the a priori mode.|cc| * 0 30138. * 0 30139. |h1|6.3.1. Syntax * 0 30140. * 0 30141. |pb1|a)|ts1||b|deprocedured to|co||r|61C,67a|b||cc| MOID FORM : * 0 30142. MEEK|co||r|61C|b||cc| procedure yielding MOID FORM.|r| * 0 30143. |p1|b)|ts1||b|softly deprocedured to|co||r|61D|b||cc| MODE FORM : * 0 30144. SOFT|co||r|61D|b||cc| procedure yielding MODE FORM.|r| * 0 30145. |w5||exx||co|Examples: * 0 30146. |ex| a) |i|random |r|(in |i|REAL (random)|r|)? 0 30147. |ey|b) |i|x or y |r|(in |i|x or y |bec| 3.14|r|, see 1.1.2) |cc|? 0 30148. * 0 30149. |h|6.3.2. Semantics * 0 30150. * 0 30151. |pa||j|The yield |w|W|r| of a |b|deprocedured-to-MOID-FORM|r| or * 0 30152. |b|softly-deprocedured-to-MOID-FORM|r| * 0 30153. |w|F|r|, in an environ |w|E|r|, is determined as follows: * 0 30154. |et|let |co|the routine|cc| |w|R|r| be the yield in |w|E|r| of the direct descendent of |w|F|r|; * 0 30155. |et||w|W|r| is the yield of the calling |co|5.4.3.2.b|cc| of |w|R|r| in |w|E|r|; * 0 30156. |et|it is required that |w|W|r| be not newer in scope than |w|E|r|.? 0 30157. * 0 30158. |h|6.4. Uniting * 0 30159. * 0 30160. |pa||j||co|Uniting does not change the mode of the run-time value yielded by a construct, * 0 30161. but simply gives more freedom to it. That value must be * 0 30162. acceptable to not just that one mode, but rather to the whole of a given set of modes. * 0 30163. However, after uniting, that value may be subject to a primitive action * 0 30164. only after being dynamically tested in a |b|conformity-clause|r| (3.4.1.q); indeed, * 0 30165. no primitive action can be programmed with a construct of a |b||ap|UNITED|ap||r| mode * 0 30166. (except to assign it to a |b|UNITED-variable|r|, of course). * 0 30167. |exx|Example: * 0 30168. |xi||i|UNION (BOOL, CHAR) t, v; * 0 30169. |e|t |bec| "a"; t |bec| TRUE; v |bec| t|r|. * 0 30170. |cc| * 0 30171. * 0 30172. |h1|6.4.1. Syntax * 0 30173. * 0 30174. |pb1|a)|ts1||b|united to|co||r|61B|b||cc| UNITED FORM : * 0 30175. MEEK|co||r|61C|b||cc| MOID FORM, where MOID unites to UNITED|co||r|b|b||cc|.|r| * 0 30176. |p1|b)|ts1||b|WHETHER MOID1 unites to MOID2|co||r|a,34i,71m|b||cc| : * 0 30177. where MOID1 equivalent MOID2|co||r|73a|b||cc|, WHETHER false ; * 0 30178. unless MOID1 equivalent MOID2|co||r|73a|b||cc|, * 0 30179. WHETHER safe MOODS1 subset of$#safe MOODS2|co||r|73l,m,n|b||cc|, * 0 30180. where (MOODS1) is (MOID1)$#or (union of MOODS1 mode) is (MOID1), * 0 30181. where (MOODS2) is (MOID2)$#? 0 30182. or (union of MOODS2 mode) is (MOID2).|r| * 0 30183. |w5||exx||co|Examples: * 0 30184. |ex|a) |i|x|r| (in |i|uir |bec| x|r|)|q|? 0 30185. |e||i|u|r| (in |i|UNION (CHAR, INT, VOID) (u)|r|, * 0 30186. in a reach containing |i|UNION (INT, VOID) u |bec| EMPTY|r|)|cc| * 0 30187. * 0 30188. |h|6.5. Widening * 0 30189. * 0 30190. |pa||j||co|Widening transforms integers to real numbers, real numbers to complex numbers * 0 30191. (in both cases, with the same size), a value of mode |b||ap|BITS|ap||r| to an unpacked vector of * 0 30192. truth values, or a value of mode |b||ap|BYTES|ap||r| to an unpacked vector of characters. * 0 30193. |pg|For example, in |i|z |bec| 1|r|, the yield of |i|1|r| is widened to the real * 0 30194. number |w|1.0|r| and then to the complex number |w|(1.0, 0.0)|r|; * 0 30195. syntactically, the a priori mode specified by |i|INT|r| is changed to that specified by |i|REAL|r| * 0 30196. and then to that specified by |i|COMPL|r|.|cc| * 0 30197. * 0 30198. |h1|6.5.1. Syntax * 0 30199. * 0 30200. |pb1|A) |ts1||b|BITS :: structured with$#row of boolean field SITHETY letter aleph mode.|r| * 0 30201. |p1|B)|ts1||b|BYTES :: structured with$#row of character field SITHETY letter aleph mode.|r|? 0 30202. |p1|C)|ts1||b|SITHETY :: LENGTH LENGTHETY ; SHORTH SHORTHETY ; EMPTY.|r| * 0 30203. |p1|D)|ts1||b|LENGTH :: letter l letter o letter n letter g.|r| * 0 30204. |p1|E)|ts1||b|SHORTH :: letter s letter h letter o$#letter r letter t.|r| * 0 30205. |p1|F)|ts1||b|LENGTHETY :: LENGTH LENGTHETY ; EMPTY.|r| * 0 30206. |p1|G)|ts1||b|SHORTHETY :: SHORTH SHORTHETY ; EMPTY.|r| * 0 30207. |pb1|a)|ts1||b|widened to|co||r|b,61A|b||cc| SIZETY real FORM : * 0 30208. MEEK|co||r|61C|b||cc| SIZETY integral FORM.|r| * 0 30209. |p||ps||co||b|SIZETY :: long LONGSETY ; short SHORTSETY ; EMPTY.|r||cc| * 0 30210. |p1|b)|ts1||b|widened to|co||r|61A|b||cc|$#structured with SIZETY real field letter r letter e? 0 30211. $#SIZETY real field letter i letter m mode FORM : * 0 30212. MEEK|co||r|61C|b||cc| SIZETY real FORM ; * 0 30213. widened to|co||r|a|b||cc| SIZETY real FORM.|r| * 0 30214. |p1|c)|ts1||b|widened to|co||r|61A|b||cc| row of boolean FORM : * 0 30215. MEEK|co||r|61C|b||cc| BITS FORM.|r| * 0 30216. |p1|d)|ts1||b|widened to|co||r|61A|b||cc| row of character FORM : * 0 30217. MEEK|co||r|61C|b||cc| BYTES FORM.|r| * 0 30218. |w5||exx||co|Examples: * 0 30219. |ex|a) |i|1|r| (in |i|x |bec| 1|r|) * 0 30220. |ey|b) |i|1.0|r| (in |i|z |bec| 1.0|r|)|qs||i|1|r| (in |i|z |bec| 1|r|) * 0 30221. |ey|c) |i|2r101|r| (in |i||so||thin||sc| BOOL (2r101)|r|) * 0 30222. |ey|d) |i|r|r| (in |i||so||thin||sc| CHAR (r)|r|, see 1.1.2)|cc| * 0 30223. * 0 30224. |h|6.5.2. Semantics * 0 30225. * 0 30226. |pa||j|The yield |w|W|r| of a |b|widened-to-MODE-FORM|r| |w|F|r| is * 0 30227. determined as follows: * 0 30228. |et|let |w|V|r| be the yield of the direct descendent of |w|F|r|; * 0 30229. |pi|Case#A: |b||ap|MODE|ap||r| is some |b||ap|SIZETY real|ap||r|: * 0 30230. |et||w|W|r| is the real number widenable from |co|2.1.3.1.e|cc| |w|V|r|; * 0 30231. |pi|Case#B: |b||ap|MODE|ap||r| is some |b||ap|structured with SIZETY real letter r letter e * 0 30232. SIZETY real letter i letter m mode|ap||r|: * 0 30233. |xi||bt||w|W|r| is |co|the complex number which is|cc| a structured value * 0 30234. whose fields are respectively |w|V|r| * 0 30235. and the real number |w|0|r| of the same size |co|2.1.3.1.b|cc| as |w|V|r|; * 0 30236. |pi|Case#C: |b||ap|MODE|ap||r| is |b||ap|row of boolean|ap||r| or |b||ap|row of character|ap||r|: * 0 30237. |et||w|W|r| is the |co|only|cc| field of |w|V|r|. * 0 30238. * 0 30239. |h|6.6. Rowing * 0 30240. * 0 30241. |pa||j||co|Rowing permits the building of a multiple value from a single element. * 0 30242. If the latter is a name then the result of rowing may also be a name * 0 30243. referring to that multiple value.? 0 30244. |exx|Example: * 0 30245. |ey||i||so|1 : 1|sc|#REAL b1 |bec| 4.13|r| |cc|? 0 30246. * 0 30247. |h1|6.6.1. Syntax * 0 30248. * 0 30249. |pb1|a)|ts1||b|rowed to|co||r|61A|b||cc| REFETY ROWS1 of MODE FORM : * 0 30250. where (ROWS1) is (row), STRONG|co||r|61A|b||cc| REFLEXETY MODE FORM, * 0 30251. where (REFETY) is derived from (REFLEXETY)|co||r|531b,c,|mi||b||cc| ;? 0 30252. where (ROWS1) is (row ROWS2), STRONG|co||r|61A|b||cc| REFLEXETY ROWS2 of MODE FORM, * 0 30253. where (REFETY) is derived from (REFLEXETY)|co||r|531b,c,|mi||b||cc|.|r|? 0 30254. |w5||exx||co|Examples: * 0 30255. |ex|a) |i|4.13|r| (in |i||so|1 : 1|sc| REAL b1 |bec| 4.13|r|)|qs| * 0 30256. |e||i|x1|r| (in |i||so|1 : 1, 1 : n|sc| REAL b2 |bec| x1|r|)|cc| * 0 30257. * 0 30258. |h|6.6.2. Semantics * 0 30259. * 0 30260. |pb1||j|a)|tp1|The yield |w|W|r| of a |b|rowed-to-REFETY-ROWS1-of-MODE-FORM|r| |w|F|r| is * 0 30261. determined as follows: * 0 30262. |et|let |w|V|r| be the yield of the |b|STRONG-FORM|r| of |w|F|r|;? 0 30263. |pi|Case#A: |b||ap|REFETY|ap||r| is |b||ap|EMPTY|ap||r|: * 0 30264. |et| |w|W|r| is the multiple value "built" |co|b|cc| from * 0 30265. |w|V|r| for |b||ap|ROWS1|ap||r|; * 0 30266. |pi|Case#B: |b||ap|REFETY|ap||r| is |b||ap|REF to|ap||r|: * 0 30267. |e|If |w|V|r| is nil, * 0 30268. |e|then |w|W|r| is a nil name; * 0 30269. |e|otherwise, |w|W|r| is the name "built" |co|c|cc| from * 0 30270. |w|V|r| for |b||ap|ROWS1|ap||r|. * 0 30271. |pb1|b)|tp1|The multiple value |w|W|r| "built" from a value |w|V|r|, for some |b||ap|ROWS1|ap||r|, * 0 30272. is determined as follows: * 0 30273. |pi|Case#A: |b||ap|ROWS1|ap||r| is |b||ap|row|ap||r|: * 0 30274. |et||w|W|r| is composed of * 0 30275. |pha11|(i)|thb1|a descriptor |w|((1,#1))|r|, * 0 30276. |pha21|(ii)|thb1||co|one element|cc| |w|V|r|; * 0 30277. |pi|Case#B: |b||ap|ROWS1|ap||r| is some |b||ap|row ROWS2|ap||r|: * 0 30278. |et|let the descriptor of |w|V|r| be * 0 30279. |w|((l|s0|1|s1|,#u|s0|1|s1|), ...#, (l|s0|n|s1|,#u|s0|n|s1|))|r|; * 0 30280. |et||w|W|r| is composed of * 0 30281. |pha11|(i)|thb1|a#descriptor * 0 30282. |w|((1,#1), (l|s0|1|s1|,#u|s0|1|s1|), ...#, (l|s0|n|s1|,#u|s0|n|s1|))|r|,? 0 30283. |pha21|(ii)|thb1|the elements of |w|V|r|; * 0 30284. |xi||bt|the element selected by an index |w|(i|s0|1|s1|, ...#, i|s0|n|s1|)|r| in |w|V|r| * 0 30285. is that selected by |w|(1, i|s0|1|s1|, ...#, i|s0|n|s1|)|r| in |w|W|r|. * 0 30286. |pb1|c)|tp1|The name |w|N1|r| "built" from a name |w|N|r|, for some |b||ap|ROWS1|ap||r|, is * 0 30287. determined as follows: * 0 30288. |et||w|N1|r| is a name |co|not necessarily newly created|cc|, * 0 30289. equal in scope to |w|N|r| and * 0 30290. referring to the multiple value built |co|b|cc|, for |b||ap|ROWS1|ap||r|, from the value * 0 30291. referred to by |w|N|r|; * 0 30292. |pi|Case#A: |b||ap|ROWS1|ap||r| is |b||ap|row|ap||r|: * 0 30293. |et|the |co|only|cc| subname of |w|N1|r| is |w|N|r|; * 0 30294. |pi|Case#B: |b||ap|ROWS1|ap||r| is some |b||ap|row ROWS2|ap||r|: * 0 30295. |et|the subname of |w|N1|r| selected by |w|(1, i|s0|1|s1|, ...#,#i|s0|n|s1|)|r| * 0 30296. is the subname of |w|N|r| selected by |w|(i|s0|1|s1|, ...#,#i|s0|n|s1|)|r|. * 0 30297. * 0 30298. |h|6.7. Voiding * 0 30299. * 0 30300. |pa||j||co|Voiding is used to discard the yield of some |b|unit|r| whose primary purpose is to * 0 30301. cause its side-effects; the a posteriori mode is then simply |b||ap|void|ap||r|. * 0 30302. For example, in |i|x#|bec|#1; y#|bec|#1;|r|, the |b|assignation|r| |i|y#|bec|#1|r| is voided, * 0 30303. and in |i|PROC#t#|uqe| INT#: ENTIER#(random#|sx|#100);#t;|r|, * 0 30304. the |b|applied-identifier |i|t|r| is voided after a deproceduring, which prescribes the * 0 30305. calling of a routine. * 0 30306. |pg||b|Assignations|r| and other |b|COMORFs|r| are voided without any deproceduring so that, * 0 30307. in |i|PROC VOID p; p |bec| finish|r|, the |b|assignation|r| |i|p |bec| finish|r| does not prescribe an * 0 30308. unexpected calling of the routine |i|finish|r|.|cc| * 0 30309. * 0 30310. |h1|6.7.1. Syntax * 0 30311. * 0 30312. |pb1|A)|ts1||b|NONPROC :: PLAIN ;? 0 30313. STOWED ; REF to NONPROC ; procedure with PARAMETERS yielding MOID ; UNITED.|r| * 0 30314. |pb1|a)|ts1||b|voided to|co||r|61A|b||cc| void MORF : * 0 30315. deprocedured to|co||r|63a|b||cc| NONPROC MORF ; unchanged from|co||r|61f|b||cc| NONPROC MORF.|r|? 0 30316. |p1|b)|ts1||b|voided to|co||r|61A|b||cc| void COMORF : * 0 30317. unchanged from|co||r|61f|b||cc| MODE COMORF.|r| * 0 30318. |w5||exx||co|Examples: * 0 30319. |ex|a) |i|random|r| (in |i|SKIP; random;|r|)|qs| * 0 30320. |e||i|next random (last random)|r| * 0 30321. |e|(in |i|SKIP; next random (last random);|r|) * 0 30322. |ey|b) |i|PROC VOID (pp)|r| (in |i|PROC PROC VOID pp |uqe| * 0 30323. PROC VOID : (print (1); VOID : print (2)); PROC VOID (pp);|r|)|cc| * 0 30324. * 0 30325. |h|6.7.2. Semantics * 0 30326. * 0 30327. |pa||j|The elaboration of a |b|voided-to-void-FORM|r| consists of that of its direct descendent, * 0 30328. and yields |w|empty|r|. * 0 30329. * 0 30330. |h|7. |bs|Modes and nests|rs|? 0 30331. * 0 30332. |pa||j||co|The identification of a property in a nest is the static counterpart * 0 30333. of the dynamic determination (4.8.2.b) of * 0 30334. a value in an environ: the search is conducted from the newest (youngest) level towards * 0 30335. the previous (older) ones.? 0 30336. |pa|Modes are composed from the primitive modes, such as |b||ap|boolean|ap||r|, with the aid of * 0 30337. |b||ap|HEAD|ap||r|s, such as |b||ap|structured with|ap||r|, and they may be recursive. * 0 30338. Recursive modes spelled in different ways may nevertheless be equivalent.? 0 30339. The syntax tests the equivalence of such modes * 0 30340. by proving that it is impossible to find any discrepancy between their respective * 0 30341. structures or component modes. * 0 30342. |pa|A number of unsafe uses of properties are prevented. * 0 30343. An |b|identifier|r| or |b|mode-indication|r| is not declared * 0 30344. more than once in each reach. The modes of the * 0 30345. |b|operands|r| of a |b|formula|r| do not determine more than one operation. * 0 30346. Recursions in modes do not cause the creation of * 0 30347. dynamic objects of unlimited size and do not allow ambiguous coercions.|cc| * 0 30348. * 0 30349. |h|7.1. Independence of properties? 0 30350. * 0 30351. |pa||j||co|The following syntax determines whether two properties (i.e., two |b||ap|PROP|ap||r|s), such as * 0 30352. those corresponding to |i|REAL x|r| and |i|INT x|r|, may or may not * 0 30353. be enveloped by the same |b||ap|LAYER|ap||r|.|cc|? 0 30354. * 0 30355. |h1|7.1.1. Syntax * 0 30356. * 0 30357. |pb1|A)|ts1||b|PREF :: procedure yielding ; REF to.|r|? 0 30358. |p1|B)|ts1||b|NONPREF :: PLAIN ; STOWED ; procedure with PARAMETERS yielding MOID ; UNITED ; void.|r|? 0 30359. |p1|C)|ts1||star||b|PREFSETY :: PREF PREFSETY ; EMPTY.|r|? 0 30360. |pb||ps||co||b|PROP :: DEC ; LAB ; FIELD.|r|? 0 30361. |p||ps||b|QUALITY :: MODE ; MOID TALLY ; DYADIC ; label ; MODE field.|r|? 0 30362. |p||ps||b|TAX :: TAG ; TAB ; TAD ; TAM.|r| * 0 30363. |p||ps||b|TAO :: TAD ; TAM.|r||cc| * 0 30364. |pb1|a)|ts1||b|WHETHER PROP1 independent PROPS2 PROP2|co||r|a,48a,c,72a|b||cc| :? 0 30365. |e|WHETHER PROP1 independent PROPS2|co||r|a,c|b||cc|$#? 0 30366. and PROP1 independent PROP2|co||r|c|b||cc|.|r| * 0 30367. |p1|b)|ts1||b|WHETHER PROP independent EMPTY|co||r|48a,c,72a|b||cc| : WHETHER true.|r|? 0 30368. |p1|c)|ts1||b|WHETHER QUALITY1 TAX1$#independent QUALITY2 TAX2|co||r|a,48a,c,72a|b||cc| :? 0 30369. unless (TAX1) is (TAX2), WHETHER true ; * 0 30370. where (TAX1) is (TAX2) and (TAX1) is (TAO), * 0 30371. WHETHER QUALITY1 independent QUALITY2|co||r|d|b||cc|.|r| * 0 30372. |p1|d)|ts1||b|WHETHER QUALITY1 independent QUALITY2|co||r|c|b||cc| :? 0 30373. where QUALITY1 related QUALITY2|co||r|e,f,g,h,i,j,|mi||b||cc|, WHETHER false ;? 0 30374. unless QUALITY1 related QUALITY2|co||r|e,f,g,h,i,j,|mi||b||cc|, WHETHER true.|r|? 0 30375. |pb1|e)|ts1||b|WHETHER MONO related DUO|co||r|d|b||cc| :? 0 30376. WHETHER false.|r|? 0 30377. |p1|f)|ts1||b|WHETHER DUO related MONO|co||r|d|b||cc| : WHETHER false.|r|? 0 30378. |p1|g)|ts1||b|WHETHER PRAM related DYADIC|co||r|d|b||cc| : WHETHER false.|r|? 0 30379. |p1|h)|ts1||b|WHETHER DYADIC related PRAM|co||r|d|b||cc| : WHETHER false.|r|? 0 30380. |p1|i)|ts1||b|WHETHER procedure with MODE1 parameter MODE2 parameter$#yielding MOID1 related$#? 0 30381. procedure with MODE3 parameter MODE4 parameter$#yielding MOID2|co||r|d|b||cc| : * 0 30382. |e|WHETHER MODE1 firmly related MODE3|co||r|k|b||cc|$#? 0 30383. and MODE2 firmly related MODE4|co||r|k|b||cc|.|r| * 0 30384. |p1|j)|ts1||b|WHETHER procedure with MODE1 parameter yielding MOID1$#? 0 30385. related procedure with MODE2 parameter$#yielding MOID2|co||r|d|b||cc| : * 0 30386. WHETHER MODE1 firmly related MODE2|co||r|k|b||cc|.|r| * 0 30387. |pb1|k)|ts1||b|WHETHER MOID1 firmly related MOID2|co||r|i,j|b||cc| : * 0 30388. WHETHER MOODS1 is firm MOID2|co||r|l,m|b||cc|$#? 0 30389. or MOODS2 is firm MOID1|co||r|l,m|b||cc|, * 0 30390. |e|where (MOODS1) is (MOID1)$#? 0 30391. or (union of MOODS1 mode) is (MOID1), * 0 30392. where (MOODS2) is (MOID2)$#? 0 30393. or (union of MOODS2 mode) is (MOID2).|r| * 0 30394. |p1|l)|ts1||b|WHETHER MOODS MOOD is firm MOID|co||r|k,l|b||cc| : * 0 30395. WHETHER MOODS is firm MOID|co||r|l,m|b||cc|$#? 0 30396. or MOOD is firm MOID|co||r|m|b||cc|.|r| * 0 30397. |p1|m)|ts1||b|WHETHER MOID1 is firm MOID2|co||r|k,l,n,47f|b||cc| : * 0 30398. WHETHER MOID1 equivalent MOID2|co||r|73a|b||cc|$#? 0 30399. or MOID1 unites to MOID2|co||r|64b|b||cc|$#? 0 30400. or MOID1 deprefs to firm MOID2|co||r|n|b||cc|.|r|? 0 30401. |p1|n)|ts1||b|WHETHER MOID1 deprefs to firm MOID2|co||r|m|b||cc| : * 0 30402. where (MOID1) is (PREF MOID3), * 0 30403. WHETHER MOID5 is firm MOID2|co||r|m|b||cc|, * 0 30404. where MOID3 deflexes to MOID5|co||r|47a,b,c|b||cc| ; * 0 30405. where (MOID1) is (NONPREF), WHETHER false.|r| * 0 30406. |pa||j||co|To prevent the ambiguous application of |b|indicators|r|, * 0 30407. as in |i|REAL#x, INT#x; x#|bec|#0|r|, certain restrictions are imposed * 0 30408. on |b|defining-indicators|r| contained in a given reach. * 0 30409. These are enforced by the syntactic test for "independence" of * 0 30410. properties enveloped by a given |b||ap|LAYER|ap||r| (rules a, b, c). * 0 30411. A sufficient condition, not satisfied in the example above, * 0 30412. for the independence of a pair of properties, each being some * 0 30413. |b||ap|QUALITY TAX|ap||r|, is that the |b||ap|TAX|ap||r|s differ (rule c). * 0 30414. For |b||ap|TAX|ap||r|s which are not some |b||ap|TAO|ap||r|, this condition is * 0 30415. also necessary, so that even |i|REAL x, INT x; SKIP|r| is not a * 0 30416. |b|serial-clause|r|. * 0 30417. |pa|For two properties |b||ap|QUALITY1 TAO|ap||r| and |b||ap|QUALITY2 TAO|ap||r| * 0 30418. the test for independence is more complicated, as is exemplified * 0 30419. by the |b|serial-clause|r| * 0 30420. |n||p||ps||i|OP + |uqe|#(INT i) BOOL : TRUE, * 0 30421. OP + |uqe|#(INT i, j) INT : 1, * 0 30422. OP + |uqe|#(INT i, BOOL j) INT : 2, PRIO + |uqe| 6; * 0 30423. |e|0 + + 0 ~J |uqe| 2 ~J |r|. * 0 30424. |p|Ambiguities would be present in * 0 30425. |p||ps||i|PRIO + |uqe| 6, + |uqe| 7; 1 + 2 |sx| 3 ~J 7 or 9|qe| ~J|r| , * 0 30426. |p|in * 0 30427. |p||ps||i|OP Z |uqe| (INT i) INT : 1, MODE Z |uqe| INT; * 0 30428. |e|Z i ~J formula or declaration|qe| ~J ; SKIP|r| , * 0 30429. |p|and in * 0 30430. |p||ps||i|OP |qe| |uqe|#(UNION (REF REAL, CHAR) a) INT : 1, * 0 30431. OP |qe| |uqe|#(REAL a) INT : 2; * 0 30432. |e||qe| LOC REAL ~J 1 or 2|qe| ~J|r| . * 0 30433. |p||j|In such cases a test is made that the two |b||ap|QUALITY|ap||r|s * 0 30434. are independent (rules c, d). * 0 30435. A |b||ap|MOID TALLY|ap||r| is never independent of any |b||ap|QUALITY|ap||r| * 0 30436. (rule d). * 0 30437. A |b||ap|MONO|ap||r| is always independent of a |b||ap|DUO|ap||r| (rules d, e, f) * 0 30438. and both are independent of a |b||ap|DYADIC|ap||r| (i.e., of a * 0 30439. |b||ap|priority PRIO|ap||r|) (rules d, g, h). * 0 30440. In the case of two |b||ap|PRAM|ap||r|s which are both |b||ap|MONO|ap||r| or both * 0 30441. |b||ap|DUO|ap||r|, ambiguities could arise if the corresponding parameter * 0 30442. modes were "firmly related", i.e., if some (pair of) operand mode(s) * 0 30443. could be firmly coerced to the (pair of) parameter mode(s) of * 0 30444. either |b||ap|PRAM|ap||r| (rules i, j). * 0 30445. In the example with the two definitions of |i||qe||r|, * 0 30446. the two |b||ap|PRAM|ap||r|s are related since the modes specified by * 0 30447. |i|UNION (REF REAL, CHAR)|r| and by |i|REAL|r| are firmly * 0 30448. related, the mode specified by |i|REF REAL|r| being firmly coercible * 0 30449. to either one. * 0 30450. |pa|It may be shown that two modes are firmly related if one of them, * 0 30451. or some component |b||ap|MOOD|ap||r| of one of them, may be firmly coerced * 0 30452. to the other (rules k, l), which requires a sequence of zero or more * 0 30453. meek coercions followed by at most one uniting (6.4.1.a). * 0 30454. The possibility or otherwise of such a sequence of coercions between * 0 30455. two modes is determined by the predicate |b||ap|is firm|ap||r| (rules m, n). * 0 30456. |pa|A |b||ap|PROP1|ap||r| also renders inaccessible a |b||ap|PROP2|ap||r| in an outer * 0 30457. |b||ap|LAYER|ap||r| if that |b||ap|PROP2|ap||r| is not independent of |b||ap|PROP1|ap||r|; e.g., * 0 30458. |n||p||ps||i|BEGIN INT x; * 0 30459. |pc|BEGIN REAL x; ~J here the |b||ap|PROP1|ap||i| is |b||ap|reference to real letter x|ap||i| ~J * 0 30460. |e|SKIP |pc|END * 0 30461. |p||ps|END|r| * 0 30462. |p|and likewise * 0 30463. |p||ps||i|BEGIN OP |qe| |uqe| (INT i) INT : 1, INT k |bec| 2; * 0 30464. |pc|BEGIN OP |qe| |uqe| (REF INT i) INT : 3; * 0 30465. |pd||qe|#k ~J delivers 3, but |qe|#4 could not occur here because its * 0 30466. |b|operator|i| is inaccessible ~J * 0 30467. |pc|END * 0 30468. |p||ps|END|r|#.|cc|? 0 30469. * 0 30470. |h|7.2. Identification in nests * 0 30471. * 0 30472. |pa||j||co|This section ensures that for each |b|applied-indicator|r|? 0 30473. there is a corresponding property in some suitable |b||ap|LAYER|ap||r| of the nest.|cc|? 0 30474. * 0 30475. |h1|7.2.1. Syntax * 0 30476. * 0 30477. |pb||ps||co||b|PROPSETY :: PROPS ; EMPTY.|r|? 0 30478. |p||ps||b|PROPS :: PROP ; PROPS PROP.|r|? 0 30479. |p||ps||b|PROP :: DEC ; LAB ; FIELD.|r|? 0 30480. |p||ps||b|QUALITY :: * 0 30481. MODE ; MOID TALLY ; DYADIC ; label ; MODE field.|r| * 0 30482. |p||ps||b|TAX :: TAG ; TAB ; TAD ; TAM.|cc||r|? 0 30483. |pb1|a)|ts1||b|WHETHER PROP identified in NEST new PROPSETY|co||r|a,48b,542a|b||cc| :? 0 30484. |e|where PROP resides in PROPSETY|co||r|b,c,|mi||b||cc|, WHETHER true ; * 0 30485. where PROP independent PROPSETY|co||r|71a,b,c|b||cc|, * 0 30486. WHETHER PROP identified in NEST|co||r|a,|mi||b||cc|.|r| * 0 30487. |pb1|b)|ts1||b|WHETHER PROP1 resides in PROPS2 PROP2|co||r|a,b,48d|b||cc| : * 0 30488. WHETHER PROP1 resides in PROP2|co||r|c,|mi||b||cc|$#or * 0 30489. PROP1 resides in PROPS2|co||r|b,c,|mi||b||cc|.|r| * 0 30490. |p1|c)|ts1||b|WHETHER QUALITY1 TAX resides in$#QUALITY2 TAX|co||r|a,b,48d|b||cc| :? 0 30491. where (QUALITY1) is (label) * 0 30492. $#or (QUALITY1) is (DYADIC)? 0 30493. $#or (QUALITY1) is (MODE field),? 0 30494. WHETHER (QUALITY1) is (QUALITY2) ; * 0 30495. |e|where (QUALITY1) is (MOID1 TALLETY)$#? 0 30496. and (QUALITY2) is (MOID2 TALLETY),? 0 30497. WHETHER MOID1 equivalent MOID2|co||r|73a|b||cc|.|r|? 0 30498. |pa||j||co|A nest, except the primal one (which is just |b||ap|new|ap||r|), * 0 30499. is some |b||ap|NEST LAYER|ap||r| (i.e., some |b||ap|NEST new PROPSETY|ap||r|). * 0 30500. A |b||ap|PROP|ap||r| is identified by first looking for it in that |b||ap|LAYER|ap||r| (rule a). * 0 30501. If the |b||ap|PROP|ap||r| is some |b||ap|label TAX|ap||r| or |b||ap|DYADIC TAX|ap||r|, * 0 30502. then a simple match of the |b||ap|PROP|ap||r|s is a sufficient test (rule c). * 0 30503. If the |b||ap|PROP|ap||r| is some |b||ap|MOID TALLETY TAX|ap||r|, then the mode? 0 30504. equivalencing mechanism must be invoked (rule c). * 0 30505. If it is not found in the |b||ap|LAYER|ap||r|, then the search continues with the |b||ap|NEST|ap||r| * 0 30506. (without that |b||ap|LAYER|ap||r|), provided that it is independent of all |b||ap|PROP|ap||r|s in that * 0 30507. |b||ap|LAYER|ap||r|; otherwise the search is abandoned (rule a).? 0 30508. Note that rules b and c do double duty in that they are also used to check the validity * 0 30509. of |b|applied-field-selectors|r| (4.8.1.d).|cc| * 0 30510. * 0 30511. |h|7.2.2. Semantics * 0 30512. * 0 30513. |pb1||j|a)|tp1|If some |b|NEST-range|r| |w|R|r| |co|3.0.1.f|cc| contains an * 0 30514. |b|applied-indicator|r| |w|I|r| * 0 30515. |co|4.8.1.b|cc| of which there is a descendent |b|where-PROP-identified-in-? 0 30516. NEST-LAYER|r|, but no descendent |b|where-PROP-identified-in-? 0 30517. NEST|r|, then |w|R|r| is the "defining |b|range|r|" of that |w|I|r|. * 0 30518. |co|Note that |b||ap|NEST|ap||r| is always the nest in force just outside the |b|range|r|.|cc| * 0 30519. |pb1|b)|tp1|A |b|QUALITY-applied-indicator-with-TAX|r| |w|I|r| whose defining |b|NEST-range|r| * 0 30520. |co|a|cc| is |w|R|r| "identifies" the |b|QUALITY-NEST-LAYER-defining-indicator-with-TAX|r| * 0 30521. contained in |w|R|r|. * 0 30522. |pa||co|For example, in * 0 30523. |p||ps||i|(~J1~J REAL i |uqe| 2.0; * 0 30524. (~J2~J INT i |uqe| 1; (~J3~J REAL x; print (i) * 0 30525. ~J3~J) ~J2~J) ~J1~J)|r| * 0 30526. |p|there are three |b|ranges|r|. The |b|applied-identifier|r| |i|i|r| * 0 30527. in |i|print#(i)|r| is forced, by the syntax, to be an * 0 30528. |b|integral-NEST-new-real-letter-i-new-integral-letter-i-? 0 30529. new-reference-to-real-letter-x-applied-identifier-with-letter-i|r| * 0 30530. (4.8.1.b). Its defining |b|range|r| is the * 0 30531. |b|NEST-new-real-letter-i-serial-clause-defining-new-integral-letter-i|r| * 0 30532. (3.2.1.a) numbered |i|~J2~J|r|, it identifies the * 0 30533. |b|defining-identifier|r| |i|i|r| contained in |i|INT i|r| (not the one in * 0 30534. |i|REAL i|r|), and its mode is |b||ap|integral|ap||r|.|cc| * 0 30535. |pa||co|By a similar mechanism, a |b|DYADIC-formula|r| (5.4.2.1.a) * 0 30536. may be said to "identify" that |b|DYADIC-defining-operator|r| (4.8.1.a) * 0 30537. which determines its priority.|cc| * 0 30538. |pb1|c)|tp1|The environ |w|E|r| "necessary for" a * 0 30539. construct |w|C|r| in an environ |w|E1|r| is determined as follows: * 0 30540. |pi|If |w|E1|r| is the primal environ |co|2.2.2.a|cc|, * 0 30541. |pi|then |w|E|r| is |w|E1|r|; * 0 30542. |pi|otherwise, letting * 0 30543. |w|E1|r| be composed of a locale |w|L|r| corresponding to some |b||ap|PROPSETY|ap||r| and another * 0 30544. environ |w|E2|r|, * 0 30545. |ph|If |w|C|r| contains any |b|QUALITY-applied-indicator-with-TAX|r| * 0 30546. |et|which does not identify |co|b|cc| a |b|defining-indicator|r| * 0 30547. contained in |w|C|r|, * 0 30548. |et|which is not a |b|mode-indication|r| directly descended from * 0 30549. a |b|formal-|r| or |b|virtual-declarer|r|, and * 0 30550. |et|which is such that the predicate |b||ap|where QUALITY TAX resides * 0 30551. in PROPSETY|ap||r| |co|7.2.1.b|cc| holds, * 0 30552. |ph|then |w|E|r| is |w|E1|r|; * 0 30553. |ph|otherwise, |co||w|L|r| is not necessary for |w|C|r| and|cc| * 0 30554. |w|E|r| is the environ necessary for |w|C|r| in |w|E2|r|. * 0 30555. |pa||co|The environ necessary for a construct is used in the * 0 30556. semantics of |b|routine-texts|r| (5.4.1.2) and * 0 30557. in "establishing" (3.2.2.b). * 0 30558. For example, in * 0 30559. |n||p||ps||i|~J2~J PROC VOID pp; INT n; * 0 30560. (~J1~J PROC p |uqe| VOID : print (n); pp |bec| p)|r| * 0 30561. |p||j|if |w|E1|r| and |w|E2|r| are the environs established by the * 0 30562. elaboration of the |b|serial-clauses|r| marked by the |b|comments|r| * 0 30563. |i||ct|1|ct||r| and |i||ct|2|ct||r|, then |w|E2|r| is the environ * 0 30564. necessary in |w|E1|r| for the |b|routine-text|r| * 0 30565. |i|VOID : print (n)|r|, and so the routine yielded by |i|p|r| * 0 30566. in |w|E1|r| is composed of that |b|routine-text|r| together * 0 30567. with |w|E2|r| (5.4.1.2). Therefore, the scope of that routine is * 0 30568. the scope of |w|E2|r| (2.1.3.5.c) and hence the assignment (5.2.1.2.b) invoked by * 0 30569. |i|pp |bec| p|r| is well defined.|cc| * 0 30570. * 0 30571. |h|7.3. Equivalence of modes * 0 30572. * 0 30573. |pa||j||co|The equivalence or nonequivalence of |b||ap|MOID|ap||r|s is determined * 0 30574. in this section. For a discussion of equivalent |b||ap|MOID|ap||r|s * 0 30575. see 2.1.1.2.|cc|? 0 30576. |pa||co|One way of viewing recursive modes is to consider * 0 30577. them as infinite trees. Such a "mode tree" is obtained by repeatedly * 0 30578. substituting in some spelling, for each |b||ap|MU application|ap||r|, the * 0 30579. |b||ap|MODE|ap||r| of the corresponding |b||ap|MU definition * 0 30580. of MODE|ap||r|. Thus, the spelling |b||ap|mui definition * 0 30581. of structured with integral field letter i * 0 30582. reference to mui application field letter n * 0 30583. mode|ap||r| would give rise to the following * 0 30584. mode tree: * 0 1. |wid||picn||n||w25||e| * 0 2. |e|########|b||ul4||ul4|? 0 3. |ul4||ul4|? 0 4. |ul4||ul4|? 0 5. |ul||ul||ulb||ul4||ul4|? 0 6. |ul4||ul4||ul4|? 0 7. |ul4||ul||ul||ul|? 0 8. |e|########|##########|#############################|#############|? 0 9. |e|'structured#with'##|#############################|###########'mode'? 0 10. |e|######|ul4||ul4|? 0 11. |ul4||ul||ulb||ul4|###################|ul4||ul||ul||ulb|? 0 12. |ul4||ul4||ul||ul||ul|? 0 13. |e|#####|#########|########|#################|#########|########|? 0 14. |e|#'integral'#'field'#'letter#i'#########|ul||ul||ul||ulb||ul4|##'field'#'letter#n'? 0 15. |e|######################################|########|? 0 16. |e|################################'reference#to'#|? 0 17. |e|#########|ul4||ul4|? 0 18. |ul4||ul4|? 0 19. |ul4||ul4|? 0 20. |ul4||ul4|? 0 21. |ul4||ul||ul||ulb||ul4||ul4|? 0 22. |ul4||ul||ul||ul|? 0 23. |e|########|##########|#############################|#############|? 0 24. |e|'structured#with'##|#############################|###########'mode'? 0 25. |e|######|ul4||ul4|? 0 26. |ul4||ul||ulb||ul4|###################|ul4||ul||ul||ulb|? 0 27. |ul4||ul4||ul||ul||ul|? 0 28. |e|#####|#########|########|#################|#########|########|? 0 29. |e|#'integral'#'field'#'letter#i'#########|ul||ul||ul||ulb||ul4|##'field'#'letter#n'? 0 30. |e|######################################|########|? 0 31. |e|################################'reference#to'#|? 0 32. |e|###############################################|? 0 33. |e|##########################################|r|(|i|et#cetera|r|). * 0 34. |nar||picf|? 0 36. $ENDFILE? 0 100. |S8|S5'|S1'structured with|S5'|S1'|S362|S5'|S1'mode|S5'|S1'? 0 101. |S8|S5'|S1'integral|S5'|S1'|S9|S5'|S1'field|S5'|S1'|S9|S5'|S1'letter i|S5'|S1'|S178|S5'|S1'field|S5'|S1'|S9|S5'|S1'letter n|S5'|S1'? 0 102. |S281|S5'|S1'reference to|S5'|S1'? 0 103. |S8|S5'|S1'structured with|S5'|S1'|S362|S5'|S1'mode|S5'|S1'? 0 104. |S8|S5'|S1'integral|S5'|S1'|S9|S5'|S1'field|S5'|S1'|S9|S5'|S1'letter i|S5'|S1'|S178|S5'|S1'field|S5'|S1'|S9|S5'|S1'letter n|S5'|S1'? 0 105. |S281|S5'|S1'reference to|S5'|S1'? 0 106. |S417(|S10et c|S10et|S10era)? 0 30586. |e||j||e|Two spellings are equivalent if and only if they give * 0 30587. rise to identical mode trees. The equivalence syntax * 0 30588. tests the equivalence of two spellings by, as it were, simultaneously * 0 30589. developing the two trees until a difference is found * 0 30590. (resulting in a blind alley) or until it becomes * 0 30591. apparent that no difference can be found. * 0 30592. The growing production tree reflects to some extent the * 0 30593. structure of the mode trees.|cc| * 0 30594. * 0 30595. |h1|7.3.1. Syntax * 0 30596. * 0 30597. |pb1|A)|ts1||b|SAFE :: safe ; MU has MODE SAFE ; yin SAFE ; yang SAFE ;? 0 30598. remember MOID1 MOID2 SAFE.|r|? 0 30599. |p1|B)|ts1||b|HEAD :: PLAIN ; PREF|co||r|71A|b||cc| ; structured with ; FLEXETY ROWS of ; * 0 30600. procedure with ; union of ; void.|r|? 0 30601. |p1|C)|ts1||b|TAILETY :: MOID ; FIELDS mode ; PARAMETERS yielding MOID ; MOODS mode ; EMPTY.|r|? 0 30602. |p1|D)|ts1||b|PARTS :: PART ; PARTS PART.|r|? 0 30603. |p1|E)|ts1||b|PART :: FIELD ; PARAMETER.|r|? 0 30604. |pb1|a)|ts1||b|WHETHER MOID1 equivalent MOID2|co||r|64b,71m,72c|b||cc| :? 0 30605. WHETHER safe MOID1 equivalent safe MOID2|co||r|b|b||cc|.|r|? 0 30606. |p1|b)|ts1||b|WHETHER SAFE1 MOID1 equivalent SAFE2 MOID2|co||r|a,b,e,i,j,n|b||cc| : * 0 30607. where (SAFE1) contains (remember MOID1 MOID2)$#? 0 30608. or (SAFE2) contains (remember MOID2 MOID1), WHETHER true ; * 0 30609. unless (SAFE1) contains (remember MOID1 MOID2)$#or (SAFE2) contains (remember MOID2 MOID1), * 0 30610. |e|WHETHER (HEAD3) is (HEAD4)$#and remember MOID1 MOID2 SAFE3 TAILETY3$#? 0 30611. equivalent SAFE4 TAILETY4|co||r|b,d,e,k,q,|mi||b||cc|, * 0 30612. where SAFE3 HEAD3 TAILETY3 develops from$#SAFE1 MOID1|co||r|c|b||cc|$#? 0 30613. and SAFE4 HEAD4 TAILETY4 develops from$#SAFE2 MOID2|co||r|c|b||cc|.|r| * 0 30614. |p1|c)|ts1||b|WHETHER SAFE2 HEAD TAILETY develops from$#SAFE1 MOID|co||r|b,c|b||cc| : * 0 30615. |e|where (MOID) is (HEAD TAILETY),? 0 30616. WHETHER (HEAD) shields SAFE1 to SAFE2|co||r|74a,b,c,d,|mi||b||cc| ; * 0 30617. |e|where (MOID) is (MU definition of MODE),? 0 30618. unless (SAFE1) contains (MU has),? 0 30619. WHETHER SAFE2 HEAD TAILETY develops from$#MU has MODE SAFE1 MODE|co||r|c|b||cc| ;? 0 30620. |e|where (MOID) is (MU application)$#and * 0 30621. (SAFE1) is (NOTION MU has MODE SAFE3)$#and? 0 30622. (NOTION) contains (yin) * 0 30623. and (NOTION) contains (yang), * 0 30624. WHETHER SAFE2 HEAD TAILETY develops from$#SAFE1 MODE|co||r|c|b||cc|.|r| * 0 30625. |pb1|d)|ts1||b|WHETHER SAFE1 FIELDS1 mode$#equivalent SAFE2 FIELDS2 mode|co||r|b|b||cc| :? 0 30626. WHETHER SAFE1 FIELDS1 equivalent SAFE2 FIELDS2|co||r|f,g,h,i|b||cc|.|r|? 0 30627. |p1|e)|ts1||b|WHETHER SAFE1 PARAMETERS1 yielding MOID1$#? 0 30628. equivalent SAFE2 PARAMETERS2 yielding MOID2|co||r|b|b||cc| : * 0 30629. WHETHER SAFE1 PARAMETERS1$#equivalent SAFE2 PARAMETERS2|co||r|f,g,h,j|b||cc|$#? 0 30630. and SAFE1 MOID1 equivalent SAFE2 MOID2|co||r|b|b||cc|.|r|? 0 30631. |p1|f)|ts1||b|WHETHER SAFE1 PARTS1 PART1$#equivalent SAFE2 PARTS2 PART2|co||r|d,e,f|b||cc| : * 0 30632. WHETHER SAFE1 PARTS1 equivalent$#SAFE2 PARTS2|co||r|f,g,h,i,j|b||cc|$#? 0 30633. and SAFE1 PART1 equivalent SAFE2 PART2|co||r|i,j|b||cc|.|r|? 0 30634. |p1|g)|ts1||b|WHETHER SAFE1 PARTS1 PART1 equivalent$#SAFE2 PART2|co||r|d,e,f|b||cc| : * 0 30635. WHETHER false.|r| * 0 30636. |p1|h)|ts1||b|WHETHER SAFE1 PART1 equivalent$#SAFE2 PARTS2 PART2|co||r|d,e,f|b||cc| : * 0 30637. WHETHER false.|r| * 0 30638. |p1|i)|ts1||b|WHETHER SAFE1 MODE1 field TAG1$#equivalent * 0 30639. SAFE2 MODE2 field TAG2|co||r|d,f|b||cc| : * 0 30640. |e|WHETHER (TAG1) is (TAG2)$#and? 0 30641. SAFE1 MODE1 equivalent SAFE2 MODE2|co||r|b|b||cc|.|r|? 0 30642. |p1|j)|ts1||b|WHETHER SAFE1 MODE1 parameter$#equivalent SAFE2 MODE2 parameter|co||r|e,f|b||cc| : * 0 30643. WHETHER SAFE1 MODE1 equivalent SAFE2 MODE2|co||r|b|b||cc|.|r|? 0 30644. |pb1|k)|ts1||b|WHETHER SAFE1 MOODS1 mode equivalent$#SAFE2 MOODS2 mode|co||r|b|b||cc| :? 0 30645. |e|WHETHER SAFE1 MOODS1 subset of SAFE2 MOODS2|co||r|l,m,n|b||cc|$#? 0 30646. and SAFE2 MOODS2 subset of$#SAFE1 MOODS1|co||r|l,m,n|b||cc|$#and * 0 30647. MOODS1 number equals MOODS2 number|co||r|o,p|b||cc|.|r| * 0 30648. |p1|l)|ts1||b|WHETHER SAFE1 MOODS1 MOOD1$#subset of * 0 30649. SAFE2 MOODS2|co||r|k,l,46s,64b|b||cc| : * 0 30650. WHETHER SAFE1 MOODS1 subset of SAFE2 MOODS2|co||r|l,m,n|b||cc|$#? 0 30651. and SAFE1 MOOD1 subset of SAFE2 MOODS2|co||r|m,n|b||cc|.|r|? 0 30652. |p1|m)|ts1||b|WHETHER SAFE1 MOOD1$#subset of SAFE2 MOODS2 MOOD2|co||r|k,l,m,46s,64b|b||cc| : * 0 30653. WHETHER SAFE1 MOOD1 subset of SAFE2 MOODS2|co||r|m,n|b||cc|$#? 0 30654. or SAFE1 MOOD1 subset of SAFE2 MOOD2|co||r|n|b||cc|.|r|? 0 30655. |p1|n)|ts1||b|WHETHER SAFE1 MOOD1 subset of SAFE2 MOOD2|co||r|k,l,m,64b|b||cc| :? 0 30656. WHETHER SAFE1 MOOD1 equivalent SAFE2 MOOD2|co||r|b|b||cc|.|r|? 0 30657. |p1|o)|ts1||b|WHETHER MOODS1 MOOD1 number equals$#MOODS2 MOOD2 number$|co||r|k,o|b||cc| :? 0 30658. WHETHER MOODS1 number equals MOODS2 number|co||r|o,p,|mi||b||cc|.|r|? 0 30659. |p1|p)|ts1||b|WHETHER MOOD1 number equals MOOD2 number|co||r|k,o|b||cc| : WHETHER true.|r|? 0 30660. |pb1|q)|ts1||b|WHETHER SAFE1 EMPTY equivalent SAFE2 EMPTY|co||r|b|b||cc| : WHETHER true.|r|? 0 30661. |pa||j||co|Rule a introduces the |b||ap|SAFE|ap||r|s which are used as * 0 30662. associative memories during the determination of equivalence. * 0 30663. There are two of them, one belonging to each mode. * 0 30664. Rule b draws an immediate conclusion if the |b||ap|MOID|ap||r|s under * 0 30665. consideration are already remembered (see below) in an appropriate * 0 30666. |b||ap|SAFE|ap||r| in the form |b||ap|remember MOID1 MOID2|ap||r|. * 0 30667. If this is not the case, then the two |b||ap|MOID|ap||r|s are first remembered * 0 30668. in a |b||ap|SAFE|ap||r| (the one on the left) and then each |b||ap|MOID|ap||r| * 0 30669. is developed (rule c) and split into its |b||ap|HEAD|ap||r| and its * 0 30670. |b||ap|TAILETY|ap||r|, e.g., |b||ap|reference to real|ap||r| is split * 0 30671. into |b||ap|reference to|ap||r| and |b||ap|real|ap||b|. * 0 30672. |pa|If the |b||ap|HEAD|ap||r|s differ, then the matter is settled (rule b); * 0 30673. otherwise the |b||ap|TAILETY|ap||r|s are analyzed according to their * 0 30674. structure (which must be the same if the |b||ap|HEAD|ap||r|s are * 0 30675. identical). * 0 30676. In each case, except where the |b||ap|HEAD|ap||r|s were |b||ap|union of|ap||r|, * 0 30677. the equivalence is determined by examining the corresponding * 0 30678. components, according to the following scheme: * 0 30679. |p||cheat1||p||n||w10|##rule|pt||b||ap|TAILETY|ap||r||ezz|components? 0 30680. |p||p|##d|pt||b||ap|FIELDS mode|ap||r||ezz||b||ap|FIELDS|ap||r| * 0 30681. |p|##e|pt||b||ap|PARAMETERS yielding MOID|ap||ezz||b||ap|PARAMETERS|ap||r| and |b||ap|MOID|ap||r| * 0 30682. |p|##f|pt||b||ap|FIELDS FIELD|ap||r||ezz||b||ap|FIELDS|ap||r| and |b||ap|FIELD|ap||r| * 0 30683. |p|##f|pt||b||ap|PARAMETERS PARAMETER|ap||r||ezz||b||ap|PARAMETERS|ap||r| and |b||ap|PARAMETER|ap||r| * 0 30684. |p|##i|pt||b||ap|MODE field TAG|ap||r||ezz||b||ap|MODE|ap||r| and |b||ap|TAG|ap||r| * 0 30685. |p|##j|pt||b||ap|MODE parameter|ap||r||ezz||b||ap|MODE|ap||r| * 0 30686. |p||cheat2| * 0 30687. |p||j||p|In the case of unions, the |b||ap|TAILETY|ap||r|s are of the form * 0 30688. |b||ap|MOODS1 mode|ap||r| and |b||ap|MOODS2 mode|ap||r|. * 0 30689. Since |b||ap|MOOD|ap||r|s within equivalent unions may commute, as in * 0 30690. the modes specified by |i|UNION (REAL, INT)|r| and * 0 30691. |i|UNION (INT, REAL)|r|, the equivalence is determined * 0 30692. by checking that |b||ap|MOODS1|ap||r| is a subset of |b||ap|MOODS2|ap||r| and * 0 30693. that |b||ap|MOODS2|ap||r| is a subset of |b||ap|MOODS1|ap||r|, where * 0 30694. the subset test, of course, invokes the equivalence * 0 30695. test recursively (rules k,l,m,n,o,p). * 0 30696. |pa|A |b||ap|MOID|ap||r| is developed (rule c) into the form * 0 30697. |b||ap|HEAD TAILETY|ap||r| by determining that * 0 30698. |pha10|(i)|thb0|it is already of that form: in which case * 0 30699. markers (|b||ap|yin|ap||r| and |b||ap|yang|ap||r|) may be placed in its * 0 30700. |b||ap|SAFE|ap||r| for the later determination of well-formedness (see 7.4); * 0 30701. |pha20|(ii)|thb0|it is some |b||ap|MU definition of MODE|ap||r|: in which case * 0 30702. |b||ap|MU has MODE|ap||r| is stored in its |b||ap|SAFE|ap||r| (provided * 0 30703. that this particular |b||ap|MU|ap||r| is not there already) and * 0 30704. the |b||ap|MODE|ap||r| is developed; * 0 30705. |pha30|(iii)|thb0|it is some |b||ap|MU application|ap||r|: in which case there must * 0 30706. be some |b||ap|MU has MODE|ap||r| in its |b||ap|SAFE|ap||r| already. That |b||ap|MODE|ap||r| is then developed after * 0 30707. a well-formedness check (see 7.4) consisting of the determination * 0 30708. that there is at least one |b||ap|yin|ap||r| and at least one * 0 30709. |b||ap|yang|ap||r| in the |b||ap|SAFE|ap||r| which is more recent than the * 0 30710. |b||ap|MU has MODE|ap||r|.|cc| * 0 30711. |pa||co|Before a pair of |b||ap|TAILETY|ap||r|s is tested for equivalence, * 0 30712. it is remembered in the |b||ap|SAFE|ap||r| that the original * 0 30713. pair of |b||ap|MOID|ap||r|s is being tested. This is used to * 0 30714. force a shortcut to |b||ap|WHETHER true|ap||r| if these * 0 30715. |b||ap|MOID|ap||r|s should ever be tested again for equivalence * 0 30716. lower down the production tree. Since the number of * 0 30717. pairs of component |b||ap|MOID|ap||r|s that can be derived from any two given |b||ap|MOID|ap||r|s * 0 30718. is finite, it follows that the testing process * 0 30719. terminates. * 0 30720. |pg|It remains to be shown that the process is correct. * 0 30721. Consider the unrestricted (possibly infinite) * 0 30722. production tree that would be obtained if * 0 30723. there were no shortcut in the syntax (by * 0 30724. omitting the first alternative together with * 0 30725. the first member of the other alternative of rule b). * 0 30726. If two |b||ap|MOID|ap||r|s are not equivalent, then there exists * 0 30727. in their mode trees a shortest path from the top node * 0 30728. to some node exhibiting a difference. Obviously, * 0 30729. the reflection of this shortest path in the unrestricted production * 0 30730. tree cannot contain a repeated test for the equivalence * 0 30731. of any pair of |b||ap|MOID|ap||r|s, and therefore none of the * 0 30732. shortcuts to |b||ap|WHETHER true|ap||r| in the restricted * 0 30733. production tree can occur on this shortest path. * 0 30734. Consequently, the path to the difference must be * 0 30735. present also in the (restricted) production tree * 0 30736. produced by the syntax. * 0 30737. If the testing process does not exhibit a * 0 30738. difference in the restricted tree, then no difference can be found in any * 0 30739. number of steps; i.e., the |b||ap|MOID|ap||r|s are equivalent.|cc| * 0 30740. * 0 30741. |h|7.4. Well-formedness * 0 30742. * 0 30743. |pa||j||co||r|A mode is well formed if * 0 30744. |pha10|(i)|thb0|the elaboration of an |b|actual-declarer|r| specifying that mode * 0 30745. is a finite action (i.e., any value of that mode can be stored in a finite memory) and * 0 30746. |pha20|(ii)|thb0|it is not strongly coercible from itself * 0 30747. (since this would lead to ambiguities in coercion).|cc| * 0 30748. * 0 30749. |h1|7.4.1. Syntax * 0 30750. * 0 30751. |pb1|a)|ts1||b|WHETHER (NOTION) shields SAFE to SAFE|co||r|73c|b||cc| : * 0 30752. where (NOTION) is (PLAIN)$#or (NOTION) is (FLEXETY ROWS of)$#or * 0 30753. (NOTION) is (union of)$#or * 0 30754. (NOTION) is (void), * 0 30755. WHETHER true.|r|? 0 30756. |p1|b)|ts1||b|WHETHER (PREF) shields SAFE to yin SAFE|co||r|73c|b||cc| : WHETHER true.|r|? 0 30757. |p1|c)|ts1||b|WHETHER (structured with) shields SAFE to yang SAFE|co||r|73c|b||cc| : WHETHER true.|r|? 0 30758. |p1|d)|ts1||b|WHETHER (procedure with) shields SAFE to$#? 0 30759. yin yang SAFE|co||r|73c|b||cc| : WHETHER true.|r| * 0 30760. * 0 30761. |pa||j||co|As a by-product of mode equivalencing, modes are tested for well-formedness (7.3.1.c). * 0 30762. All nonrecursive modes are well formed. * 0 30763. For recursive modes, it is necessary that each cycle in each spelling of that mode * 0 30764. (from |b||ap|MU definition of MODE|ap||r| to |b||ap|MU application|ap||r|) * 0 30765. passes through at least one |b||ap|HEAD|ap||r| which is yin, ensuring condition (i) * 0 30766. and one (possibly the same) |b||ap|HEAD|ap||r| which is yang, ensuring condition (ii).? 0 30767. Yin |b||ap|HEAD|ap||r|s are |b||ap|PREF|ap||r| and |b||ap|procedure with|ap||r|. * 0 30768. Yang |b||ap|HEAD|ap||r|s are |b||ap|structured with|ap||r| and |b||ap|procedure with|ap||r|. * 0 30769. The other |b||ap|HEAD|ap||r|s, including |b||ap|FLEXETY ROWS of|ap||r| and |b||ap|union of|ap||r|, * 0 30770. are neither yin nor yang. * 0 30771. This means that the modes specified by |i|A, B|r| and |i|C|r| in * 0 30772. |n||p||ps||i|MODE A |uqe| STRUCT (INT n, REF A next), * 0 30773. B |uqe| STRUCT (PROC B next), |cx| |uqe| PROC (|cx|) |cx||r| |j||p|are all well formed. * 0 30774. However, |i|MODE D |uqe| |so|1 : 10|sc| D, E |uqe| UNION (INT, E)|r| is not a |b|mode-declaration|r|.|cc|? 0 30775. |w15||pq||co||w|Tao produced the one. * 0 30776. |pp|The one produced the two. * 0 30777. |pp|The two produced the three. * 0 30778. |pp|And the three produced the ten thousand things. * 0 30779. |pp|The ten thousand things carry the yin and embrace the yang, * 0 30780. and through the blending of the material force they achieve harmony. * 0 30781. |ppp|Tao-te Ching, 42, |pr|Lao Tzu.|r||cc||qq|? 0 40000. |np||e||e||c|PART#IV|nc| * 0 40001. |e||e||c|Elaboration-independent constructions|nc| * 0 40002. |e|# * 0 40003. * 0 40004. |h|8. |bs|Denotations|rs| * 0 40005. * 0 40006. |pa||j||co||b|Denotations|r|, e.g., |i|3.14|r| or |i|"abc"|r|, are constructs * 0 40007. whose yields are independent of any action. * 0 40008. In other languages, they are sometimes termed * 0 40009. "literals" or "constants".|cc| * 0 40010. * 0 40011. |h1|8.0.1. Syntax? 0 40012. * 0 40013. |pb1|a)|ts1||b|MOID NEST denoter|co||r|5D,A341i|b||cc| : * 0 40014. |g|#pragment|co||r|92a|b||cc| sequence option, * 0 40015. MOID denotation$|co||r|810a,811a,812a,813a,814a,815a,82a,b,c,83a,|mi||b||cc|.|r|? 0 40016. |j||pa||co|The meaning of a |b|denotation|r| is independent of any nest.|cc|? 0 40017. * 0 40018. |h|8.1. Plain denotations * 0 40019. * 0 40020. |pa||j||co||b|Plain-denotations|r| are those of arithmetic values, truth * 0 40021. values, characters and the void value, e.g., |i|1|r|, |i|3.14|r|, |i|TRUE|r|, * 0 40022. |i|"a"|r| and |i|EMPTY|r|.|cc| * 0 40023. * 0 40024. |h1|8.1.0.1. Syntax? 0 40025. * 0 40026. |pb1|A)|ts1||b|SIZE :: long ; short.|r|? 0 40027. |p1|B)|ts1||star||b|NUMERAL :: fixed point numeral ;? 0 40028. variable point numeral ; floating point numeral.|r|? 0 40029. |pb1|a)|ts1||b|SIZE INTREAL denotation|co||r|a,80a|b||cc| :? 0 40030. |e|SIZE symbol|co||r|94d|b||cc|, INTREAL denotation|co||r|a,811a,812a|b||cc|.|r|? 0 40031. |pb1|b)|ts1||star||b|plain denotation : * 0 40032. PLAIN denotation|co||r|a,811a,812a,813a,814a|b||cc| ; void denotation|co||r|815a|b||cc|.|r| * 0 40033. |w5||exx||co|Example: * 0 40034. |ex|a) |i|LONG 0|r| |cc|? 0 40035. * 0 40036. |h|8.1.0.2. Semantics * 0 40037. * 0 40038. |pa||j|The yield |w|W|r| of an |b|INTREAL-denotation|r| is the * 0 40039. "intrinsic value" |co|8.1.1.2, 8.1.2.2.a,b|cc| of its constituent |b|NUMERAL|r|; * 0 40040. |et|it is required that |w|W|r| be not greater than the largest value * 0 40041. of mode |b||ap|INTREAL|ap||r| that can be distinguished |co|2.1.3.1.d|cc|. * 0 40042. |pg||co|An |b|INTREAL-denotation|r| yields an arithmetic value |co|2.1.3.1.a|cc|, * 0 40043. but arithmetic values yielded by different |b|INTREAL-denotations|r| are not * 0 40044. necessarily different (e.g., |i|123.4|r| and |i|1.234|ttp|+2|r|). |cc| * 0 40045. * 0 40046. |h|8.1.1. Integral denotations * 0 40047. * 0 40048. |h1|8.1.1.1. Syntax * 0 40049. * 0 40050. |pb1|a)|ts1||b|integral denotation|co||r|80a,810a|b||cc| : * 0 40051. fixed point numeral|co||r|b|b||cc|.|r| * 0 40052. |p1|b)|ts1||b|fixed point numeral|co||r|a,812c,d,f,i,A341h|b||cc| : * 0 40053. digit cypher|co||r|c|b||cc| sequence.|r| * 0 40054. |p1|c)|ts1||b|digit cypher|co||r|b|b||cc| : DIGIT symbol|co||r|94b|b||cc|.|r|? 0 40055. |w5||exx||co|Examples: * 0 40056. |ex|a) |i|4096|r|? 0 40057. |ez|b) |i|4096|r|? 0 40058. |ey|c) |i|4 |r||cc|? 0 40059. * 0 40060. |h|8.1.1.2. Semantics * 0 40061. * 0 40062. |pa||j|The intrinsic value of a |b|fixed-point-numeral|r| |w|N|r| is the integer * 0 40063. of which the reference-language form of |w|N|r| |co|9.3.b|cc| is a decimal representation. * 0 40064. * 0 40065. |h|8.1.2. Real denotations * 0 40066. * 0 40067. |h1|8.1.2.1. Syntax * 0 40068. * 0 40069. |pb1|a)|ts1||b|real denotation|co||r|80a,810a|b||cc| : * 0 40070. |e|variable point numeral|co||r|b|b||cc| ; * 0 40071. floating point numeral|co||r|e|b||cc|.|r| * 0 40072. |p1|b)|ts1||b|variable point numeral|co||r|a,f|b||cc| : * 0 40073. |e|integral part|co||r|c|b||cc| option, fractional part|co||r|d|b||cc|.|r| * 0 40074. |p1|c)|ts1||b|integral part|co||r|b|b||cc| : fixed point numeral|co||r|811b|b||cc|.|r| * 0 40075. |p1|d)|ts1||b|fractional part|co||r|b|b||cc| : * 0 40076. point symbol|co||r|94b|b||cc|, fixed point numeral|co||r|811b|b||cc|.|r| * 0 40077. |p1|e)|ts1||b|floating point numeral|co||r|a|b||cc| : * 0 40078. stagnant part|co||r|f|b||cc|, exponent part|co||r|g|b||cc|.|r| * 0 40079. |p1|f)|ts1||b|stagnant part|co||r|e|b||cc| : * 0 40080. |e|fixed point numeral|co||r|811b|b||cc| ; variable point numeral|co||r|b|b||cc|.|r| * 0 40081. |p1|g)|ts1||b|exponent part|co||r|e|b||cc| : * 0 40082. times ten to the power choice|co||r|h|b||cc|, * 0 40083. power of ten|co||r|i|b||cc|.|r|? 0 40084. |p1|h)|ts1||b|times ten to the power choice|co||r|g|b||cc| : * 0 40085. times ten to the power symbol|co||r|94b|b||cc| ; letter e symbol|co||r|94a|b||cc|.|r| * 0 40086. |p1|i)|ts1||b|power of ten|co||r|g|b||cc| : * 0 40087. plusminus|co||r|j|b||cc| option, fixed point numeral|co||r|811b|b||cc|.|r| * 0 40088. |p1|j)|ts1||b|plusminus|co||r|i|b||cc| : * 0 40089. plus symbol|co||r|94c|b||cc| ; minus symbol|co||r|94c|b||cc|.|r| * 0 40090. |w5||exx||co|Examples: * 0 40091. |ex|a) |i|0.00123|q|1.23e|mi|3|r|? 0 40092. |ez|b) |i|0.00123|r|? 0 40093. |ey|c) |i|0|r|? 0 40094. |ez|d) |i|.00123|r|? 0 40095. |ey|e) |i|1.23e|mi|3|r|? 0 40096. |ez|f) |i|123|q|1.23|r|? 0 40097. |ey|g) |i|e|mi|3|r|? 0 40098. |ez|h) |i||ttp||q|e|r|? 0 40099. |ey|i) |i||mi|3|r|? 0 40100. |ez|j) |i|+|q||mi||r|#|cc|? 0 40101. * 0 40102. |h|8.1.2.2. Semantics * 0 40103. * 0 40104. |pb1||j|a)|tp1|The intrinsic value |w|V|r| of a |b|variable-point-numeral|r| * 0 40105. |w|N|r| is determined as follows: * 0 40106. |et|let |w|I|r| be the intrinsic value of the |b|fixed-point-numeral|r| * 0 40107. of its constituent |b|integral-part|r|, if any, and be |w|0|r| otherwise; * 0 40108. |et|let |w|F|r| be the intrinsic value of the |b|fixed-point-numeral|r| * 0 40109. of its |b|fractional-part|r| |w|P|r| divided by |w|10|r| as many * 0 40110. times as there are |b|digit-cyphers|r| contained in |w|P|r|; * 0 40111. |et||w|V|r| is the sum in the sense of numerical analysis of * 0 40112. |w|I|r| and |w|F|r|. * 0 40113. |pb1|b)|tp1|The intrinsic value |w|V|r| of a |b|floating-point-numeral|r| * 0 40114. |w|N|r| is determined as follows: * 0 40115. |et|let |w|S|r| be the intrinsic value of the |b|NUMERAL|r| of its * 0 40116. |b|stagnant-part|r|; * 0 40117. |et|let |w|E|r| be the intrinsic value of the constituent * 0 40118. |b|fixed-point-numeral|r| of its |b|exponent-part|r|; * 0 40119. |pi|Case#A: The constituent |b|plusminus-option|r| of |w|N|r| * 0 40120. contains a |b|minus-symbol|r|: * 0 40121. |et||w|V|r| is the product in the sense of numerical analysis of |w|S|r| * 0 40122. and |w|1/10|r| raised to the power |w|E|r|; * 0 40123. |pi|Case#B: The direct descendent of that |b|plusminus-option|r| * 0 40124. contains a |b|plus-symbol|r| or is empty: * 0 40125. |et||w|V|r| is the product in the sense of numerical analysis of |w|S|r| * 0 40126. and |w|10|r| raised to the power |w|E|r|. * 0 40127. * 0 40128. |h|8.1.3. Boolean denotations * 0 40129. * 0 40130. |h1|8.1.3.1. Syntax * 0 40131. * 0 40132. |pb1|a)|ts1||b|boolean denotation|co||r|80a|b||cc| : * 0 40133. true|co||r|94b|b||cc| symbol ; false|co||r|94b|b||cc| symbol.|r| * 0 40134. |w5||exx||co|Examples: * 0 40135. |ex|a) |i|TRUE|q|FALSE|r| |cc|? 0 40136. * 0 40137. |h|8.1.3.2. Semantics * 0 40138. * 0 40139. |pa||j|The yield of a |b|boolean-denotation|r| is |w|true|r| (|w|false|r|) * 0 40140. if its direct descendent is a |b|true-symbol|r| (|b|false-symbol|r|). * 0 40141. * 0 40142. |h|8.1.4. Character denotations * 0 40143. * 0 40144. |pa||j||co||b|Character-denotations|r| consist of a |b|string-item|r| between * 0 40145. two |b|quote-symbols|r|, e.g., |i|"a"|r|. To indicate a quote, a * 0 40146. |b|quote-image-symbol|r| (represented by |i|""|r|) is used, e.g., |i|""""|r|. Since * 0 40147. the syntax nowhere allows |b|character-|r| or |b|string-denotations|r| * 0 40148. to follow one another, this causes no ambiguity.|cc| * 0 40149. * 0 40150. |h1|8.1.4.1. Syntax * 0 40151. * 0 40152. |pb1|a)|ts1||b|character denotation|co||r|80a|b||cc| : * 0 40153. |e|quote|co||r|94b|b||cc| symbol, string item|co||r|b|b||cc|, quote symbol|co||r|94b|b||cc|.|r| * 0 40154. |p1|b)|ts1||b|string item|co||r|a,83b|b||cc| : character glyph|co||r|c|b||cc| ; * 0 40155. quote image symbol|co||r|94b|b||cc| ; other string item|co||r|d|b||cc|.|r| * 0 40156. |p1|c)|ts1||b|character glyph|co||r|b,92c|b||cc| : * 0 40157. LETTER symbol|co||r|94a|b||cc| ; DIGIT symbol|co||r|94b|b||cc| ; * 0 40158. point symbol|co||r|94b|b||cc| ; * 0 40159. open symbol|co||r|94f|b||cc| ; close symbol|co||r|94f|b||cc| ; comma symbol|co||r|94b|b||cc| ; * 0 40160. space symbol|co||r|94b|b||cc| ; plus symbol|co||r|94c|b||cc| ; minus symbol|co||r|94c|b||cc|.|r| * 0 40161. |p1|d)|ts1||j| A production rule may be added for the * 0 40162. notion |b||ap|other string item|ap||r| |co|b, for which no hyper-rule is given in this * 0 40163. Report|cc| each of whose alternatives is a symbol |co|1.1.3.1.f|cc| which is * 0 40164. different from any terminal production of |b||ap|character glyph|ap||r| |co|c|cc| and which is * 0 40165. not |b||ap|quote symbol|ap||r|.|n|? 0 40166. |w5||exx||co|Examples: * 0 40167. |ex|a) |i|"a"|r|? 0 40168. |ez|b) |i|a|q|""|q||qe||r| * 0 40169. |ey|c) |i|a|qs|1|qs|.|qs||ro||qs||rc||qs|,|qs||vs||qs|? 0 40170. +|qs||mi||r|#|cc| * 0 40171. * 0 40172. |h|8.1.4.2. Semantics * 0 40173. * 0 40174. |pb1||j|a)|tp1|The yield of a |b|character-denotation|r| * 0 40175. is the intrinsic value of the |b|symbol|r| descended from its |b|string-item|r|. * 0 40176. |pb1|b)|tp1|The intrinsic value of each distinct |b|symbol|r| descended from a |b|string-item|r| is * 0 40177. a unique character. |co|Characters have no inherent meaning, except insofar as * 0 40178. some of them are interpreted in particular ways by the transput * 0 40179. declarations (10.3). The |b|character-glyphs|r|, which include * 0 40180. all the characters needed for transput, form a minimum set * 0 40181. which all implementations (2.2.2.c) are expected to provide.|cc| * 0 40182. * 0 40183. |h1|8.1.5. Void denotation? 0 40184. * 0 40185. |pa||j||co|A |b|void-denotation|r| may be used to assign a void value to a |b|UNITED-variable|r|, * 0 40186. e.g., |i|UNION (|so||thin||sc|REAL, VOID) u |bec| EMPTY|r|.|cc|? 0 40187. * 0 40188. |h1|8.1.5.1. Syntax * 0 40189. * 0 40190. |pb1|a)|ts1||b|void denotation|co||r|80a|b||cc| : empty|co||r|94b|b||cc| symbol.|r|? 0 40191. |pa||co|Example: * 0 40192. |ex|a) |i|EMPTY |r||cc|? 0 40193. * 0 40194. |h|8.1.5.2. Semantics * 0 40195. * 0 40196. |pa||j|The yield of a |b|void-denotation|r| is * 0 40197. |w|empty|r|. * 0 40198. * 0 40199. |h|8.2. Bits denotations * 0 40200. * 0 40201. |h1|8.2.1. Syntax * 0 40202. * 0 40203. |pb1|A)|ts1||b|RADIX :: radix two ; radix four ; radix eight ; radix sixteen.|r| * 0 40204. |pb1|a)|ts1||b|structured with$#row of boolean field$#LENGTH LENGTHETY letter aleph * 0 40205. mode denotation|co||r|a,80a|b||cc| : long|co||r|94d|b||cc| symbol, * 0 40206. structured with row of boolean field$#LENGTHETY letter aleph mode denotation |co||r|a,c|b||cc|.|r| * 0 40207. |p1|b)|ts1||b|structured with? 0 40208. $#row of boolean field$#SHORTH SHORTHETY letter aleph$#mode denotation|co||r|b,80a|b||cc| : * 0 40209. |e|short|co||r|94d|b||cc| symbol, structured with$#? 0 40210. row of boolean field$#SHORTHETY letter aleph#mode$#denotation|co||r|b,c|b||cc|.|r|? 0 40211. |p1|c)|ts1||b|structured with$#row of boolean field$#? 0 40212. letter aleph mode denotation|co||r|a,b,80a|b||cc| : * 0 40213. |e|RADIX|co||r|d,e,f,g|b||cc|, * 0 40214. letter r symbol|co||r|94a|b||cc|, RADIX digit|co||r|h,i,j,k|b||cc| sequence.|r| * 0 40215. |p1|d)|ts1||b|radix two|co||r|c,A347b|b||cc| : digit two|co||r|94b|b||cc| symbol.|r| * 0 40216. |p1|e)|ts1||b|radix four|co||r|c,A347b|b||cc| : digit four|co||r|94b|b||cc| symbol.|r| * 0 40217. |p1|f)|ts1||b|radix eight|co||r|c,A347b|b||cc| : digit eight|co||r|94b|b||cc| symbol.|r| * 0 40218. |p1|g)|ts1||b|radix sixteen|co||r|c,A347b|b||cc| : * 0 40219. digit one symbol|co||r|94b|b||cc|, digit six symbol|co||r|94b|b||cc|.|r| * 0 40220. |p1|h)|ts1||b|radix two digit|co||r|c,i|b||cc| : * 0 40221. digit zero symbol|co||r|94b|b||cc| ; digit one symbol|co||r|94b|b||cc|.|r| * 0 40222. |p1|i)|ts1||b|radix four digit|co||r|c,j|b||cc| : * 0 40223. radix two digit|co||r|h|b||cc| ; digit two symbol|co||r|94b|b||cc| ; * 0 40224. digit three symbol|co||r|94b|b||cc|.|r| * 0 40225. |p1|j)|ts1||b|radix eight digit|co||r|c,k|b||cc| : * 0 40226. radix four digit|co||r|i|b||cc| ; digit four symbol|co||r|94b|b||cc| ; * 0 40227. digit five symbol|co||r|94b|b||cc| ; * 0 40228. digit six symbol|co||r|94b|b||cc| ; digit seven symbol|co||r|94b|b||cc|.|r| * 0 40229. |p1|k)|ts1||b|radix sixteen digit|co||r|c|b||cc| : * 0 40230. radix eight digit|co||r|j|b||cc| ; digit eight symbol|co||r|94b|b||cc| ; * 0 40231. digit nine symbol|co||r|94b|b||cc| ; letter a symbol|co||r|94a|b||cc| ; * 0 40232. letter b symbol|co||r|94a|b||cc| ; letter c symbol|co||r|94a|b||cc| ; * 0 40233. letter d symbol|co||r|94a|b||cc| ; * 0 40234. letter e symbol|co||r|94a|b||cc| ; letter f symbol|co||r|94a|b||cc|.|r| * 0 40235. |pb1|l)|ts1||star||b|bits denotation : BITS denotation|co||r|a,b,c|b||cc|.|r| * 0 40236. |p||ps||co||b|BITS :: structured with$#row of boolean field SITHETY letter aleph mode.|r||cc| * 0 40237. |p1| m)|ts1||star||b|radix digit : RADIX digit|co||r|h,i,j,k|b||cc|.|r| * 0 40238. |w5||exx||co|Examples: * 0 40239. |ex|a) |i|LONG 2r101|r|? 0 40240. |ez|b) |i|SHORT 16rffff|r|? 0 40241. |ey|c) |i|8r231|r|#|cc|? 0 40242. * 0 40243. |h|8.2.2. Semantics * 0 40244. * 0 40245. |pb1||j|a)|tp1|The yield |w|V|r| of a |b|bits-denotation|r| |w|D|r| is * 0 40246. determined as follows: * 0 40247. |et|let |w|W|r| be the intrinsic boolean value |co|b|cc| of its constituent * 0 40248. |b|RADIX-digit-sequence|r|; * 0 40249. |et|let |w|m|r| be the length of |w|W|r|; * 0 40250. |et|let |w|n|r| be the value of |u|l#|i|bits width|r| |co|10.2.1.j|cc|, where * 0 40251. |u|l|r| stands for as many times |i|long|r| (|i|short|r|) as there * 0 40252. are |b|long-symbols|r| (|b|short-symbols|r|) contained in |w|D|r|; * 0 40253. |et|it is required that |w|m|r| be not greater than |w|n|r|; * 0 40254. |et||w|V|r| is a structured value |co|whose mode is * 0 40255. some |b||ap|BITS|ap||r||cc| whose only field is a multiple value having * 0 40256. |pha10|(i)|thb0|a descriptor |w|((1,#n))|r| and * 0 40257. |pha20|(ii)|thb0||w|n|r| elements, that selected by * 0 40258. |w|(i)|r| being |w|false|r| if |w|1#|le|#i#|le|#n#|mi|#m|r|, and being the |w|(i#+#m#|mi|#n)|r||hy|th * 0 40259. truth value of |co|the sequence|cc| |w|W|r| otherwise. * 0 40260. |pb1|b)|tp1|The intrinsic boolean value of a |b|RADIX-digit-sequence |w|S|r| * 0 40261. is the shortest sequence of truth values which, regarded as * 0 40262. a binary number (|w|true|r| corresponding to |w|1|r| * 0 40263. and |w|false|r| to |w|0|r|), is the same as the intrinsic integral value |co|c|cc| of |w|S|r|. * 0 40264. |pb1|c)|tp1|The intrinsic integral value of a |b|radix|hy|two|hy||r| * 0 40265. (|b|radix|hy|four|hy||r|, |b|radix|hy|eight|hy||r|, |b|radix|hy|sixteen|hy||r|) * 0 40266. |b||hy|digit-sequence|r| |w|S|r| is the integer of which the reference-language form of * 0 40267. |w|S|r| |co|9.3.b|cc| is a binary, (quaternary, octal, hexadecimal) representation, * 0 40268. where the representations |i|a|r|, |i|b|r|, |i|c|r|, |i|d|r|, |i|e|r| * 0 40269. and |i|f|r|, considered as digits, have values |w|10|r|, |w|11|r|, |w|12|r|, * 0 40270. |w|13|r|, |w|14|r| and |w|15|r| respectively. * 0 40271. * 0 40272. |h|8.3. String denotations * 0 40273. * 0 40274. |pa||j||co||b|String-denotations|r| are a convenient way of specifying * 0 40275. "strings", i.e., multiple values of mode |b||ap|row of character|ap||r|. * 0 40276. |exx|Example: * 0 40277. |p||ps||i|STRING message |bec| "all|ivs|is|ivs|well"|r|##|cc| * 0 40278. |h1| 8.3.1. Syntax * 0 40279. * 0 40280. |pb1|a)|ts1||b|row of character denotation|co||r|80a|b||cc| : * 0 40281. |e|quote|co||r|94b|b||cc| symbol, * 0 40282. string|co||r|b|b||cc| option, quote symbol|co||r|94b|b||cc|.|r| * 0 40283. |p1|b)|ts1||b|string|co||r|a|b||cc| : * 0 40284. string item|co||r|814b|b||cc|, * 0 40285. string item|co||r|814b|b||cc| sequence.|r| * 0 40286. |pb1|c)|ts1||star||b|string denotation : row of character denotation|co||r|a|b||cc|.|r| * 0 40287. |w5||exx||co|Examples: * 0 40288. |ex|a) |i|"abc"|r| * 0 40289. |ez|b) |i|abc|r|#|cc| * 0 40290. * 0 40291. |h|8.3.2. Semantics? 0 40292. * 0 40293. |pa||j|The yield of a |b|string-denotation|r| |w|D|r| is? 0 40294. a multiple value |w|V|r| determined as follows:? 0 40295. |et|let |w|n|r| be the number of |b|string-items|r| contained in |w|D|r|; * 0 40296. |et|the descriptor of |w|V|r| is |w|((1,#n))|r|;? 0 40297. |et|for |w|i |uqe| 1, ... , n|r|, the element of |w|V|r| with index |w|(i)|r| is * 0 40298. the intrinsic value |co|8.1.4.2.b|cc| of the |w|i|r||hy|th constituent * 0 40299. |b|symbol|r| of the |b|string|r| of |w|D|r|.? 0 40300. |pa||co||i|"a"|r| is a |b|character-denotation|r|, not a * 0 40301. |b|string-denotation|r|. However, in all strong positions, e.g., * 0 40302. |i|STRING s |bec| "a"|r|, it can be rowed to a multiple value (6.6). * 0 40303. Elsewhere, where a multiple value is required, a |b|cast|r| (5.5.1.1.a) * 0 40304. may be used, e.g., |i|UNION (CHAR, STRING) cs |bec| STRING ("a")|r|.|cc| * 0 40305. * 0 40306. |h|9. |bs|Tokens and symbols|rs| * 0 40307. * 0 40308. |h|9.1. Tokens * 0 40309. * 0 40310. |pa||j||co||b|Tokens|r| (9.1.1.f) are |b|symbols|r| (9.1.1.h) possibly preceded by |b|pragments|r| (9.2.1.a). * 0 40311. Therefore, |b|pragments|r| may appear between |b|symbols|r| * 0 40312. wherever the syntax produces a succession of |b|tokens|r|. * 0 40313. However, in a few places, the syntax specifically produces |b|symbols|r| rather than * 0 40314. |b|tokens|r|, notably within |b|denotations|r| (8), |b|format-texts|r| (10.3.4.1.1.a) * 0 40315. and, of course, within |b|pragments|r|. * 0 40316. Therefore, |b|pragments|r| may not occur in these places.|cc| * 0 40317. * 0 40318. |h1|9.1.1. Syntax? 0 40319. * 0 40320. |pb1|a)|ts1||b|CHOICE STYLE start|co||r|34a|b||cc| : * 0 40321. |e|where (CHOICE) is (choice using boolean), * 0 40322. |e|STYLE if|co||r|94f,|mi||b||cc| token ; * 0 40323. |e|where (CHOICE) is (CASE), STYLE case|co||r|94f,|mi||b||cc| token.|r| * 0 40324. |p1|b)|ts1||b|CHOICE STYLE in|co||r|34e|b||cc| : * 0 40325. |e|where (CHOICE) is (choice using boolean), * 0 40326. |e|STYLE then|co||r|94f,|mi||b||cc| token ; * 0 40327. |e|where (CHOICE) is (CASE), STYLE in|co||r|94f,|mi||b||cc| token.|r| * 0 40328. |p1|c)|ts1||b|CHOICE STYLE again|co||r|34l|b||cc| : * 0 40329. |e|where (CHOICE) is (choice using boolean), * 0 40330. |e|STYLE else if|co||r|94f,|mi||b||cc| token ; * 0 40331. |e|where (CHOICE) is (CASE), STYLE ouse|co||r|94f,|mi||b||cc| token.|r| * 0 40332. |p1|d)|ts1||b|CHOICE STYLE out|co||r|34l|b||cc| : * 0 40333. |e|where (CHOICE) is (choice using boolean), * 0 40334. |e|STYLE else|co||r|94f,|mi||b||cc| token ; * 0 40335. |e|where (CHOICE) is (CASE), STYLE out|co||r|94f,|mi||b||cc| token.|r| * 0 40336. |p1|e)|ts1||b|CHOICE STYLE finish|co||r|34a|b||cc| : * 0 40337. |e|where (CHOICE) is (choice using boolean), * 0 40338. |e|STYLE fi|co||r|94f,|mi||b||cc| token ; * 0 40339. |e|where (CHOICE) is (CASE), STYLE esac|co||r|94f,|mi||b||cc| token.|r| * 0 40340. |p1|f)|ts1||b|NOTION token : pragment|co||r|92a|b||cc| sequence option, * 0 40341. NOTION symbol|co||r|94a,b,c,d,e,f,g,h|b||cc|.|r| * 0 40342. |pb1|g)|ts1||star||b|token : NOTION token|co||r|f|b||cc|.|r| * 0 40343. |p1|h)|ts1||star||b|symbol : NOTION symbol|co||r|94a,b,c,d,e,f,g,h|b||cc|.|r| * 0 40344. * 0 40345. |h|9.2. Comments and pragmats * 0 40346. * 0 40347. |pq||j||co||w|A source of innocent merriment. * 0 40348. |ppp|Mikado, |pr|W.S.Gilbert.|r||cc||qq|? 0 40349. |pa||co|A |b|pragment|r| is a |b|comment|r| or a |b|pragmat|r|. * 0 40350. No semantics of |b|pragments|r| is given and therefore * 0 40351. the meaning (2.1.4.1.a) of any |b|program|r| is quite unaffected * 0 40352. by their presence. It is indeed the intention that |b|comments|r| * 0 40353. should be entirely ignored by the implementation, their sole purpose * 0 40354. being the enlightenment of the human interpreter of the |b|program|r|. * 0 40355. |pa||b|Pragmats|r| may, on the other hand, convey to the implementation * 0 40356. some piece of information affecting some aspect of the meaning of the * 0 40357. |b|program|r| which is not defined by this Report, for example: * 0 40358. |xh||bt|the action to be taken upon overflow (2.1.4.3.h) or if the * 0 40359. scope rule is violated (as in 5.2.1.2.b), e.g., |i|PR#overflow check on#PR|r|, * 0 40360. |i|PR#overflow check off#PR|r|, |i|PR#scope check on#PR|r| or * 0 40361. |i|PR#scope check off#PR|r|; * 0 40362. |xh||bt|the action to be taken upon completion of the compilation process, e.g., * 0 40363. |i|PR#compile only#PR|r|, |i|PR#dump#PR|r| or |i|PR#run#PR|r|; * 0 40364. |xh||bt|that the language to be implemented is some sublanguage or * 0 40365. superlanguage of ALGOL 68, e.g., |i|PR#nonrec#PR|r| (for a * 0 40366. |b|routine-text|r| which may be presumed to be non-recursive); * 0 40367. |xh||bt|that the compilation may check for the truth, or attempt to prove * 0 40368. the correctness, of some assertion, e.g.: * 0 40369. |n||xh||i|INT a, b; read((a, b)) PR ASSERT a |sge| 0 |and| b |sgt| 0 PR; * 0 40370. |e|INT q |bec| 0, r |bec| a; * 0 40371. |e|WHILE r |sge| b |g|PR ASSERT |g|a |uqe| b |sx| q + r |and| 0 |le| r PR |g| * 0 40372. |e|DO (q +|bec| 1, r |mi||bec| b) OD |g|? 0 40373. |e|PR ASSERT |g|a |uqe| b |sx| q + r |and| 0 |le| r |and| r |lt| b PR|r|#. * 0 40374. |pb||j|They may also be used to convey to the implementation that the * 0 40375. source text is to be augmented with some other text, or edited in * 0 40376. some way, for example: * 0 40377. |xh||bt|some previously compiled portion of the |b|particular-program|r| is to * 0 40378. be invoked, e.g., |i|PR#WITH segment FROM album#PR|r|; * 0 40379. |xh||bt|the source text is continued on some other document, e.g., * 0 40380. |i|PR#READ FROM another file#PR|r|; * 0 40381. |xh||bt|the end of the source text has been reached, e.g., * 0 40382. |i|PR#FINISH#PR|r|. * 0 40383. |pb|The interpretation of |b|pragmats|r| is not defined in this * 0 40384. Report, but is left to the discretion of the implementer, who ought, at least, to * 0 40385. provide some means whereby all further |b|pragmats|r| * 0 40386. may be ignored, for example: * 0 40387. |n||p||pv||i|PR#pragmats off#PR|r|.|cc| * 0 40388. |w10| * 0 40389. |pq||co||i|PR algol 68 PR * 0 40390. |pp|BEGIN * 0 40391. |pp|##PROC PR nonrec PR pr |uqe| VOID: pr; * 0 40392. |pp|##pr * 0 40393. |pp|END * 0 40394. |pp|PR run PR PR |qe| PR * 0 40395. |ppp||n||w|Revised Report on the Algorithmic * 0 40396. |p||pr|Language ALGOL 68.|r||cc||qq| * 0 40397. * 0 40398. |h1|9.2.1. Syntax * 0 40399. * 0 40400. |pb1|A)|ts1||b|PRAGMENT :: pragmat ; comment.|r|? 0 40401. |pb1|a)|ts1||b|pragment|co||r|80a,91f,A341b,h,A348a,b,c,A349a,A34Ab|b||cc| : PRAGMENT|co||r|b|b||cc|.|r|? 0 40402. |p1|b)|ts1||b|PRAGMENT|co||r|a|b||cc| : * 0 40403. STYLE PRAGMENT symbol|co||r|94h,|mi||b||cc|, STYLE PRAGMENT item|co||r|c|b||cc| sequence option,#$? 0 40404. STYLE PRAGMENT symbol|co||r|94h,|mi||b||cc|.|r| * 0 40405. |p||ps||co||b|STYLE :: brief ; bold ; style TALLY.|cc||r|? 0 40406. |p1|c)|ts1||b|STYLE PRAGMENT item|co||r|b|b||cc| : * 0 40407. character glyph|co||r|814c|b||cc| ; STYLE other PRAGMENT item|co||r|d|b||cc|.|r| * 0 40408. |j||pb1|d)|ts1|A production rule may be added for each notion designated by * 0 40409. |b||ap|STYLE other PRAGMENT item|ap||r| |co|c, for which no hyper-rule is * 0 40410. given in this Report|cc| each of whose alternatives is a symbol * 0 40411. |co|1.1.3.1.f|cc| different from any terminal production of * 0 40412. |b||ap|character glyph|ap||r| |co|8.1.4.1.c|cc|, and such that no terminal * 0 40413. production of any |b||ap|STYLE other PRAGMENT item|ap||r| is the corresponding * 0 40414. |b||ap|STYLE PRAGMENT symbol|ap||r|. |co|Thus |i|COMMENT |ct| COMMENT|r| might be a * 0 40415. |b|comment|r|, but |i| |ct| |ct| |ct| |r| could not.|cc| * 0 40416. |w5||exx||co|Examples: * 0 40417. |ex|a) |i|PR list PR|q|? 0 40418. ~J source program to be listed ~J|r|? 0 40419. |ey|c) |i|l|qs||qe||r|#|cc|? 0 40420. * 0 40421. |h|9.3. Representations? 0 40422. * 0 40423. |pb1||j|a)|tp1|A construct in the strict language must be represented in * 0 40424. some "representation language" such as * 0 40425. the "reference language", which is used in this Report. * 0 40426. Other representation languages specially * 0 40427. suited to the supposed preference of some human or * 0 40428. mechanical interpreter of the language may be termed * 0 40429. "publication" or "hardware" languages. * 0 40430. |co|The reference language is intended to be used for the * 0 40431. representation of |b|particular-programs|r| and of their descendents. * 0 40432. It is, however, also used in Chapter 10 for the definition of the * 0 40433. standard environment.|cc| * 0 40434. |pb1|b)|tp1|A "construct in a representation language" is obtained from * 0 40435. the terminal production |w|T|r| |co|1.1.3.2.f|cc| of the corresponding construct * 0 40436. in the strict language |co|1.1.3.2.e|cc| by replacing the * 0 40437. |b|symbols|r| in |w|T|r| by their representations, as * 0 40438. specified in 9.4 below in the case of the reference language. * 0 40439. |pg||co|Thus, the strict-language |b|particular-program|r| whose * 0 40440. terminal production is * 0 40441. |p||ps||b||ap|bold begin symbol|ap| |ap|skip symbol|ap| |ap|bold end symbol|ap||r| * 0 40442. |p|gives rise to the reference-language |b|particular-program|r|? 0 40443. |p||ps||i|BEGIN SKIP END|r|#.|cc| * 0 40444. |pb1|c)|tp1|An implementation |co|2.2.2.c|cc| of ALGOL 68 which uses representations * 0 40445. which are sufficiently close to those of the reference language * 0 40446. to be recognized without further elucidation, and which does not * 0 40447. augment or restrict the available representations other than as * 0 40448. provided for below |co|9.4.a,b,c|cc|, is an "implementation of the reference language". * 0 40449. |pg||co|E.g., |i|BEGIN|r|, |i||ulo|begin|ulf||r|, |u|begin|r|, * 0 40450. |i||ap|begin|r| and |i||ap|begin|ap||r| could all be representations of * 0 40451. the |b|bold-begin-symbol|r| in an implementation of the reference * 0 40452. language; some combination of holes in a punched card might be a * 0 40453. representation of it in some hardware language.|cc| * 0 40454. * 0 40455. |h|9.4. The reference language? 0 40456. * 0 40457. |pb1||j|a)|tp1|The reference language provides representations for * 0 40458. various |b|symbols|r|, including an arbitrarily large number of * 0 40459. |b|TAX-symbols|r| |co|where |b|TAX#:: TAG#; TAB#; TAD#; TAM.|r||cc|. * 0 40460. The representations of some of them are specified below |co|9.4.1|cc|, * 0 40461. and to these may be added suitable representations for * 0 40462. |b|style-TALLY-letter-ABC-symbols|r| and |b|style-TALLY-monad-? 0 40463. symbols|r| and any terminal productions * 0 40464. of |b||ap|STYLE other PRAGMENT item|ap||r| |co|9.2.1.d|cc| and of * 0 40465. |b||ap|other string item|ap||r| |co|8.1.4.1.d|cc|. * 0 40466. Representations are not provided for any of these |co|but they enable * 0 40467. individual implementations to make available their full character * 0 40468. sets for use as characters, to provide additional or extended * 0 40469. alphabets for the construction of |b|TAG-|r| and |b|TAB-symbols|r|, * 0 40470. and to provide additional |b|symbols|r| for use as |b|operators|r||cc|. * 0 40471. There is not, however, |co|and there must not be,|cc| * 0 40472. except in representations of the |b|standard-|r|, and other, * 0 40473. |b|preludes|r| |co|10.1.3.Step#6|cc|, any representation of the * 0 40474. |b|letter-aleph-symbol|r| or the |b|primal-symbol|r|. * 0 40475. |co|For the remaining |b|TAX-symbols|r|, * 0 40476. see 9.4.2. There are, however, some |b|symbols|r| produced by the syntax, * 0 40477. e.g., the |b|brief-pragmat-symbol|r|, for which no representation * 0 40478. is provided at all. This does not preclude the representation of * 0 40479. such |b|symbols|r| in other representation languages.|cc| * 0 40480. |pb1|b)|tp1|Where more than one representation of a |b|symbol|r| is given, any * 0 40481. of them may be chosen. Moreover, it is sufficient for an implementation * 0 40482. of the reference language to provide only one. Also, it is not * 0 40483. necessary to provide a representation of any particular |b|MONAD-symbol|r| * 0 40484. or |b|NOMAD-symbol|r| so long as those that are provided * 0 40485. are sufficient to represent at least one version |co|10.1.3.Step#3|cc| * 0 40486. of each |b|operator|r| declared in the |b|standard-prelude|r|. * 0 40487. |pa||co|For certain different |b|symbols|r|, one same or nearly the same * 0 40488. representation is given; e.g., the representation "|i|:|r|" is? 0 40489. given for the |b|routine-symbol|r|, the |b|colon-symbol|r| * 0 40490. and the |b|up-to-symbol|r| and "|i||lbl||r|" for the |b|label-symbol|r|.? 0 40491. It follows uniquely from the syntax * 0 40492. which of these four |b|symbols|r| is represented by an occurrence, * 0 40493. outside |b|comments|r|, |b|pragmats|r| and |b|string-denotations|r|, * 0 40494. of any mark similar to either of those representations. * 0 40495. It is also the case that "|i|..|r|" could be used, without ambiguity, for any of them,? 0 40496. and such might indeed be necessary in implementations with limited character sets. * 0 40497. It may be noted that, for such implementations, * 0 40498. no ambiguity would be introduced were "|i||ro|/|r|" and? 0 40499. "|i|/|rc||r|" to be used as representations of the |b|style-ii-sub-symbol|r| and the? 0 40500. |b|style-ii-bus-symbol|r|, respectively. * 0 40501. |pg|Also, some of the given representations appear to be composite; e.g., the * 0 40502. representation "|i||bec||r|" of the |b|becomes-symbol|r|? 0 40503. appears to consist of "|i|:|r|", the representation of? 0 40504. the |b|routine-symbol|r|, etc., and "|i||uqe||r|", the representation of the? 0 40505. |b|equals-symbol|r| and of the |b|is-defined-as-symbol|r|. * 0 40506. It follows from the syntax that "|i||bec||r|" can occur, outside? 0 40507. |b|comments|r|, |b|pragmats|r| and |b|string-denotations|r|, as a * 0 40508. representation of the |b|becomes-symbol|r| only (since "|i||uqe||r|"? 0 40509. cannot occur as the representation of a |b|monadic-operator|r|). * 0 40510. Similarly, the other given composite representations do not cause ambiguity.|cc| * 0 40511. |pb1|c)|tp1|The fact that the representations of the |b|letter-ABC-symbols|r| * 0 40512. given |co|9.4.1.a|cc| are usually spoken of as small letters is not meant to * 0 40513. imply that the corresponding capital letters could not serve equally well. * 0 40514. |co|On the other hand, if both a small letter and the corresponding * 0 40515. capital letter occur, then one of them is presumably the representation * 0 40516. of some |b|style-TALLY-letter-ABC-symbol|r| * 0 40517. or of a |b|bold-letter-ABC-symbol|r|. * 0 40518. See also 1.1.5.b for the possibility of additional |b||ap|ABC|ap||r|s in a variant of the * 0 40519. language.|cc| * 0 40520. |pb1|d)|tp1|A "typographical display feature" is a blank, or a change * 0 40521. to a new line or a new page. * 0 40522. Such features, when they appear between the |b|symbols|r| of a * 0 40523. construct in the reference language, are of no significance * 0 40524. and do not affect the meaning of that construct. * 0 40525. However, a blank contained within a |b|string-|r| or |b|character-denotation|r| * 0 40526. is one of the representations of the |b|space-symbol|r| |co|9.4.1.b|cc| rather than * 0 40527. a typographical display feature. * 0 40528. Where the representation of a |b|symbol|r| in * 0 40529. the reference language is composed of several marks * 0 40530. |co|e.g., |i|TO|r|, |i||bec||r||cc|, those marks form one |co|indivisible|cc| * 0 40531. |b|symbol|r| and, unless the contrary is explicitly stated |co|9.4.2.2.a,c|cc|, typographical * 0 40532. display features may not separate them. * 0 40533. * 0 40534. |h|9.4.1. Representations of symbols * 0 40535. * 0 40536. |pb1|a)|tp1|Letter symbols * 0 40537. |pb1| |tp1|symbol |px|representation * 0 40538. |pb||b|letter a symbol|co||r|814c,82k,942B,A346b|cc||i||px|a * 0 40539. |p||b|letter b symbol|co||r|814c,82k,942B,A344b|cc||i||px|b * 0 40540. |p||b|letter c symbol|co||r|814c,82k,942B,A348a|cc||i||px|c * 0 40541. |p||b|letter d symbol|co||r|814c,82k,942B,A342f|cc||i||px|d * 0 40542. |p||b|letter e symbol|co||r|812h,814c,82k,942B,A343e|cc||i||px|e * 0 40543. |p||b|letter f symbol|co||r|814c,82k,942B,A349a|cc||i||px|f * 0 40544. |p||b|letter g symbol|co||r|814c,942B,A43Aa|cc||i||px|g * 0 40545. |p||b|letter h symbol|co||r|814c,942B|cc||i||px|h * 0 40546. |p||b|letter i symbol|co||r|814c,942B,A345b|cc||i||px|i * 0 40547. |p||b|letter j symbol|co||r|814c,942B|cc||i||px|j * 0 40548. |p||b|letter k symbol|co||r|814c,942B,A341f|cc||i||px|k * 0 40549. |p||b|letter l symbol|co||r|814c,942B,A341f|cc||i||px|l * 0 40550. |p||b|letter m symbol|co||r|814c,942B|cc||i||px|m * 0 40551. |p||b|letter n symbol|co||r|814c,942B,A341h|cc||i||px|n * 0 40552. |p||b|letter o symbol|co||r|814c,942B|cc||i||px|o * 0 40553. |p||b|letter p symbol|co||r|814c,942B,A341f|cc||i||px|p * 0 40554. |p||b|letter q symbol|co||r|814c,942B,A341f|cc||i||px|q * 0 40555. |p||b|letter r symbol|co||r|814c,82c,942B,A347c|cc||i||px|r * 0 40556. |p||b|letter s symbol|co||r|814c,942B,A341l|cc||i||px|s * 0 40557. |p||b|letter t symbol|co||r|814c,942B|cc||i||px|t * 0 40558. |p||b|letter u symbol|co||r|814c,942B|cc||i||px|u * 0 40559. |p||b|letter v symbol|co||r|814c,942B|cc||i||px|v * 0 40560. |p||b|letter w symbol|co||r|814c,942B|cc||i||px|w * 0 40561. |p||b|letter x symbol|co||r|814c,942B,A341f|cc||i||px|x * 0 40562. |p||b|letter y symbol|co||r|814c,942B,A341f|cc||i||px|y * 0 40563. |p||b|letter z symbol|co||r|814c,942B,A342d|cc||i||px|z * 0 40564. |pb1||r|b)|tp1|Denotation symbols * 0 40565. |pb1||tp1|symbol |px|representation * 0 40566. |pb||b|digit zero symbol|co||r|811c,814c,82h,942C|cc||i||px|0 * 0 40567. |p||b|digit one symbol|co||r|43b,811c,814c,82g,h,942C|cc||i||px|1 * 0 40568. |p||b|digit two symbol|co||r|43b,811c,814c,82d,i,942C|cc||i||px|2 * 0 40569. |p||b|digit three symbol|co||r|43b,811c,814c,82i,942C|cc||i||px|3 * 0 40570. |p||b|digit four symbol|co||r|43b,811c,814c,82e,j,942C|cc||i||px|4 * 0 40571. |p||b|digit five symbol|co||r|43b,811c,814c,82j,942C|cc||i||px|5 * 0 40572. |p||b|digit six symbol|co||r|43b,811c,814c,82g,j,942C|cc||i||px|6 * 0 40573. |p||b|digit seven symbol|co||r|43b,811c,814c,82j,942C|cc||i||px|7 * 0 40574. |p||b|digit eight symbol|co||r|43b,811c,814c,82f,k,942C|cc||i||px|8 * 0 40575. |p||b|digit nine symbol|co||r|43b,811c,814c,82k,942C|cc||i||px|9 * 0 40576. |p||b|point symbol|co||r|812d,814c,A343d|cc||i||px|. * 0 40577. |p||b|times ten to the power symbol|co||r|812h|cc||i||px||ttp| |py||ttp2| * 0 40578. |p||b|true symbol|co||r|813a|cc||i||px|TRUE * 0 40579. |p||b|false symbol|co||r|813a|cc||i||px|FALSE * 0 40580. |p||b|quote symbol|co||r|814a,83a|cc||i||px|" * 0 40581. |p||b|quote image symbol|co||r|814b|cc||i||px|"" * 0 40582. |p||b|space symbol|co||r|814c|cc||i||py||vs| * 0 40583. |p||b|comma symbol|co||r|814c|cc||i||px|, * 0 40584. |p||b|empty symbol|co||r|815a|cc||i||px|EMPTY * 0 40585. |pb1||r|c)|tp1|Operator symbols * 0 40586. |pb1||tp1|symbol |px|representation * 0 40587. |pb||b|or symbol|co||r|942H|cc||i||px||or| * 0 40588. |p||b|and symbol|co||r|942H|cc||i||px||and| * 0 40589. |p||b|ampersand symbol|co||r|942H|cc||i||px|&? 0 40590. |p||b|differs from symbol|co||r|942H|cc||i||px||ne| * 0 40591. |p||b|is less than symbol|co||r|942I|cc||i||px||lt| * 0 40592. |p||b|is at most symbol|co||r|942H|cc||i||px||le| * 0 40593. |p||b|is at least symbol|co||r|942H|cc||i||px||sge| * 0 40594. |p||b|is greater than symbol|co||r|942I|cc||i||px||sgt| * 0 40595. |p||b|divided by symbol|co||r|942I|cc||i||px|/ * 0 40596. |p||b|over symbol|co||r|942H|cc||i||px||sq| * 0 40597. |p||b|percent symbol|co||r|942H|cc||i||px|%? 0 40598. |p||b|window symbol|co||r|942H|cc||i||px||box| * 0 40599. |p||b|floor symbol|co||r|942H|cc||i||px||flr| * 0 40600. |p||b|ceiling symbol|co||r|942H|cc||i||px||clg| * 0 40601. |p||b|plus i times symbol|co||r|942H|cc||i||px||tip| * 0 40602. |p||b|not symbol|co||r|942H|cc||i||px||not| * 0 40603. |p||b|tilde symbol|co||r|942H|cc||i||px||til|? 0 40604. |p||b|down symbol|co||r|942H|cc||i||px||dwn| * 0 40605. |p||b|up symbol|co||r|942H|cc||i||px||up| * 0 40606. |p||b|plus symbol|co||r|812j,814c,942H,A342e|cc||i||px|+ * 0 40607. |p||b|minus symbol|co||r|812j,814c,942H,A342e|cc||i||px||mi| * 0 40608. |p||b|equals symbol|co||r|942I|cc||i||px||uqe| * 0 40609. |p||b|times symbol|co||r|942I|cc||i||px||sx| * 0 40610. |p||b|asterisk symbol|co||r|942I|cc||i||px|* * 0 40611. |p||b|assigns to symbol|co||r|942J|cc||i||px||uqe|:? 0 40612. |p||b|becomes symbol|co||r|44f,521a,942J|cc||i||px||bec|? 0 40613. |pb1||r|d)|tp1|Declaration symbols * 0 40614. |pb1||tp1|symbol |px|representation * 0 40615. |pb||b|is defined as symbol|co||r|42b,43b,44c,45c|cc||i||px||uqe| * 0 40616. |p||b|long symbol|co||r|810a,82a|cc||i||px|LONG * 0 40617. |p||b|short symbol|co||r|810a,82b|cc||i||px|SHORT * 0 40618. |p||b|reference to symbol|co||r|46c|cc||i||px|REF * 0 40619. |p||b|local symbol|co||r|523a,b|cc||i||px|LOC * 0 40620. |p||b|heap symbol|co||r|523a,b|cc||i||px|HEAP * 0 40621. |p||b|structure symbol|co||r|46d|cc||i||px|STRUCT * 0 40622. |p||b|flexible symbol|co||r|46g|cc||i||px|FLEX * 0 40623. |p||b|procedure symbol|co||r|44b,46o|cc||i||px|PROC * 0 40624. |p||b|union of symbol|co||r|46s|cc||i||px|UNION * 0 40625. |p||b|operator symbol|co||r|45a|cc||i||px|OP * 0 40626. |p||b|priority symbol|co||r|43a|cc||i||px|PRIO * 0 40627. |p||b|mode symbol|co||r|42a|cc||i||px|MODE * 0 40628. |pb1||r|e)|tp1|Mode standards * 0 40629. |pb1||tp1|symbol |px|representation * 0 40630. |pb||b|integral symbol|co||r|942E|cc||i||px|INT? 0 40631. |p||b|real symbol|co||r|942E|cc||i||px|REAL? 0 40632. |p||b|boolean symbol|co||r|942E|cc||i||px|BOOL? 0 40633. |p||b|character symbol|co||r|942E|cc||i||px|CHAR? 0 40634. |p||b|format symbol|co||r|942E|cc||i||px|FORMAT? 0 40635. |p||b|void symbol|co||r|942E|cc||i||px|VOID * 0 40636. |p||b|complex symbol|co||r|942E|cc||i||px|COMPL? 0 40637. |p||b|bits symbol|co||r|942E|cc||i||px|BITS? 0 40638. |p||b|bytes symbol|co||r|942E|cc||i||px|BYTES? 0 40639. |p||b|string symbol|co||r|942E|cc||i||px|STRING? 0 40640. |p||b|sema symbol|co||r|942E|cc||i||px|SEMA? 0 40641. |p||b|file symbol|co||r|942E|cc||i||px|FILE? 0 40642. |p||b|channel symbol|co||r|942E|cc||i||px|CHANNEL * 0 40643. |pb1||r|f)|tp1|Syntactic symbols * 0 40644. |pb1||tp1|symbol |px|representation * 0 40645. |pb||b|bold begin symbol|co||r|133d|cc||i||px|BEGIN * 0 40646. |p||b|bold end symbol|co||r|133d|cc||i||px|END * 0 40647. |p||b|brief begin symbol|co||r|133d,A348b,A34Ab|cc||i||px||ro| * 0 40648. |p||b|brief end symbol|co||r|133d,A348b,A34Ab|cc||i||px||rc| * 0 40649. |p||b|and also symbol|co||r|133c,33b,f,34h,41a,b,46e,i,? 0 40650. |tp1|q,t,532b,541e,543b,A348b,A34Ac,d|cc||i| |px|, * 0 40651. |p||b|go on symbol|co||r|32b|cc||i||px|; * 0 40652. |p||b|completion symbol|co||r|32b|cc||i||px|EXIT * 0 40653. |p||b|label symbol|co||r|32c|cc||i||px||lbl|? 0 40654. |p||b|parallel symbol|co||r|33c|cc||i||px|PAR * 0 40655. |p||b|open symbol|co||r|814c|cc||i||px||ro|? 0 40656. |p||b|close symbol|co||r|814c|cc||i||px||rc|? 0 40657. |p||b|bold if symbol|co||r|91a|cc||i||px|IF * 0 40658. |p||b|bold then symbol|co||r|91b|cc||i||px|THEN * 0 40659. |p||b|bold else if symbol|co||r|91c|cc||i||px|ELIF * 0 40660. |p||b|bold else symbol|co||r|91d|cc||i||px|ELSE * 0 40661. |p||b|bold fi symbol|co||r|91e|cc||i||px|FI * 0 40662. |p||b|bold case symbol|co||r|91a|cc||i||px|CASE * 0 40663. |p||b|bold in symbol|co||r|91b|cc||i||px|IN * 0 40664. |p||b|bold ouse symbol|co||r|91c|cc||i||px|OUSE * 0 40665. |p||b|bold out symbol|co||r|91d|cc||i||px|OUT * 0 40666. |p||b|bold esac symbol|co||r|91e|cc||i||px|ESAC * 0 40667. |p||b|brief if symbol|co||r|91a|cc||i||px||ro| * 0 40668. |p||b|brief then symbol|co||r|91b|cc||i||px|| * 0 40669. |p||b|brief else if symbol|co||r|91c|cc||i||px||: * 0 40670. |p||b|brief else symbol|co||r|91d|cc||i||px|| * 0 40671. |p||b|brief fi symbol|co||r|91e|cc||i||px||rc| * 0 40672. |p||b|brief case symbol|co||r|91a|cc||i||px||ro| * 0 40673. |p||b|brief in symbol|co||r|91b|cc||i||px|| * 0 40674. |p||b|brief ouse symbol|co||r|91c|cc||i||px||: * 0 40675. |p||b|brief out symbol|co||r|91d|cc||i||px|| * 0 40676. |p||b|brief esac symbol|co||r|91e|cc||i||px||rc| * 0 40677. |p||b|colon symbol|co||r|34j,k|cc||i||px|: * 0 40678. |p||b|brief sub symbol|co||r|133e|cc||i||px||os| * 0 40679. |p||b|brief bus symbol|co||r|133e|cc||i||px||cs| * 0 40680. |p||b|style i sub symbol|co||r|133e|cc||i||px||ro| * 0 40681. |p||b|style i bus symbol|co||r|133e|cc||i||px||rc| * 0 40682. |p||b|up to symbol|co||r|46j,k,l,532f|cc||i||px|: * 0 40683. |p||b|at symbol|co||r|532g|cc||i||px||at||py|AT * 0 40684. |p||b|is symbol|co||r|522b|cc||i||px||bec|: |py|IS * 0 40685. |p||b|is not symbol|co||r|522b|cc||i||px|:|ne|: |py|:/|uqe|:|pz|ISNT? 0 40686. |p||b|nil symbol|co||r|524a|cc||i||px||nil||py|NIL * 0 40687. |p||b|of symbol|co||r|531a|cc||i||px|OF * 0 40688. |p||b|routine symbol|co||r|541a,b|cc||i||px|: * 0 40689. |p||b|bold go to symbol|co||r|544b|cc||i||px|GOTO? 0 40690. |p||b|bold go symbol|co||r|544b|cc||i||px|GO? 0 40691. |p||b|skip symbol|co||r|552a|cc||i||px||til||py|SKIP * 0 40692. |p||b|formatter symbol|co||r|A341a|cc||i||px||do| * 0 40693. |pb1||r|g)|tp1|Loop symbols * 0 40694. |pb1||tp1|symbol |px|representation * 0 40695. |pb||b|bold for symbol|co||r|35b|cc||i||px|FOR * 0 40696. |p||b|bold from symbol|co||r|35d|cc||i||px|FROM * 0 40697. |p||b|bold by symbol|co||r|35d|cc||i||px|BY * 0 40698. |p||b|bold to symbol|co||r|35d,544b|cc||i||px|TO * 0 40699. |p||b|bold while symbol|co||r|35g|cc||i||px|WHILE * 0 40700. |p||b|bold do symbol|co||r|35h|cc||i||px|DO * 0 40701. |p||b|bold od symbol|co||r|35h|cc||i||px|OD * 0 40702. |pb1||r|h)|tp1|Pragment symbols * 0 40703. |pb1||tp1|symbol |px|representation * 0 40704. |pb||b|brief comment symbol|co||r|92b|cc||i||px||ct| * 0 40705. |p||b|bold comment symbol|co||r|92b|cc||i||px|COMMENT * 0 40706. |p||b|style i comment symbol|co||r|92b|cc||i||px|CO * 0 40707. |p||b|style ii comment symbol|co||r|92b|cc||i||px||ha|? 0 40708. |p||b|bold pragmat symbol|co||r|92b|cc||i||px|PRAGMAT * 0 40709. |p||b|style i pragmat symbol|co||r|92b|cc||i||px|PR|r|? 0 40710. * 0 40711. |h|9.4.2. Other TAX symbols? 0 40712. * 0 40713. |h|9.4.2.1. Metasyntax? 0 40714. * 0 40715. |pb1|A)|ts1||b|TAG|co||r|D,F,K,48a,b,c,d|b||cc| :: * 0 40716. |e|LETTER|co||r|B|b||cc| ; TAG LETTER|co||r|B|b||cc| ; TAG DIGIT|co||r|C|b||cc|.|r| * 0 40717. |p1|B)|ts1||b|LETTER|co||r|A|b||cc| :: * 0 40718. |e|letter ABC|co||r|94a|b||cc| ; letter aleph|co||r||mi||b||cc| ; * 0 40719. style TALLY letter ABC|co||r||mi||b||cc|.|r| * 0 40720. |p1|C)|ts1||b|DIGIT|co||r|A|b||cc| :: digit zero|co||r|94b|b||cc| ; digit one|co||r|94b|b||cc| ; * 0 40721. digit two|co||r|94b|b||cc| ; digit three|co||r|94b|b||cc| ; digit four|co||r|94b|b||cc| ; * 0 40722. digit five|co||r|94b|b||cc| ; digit six|co||r|94b|b||cc| ; * 0 40723. digit seven|co||r|94b|b||cc| ; digit eight|co||r|94b|b||cc| ; digit nine|co||r|94b|b||cc|.|r| * 0 40724. |p1|D)|ts1||b|TAB|co||r|48a,b|b||cc| :: bold TAG|co||r|A,|mi||b||cc| ; SIZETY STANDARD|co||r|E|b||cc|.|r|? 0 40725. |p1|E)|ts1||b|STANDARD|co||r|D|b||cc| :: integral|co||r|94e|b||cc| ; real|co||r|94e|b||cc| ; * 0 40726. boolean|co||r|94e|b||cc| ; character|co||r|94e|b||cc| ; format|co||r|94e|b||cc| ; * 0 40727. void|co||r|94e|b||cc| ; complex|co||r|94e|b||cc| ; bits|co||r|94e|b||cc| ; bytes|co||r|94e|b||cc| ; * 0 40728. string|co||r|94e|b||cc| ; sema|co||r|94e|b||cc| ; * 0 40729. file|co||r|94e|b||cc| ; channel|co||r|94e|b||cc|.|r| * 0 40730. |p1|F)|ts1||b|TAD|co||r|48a,b|b||cc| :: bold TAG|co||r|A,|mi||b||cc| ; * 0 40731. DYAD|co||r|G|b||cc| BECOMESETY|co||r|J|b||cc| ; * 0 40732. DYAD|co||r|G|b||cc| cum NOMAD|co||r|I|b||cc| BECOMESETY|co||r|J|b||cc|.|r| * 0 40733. |p1|G)|ts1||b|DYAD|co||r|F|b||cc| :: MONAD|co||r|H|b||cc| ; NOMAD|co||r|I|b||cc|.|r|? 0 40734. |p1|H)|ts1||b|MONAD|co||r|G,K|b||cc| :: or|co||r|94c|b||cc| ; and|co||r|94c|b||cc| ; * 0 40735. ampersand|co||r|94c|b||cc| ; differs from|co||r|94c|b||cc| ; is at most|co||r|94c|b||cc| ; * 0 40736. is at least|co||r|94c|b||cc| ; over|co||r|94c|b||cc| ; percent|co||r|94c|b||cc| ; * 0 40737. window|co||r|94c|b||cc| ; floor|co||r|94c|b||cc| ; ceiling|co||r|94c|b||cc| ; * 0 40738. plus i times|co||r|94c|b||cc| ; not|co||r|94c|b||cc| ; tilde|co||r|94c|b||cc| ; * 0 40739. down|co||r|94c|b||cc| ; up|co||r|94c|b||cc| ; * 0 40740. plus|co||r|94c|b||cc| ; minus|co||r|94c|b||cc| ; style TALLY monad|co||r||mi||b||cc|.|r| * 0 40741. |p1|I)|ts1||b|NOMAD|co||r|F,G,K|b||cc| :: is less than|co||r|94c|b||cc| ; * 0 40742. is greater than|co||r|94c|b||cc| ; divided by|co||r|94c|b||cc| ; * 0 40743. equals|co||r|94c|b||cc| ; times|co||r|94c|b||cc| ; asterisk|co||r|94c|b||cc|.|r|? 0 40744. |p1|J)|ts1||b|BECOMESETY|co||r|F,K|b||cc| :: cum becomes|co||r|94c|b||cc| ; * 0 40745. cum assigns to|co||r|94c|b||cc| ; EMPTY.|r| * 0 40746. |p1|K)|ts1||b|TAM|co||r|48a,b|b||cc| :: bold TAG|co||r|A,|mi||b||cc| ; * 0 40747. MONAD|co||r|H|b||cc| BECOMESETY|co||r|J|b||cc| ; * 0 40748. MONAD|co||r|H|b||cc| cum|co||r|9422e|b||cc| NOMAD|co||r|I|b||cc| BECOMESETY|co||r|J|b||cc|.|r| * 0 40749. |p1|L)|ts1||b|ABC|co||r|B|b||cc| :: a ; b ; c ; d ; e ; f ; g ; h ; i ; j ; k ; l ; * 0 40750. m ; n ; o ; p ; q ; r ; s ; t ; u ; v ; w ; x ; y ; z.|r|? 0 40751. |pb1|M)|ts1||star||b|DOP :: DYAD|co||r|G|b||cc| ; DYAD|co||r|G|b||cc| cum NOMAD|co||r|I|b||cc|.|r|? 0 40752. |pa||j||co|The metanotion "|b|ABC|r|" is provided, in addition * 0 40753. to the metanotion "|b|ALPHA|r|", in order to facilitate the * 0 40754. definition of variants of ALGOL 68 (1.1.5.b).|cc| * 0 40755. * 0 40756. |h|9.4.2.2. Representation? 0 40757. * 0 40758. |pb1||j|a)|tp1|The representation of each |b|TAG-symbol|r| not given * 0 40759. * 0 40760. above |co|9.4.1|cc| is composed of marks corresponding, in order, to the * 0 40761. |b||ap|LETTER|ap||r|s or |b||ap|DIGIT|ap||r|s contained in that |b||ap|TAG|ap||r|. * 0 40762. These marks may be separated by typographical display features |co|9.4.d|cc|. * 0 40763. The mark corresponding to each |b||ap|LETTER|ap||r| (|b||ap|DIGIT|ap||r|) * 0 40764. is the representation of that |b|LETTER-symbol|r| (|b|DIGIT-symbol|r|). * 0 40765. |co|For example, the representation of a |b|letter-x-digit-one-symbol|r| * 0 40766. is |i|x1|r|, which may be written |i|x#1|r|. |b|TAG-symbols|r| are * 0 40767. used for |b|identifiers|r| and |b|field-selectors|r|.|cc| * 0 40768. |pb1|b)|tp1|The representation, if any, of each |b|bold-TAG-symbol|r| is * 0 40769. composed of marks corresponding, in order, to the |b||ap|LETTER|ap||r|s * 0 40770. or |b||ap|DIGIT|ap||r|s contained in that |b||ap|TAG|ap||r| |co|but with no * 0 40771. typographical display features in between|cc|. The mark corresponding * 0 40772. to each |b||ap|LETTER|ap||r| (|b||ap|DIGIT|ap||r|) is similar to the mark * 0 40773. representing the corresponding |b|LETTER-symbol|r| (|b|DIGIT-symbol|r|), * 0 40774. being, in this Report, the corresponding bold faced letter (digit). * 0 40775. |co|Other methods of indicating the similarity which are recognizable * 0 40776. without further elucidation are also acceptable, e.g., |i|PERSON|r|, * 0 40777. |i||ulo|person|ulf||r|, |u|person|r|, |i||ap|person|r| and * 0 40778. |i||ap|person|ap||r| could all be representations of the * 0 40779. |b|bold-letter-p-letter-e-letter-r-letter-s-letter-o-letter-n-symbol|r|.|cc| * 0 40780. |pg|However, the representation of a |b|bold-TAG-symbol|r| * 0 40781. may not be the same as any representation of any other |b|symbol|r| * 0 40782. |co|; thus there may be a finite number of |b|bold-TAG-symbols|r| which * 0 40783. have no representation; e.g., there is no representation for the * 0 40784. |b|bold-letter-r-letter-e-letter-a-letter-l-symbol|r| because * 0 40785. |i|REAL|r| is a representation of the |b|real-symbol|r|; note that * 0 40786. the number of |b|bold-TAG-symbols|r| available is still arbitrarily * 0 40787. large|cc|. If, according to the convention used, a given sequence of * 0 40788. marks could be either the representation of one |b|bold-TAG-symbol|r| * 0 40789. or the concatenation of the representations of two or more other |b|symbols|r|, * 0 40790. then it is always to be construed as that one |b|symbol|r| * 0 40791. |co|; the inclusion of a blank can always force the other interpretation; * 0 40792. e.g., |i|REFREAL|r| is one |b|symbol|r|, whereas |i|REF#REAL|r| must always be two|cc|. * 0 40793. |co||b|Bold-TAG-symbols|r| are used for * 0 40794. |b|mode-indications|r| and for |b|operators|r|.|cc| * 0 40795. |pb1|c)|tp1|The representation of each |b|SIZE-SIZETY-STANDARD-symbol|r| * 0 40796. is composed of the representation of the corresponding * 0 40797. |b|SIZE-symbol|r|, possibly followed by typographical display * 0 40798. features, followed by the * 0 40799. represention of the corresponding |b|SIZETY-STANDARD-symbol|r|. * 0 40800. |co|For example, the representation of a |b|long-real-symbol|r| is |i|LONG#REAL|r|, * 0 40801. or perhaps |i||ap|long|ap||ap|real|ap||r| (but not, * 0 40802. according to section b above, |i|LONGREAL|r| or |i||ap|longreal|ap||r|, * 0 40803. for those would be representations of * 0 40804. the |b|bold-letter-l-letter-o-letter-n-letter-g-letter-r-letter-e-? 0 40805. letter-a-letter-l-symbol|r|). * 0 40806. |b|SIZETY-STANDARD-symbols|r| are used for * 0 40807. |b|mode-indications|r|.|cc| * 0 40808. |pb1|d)|tp1|The representation of each |b|DOP-cum-becomes-symbol|r| * 0 40809. (|b|DOP-cum-assigns-to-symbol|r|) is composed of the mark or marks * 0 40810. representing the corresponding |b|DOP-symbol|r| followed |co|without * 0 40811. intervening typographical display features|cc| by the marks representing * 0 40812. the |b|becomes-symbol|r| (the |b|assigns-to-symbol|r|). * 0 40813. |co|For example, the representation of a |b|plus-cum-becomes-symbol|r| * 0 40814. is |i|+|bec||r|. |b|DOP-cum-becomes-symbols|r| are used for * 0 40815. |b|operators|r|.|cc| * 0 40816. |pb1|e)|tp1|The representation of each |b|DYAD-cum-NOMAD-symbol|r| is * 0 40817. composed of the mark representing the corresponding |b|DYAD-symbol|r| * 0 40818. followed |co|without intervening typographical display features|cc| * 0 40819. by the mark representing the corresponding |b|NOMAD-symbol|r|. * 0 40820. |co|For example, the representation of an |b|over-cum-times-symbol|r| is |i||sq||sx||r|. * 0 40821. |b|DYAD-cum-NOMAD-symbols|r| are used for |b|operators|r|, * 0 40822. but note that |b|NOMAD1-cum-NOMAD2-symbols|r| may be only |b|dyadic-operators|r|.|cc| * 0 50000. |np||e||e||c|PART#V|nc|? 0 50001. * 0 50002. |e||e||c|Environment and Examples|nc| * 0 50003. * 0 50004. |e||e|? 0 50005. * 0 50006. |h|10. |bs|Standard environment|rs| * 0 50007. * 0 50008. |pa||j||co|The "standard environment" encompasses the constituent * 0 50009. |b|EXTERNAL-preludes|r|, |b|system-tasks|r| and |b|particular-postludes|r| * 0 50010. of a |b|program-text|r|.|cc| * 0 50011. * 0 50012. |h|10.1. Program texts * 0 50013. * 0 50014. |pa||j||co|The programmer is concerned with |b|particular-programs|r| * 0 50015. (10.1.1.g). These are always included in a |b|program-text|r| (10.1.1.a) * 0 50016. which also contains the |b|standard-prelude|r|, * 0 50017. a |b|library-prelude|r|, * 0 50018. which depends upon the implementation, a |b|system-prelude|r| and * 0 50019. |b|system-tasks|r|, which correspond to the operating environment, * 0 50020. possibly some other |b|particular-programs|r|, one or more * 0 50021. |b|particular-preludes|r| (one for each |b|particular-program|r|) * 0 50022. and one or more |b|particular-postludes|r|.|cc| * 0 50023. * 0 50024. |h1|10.1.1. Syntax * 0 50025. * 0 50026. |pb1|A)|ts1||b|EXTERNAL :: standard ; library ; system ; particular.|r|? 0 50027. |p1|B)|ts1||b|STOP :: label letter s letter t letter o letter p.|r|? 0 50028. |pb1|a)|ts1||b|program text : STYLE begin|co||r|94f|b||cc| token, * 0 50029. new LAYER1 preludes|co||r|b|b||cc|, * 0 50030. parallel|co||r|94f|b||cc| token, new LAYER1 tasks|co||r|d|b||cc| PACK, * 0 50031. STYLE end|co||r|94f|b||cc| token.|r| * 0 50032. |p1|b)|ts1||b|NEST1 preludes|co||r|a|b||cc| : * 0 50033. NEST1 standard prelude with DECS1|co||r|c|b||cc|, * 0 50034. NEST1 library prelude with DECSETY2|co||r|c|b||cc|, * 0 50035. NEST1 system prelude with DECSETY3|co||r|c|b||cc|, * 0 50036. where (NEST1) is$#(new EMPTY new DECS1 DECSETY2 DECSETY3).|r|? 0 50037. |p1|c)|ts1||b|NEST1 EXTERNAL prelude with DECSETY1|co||r|b,f|b||cc| : * 0 50038. strong void NEST1 series with DECSETY1|co||r|32b|b||cc|, go on|co||r|94f|b||cc| token ; * 0 50039. |e|where (DECSETY1) is (EMPTY), EMPTY.|r| * 0 50040. |p1|d)|ts1||b|NEST1 tasks|co||r|a|b||cc| : * 0 50041. NEST1 system task|co||r|e|b||cc| list, and also|co||r|94f|b||cc| token, * 0 50042. NEST1 user task|co||r|f|b||cc| PACK list.|r| * 0 50043. |p1|e)|ts1||b|NEST1 system task|co||r|d|b||cc| : strong void NEST1 unit|co||r|32d|b||cc|.|r|? 0 50044. |p1|f)|ts1||b|NEST1 user task|co||r|d|b||cc| :? 0 50045. NEST2 particular prelude with DECS|co||r|c|b||cc|, * 0 50046. NEST2 particular program|co||r|g|b||cc| PACK, go on|co||r|94f|b||cc| token, * 0 50047. NEST2 particular postlude|co||r|i|b||cc|, * 0 50048. where (NEST2) is (NEST1 new DECS STOP).|r| * 0 50049. |p1|g)|ts1||b|NEST2 particular program|co||r|f|b||cc| : * 0 50050. NEST2 new LABSETY3 joined label definition$#of LABSETY3|co||r|h|b||cc|, * 0 50051. strong void NEST2 new LABSETY3$#ENCLOSED clause|co||r|31a,33a,c,34a,35a|b||cc|.|r| * 0 50052. |p1|h)|ts1||b|NEST joined label definition of LABSETY|co||r|g,h|b||cc| :? 0 50053. where (LABSETY) is (EMPTY), EMPTY ; * 0 50054. where (LABSETY) is (LAB1 LABSETY1), * 0 50055. NEST label definition of LAB1|co||r|32c|b||cc|, * 0 50056. NEST joined label definition of$#LABSETY1|co||r|h|b||cc|.|r|? 0 50057. |p1|i)|ts1||b|NEST2 particular postlude|co||r|f|b||cc| : * 0 50058. |e|strong void NEST2 series with STOP|co||r|32b|b||cc|.|r| * 0 50059. |w5||exx||co|Examples: * 0 50060. |ex|a) |i|(#~J~J standard|r|-|i|prelude ~J~J; * 0 50061. ~J~J library|r|-|i|prelude ~J~J; ~J~J system|r|-|i|prelude ~J~J; * 0 50062. |pd|PAR BEGIN ~J~J system|r|-|i|task|r|-|i|1 ~J~J#, * 0 50063. ~J~J system|r|-|i|task|r|-|i|2 ~J~J#, * 0 50064. |pe|(#~J~J particular|r|-|i|prelude ~J~J; * 0 50065. |xe|(start|lbl| commence|lbl| BEGIN SKIP END); * 0 50066. |e|~J~J particular|r|-|i|postlude ~J~J#)#, * 0 50067. |pe|(#~J~J#another#user|r|-|i|task#~J~J#) * 0 50068. |pd|END#)|r| * 0 50069. |ey|b) |i|~J~J standard|r|-|i|prelude |r|(10.2,#10.3)|i| ~J~J; * 0 50070. ~J~J library|r|-|i|prelude ~J~J; * 0 50071. ~J~J system|r|-|i|prelude |r|(10.4.1)|i| ~J~J;|r| * 0 50072. |ey|d) |i|~J~J system|r|-|i|task|r|-|i|1 |r|(10.4.2.a)|i| ~J~J#, * 0 50073. ~J~J system|r|-|i|task|r|-|i|2 ~J~J#, * 0 50074. |pd|(#~J~J particular|r|-|i|prelude ~J~J; * 0 50075. |xd|(start|lbl| commence|lbl| BEGIN SKIP END); * 0 50076. |e|~J~J particular|r|-|i|postlude ~J~J#)#, * 0 50077. |pd|(~J~J#another user|r|-|i|task ~J~J#)|r| * 0 50078. |ey|f) |i|~J~J particular|r|-|i|prelude |r|(10.5.1)|i| ~J~J; * 0 50079. |xc|(start|lbl| commence|lbl| BEGIN SKIP END); * 0 50080. |e|~J~J particular|r|-|i|postlude |r|(10.5.2)|i| ~J~J|r| * 0 50081. |ey|g) |i|start|lbl| commence|lbl| BEGIN SKIP END|r| * 0 50082. |ey|h) |i|start|lbl| commence|lbl||r| * 0 50083. |ey|i) |i|stop|lbl| lock (stand in); lock (stand out); * 0 50084. lock (stand back)|r|#|cc| * 0 50085. |j|? 0 50086. * 0 50087. |h|10.1.2. The environment condition * 0 50088. * 0 50089. |pb1||j|a)|tp1|A |b|program|r| in the strict language must be akin |co|1.1.3.2.k|cc| to * 0 50090. some |b|program-text|r| * 0 50091. whose constituent#|b|EXTERNAL-preludes|r| and |b|particular-postludes|r| * 0 50092. are as specified in the remainder of this section. * 0 50093. |pg||co|It is convenient to speak of the |b|standard-prelude|r|, * 0 50094. the |b|library-prelude|r|, the |b|particular-programs|r|, etc. of * 0 50095. a |b|program|r| when discussing * 0 50096. those parts of that * 0 50097. |b|program|r| which correspond to the constituent#|b|standard-prelude|r|, * 0 50098. etc. of the corresponding |b|program-text|r|.|cc| * 0 50099. |pb1|b)|tp1|The constituent#|b|standard-prelude|r| of all |b|program-texts|r| is that * 0 50100. |b|standard-prelude|r| whose representation is obtained |co|10.1.3|cc| from * 0 50101. the forms given in sections 10.2 and 10.3. * 0 50102. |pb1|c)|tp1|The constituent |b|library-prelude|r| of a |b|program-text|r| * 0 50103. is not specified in this Report |co|but must be specified for each * 0 50104. implementation; the syntax of |b||ap|program text|ap||r| ensures that a * 0 50105. |b|declaration|r| contained in a |b|library-prelude|r| may not * 0 50106. contradict any |b|declaration|r| contained in the * 0 50107. |b|standard-prelude|r||cc|. * 0 50108. |pb1|d)|tp1|The constituent |b|system-prelude|r| (|b|system-task-list|r|) * 0 50109. of all |b|program-texts|r| is that |b|system-prelude|r| * 0 50110. (|b|system-task-list|r|) whose representation is obtained from the * 0 50111. forms given in section 10.4, with the possible addition of other * 0 50112. forms not specified in this Report |co|but to be specified to suit * 0 50113. the operating environment of each implementation|cc|. * 0 50114. |pb1|e)|tp1|Each constituent |b|particular-prelude|r| (|b|particular-? 0 50115. postlude|r|) of all |b|program-texts|r| is that |b|particular-? 0 50116. prelude|r| (|b|particular-postlude|r|) whose representation is * 0 50117. obtained from the forms given in section 10.5, with the possible * 0 50118. addition of other forms not specified in this Report |co|but to be * 0 50119. specified for each implementation|cc|. * 0 50120. * 0 50121. |h|10.1.3. The method of description of the standard environment * 0 50122. * 0 50123. |pa||j|A representation of an |b|EXTERNAL-prelude|r|, |b|system-task|r| * 0 50124. or |b|particular-postlude|r| is obtained by altering each form in * 0 50125. the relevant sections of this chapter in the following steps: * 0 50126. |p||pi|Step#1: If a given form |w|F|r| begins with |i|OP|r| |co|the * 0 50127. |b|operator-symbol|r||cc| followed by one of the marks |u|P|r|, |u|Q|r|, * 0 50128. |u|R|r| or |u|E|r|, then |w|F|r| is replaced by a number of new forms * 0 50129. each of which is a copy of |w|F|r| * 0 50130. in which that mark |co|following the |i|OP|r||cc| is (all other * 0 50131. occurrences in |w|F|r| of that mark are) replaced, in each respective * 0 50132. new form, by: * 0 50133. |n||p||ps|Case#A: The mark is |u|P|r|: * 0 50134. |et||i||mi||r|, |i|+|r|, |i||nl||sx|,#*|ng||r| or |i|/|r| * 0 50135. |e|(|i||mi||r|, |i|+|r|, |sx| or |i|/|r|); * 0 50136. |p||ps|Case#B: The mark is |u|Q|r|: * 0 50137. |et||i||nl|MINUSAB,#|mi||bec||ng||r|, |i||nl|PLUSAB,#+|bec||ng||r|, * 0 50138. |i||nl|TIMESAB,#|sx||bec|,#*|bec||ng||r| or |i||nl|DIVAB,#/|bec||ng||r| * 0 50139. |e|(|i||mi||bec||r|, |i|+|bec||r|, |i||sx||bec||r| or |i|/|bec||r|); * 0 50140. |p||ps|Case#C: The mark is |u|R|r|: * 0 50141. |et||i||nl||lt|,#LT|ng||r|, |i||nl||le|,#|lt||uqe|,#LE|ng||r|, * 0 50142. |i||nl||uqe|,#EQ|ng||r|, |i||nl||ne|,#/|uqe|,#NE|ng||r|, * 0 50143. |i||nl||sge|,#|sgt||uqe|,#GE|ng||r| or |i||nl||sgt|,#GT|ng||r| * 0 50144. |e|(|i||lt||r|, |i||le||r|, |i||uqe||r|, |i||ne||r|, |i||sge||r| or |i||sgt||r|); * 0 50145. |p||ps|Case#D: The mark is |u|E|r|: * 0 50146. |et||i||nl||uqe|,#EQ|ng||r| or |i||nl||ne|,#/|uqe|,#NE|ng||r| * 0 50147. |e|(|i||uqe||r| or |i||ne||r|); * 0 50148. |p||j||pi|Step#2: If, in some form, as possibly made in the step * 0 50149. above, |ra| occurs followed by an |b|INDICATOR|r| (a |b|field-selector|r|) |w|I|r|, * 0 50150. then that occurrence of |ra| * 0 50151. is deleted and each * 0 50152. |b|INDICATOR|r| (|b|field-selector|r|) akin |co|1.1.3.2.k|cc| to |w|I|r| contained in any form is * 0 50153. replaced by a copy of one same |b|INDICATOR|r| (|b|field-selector|r|) * 0 50154. which does not occur elsewhere * 0 50155. in the |b|program|r| and Step#2 is taken again; * 0 50156. |p||pi|Step#3: If a given form |w|F|r|, as possibly modified or made in the steps above, * 0 50157. begins with |i|OP|r| |co|the |b|operator-symbol|r||cc| followed * 0 50158. by a chain of |b|TAO-symbols|r| * 0 50159. separated by |b|and-also-symbols|r|, the chain being * 0 50160. enclosed between |nl| and |ng|, then |w|F|r| is replaced by a * 0 50161. number of different "versions" of that form each of which is a copy of |w|F|r| in * 0 50162. which that chain, together with its enclosing |nl| and |ng|, has * 0 50163. been replaced by * 0 50164. one of those |b|TAO-symbols|r| * 0 50165. |co|; however, an implementation is not obliged to provide more * 0 50166. than one such version (9.4.b)|cc|; * 0 50167. |p||pi|Step#4: If, in a given form, as possibly modified or made in the steps above, there * 0 50168. occurs a sequence |w|S|r| of |b|symbols|r| enclosed between |nl| and |ng| * 0 50169. and if, in that |w|S|r|, |u|L#|i|INT|r|, |u|L#|i|REAL|r|, * 0 50170. |u|L#|i|COMPL|r|, |u|L#|i|BITS|r| or |u|L#|i|BYTES|r| occurs, then |w|S|r| is * 0 50171. replaced by a chain of a sufficient number of sequences separated * 0 50172. by |b|and-also-symbols|r|, the |w|n|r||hy|th of which is a copy of |w|S|r| * 0 50173. in which copy each occurrence of |u|l|r| (|u|L|r|, |u|K|r|, |u|S|r|) is replaced * 0 50174. by |w|(n#|mi|#1)|r| times |i|long|r| (|i|LONG|r|, |i|LENG|r|, |i|SHORTEN|r|), followed by an * 0 50175. |b|and-also-symbol|r| and a further chain of a sufficient * 0 50176. number of sequences separated by |b|and-also-symbols|r|, the |w|m|r||hy|th * 0 50177. of which is a copy of |w|S|r| in which copy each occurrence of * 0 50178. |u|l|r| (|u|L|r|, |u|K|r|, |u|S|r|) has been replaced by |w|m|r| times |i|short|r| * 0 50179. (|i|SHORT|r|, |i|SHORTEN|r|, |i|LENG|r|); the |nl| and |ng| enclosing that |w|S|r| are * 0 50180. then deleted; * 0 50181. |p||pi|Step#5: If, in a given form |w|F|r|, * 0 50182. as possibly modified or made in the steps above, * 0 50183. |u|L#|i|INT|r| (|u|L#|i|REAL|r|, |u|L#|i|COMPL|r|, |u|L#|i|BITS|r|, * 0 50184. |u|L#|i|BYTES|r|) occurs, then |w|F|r| is replaced by a sequence of a * 0 50185. sufficient number of new forms, the |w|n|r||hy|th of which is a copy of |w|F|r| * 0 50186. in which * 0 50187. copy each occurrence of |u|l|r| (|u|L|r|, |u|K|r|, |u|S|r|) is * 0 50188. replaced by |w|(n#|mi|#1)|r| times |i|long|r| (|i|LONG|r|, |i|LENG|r|, * 0 50189. |i|SHORTEN|r|), and each occurrence of |i|LONG#|u|L|r| (|i|long#|u|l|r|) * 0 50190. by |w|n|r| times |i|LONG|r| (|i|long|r|), * 0 50191. followed by a further sequence of a sufficient * 0 50192. number of new forms, the |w|m|r||hy|th of which is a copy of |w|F|r| * 0 50193. in which copy each occurrence of |u|l|r| (|u|L|r|, |u|K|r|, |u|S|r|) * 0 50194. is replaced by |w|m|r| times |i|short|r| (|i|SHORT|r|, |i|SHORTEN|r|, * 0 50195. |i|LENG|r|), and each occurrence of |i|LONG#|u|L|r| (|i|long#|u|l|r|) * 0 50196. by (|w|m#|mi|#1|r|) times |i|SHORT|r| (|i|short|r|);? 0 50197. |p||pi|Step#6: Each occurrence of |u|f|r| (|u|PRIM|r|) in any form, as possibly modified * 0 50198. or made in the steps above, is replaced by a representation of * 0 50199. a |b|letter-aleph-symbol|r| (|b|primal-symbol|r|) |co|9.4.a|cc|; * 0 50200. |p||pi|Step#7: If a sequence of representations beginning with and ending * 0 50201. with * 0 50202. |i|C|r| occurs in any form, as possibly modified or made in the steps * 0 50203. above, then this sequence, which is termed a "pseudo-comment", * 0 50204. is replaced by a representation of a * 0 50205. |b|declarer|r| or |b|closed-clause|r| suggested by the sequence; * 0 50206. |p||pi|Step#8: If, in any form, as possibly modified or made in the steps * 0 50207. above, a |b|routine-text|r| occurs whose * 0 50208. calling involves the manipulation of real numbers, then this * 0 50209. |b|routine-text|r| may be replaced by any other |b|routine-text|r| whose * 0 50210. calling has approximately the same effect |co|; the degree of * 0 50211. approximation is left undefined in this Report (see also 2.1.3.1.e)|cc|; * 0 50212. |p||pi|Step#9:#In the case of an |b|EXTERNAL-prelude|r|, a form consisting * 0 50213. of a |b|skip-symbol|r| followed by a |b|go-on-symbol|r| |co||i|SKIP;|r||cc| * 0 50214. is added at the end. * 0 50215. |pa||co|The term "sufficient number", as used in Steps 4 and 5 above, * 0 50216. implies that no intended |b|particular-program|r| should * 0 50217. have a different meaning or fail to be * 0 50218. produced by the syntax solely on account of an insufficiency of * 0 50219. that number.|cc| * 0 50220. |j||pa|Wherever |co|in the transput declarations|cc| the representation * 0 50221. |i||ttp||r| (|i||ttp2||r|, |i||tip||r|) occurs within a |b|character-denotation|r| or * 0 50222. |b|string-denotation|r|, it is to be interpreted as the representation * 0 50223. of the |b|string-item|r| |co|8.1.4.1.b|cc| used to indicate "times ten to the power" * 0 50224. (an alternative form |co|, if any,|cc| of "times ten to the power", "plus i times") * 0 50225. on external media. |co|Clearly, these representations have been chosen because * 0 50226. of their similarity to those of the |b|times-ten-to-the-power-symbol|r| (9.4.1.b) * 0 50227. and the |b|plus-i-times-symbol|r| (9.4.1.c), but, on media on which these characters * 0 50228. are not available, other |b|string-items|r| must be chosen (and the * 0 50229. |b|letter-e-symbol|r| and the |b|letter-i-symbol|r| are obvious candidates).|cc| * 0 50230. |pa||co|The declarations in this chapter are intended to describe their * 0 50231. effect clearly. The effect may very well be obtained by a more efficient * 0 50232. method.|cc| * 0 50233. * 0 50234. |h|10.2. The standard prelude * 0 50235. * 0 50236. |pa||j||co|The |b|declarations|r| of the |b|standard-prelude|r| comprise * 0 50237. "environment enquiries", which supply information concerning a * 0 50238. specific property of the implementation (2.2.2.c), "standard * 0 50239. modes", "standard operators and functions", "synchronization operations" * 0 50240. and "transput declarations" (which are given in section 10.3).|cc| * 0 50241. * 0 50242. |h|10.2.1. Environment enquiries * 0 50243. * 0 50244. |pb1|a)|ts1||i|INT int#lengths |uqe| ~J~J 1 plus the number of extra lengths of * 0 50245. integers |r||co|2.1.3.1.d|cc||i| ~J~J ;|r| * 0 50246. |pb1|b)|ts1||i|INT int#shorths |uqe| ~J~J 1 plus the number of extra shorths * 0 50247. of integers |r||co|2.1.3.1.d|cc||i| ~J~J ;|r| * 0 50248. |pb1|c)|ts1||i||u|L#|i|INT#|u|l#|i|max#int |uqe| ~J~J the largest |u|l#|i|integral * 0 50249. value |r||co|2.2.2.b|cc||i| ~J~J ;|r| * 0 50250. |pb1|d)|ts1||i|INT real#lengths |uqe| ~J~J 1 plus the number of extra lengths of real * 0 50251. numbers |r||co|2.1.3.1.d|cc||i| ~J~J ;|r| * 0 50252. |pb1|e)|ts1||i|INT real#shorths |uqe| ~J~J 1 plus the number of extra shorths * 0 50253. of real numbers |r||co|2.1.3.1.d|cc||i| ~J~J ;|r| * 0 50254. |pb1|f)|ts1||u|L#|i|REAL |u|l#|i|max#real |uqe| ~J~J the largest |u|l#|i|? 0 50255. real value |r||co|2.2.2.b|cc||i| ~J~J ;|r| * 0 50256. |pb1|g)|ts1||u|L#|i|REAL |u|l#|i|small#real |uqe| ~J~J the smallest |u|l#|i|real * 0 50257. value such that both |u|L#|i|1 + |u|l#|i|small#real |sgt| |u|L#|i|1 * 0 50258. and |u|L#|i|1 |mi| |u|l#|i|small#real |lt| |u|L#|i|1 |r||co|2.2.2.b|cc||i| ~J~J ;|r| * 0 50259. |pb1|h)|ts1||i|INT bits#lengths |uqe| ~J~J 1 plus the number of * 0 50260. extra widths |r||co|j|cc||i| of bits ~J~J ;|r| * 0 50261. |pb1|i)|ts1||i|INT bits#shorths |uqe| ~J~J 1 plus the number of extra * 0 50262. shorths |r||co|j|cc||i| of bits ~J~J ;|r| * 0 50263. |pb1|j)|ts1||i|INT |u|l#|i|bits#width |uqe| ~J~J the number of elements in |u|l#|i|? 0 50264. bits; see |u|L#|i|BITS|r| |co|10.2.2.g|cc||i|; * 0 50265. this number increases (decreases) with the "size", i.e., the * 0 50266. number of |ap|long|ap|s (minus the number of |ap|short|ap|s) * 0 50267. of which |ap||u|l|i||ap| is composed, * 0 50268. until a certain size is reached, viz., "the number of extra widths" * 0 50269. (minus "the number of extra shorths") of bits, after which it * 0 50270. is constant ~J~J ;|r| * 0 50271. |pb1|k)|ts1||i|INT bytes#lengths |uqe| ~J~J 1 plus the number of * 0 50272. extra widths |r||co|m|cc||i| of bytes ~J~J ;|r| * 0 50273. |pb1|l)|ts1||i|INT bytes#shorths |uqe| ~J~J 1 plus the number of extra * 0 50274. shorths |r||co|m|cc||i| of bytes ~J~J ;|r| * 0 50275. |pb1|m)|ts1||i|INT |u|l#|i|bytes#width |uqe| ~J~J the number of elements in * 0 50276. |u|l#|i|bytes; see |u|L#|i|BYTES|r| |co|10.2.2.h|cc||i|; * 0 50277. this number increases (decreases) with the "size", i.e., the * 0 50278. number of |ap|long|ap|s (minus the number of |ap|short|ap|s) * 0 50279. of which |u|l|i| is composed, * 0 50280. until a certain size is reached, viz., "the number of extra widths" * 0 50281. (minus "the number of extra shorths") of bytes, after which it * 0 50282. is constant ~J~J ;|r| * 0 50283. |pb1|n)|ts1||i|OP ABS |uqe| (CHAR a) INT : |g|~J~J the integral equivalent |r||co|2.1.3.1.g|cc||i| of the * 0 50284. character |ap|a|ap| ~J~J ;|r| * 0 50285. |pb1|o)|ts1||i|OP REPR |uqe| (INT a) CHAR : |g|~J~J that character |ap|x|ap|, if it exists, * 0 50286. for which ABS x |uqe| a ~J~J ;|r| * 0 50287. |pb1|p)|ts1||i|INT max#abs#char |uqe| ~J~J the largest integral equivalent * 0 50288. |r||co|2.1.3.1.g|cc||i| of a character ~J~J ;|r| * 0 50289. |pb1|q)|ts1||i|CHAR null character |uqe| ~J~J some character ~J~J ;|r| * 0 50290. |pb1|r)|ts1||i|CHAR flip |uqe| ~J~J the character used to represent |ap|true|ap| * 0 50291. during transput |r||co|10.3.3.1.a, 10.3.3.2.a|cc||i| ~J~J ;|r| * 0 50292. |pb1|s)|ts1||i|CHAR flop |uqe| ~J~J the character used to represent |ap|false|ap| * 0 50293. during transput ~J~J ;|r| * 0 50294. |pb1|t)|ts1||i|CHAR errorchar |uqe| ~J~J the character used to represent * 0 50295. unconvertible arithmetic values |r||co|10.3.2.1.b,c,d,e,f|cc||i| during transput ~J~J ;|r| * 0 50296. |pb1|u)|ts1||i|CHAR blank |uqe| "|vs|" ;|r| * 0 50297. * 0 50298. |h|10.2.2. Standard modes * 0 50299. * 0 50300. |pb1|a)|ts1||i|MODE VOID |uqe| ~J~J an actual|r|-|i|declarer specifying the mode * 0 50301. |ap|void|ap| ~J~J ;|r| * 0 50302. |pb1|b)|ts1||i|MODE BOOL |uqe| ~J~J an actual|r|-|i|declarer specifying the * 0 50303. mode |ap|boolean|ap| ~J~J ;|r| * 0 50304. |pb1|c)|ts1||i|MODE |u|L#|i|INT |uqe| ~J~J an actual|r|-|i|declarer specifying * 0 50305. the mode |ap||u|l#|i|integral|ap| ~J~J ;|r| * 0 50306. |pb1|d)|ts1||i|MODE |u|L|i|#REAL |uqe| ~J~J an actual|r|-|i|declarer specifying the * 0 50307. mode |ap||u|l|i|#real|ap| ~J~J ;|r| * 0 50308. |pb1|e)|ts1||i|MODE CHAR |uqe| ~J~J an actual|r|-|i|declarer specifying the mode * 0 50309. |ap|character|ap| ~J~J ;|r| * 0 50310. |pb1|f)|ts1||i|MODE |u|L#|i|COMPL |uqe| STRUCT (|u|L#|i|REAL re, im) ;|r| * 0 50311. |pb1|g)|ts1||i|MODE |u|L#|i|BITS |uqe| STRUCT (|so|1 : |g||u|l#|i|bits width|sc| BOOL |u|l * 0 50312. f|i|) ;|r| |co|See 10.2.1.j|cc| * 0 50313. |xi||j||co|The |b|field-selector|r| is hidden from the user in order that * 0 50314. he may not break open the structure; in particular, he may not subscript * 0 50315. the field.|cc||n| * 0 50316. |pb1|h)|ts1||i|MODE |u|L#|i|BYTES |uqe| STRUCT (|so|1 : |g||u|l#|i|bytes#width|sc| CHAR |u|l#? 0 50317. f|i|) ;|r| |co|See 10.2.1.m|cc| * 0 50318. |pb1|i)|ts1||i|MODE STRING |uqe| FLEX |so|1 : |g|0|sc| CHAR ;|r| * 0 50319. * 0 50320. |h|10.2.3. Standard operators and functions * 0 50321. * 0 50322. |h|10.2.3.0. Standard priorities * 0 50323. * 0 50324. |pb1|a)|ts1||i|PRIO MINUSAB |uqe| 1, PLUSAB |uqe| 1, TIMESAB |uqe| 1, * 0 50325. DIVAB |uqe| 1, OVERAB |uqe| 1, MODAB |uqe| 1, PLUSTO |uqe| 1, * 0 50326. |e||mi||bec| |uqe| 1, +|bec| |uqe| 1, |sx||bec| |uqe| 1, *|bec| |uqe| 1, /|bec| |uqe| 1, |sq||bec| |uqe| 1, * 0 50327. %|bec| |uqe| 1, |sq||sx||bec| |uqe| 1, |sq|*|bec| |uqe| 1, %|sx||bec| |uqe| 1, %*|bec| |uqe| 1, +|uqe|: |uqe| 1, * 0 50328. |e||e||or| |uqe| 2, OR |uqe| 2, * 0 50329. |e||e||and| |uqe| 3, & |uqe| 3, AND |uqe| 3, * 0 50330. |e||e||uqe| |uqe| 4, EQ |uqe| 4, |ne| |uqe| 4, /|uqe| |uqe| 4, NE |uqe| 4, * 0 50331. |e||e||lt| |uqe| 5, LT |uqe| 5, * 0 50332. |le| |uqe| 5, |lt||uqe| |uqe| 5, LE |uqe| 5,? 0 50333. |sge| |uqe| 5, |sgt||uqe| |uqe| 5, GE |uqe| 5,? 0 50334. |sgt| |uqe| 5, GT |uqe| 5, * 0 50335. |e||e||mi| |uqe| 6, + |uqe| 6, * 0 50336. |e||e||sx| |uqe| 7, * |uqe| 7, / |uqe| 7, |sq| |uqe| 7, % |uqe| 7, OVER |uqe| 7, * 0 50337. |e||sq||sx| |uqe| 7, |sq|* |uqe| 7, %|sx| |uqe| 7, %* |uqe| 7, MOD |uqe| 7, * 0 50338. |e||box| |uqe| 7, ELEM |uqe| 7, * 0 50339. |e||e||up| |uqe| 8, ** |uqe| 8, |dwn| |uqe| 8, UP |uqe| 8, DOWN |uqe| 8, SHL |uqe| 8, SHR |uqe| 8, * 0 50340. |e|LWB |uqe| 8, UPB |uqe| 8, |flr| |uqe| 8, |clg| |uqe| 8, * 0 50341. |e||e||tip| |uqe| 9, +|sx| |uqe| 9, +* |uqe| 9, I |uqe| 9 ;|r| * 0 50342. * 0 50343. |h|10.2.3.1. Rows and associated operations * 0 50344. * 0 50345. |pb1|a)|ts1||i|MODE |ra| ROWS |uqe| ~J~J an actual|r|-|i|declarer specifying a * 0 50346. mode united from|r| |co|2.1.3.6.a|cc| |i|a sufficient set of * 0 50347. modes each of which begins with |ap|row|ap| ~J~J ;|r|? 0 50348. |pb1|b)|ts1||i|OP |nl|LWB, |flr||ng| |uqe| (INT n, ROWS a) INT : |g|~J~J the lower bound in the n? 0 50349. |r|-|i|th bound pair of the descriptor of the value of |ap|a|ap|, if that * 0 50350. bound pair exists ~J~J ;|r| * 0 50351. |pb1|c)|ts1||i|OP |nl|UPB, |clg||ng| |uqe| (INT n, ROWS a) INT : |g|~J~J the upper bound in the n? 0 50352. |r|-|i|th bound pair of the descriptor of the value of |ap|a|ap|, if that * 0 50353. bound pair exists ~J~J ;|r| * 0 50354. |pb1|d)|ts1||i|OP |nl|LWB, |flr||ng| |uqe| (ROWS a) INT : |g|1 |flr| a ;|r| * 0 50355. |pb1|e)|ts1||i|OP |nl|UPB, |clg||ng| |uqe| (ROWS a) INT : |g|1 |clg| a ;|r| * 0 50356. |pa||j||co|The term "sufficient set", as used in a above and also in * 0 50357. 10.3.2.2.b and d, implies that no intended |b|particular-program|r| * 0 50358. should fail to be produced (nor any unintended |b|particular-program|r| be produced) * 0 50359. by the syntax solely on account of an * 0 50360. insufficiency of modes in that set.|cc| * 0 50361. * 0 50362. |h|10.2.3.2. Operations on boolean operands * 0 50363. * 0 50364. |pb1|a)|ts1||i|OP |nl||or|, OR|ng| |uqe| (BOOL a, b) BOOL : |g|(a | TRUE | b) ;|r| * 0 50365. |pb1|b)|ts1||i|OP |nl||and|, &, AND|ng| |uqe| (BOOL a, b) BOOL : |g|(a | b | FALSE) ;|r| * 0 50366. |pb1|c)|ts1||i|OP |nl||not|, |til|, NOT|ng| |uqe| (BOOL a) BOOL : |g|(a | FALSE | TRUE) ;|r| * 0 50367. |pb1|d)|ts1||i|OP |nl||uqe|, EQ|ng| |uqe| (BOOL a, b) BOOL : |g|(a |and| b) |or| (|not| a |and| |not| * 0 50368. b) ;|r| * 0 50369. |pb1|e)|ts1||i|OP |nl||ne|, /|uqe|, NE|ng| |uqe| (BOOL a, b) BOOL : |g||not| (a |uqe| b) ;|r| * 0 50370. |pb1|f)|ts1||i|OP ABS |uqe| (BOOL a) INT : |g|(a | 1 | 0) ;|r| * 0 50371. * 0 50372. |h|10.2.3.3. Operations on integral operands * 0 50373. * 0 50374. |pb1|a)|ts1||i|OP |nl||lt|, LT|ng| |uqe| (|u|L#|i|INT a, b) BOOL : |g|~J~J true if the value of * 0 50375. |ap|a|ap| is smaller than|r| |co|2.1.3.1.e|cc| |i|that of |ap|b|ap| and false otherwise ~J~J * 0 50376. ;|r| * 0 50377. |pb1|b)|ts1||i|OP |nl||le|, |lt||uqe|, LE|ng| |uqe| (|u|L#|i|INT a, b) BOOL : |g||not| (b |lt| a) ;|r| * 0 50378. |pb1|c)|ts1||i|OP |nl||uqe|, EQ|ng| |uqe| (|u|L#|i|INT a, b) BOOL : |g|a |le| b |and| b |le| a ;|r| * 0 50379. |pb1|d)|ts1||i|OP |nl||ne|, /|uqe|, NE|ng| |uqe| (|u|L#|i|INT a, b) BOOL : |g||not| (a |uqe| b) ;|r| * 0 50380. |pb1|e)|ts1||i|OP |nl||sge|, |sgt||uqe|, GE|ng| |uqe| (|u|L#|i|INT a, b) BOOL : |g|b |le| a ;|r| * 0 50381. |pb1|f)|ts1||i|OP |nl||sgt|, GT|ng| |uqe| (|u|L#|i|INT a, b) BOOL : |g|b |lt| a ;|r| * 0 50382. |pb1|g)|ts1||i|OP |mi| |uqe| (|u|L#|i|INT a, b) |u|L#|i|INT : |g|~J~J the value of |ap|a|ap| * 0 50383. minus|r| |co|2.1.3.1.e|cc| |i|that of |ap|b|ap| ~J~J ;|r| * 0 50384. |pb1|h)|ts1||i|OP |mi| |uqe| (|u|L#|i|INT a) |u|L#|i|INT : |g||u|L#|i|0 |mi| a ;|r| * 0 50385. |pb1|i)|ts1||i|OP + |uqe| (|u|L#|i|INT a, b) |u|L#|i|INT : |g|a |mi| |mi|b ;|r| * 0 50386. |pb1|j)|ts1||i|OP + |uqe| (|u|L#|i|INT a) |u|L#|i|INT : |g|a ;|r| * 0 50387. |pb1|k)|ts1||i|OP ABS |uqe| (|u|L#|i|INT a) |u|L#|i|INT : |g|(a |lt| |u|L#|i|0# * 0 50388. |#|mi|a | a) ;|r| * 0 50389. |pb1|l)|ts1||i|OP |nl||sx|, *|ng| |uqe| (|u|L#|i|INT a, b) |u|L#|i|INT :|g| * 0 50390. |pc|BEGIN |u|L#|i|INT s |bec| * 0 50391. |u|L#|i|0, i |bec| ABS b; * 0 50392. |e|WHILE i |sge| |u|L#|i|1 * 0 50393. |e|DO s |bec| s + a; i |bec| i |mi| |u|L#|i|1 OD; * 0 50394. |e|(b |lt| |u|L#|i|0 |#|mi| s | s) |pc|END ;|r| * 0 50395. |pb1|m)|ts1||i|OP |nl||sq|, %, OVER|ng| |uqe| (|u|L#|i|INT a, b) |u|L#|i|INT :|g| * 0 50396. |pc|IF b |ne| |u|L#|i|0 * 0 50397. |pc|THEN |u|L#|i|INT q |bec| |u|L#|i|0, r |bec| ABS a; |e|WHILE (r |bec| r |mi| ABS b) |sge| * 0 50398. |u|L#|i|0 DO q |bec| q + |u|L#|i|1 OD; * 0 50399. |e|(a |lt| |u|L#|i|0 |and| b |sge| |u|L#|i|0 * 0 50400. |or| a |sge| |u|L#|i|0 |and| b |lt| |u|L#|i|0 ||g| |mi| q | q) |pc|FI ;|r| * 0 50401. |pb1|n)|ts1||i|OP |nl||sq||sx|, |sq|*, %|sx|, %*, MOD|ng| |uqe| * 0 50402. (|u|L#|i|INT a, b) |u|L#|i|INT :|g| * 0 50403. |e|(INT r |uqe| a |mi| a |sq| b |sx| b; * 0 50404. r |lt| 0 | r + ABS b | r) ;|r|? 0 50405. |pb1|o)|ts1||i|OP / |uqe| (|u|L#|i|INT a, b) |u|L#|i|REAL : |g||u|L#|i|REAL (a) * 0 50406. / |u|L#|i|REAL (b) ;|r| * 0 50407. |pb1|p)|ts1||i|OP |nl||up|, **, UP|ng| |uqe| (|u|L#|i|INT a, INT b) |u|L#|i|INT :|g| * 0 50408. |e|(b |sge| 0 | |u|L#|i|INT p |bec| |u|L#|i|1; TO b#DO p |bec| p |sx| a OD; p) ;|r|? 0 50409. |pb1|q)|ts1||i|OP LENG |uqe| (|u|L#|i|INT a) LONG#|u|L#|i|INT : |g|~J~J the long#|u|l|i| * 0 50410. integral value lengthened from|r| |co|2.1.3.1.e|cc| |i|the value of |ap|a|ap| ~J~J ;|r| * 0 50411. |pb1|r)|ts1||i|OP SHORTEN |uqe| (LONG#|u|L#|i|INT a) |u|L#|i|INT : |g|~J~J the * 0 50412. |u|l#|i|integral value, if it exists, which can be lengthened to|r| |co|2.1.3.1.e|cc| |i|? 0 50413. the value of |ap|a|ap| ~J~J ;|r| * 0 50414. |pb1|s)|ts1||i|OP ODD |uqe| (|u|L#|i|INT a) BOOL : |g|ABS a |sq||sx| |u|L#|i|2 * 0 50415. |uqe| |u|L#|i|1 ;|r| * 0 50416. |pb1|t)|ts1||i|OP SIGN |uqe| (|u|L#|i|INT a) INT : * 0 50417. |e|(a#|sgt|#|u|L#|i|0#|#1#|:#a#|lt|#|u|L#|i|0 |#|mi|#1 |#0)#;|r|? 0 50418. |pb1|u)|ts1||i|OP |nl||tip|, +|sx|, +*, I|ng| |uqe| (|u|L#|i|INT a, b) |u|L#|i|COMPL : |g|? 0 50419. (a, b) ;|r| * 0 50420. * 0 50421. |h|10.2.3.4. Operations on real operands * 0 50422. * 0 50423. |pb1|a)|ts1||i|OP |nl||lt|, LT|ng| |uqe| (|u|L#|i|REAL a, b) BOOL : |g|? 0 50424. ~J~J true if the value of |ap|a|ap| is smaller than |r||co|2.1.3.1.e|cc||i| * 0 50425. that of |ap|b|ap| and false otherwise ~J~J ;|r| * 0 50426. |pb1|b)|ts1||i|OP |nl||le|, |lt||uqe|, LE|ng| |uqe| (|u|L#|i|REAL a, b) BOOL : |g|? 0 50427. |not| (b |lt| a) ;|r| * 0 50428. |pb1|c)|ts1||i|OP |nl||uqe|, EQ|ng| |uqe| (|u|L#|i|REAL a, b) BOOL : |g|? 0 50429. a |le| b |and| b |le| a ;|r| * 0 50430. |pb1|d)|ts1||i|OP |nl||ne|, /|uqe|, NE|ng| |uqe| (|u|L#|i|REAL a, b) * 0 50431. BOOL : |g||not| (a |uqe| b) ;|r| * 0 50432. |pb1|e)|ts1||i|OP |nl||sge|, |sgt||uqe|, GE|ng| |uqe| (|u|L#|i|REAL a, b) BOOL : |g|? 0 50433. b |le| a ;|r| * 0 50434. |pb1|f)|ts1||i|OP |nl||sgt|, GT|ng| |uqe| (|u|L#|i|REAL a, b) BOOL : |g|? 0 50435. b |lt| a ;|r| * 0 50436. |pb1|g)|ts1||i|OP |mi| |uqe| (|u|L#|i|REAL a, b) |u|L#|i|REAL : |g|~J~J the value of |ap|a|ap| * 0 50437. minus|r| |co|2.1.3.1.e|cc| |i|that of |ap|b|ap| ~J~J ;|r| * 0 50438. |pb1|h)|ts1||i|OP |mi| |uqe| (|u|L#|i|REAL a) |u|L#|i|REAL : |g||u|L#|i|0 |mi| a ;|r| * 0 50439. |pb1|i)|ts1||i|OP + |uqe| (|u|L#|i|REAL a, b) |u|L#|i|REAL : |g|a |mi| |mi| b ;|r| * 0 50440. |pb1|j)|ts1||i|OP + |uqe| (|u|L#|i|REAL a) |u|L#|i|REAL : |g|a ;|r| * 0 50441. |pb1|k)|ts1||i|OP ABS |uqe| (|u|L#|i|REAL a) |u|L#|i|REAL : |g|(a |lt| |u|L#|i|0 * 0 50442. |#|mi| a | a) ;|r| * 0 50443. |pb1|l)|ts1||i|OP |nl||sx|, *|ng| |uqe| (|u|L#|i|REAL a, b) |u|L#|i|REAL : |g|~J~J the value of * 0 50444. |ap|a|ap| times|r| |co|2.1.3.1.e|cc| |i|that of |ap|b|ap| ~J~J ;|r| * 0 50445. |pb1|m)|ts1||i|OP / |uqe| (|u|L#|i|REAL a, b) |u|L#|i|REAL : |g|~J~J the value of * 0 50446. |ap|a|ap| divided by|r| |co|2.1.3.1.e|cc| |i|that of |ap|b|ap| ~J~J ;|r| * 0 50447. |pb1|n)|ts1||i|OP LENG |uqe| (|u|L#|i|REAL a) LONG#|u|L#|i|REAL : |g|~J~J the long#|u|l|i|#? 0 50448. real value lengthened from|r| |co|2.1.3.1.e|cc| |i|the value of |ap|a|ap| ~J~J ;|r| * 0 50449. |pb1|o)|ts1||i|OP SHORTEN |uqe| (LONG#|u|L#|i|REAL a) |u|L#|i|REAL : |g|~J~J if * 0 50450. ABS a |le| LENG |u|l#|i|max#real, then a |u|l#|i|real value |ap|v|ap| such * 0 50451. that, for any |u|l#|i|real value |ap|w|ap|, * 0 50452. |e|ABS (LENG v |mi| a) |le| ABS (LENG w * 0 50453. |mi| a) ~J~J ;|r| * 0 50454. |pb1|p)|ts1||i|OP ROUND |uqe| (|u|L#|i|REAL a) |u|L#|i|INT : |g|~J~J a |u|l#|i|? 0 50455. integral value, if one exists, which is widenable to|r| |co|2.1.3.1.e|cc| |i|a |u|l#|i|? 0 50456. real value differing by not more than one|r|-|i|half from the value of * 0 50457. |ap|a|ap| ~J~J ;|r| * 0 50458. |pb1|q)|ts1||i|OP SIGN |uqe| (|u|L#|i|REAL a) INT#:#? 0 50459. |g|(a |sgt| |u|L#|i|0 | 1 |:#a |lt| |u|L#|i|0 |#|mi|#1 |#0)#;|r| * 0 50460. |pb1|r)|ts1||i|OP |nl|ENTIER, |flr||ng| |uqe| (|u|L#|i|REAL a) |u|L#|i|INT : * 0 50461. |pc|BEGIN |u|L#|i|INT j * 0 50462. |bec| |u|L#|i|0; |e|WHILE j#|lt|#a DO j |bec| j + |u|L#|i|1 OD; |e|WHILE j#|sgt|#a DO * 0 50463. j |bec| j |mi| |u|L#|i|1 OD; |e|j |pc|END ;|r| * 0 50464. |pb1|s)|ts1||i|OP |nl||tip|, +|sx|, +*, I|ng| |uqe| (|u|L#|i|REAL a, b) |u|L#|i|COMPL : |g|(a, b) ;|r| * 0 50465. * 0 50466. |h|10.2.3.5. Operations on arithmetic operands * 0 50467. * 0 50468. |pb1|a)|ts1||i|OP |u|P |i||uqe| (|u|L#|i|REAL a, |u|L#|i|INT b) |u|L#|i|? 0 50469. REAL : |g|a |u|P |i||u|L#|i|REAL (b) ;|r| * 0 50470. |pb1|b)|ts1||i|OP |u|P |i||uqe| (|u|L#|i|INT a, |u|L#|i|REAL b) |u|L#|i|REAL * 0 50471. : |g||u|L#|i|REAL (a) |u|P |i|b ;|r| * 0 50472. |pb1|c)|ts1||i|OP |u|R |i||uqe| (|u|L#|i|REAL a, |u|L#|i|INT b) BOOL : |g|? 0 50473. a |u|R#L#|i|REAL (b) ;|r| * 0 50474. |pb1|d)|ts1||i|OP |u|R |i||uqe| (|u|L#|i|INT a, |u|L#|i|REAL b) BOOL : |g|? 0 50475. |u|L#|i|REAL (a) |u|R |i|b ;|r| * 0 50476. |pb1|e)|ts1||i|OP |nl||tip|, +|sx|, +*, I|ng| |uqe| (|u|L#|i|REAL a, |u|L#|i|INT b) |u|L#|i|COMPL : |g|? 0 50477. (a, b) ;|r| * 0 50478. |pb1|f)|ts1||i|OP |nl||tip|, +|sx|, +*, I|ng| |uqe| (|u|L#|i|INT a, |u|L#|i|REAL b) |u|L#|i|COMPL : |g|? 0 50479. (a, b) ;|r| * 0 50480. |pb1|g)|ts1||i|OP |nl||up|, **, UP|ng| |uqe| (|u|L#|i|REAL a, INT b) |u|L#|i|REAL : * 0 50481. |e|(|u|L#|i|? 0 50482. REAL p |bec| |u|L#|i|1; TO ABS b DO p |bec| p |sx| a OD; (b |sge| 0 | p | |u|L#|i|? 0 50483. 1 / p)) ;|r| * 0 50484. * 0 50485. |h|10.2.3.6. Operations on character operands * 0 50486. * 0 50487. |pb1|a)|ts1||i|OP |u|R |i||uqe| (CHAR a, b) BOOL : |g|ABS a |u|R |i|ABS b ; * 0 50488. |r||co|10.2.1.n|cc| * 0 50489. |pb1|b)|ts1||i|OP + |uqe| (CHAR a, b) STRING : |g|(a, b) ;|r| * 0 50490. * 0 50491. |h|10.2.3.7. Operations on complex operands * 0 50492. * 0 50493. |pb1|a)|ts1||i|OP RE |uqe| (|u|L#|i|COMPL a) |u|L#|i|REAL : |g|re OF a ;|r| * 0 50494. |pb1|b)|ts1||i|OP IM |uqe| (|u|L#|i|COMPL a) |u|L#|i|REAL : |g|im OF a ;|r| * 0 50495. |pb1|c)|ts1||i|OP ABS |uqe| (|u|L#|i|COMPL a) |u|L#|i|REAL : |g||u|l#|i|sqrt * 0 50496. (RE a |up| 2 + IM a |up| 2) ;|r| * 0 50497. |pb1|d)|ts1||i|OP ARG |uqe| (|u|L#|i|COMPL a) |u|L#|i|REAL : * 0 50498. |pc|IF |u|L#|i|REAL re |uqe| RE a, im |uqe| IM a; * 0 50499. |e|re |ne| |u|L#|i|0 |or| im |ne| |u|L#|i|0 * 0 50500. |pc|THEN IF ABS re |sgt| ABS im * 0 50501. |pd|THEN |u|l#|i|arctan (im / re) + |g||u|l#|i|pi / |u|L#|i|2 |sx| * 0 50502. |e|(im#|lt|#|u|L#|i|0#|#SIGN#re#|mi|#1|g||#1#|mi|#SIGN#re)? 0 50503. |pd|ELSE |mi||u|l#|i|arctan (re / im) + |g||u|l#|i|pi / |u|L#|i|2 |sx| SIGN im * 0 50504. |pd|FI|pc|FI ;|r| * 0 50505. |pb1|e)|ts1||i|OP CONJ |uqe| (|u|L#|i|COMPL a) |u|L#|i|COMPL : |g|RE a |tip| |mi|IM a * 0 50506. ;|r| * 0 50507. |pb1|f)|ts1||i|OP |nl||uqe|, EQ|ng| |uqe| (|u|L#|i|COMPL a, b) BOOL : |g|RE a |uqe| RE b |and| IM a |uqe| * 0 50508. IM b ;|r| * 0 50509. |pb1|g)|ts1||i|OP |nl||ne|, /|uqe|, NE|ng| |uqe| (|u|L#|i|COMPL a, b) BOOL : |g||not| (a |uqe| b) ;|r| * 0 50510. |pb1|h)|ts1||i|OP |mi| |uqe| (|u|L#|i|COMPL a, b) |u|L#|i|COMPL : |g|(RE a |mi| RE b) * 0 50511. |tip| (IM a |mi| IM b) ;|r| * 0 50512. |pb1|i)|ts1||i|OP |mi||uqe| (|u|L#|i|COMPL a) |u|L#|i|COMPL : |g||mi|#RE a |tip| |mi|IM a * 0 50513. ;|r| * 0 50514. |pb1|j)|ts1||i|OP + |uqe| (|u|L#|i|COMPL a, b) |u|L#|i|COMPL : |g|(RE a + RE b) * 0 50515. |tip| (IM a + IM b) ;|r| * 0 50516. |pb1|k)|ts1||i|OP + |uqe| (|u|L#|i|COMPL a) |u|L#|i|COMPL : |g|a ;|r| * 0 50517. |pb1|l)|ts1||i|OP |nl||sx|, *|ng| |uqe| (|u|L#|i|COMPL a, b) |u|L#|i|COMPL :|g| * 0 50518. |e|(RE a |sx| RE b * 0 50519. |mi| IM a |sx| IM b) |tip| (RE a |sx| IM b + IM a |sx| RE b) ;|r| * 0 50520. |pb1|m)|ts1||i|OP / |uqe| (|u|L#|i|COMPL a, b) |u|L#|i|COMPL :|g| * 0 50521. |e|(|u|L#|i|REAL d |uqe| RE (b |sx| CONJ b); |u|L#|i|COMPL n |uqe| a |sx| CONJ b; * 0 50522. (RE n / d) |tip| (IM n / d)) ;|r| * 0 50523. |pb1|n)|ts1||i|OP LENG |uqe| (|u|L#|i|COMPL a) LONG#|u|L#|i|COMPL : * 0 50524. LENG RE a |tip| LENG IM a ;|r| * 0 50525. |pb1|o)|ts1||i|OP SHORTEN |uqe| (LONG#|u|L#|i|COMPL a) |u|L#|i|COMPL : * 0 50526. |e|SHORTEN RE a |tip| SHORTEN IM a ;|r| * 0 50527. |pb1|p)|ts1||i|OP |u|P |i||uqe| (|u|L#|i|COMPL a, |u|L#|i|INT b) |u|L#|i|COMPL : * 0 50528. |g|a |u|P |i||u|L#|i|COMPL (b) ;|r| * 0 50529. |pb1|q)|ts1||i|OP |u|P |i||uqe| (|u|L#|i|COMPL a, |u|L#|i|REAL b) |u|L#|i|? 0 50530. COMPL : |g|a |u|P |i||u|L#|i|COMPL (b) ;|r| * 0 50531. |pb1|r)|ts1||i|OP |u|P |i||uqe| (|u|L#|i|INT a, |u|L#|i|COMPL b) |u|L#|i|COMPL : * 0 50532. |g||u|L#|i|COMPL (a) |u|P |i|b ;|r| * 0 50533. |pb1|s)|ts1||i|OP |u|P |i||uqe| (|u|L#|i|REAL a, |u|L#|i|COMPL b) |u|L#|i|COMPL : * 0 50534. |g||u|L#|i|COMPL (a) |u|P |i|b ;|r| * 0 50535. |pb1|t)|ts1||i|OP |nl||up|, **, UP|ng| |uqe| (|u|L#|i|COMPL a, INT b) |u|L#|i|COMPL : |g|? 0 50536. |e|(|u|L#|i|COMPL p |bec| |u|L#|i|1; TO ABS b DO p |bec| p |sx| a OD; (b |sge| 0 | * 0 50537. p | |u|L#|i|1 / p)) ;|r| * 0 50538. |pb1|u)|ts1||i|OP |u|E |i||uqe| (|u|L#|i|COMPL a, |u|L#|i|INT b) BOOL : |g|a * 0 50539. |u|E#L#|i|COMPL (b) ;|r| * 0 50540. |pb1|v)|ts1||i|OP |u|E |i||uqe| (|u|L#|i|COMPL a, |u|L#|i|REAL b) BOOL : |g|? 0 50541. a |u|E |i||u|L#|i|COMPL (b) ;|r| * 0 50542. |pb1|w)|ts1||i|OP |u|E |i||uqe| (|u|L#|i|INT a, |u|L#|i|COMPL b) BOOL : |g|b * 0 50543. |u|E |i|a ;|r| * 0 50544. |pb1|x)|ts1||i|OP |u|E |i||uqe| (|u|L#|i|REAL a, |u|L#|i|COMPL b) BOOL : |g|? 0 50545. b |u|E |i|a ;|r| * 0 50546. * 0 50547. |h|10.2.3.8. Bits and associated operations * 0 50548. * 0 50549. |pb1|a)|ts1||i|OP |nl||uqe|, EQ|ng| |uqe| (|u|L#|i|BITS a, b) BOOL : |g| * 0 50550. |pc|BEGIN BOOL c; * 0 50551. |pd|FOR i TO |u|l#|i|bits#width * 0 50552. |pd|WHILE c |bec| (|u|l f |i|OF a) |so|i|sc| |uqe| (|u|l f |i|OF b) |so|i|sc|? 0 50553. |pd|DO SKIP OD; * 0 50554. |xc|c * 0 50555. |xs|END ;|r| * 0 50556. |pb1|b)|ts1||i|OP |nl||ne|, /|uqe|, NE|ng| |uqe| (|u|L#|i|BITS a, b) BOOL : |g||not| (a#|uqe|#b)#;|r| * 0 50557. |pb1|c)|ts1||i|OP |nl||or|, OR|ng| |uqe| (|u|L#|i|BITS a, b) |u|L#|i|BITS : |g| * 0 50558. |pc|BEGIN |u|L#|i|BITS c; * 0 50559. |pd|FOR i TO |u|l#|i|bits#width * 0 50560. |pd|DO (|u|l#f |i|OF c) |so|i|sc| |bec| * 0 50561. (|u|l#f |i|OF a) |so|i|sc| |or| (|u|l#f |i|OF b) |so|i|sc| OD; * 0 50562. |xc|c * 0 50563. |pc|END ;|r|? 0 50564. |pb1|d)|ts1||i|OP |nl||and|, &, AND|ng| |uqe| (|u|L#|i|BITS a, b) |u|L#|i|BITS :|g| * 0 50565. |pc|BEGIN |u|L#|i|BITS c; * 0 50566. |pd|FOR i TO |u|l#|i|bits#width * 0 50567. |pd|DO (|u|l#f |i|OF c) |so|i|sc| |bec| (|u|l#f |i|OF a) |so|i|sc| |and| * 0 50568. (|u|l#f |i|OF b) |so|i|sc| OD; * 0 50569. |xc|c * 0 50570. |pc|END ;|r| * 0 50571. |pb1|e)|ts1||i|OP |nl||le|, |lt||uqe|, LE|ng| |uqe| (|u|L#|i|BITS a, b) * 0 50572. BOOL : |g|(a |or| b) |uqe| b ;|r| * 0 50573. |pb1|f)|ts1||i|OP |nl||sge|, |sgt||uqe|, GE|ng| |uqe| (|u|L#|i|BITS a, b) * 0 50574. BOOL : |g|b |le| a ;|r| * 0 50575. |pb1|g)|ts1||i|OP |nl||up|, UP, SHL|ng| |uqe| (|u|L#|i|BITS a, INT b) * 0 50576. |u|L#|i|BITS :|g| * 0 50577. |pc|IF ABS b |le| |u|l#|i|bits#width * 0 50578. |pc|THEN |u|L#|i|BITS c |bec| a; * 0 50579. |pd|TO ABS b * 0 50580. |pd|DO IF b |sgt| 0 THEN * 0 50581. |pe|FOR i FROM 2 TO |u|l#|i|bits#width * 0 50582. |pe|DO (|u|l#f |i|OF c) |so|i |mi| 1|sc| |bec| (|u|l#f |i|OF c) |so|i|sc| OD; * 0 50583. |pe|(|u|l#f |i|OF c) |so||u|l#|i| bits#width|sc| |bec| FALSE * 0 50584. |pd|ELSE * 0 50585. |pe|FOR i FROM |u|l#|i|bits#width BY |mi|1 TO 2 * 0 50586. |pe|DO (|u|l#f |i|OF c) |so|i|sc| |bec| (|u|l#f |i|OF c) |so|i |mi| 1|sc| OD; * 0 50587. |pe|(|u|l#f |i|OF c) |so|1|sc| |bec| FALSE * 0 50588. |xc|FI OD; * 0 50589. |e|c |pc|FI ;|r| * 0 50590. |pb1|h)|ts1||i|OP |nl||dwn|, DOWN, SHR|ng| |uqe| (|u|L#|i|BITS x, INT n) * 0 50591. |u|L#|i|BITS : |g|x |up|#|mi| n ;|r| * 0 50592. |pb1|i)|ts1||i|OP ABS |uqe| (|u|L#|i|BITS a) |u|L#|i|INT : |g|? 0 50593. |pc|BEGIN |u|L#|i|INT c |bec| |u|L#|i|0; |e|FOR i TO |u|l#|i|bits#width * 0 50594. |e|DO c |bec| |u|L#|i|2 |sx| c + |u|K |i|ABS (|u|l#f |i|OF a) |so|i|sc| OD; |e|c |pc|END ;|r|? 0 50595. |pb1|j)|ts1||i|OP BIN * 0 50596. |uqe| (|u|L#|i|INT a) |u|L#|i|BITS :|g| * 0 50597. |pc|IF a |sge| |u|L#|i|0 * 0 50598. |pc|THEN |u|L#|i|INT b |bec| a; * 0 50599. |u|L#|i|BITS c;|e|FOR i FROM |u|l#|i|bits#width BY |mi| 1 TO 1 |e|DO * 0 50600. (|u|l#f|i| OF c) |so|i|sc| |bec| ODD b; b |bec| b |sq| |u|L#|i|2 OD; * 0 50601. |e|c |pc|FI ;|r| * 0 50602. |pb1|k)|ts1||i|OP |nl|ELEM, |box||ng| |uqe| (INT a, |u|L#|i|BITS b) BOOL : |g|? 0 50603. (|u|l#f|i| OF b) |so|a|sc| ;|r| * 0 50604. |pb1|l)|ts1||i|PROC |u|l#|i|bits#pack |uqe| (|so||thin||sc| BOOL a) |u|L#|i|BITS : |g|? 0 50605. |pc|IF INT n |uqe| |clg| a |so||at| 1|sc|; * 0 50606. |e|n |le| |u|l#|i|bits#width * 0 50607. |pc|THEN |u|L#|i|BITS c; * 0 50608. |e|FOR i TO |u|l#|i|bits#width |pd|DO * 0 50609. (|u|l#f|i| OF c) |so|i|sc| |bec| |g| * 0 50610. |pe|(i |le| |u|l#|i|bits#width |mi| n | FALSE ||g| a |so||at| 1|sc| |so|i |mi| |u|l#|i|bits#width + n|sc|) |xc|OD; * 0 50611. |e|c |pc|FI ;|r| * 0 50612. |pb1|m)|ts1||i|OP |nl||not|, |til|, NOT|ng| |uqe| (|u|L#|i|BITS a) |u|L#|i|BITS : |g|? 0 50613. |pc|BEGIN |u|L#|i|BITS c; * 0 50614. |pd|FOR i TO |u|l#|i|bits#width DO (|u|l#f|i| OF c) |so|i|sc| * 0 50615. |bec| |not| (|u|l#f|i| OF a) |so|i|sc| OD; * 0 50616. |pd|c * 0 50617. |pc|END ;|r| * 0 50618. |pb1|n)|ts1||i|OP LENG |uqe| (|u|L#|i|BITS a) LONG#|u|L#|i|BITS : |g| * 0 50619. long#|u|l#|i|bits#pack (a) ;|r| * 0 50620. |pb1|o)|ts1||i|OP SHORTEN |uqe| (LONG#|u|L#|i|BITS a) |u|L#|i|BITS : |g|? 0 50621. |u|l#|i|bits#pack (|so||thin||sc| BOOL (a)|g| |so|long#|u|l#|i|bits#width |mi| * 0 50622. |u|l#|i|bits#width + 1 : |sc|) ;|r| * 0 50623. * 0 50624. |h|10.2.3.9. Bytes and associated operations * 0 50625. * 0 50626. |pb1|a)|ts1||i|OP |u|R |i||uqe| (|u|L#|i|BYTES a, b) BOOL : |g|STRING (a) * 0 50627. |u|R |i|STRING (b) ;|r| * 0 50628. |pb1|b)|ts1||i|OP |nl|ELEM, |box||ng| |uqe| (INT a, |u|L#|i|BYTES b) CHAR : |g|(|u|l#f |i|OF b) * 0 50629. |so|a|sc| ;|r| * 0 50630. |pb1|c)|ts1||i|PROC |u|l#|i|bytes#pack |uqe| (STRING a) |u|L#|i|BYTES : * 0 50631. |pc|IF INT n |uqe| |clg| a |so||at| 1|sc|; * 0 50632. |e|n |le| |u|l#|i|bytes#width * 0 50633. |pc|THEN |u|L#|i|BYTES c; * 0 50634. |e|FOR i TO |u|l#|i|bytes#width * 0 50635. |pd|DO (|u|l#f |i|OF c) |so|i|sc| |bec| * 0 50636. (i |le| n | a |so||at|#1|sc| |so|i|sc| | null character) OD; * 0 50637. |xc|c * 0 50638. |pc|FI ;|r| * 0 50639. |pb1|d)|ts1||i|OP LENG |uqe| (|u|L#|i|BYTES a) LONG#|u|L#|i|BYTES : |g|? 0 50640. long#|u|l#|i|bytes#pack (a) ;|r| * 0 50641. |pb1|e)|ts1||i|OP SHORTEN |uqe| (LONG#|u|L#|i|BYTES a) |u|L#|i|BYTES : |g|? 0 50642. |u|l#|i|bytes#pack (STRING (a) |so| : |u|l#|i|bytes#width|sc|) ;|r| * 0 50643. * 0 50644. |h|10.2.3.10. Strings and associated operations * 0 50645. * 0 50646. |pb1|a)|ts1||i|OP |nl||lt|, LT|ng| |uqe| (STRING a, b) BOOL : * 0 50647. |pc|BEGIN INT m |uqe| |clg| a |so||at| 1|sc|, n |uqe| |clg| b |so||at| 1|sc|; * 0 50648. INT c |bec| 0; * 0 50649. |pd|FOR i TO (m |lt| n | m | n)? 0 50650. |pd|WHILE (c |bec| ABS a |so||at| 1|sc| |so|i|sc| |mi| ABS b |so||at| 1|sc| |so|i|sc|) |uqe| 0 * 0 50651. |pd|DO SKIP OD; * 0 50652. |xc|(c |uqe| 0 | m |lt| n |and| n |sgt| 0 | c |lt| 0) * 0 50653. |pc|END ;|r| * 0 50654. |pb1|b)|ts1||i|OP |nl||le|, |lt||uqe|, LE|ng| |uqe| (STRING a, b) BOOL : |g||not| (b |lt| a) ;|r| * 0 50655. |pb1|c)|ts1||i|OP |nl||uqe|, EQ|ng| |uqe| (STRING a, b) BOOL : |g|a |le| b |and| b |le| a ;|r| * 0 50656. |pb1|d)|ts1||i|OP |nl||ne|, /|uqe|, NE|ng| |uqe| (STRING a, b) BOOL : |g||not| (a |uqe| b) ;|r| * 0 50657. |pb1|e)|ts1||i|OP |nl||sge|, |sgt||uqe|, GE|ng| |uqe| (STRING a, b) BOOL : |g|b |le| a ;|r| * 0 50658. |pb1|f)|ts1||i|OP |nl||sgt|, GT|ng| |uqe| (STRING a, b) BOOL : |g|b |lt| a ;|r| * 0 50659. |pb1|g)|ts1||i|OP |u|R |i||uqe| (STRING a, CHAR b) BOOL : |g|a |u|R |i|STRING (b) ;|r| * 0 50660. |pb1|h)|ts1||i|OP |u|R |i||uqe| (CHAR a, STRING b) BOOL : |g|STRING (a) |u|R |i|b ;|r| * 0 50661. |pb1|i)|ts1||i|OP + |uqe| (STRING a, b) STRING : * 0 50662. |pc|(INT m |uqe| (INT la |uqe| |clg| a |so||at| 1|sc|; la |lt| 0 | 0 | la), * 0 50663. |pd|n |uqe| (INT lb |uqe| |clg| b |so||at| 1|sc|; lb |lt| 0 | 0 | lb); * 0 50664. |pc||so|1 : m + n|sc| CHAR c; * 0 50665. |pc|c |so|1 : m|sc| |bec| a |so||at| 1|sc|;#|g|c |so|m + 1 : m + n|sc| |bec| b |so||at| 1|sc|; c) ;|r| * 0 50666. |pb1|j)|ts1||i|OP + |uqe| (STRING a, CHAR b) STRING : |g|a + STRING (b) ;|r| * 0 50667. |pb1|k)|ts1||i|OP + |uqe| (CHAR a, STRING b) STRING : |g|STRING (a) + b ;|r| * 0 50668. |pb1|l)|ts1||i|OP |nl||sx|, *|ng| |uqe| (STRING a, INT b) STRING : |g|? 0 50669. (STRING c; TO b DO c |bec| c + a OD; c) ;|r| * 0 50670. |pb1|m)|ts1||i|OP |nl||sx|, *|ng| |uqe| (INT a, STRING b) STRING : |g|b |sx| a ;|r| * 0 50671. |pb1|n)|ts1||i|OP |nl||sx|, *|ng| |uqe| (CHAR a, INT b) STRING : |g|? 0 50672. STRING (a) |sx| b ;|r| * 0 50673. |pb1|o)|ts1||i|OP |nl||sx|, *|ng| |uqe| (INT a, CHAR b) STRING : |g|b |sx| a ;|r| * 0 50674. |pa||co|The operations defined in a, g and h imply that if * 0 50675. |i|ABS#"a"#|lt|#ABS#"b"|r|, then |i|""#|lt|#"a"|r|#; |i|"a"#|lt|#"b"|r|#; * 0 50676. |i|"aa"#|lt|#"ab"|r|#; |i|"aa"#|lt|#"ba"|r|#; |i|"ab"#|lt|#"b"|r| * 0 50677. and |i|"ab"#|lt|#"ba"|r|#.|cc| * 0 50678. * 0 50679. |h|10.2.3.11. Operations combined with assignations * 0 50680. * 0 50681. |pb1|a) |ts1||i|OP |nl|MINUSAB, |mi||bec||ng| |uqe| (REF |u|L#|i|INT a, * 0 50682. |u|L#|i|INT b) REF |u|L#|i|INT :|g| a |bec| a |mi| b ;|r|? 0 50683. |pb1|b)|ts1||i|OP |nl|MINUSAB, |mi||bec||ng| |uqe| (REF |u|L#|i|REAL a, |u|L#|i|REAL b) REF |u|L#|i|? 0 50684. REAL :|g| a |bec| a |mi| b ;|r| * 0 50685. |pb1|c)|ts1||i|OP |nl|MINUSAB, |mi||bec||ng| |uqe| (REF |u|L#|i|COMPL a, |u|L#|i|COMPL b) REF |u|L#|i|? 0 50686. COMPL :|g| a |bec| a |mi| b ;|r| * 0 50687. |pb1|d)|ts1||i|OP |nl|PLUSAB, +|bec||ng| |uqe| (REF |u|L#|i|INT a, |u|L#|i|INT b) REF |u|L#|i|INT * 0 50688. :|g| a |bec| a + b ;|r| * 0 50689. |pb1|e)|ts1||i|OP |nl|PLUSAB, +|bec||ng| |uqe| (REF |u|L#|i|REAL a, |u|L#|i|REAL b) REF |u|L#|i|? 0 50690. REAL :|g| a |bec| a + b ;|r| * 0 50691. |pb1|f)|ts1||i|OP |nl|PLUSAB, +|bec||ng| |uqe| (REF |u|L#|i|COMPL a, |u|L#|i|COMPL b) REF |u|L#|i|? 0 50692. COMPL :|g| a |bec| a + b ;|r| * 0 50693. |pb1|g)|ts1||i|OP |nl|TIMESAB, |sx||bec|, *|bec||ng| |uqe| (REF |u|L#|i|INT a, * 0 50694. |u|L#|i|INT b) REF |u|L#|i|INT :|g| a |bec| a |sx| b ;|r| * 0 50695. |pb1|h)|ts1||i|OP |nl|TIMESAB, |sx||bec|, *|bec||ng| |uqe| (REF |u|L#|i|REAL a, |u|L#|i|REAL b) REF |u|L#|i|? 0 50696. REAL :|g| a |bec| a |sx| b ;|r| * 0 50697. |pb1|i) |ts1||i|OP |nl|TIMESAB, |sx||bec|, *|bec||ng| |uqe| (REF |u|L#|i|COMPL a, |u|L#|i|COMPL b) * 0 50698. REF |u|L#|i|COMPL :|g| a |bec| a |sx| b ;|r| * 0 50699. |pb1|j)|ts1||i|OP |nl|OVERAB, |sq||bec|, %|bec||ng| |uqe| (REF |u|L#|i|INT a, |u|L#|i|INT b) REF |u|L#|i|? 0 50700. INT :|g| a |bec| a |sq| b ;|r| * 0 50701. |pb1|k)|ts1||i|OP |nl|MODAB,#|sq||sx||bec|,#|sq|*|bec|,#%|sx||bec|,#%*|bec||ng| |uqe| * 0 50702. |e|(REF |u|L#|i|INT a, |u|L#|i|INT b) REF |u|L#|i|INT :|g| a |bec| a |sq||sx| b ;|r|? 0 50703. |pb1|l)|ts1||i|OP |nl|DIVAB, /|bec||ng| |uqe| (REF |u|L#|i|REAL a, |u|L#|i|REAL b) REF |u|L#|i|? 0 50704. REAL :|g| a |bec| a / b ;|r| * 0 50705. |pb1|m)|ts1||i|OP |nl|DIVAB, /|bec||ng| |uqe| (REF |u|L#|i|COMPL a, |u|L#|i|COMPL b) REF |u|L#|i|? 0 50706. COMPL :|g| a |bec| a / b ;|r| * 0 50707. |pb1|n)|ts1||i|OP |u|Q |i||uqe| (REF |u|L#|i|REAL a, |u|L#|i|INT b) REF |u|L#|i|? 0 50708. REAL :|g| a |u|Q |i||u|L#|i|REAL (b) ;|r| * 0 50709. |pb1|o)|ts1||i|OP |u|Q |i||uqe| (REF |u|L#|i|COMPL a, |u|L#|i|INT b) REF * 0 50710. |u|L#|i|COMPL :|g| a |u|Q |i||u|L#|i|COMPL (b) ;|r| * 0 50711. |pb1|p)|ts1||i|OP |u|Q |i||uqe| (REF |u|L#|i|COMPL a, |u|L#|i|REAL b) REF |u|L#|i|COMPL :|g| a * 0 50712. |u|Q#L#|i|COMPL (b) ;|r|? 0 50713. |pb1|q)|ts1||i|OP |nl|PLUSAB, +|bec||ng| |uqe| (REF STRING a, STRING b) REF STRING :|g| * 0 50714. a#|bec|#a + b ;|r| * 0 50715. |pb1|r)|ts1||i|OP |nl|PLUSTO, +|uqe|:|ng| |uqe| (STRING a, REF STRING b) REF STRING :|g| * 0 50716. b#|bec|#a + b ;|r| * 0 50717. |pb1|s)|ts1||i|OP |nl|PLUSAB, +|bec||ng| |uqe| (REF STRING a, CHAR b) REF STRING :|g| a +|bec| STRING (b) ;|r| * 0 50718. |pb1|t)|ts1||i|OP |nl|PLUSTO, +|uqe|:|ng| |uqe| (CHAR a, REF STRING b) REF STRING :|g| STRING (a) +|uqe|: b ;|r| * 0 50719. |pb1|u)|ts1||i|OP |nl|TIMESAB, |sx||bec|, *|bec||ng| |uqe| (REF STRING a, INT b) * 0 50720. REF STRING :|g| a#|bec|#a#|sx|#b#;|r| * 0 50721. * 0 50722. |h|10.2.3.12. Standard mathematical constants and functions * 0 50723. * 0 50724. |pb1|a)|ts1||i||u|L#|i|REAL |u|l#|i|pi |uqe| ~J~J a |u|l#|i|real value close * 0 50725. to |pii| ; see |u|m|i|ath. of |u|c|i|omp. v. 16, 1962, pp. 80|r|-|i|99 ~J~J ;|r| * 0 50726. |pb1|b)|ts1||i|PROC |u|l#|i|sqrt |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|? 0 50727. ~J~J if x |sge| |u|L#|i|0, a |u|l#|i|real value close to the square root of * 0 50728. |ap|x|ap| ~J~J ;|r| * 0 50729. |pb1|c)|ts1||i|PROC |u|l#|i|exp |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|? 0 50730. ~J~J a |u|l#|i|real value, if one exists, close to the exponential function * 0 50731. of |ap|x|ap| ~J~J ;|r| * 0 50732. |pb1|d)|ts1||i|PROC |u|l#|i|ln |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|~J~J a * 0 50733. |u|l#|i|real value, if one exists, close to the natural logarithm of |ap|x|ap| ~J~J ;|r| * 0 50734. |pb1|e)|ts1||i|PROC |u|l#|i|cos |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|? 0 50735. ~J~J a |u|l#|i|real value close to the cosine of |ap|x|ap| ~J~J ;|r| * 0 50736. |pb1|f)|ts1||i|PROC |u|l#|i|arccos |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|? 0 50737. ~J~J if ABS#x#|le|#|u|L#|i|1, a |u|l#|i|real value close to the inverse * 0 50738. cosine of |ap|x|ap|, |u|L#|i|0#|le|#|u|l#|i|arccos#(x)#|le|#|u|l#|i|pi ~J~J ;|r| * 0 50739. |pb1|g)|ts1||i|PROC |u|l#|i|sin |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|? 0 50740. ~J~J a |u|l#|i|real value close to the sine of |ap|x|ap| ~J~J ;|r| * 0 50741. |pb1|h)|ts1||i|PROC |u|l#|i|arcsin |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|? 0 50742. ~J~J if ABS#x#|le|#|u|L#|i|1, a |u|l#|i|real value close to the inverse * 0 50743. sine of |ap|x|ap|, ABS |u|l#|i|arcsin#(x)#|le|#|u|l#|i|pi#/#|u|L#|i|2 ~J~J ;|r| * 0 50744. |pb1|i)|ts1||i|PROC |u|l#|i|tan |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|? 0 50745. ~J~J a |u|l#|i|real value, if one exists, close to the tangent of |ap|x|ap| ~J~J * 0 50746. ;|r| * 0 50747. |pb1|j)|ts1||i|PROC |u|l#|i|arctan |uqe| (|u|L#|i|REAL x) |u|L#|i|REAL : |g|? 0 50748. ~J~J a |u|l#|i|real value close to the inverse tangent of |ap|x|ap|, ABS#|u|l#|i|? 0 50749. arctan#(x)#|le|#|u|l#|i|pi#/#|u|L#|i|2 ~J~J ;|r| * 0 50750. |pb1|k)|ts1||i|PROC |u|l#|i|next#random |uqe| (REF |u|L#|i|INT a) |u|L#|i|REAL#: * 0 50751. |pc||j||ro|a |bec| ~J~J the next pseudo|r|-|i|random |u|l#|i|integral * 0 50752. value after |ap|a|ap| from a uniformly distributed sequence on the * 0 50753. interval |os||u|L#|i|0,#|u|l#|i|max#int|cs| ~J~J ; * 0 50754. |pc|~J~J the real value corresponding to |ap|a|ap| according to some mapping * 0 50755. of integral values |so||u|L#|i|0,#|u|l#|i|max#int|sc| into real * 0 50756. values |os||u|L#|i|0,#|u|L#|i|1) |r||co|i.e., such that |w|0#|le|#x#|lt|#1|cc||i| * 0 50757. such that the sequence of real values so produced preserves the * 0 50758. properties of * 0 50759. pseudo|r|-|i|randomness and uniform distribution of the * 0 50760. sequence of integral values ~J~J|rc| ;|r| * 0 50761. * 0 50762. |h|10.2.4. Synchronization operations * 0 50763. * 0 50764. |pa||j|The elaboration of a * 0 50765. |b|parallel-clause|r| |w|P|r| |co|3.3.1.c|cc| in an environ |w|E|r| is termed a "parallel action". * 0 50766. The elaboration of a * 0 50767. constituent |b|unit|r| of |w|P|r| in |w|E|r| * 0 50768. is termed a "process" of that parallel action. * 0 50769. |pa|Any elaboration |w|A|r| |co|in some * 0 50770. environ|cc| of either of the |b|ENCLOSED-clauses|r| * 0 50771. delineated by the |b|pragmats|r| |co|9.2.1.b|cc| |i|PR#start of incompatible * 0 50772. part#PR|r| and |i|PR#finish of incompatible part#PR|r| in the * 0 50773. forms 10.2.4.d and 10.2.4.e is * 0 50774. incompatible with |co|2.1.4.2.e|cc| any elaboration |w|B|r| of either of those * 0 50775. |b|ENCLOSED-clauses|r| if |w|A|r| and |w|B|r| are descendent actions * 0 50776. |co|2.1.4.2.b|cc| of different processes of some same parallel action. * 0 50777. |n||pb1|a)|ts1||i|MODE SEMA |uqe| STRUCT (REF INT |u|f|i|) ;|r| * 0 50778. |pb1|b)|ts1||i|OP LEVEL |uqe| (INT a) SEMA : * 0 50779. |ef|(SEMA s; |u|f|i| OF s |bec| HEAP INT |bec| a; s) ;|r| * 0 50780. |pb1|c)|ts1||i|OP LEVEL |uqe| (SEMA a) INT : |u|f|i| OF a ;|r| * 0 50781. |pb1|d)|ts1||i|OP DOWN |uqe| (SEMA edsger) VOID : * 0 50782. |pc|BEGIN REF INT dijkstra |uqe| |u|f|i| OF edsger;? 0 50783. |pd|WHILE * 0 50784. |pe|PR#start of incompatible part#PR * 0 50785. |pf|IF dijkstra |sge| 1 THEN dijkstra |mi||bec| 1; FALSE * 0 50786. |pf|ELSE * 0 50787. |xf||j|~J~J let |w|P|i| be the process such that the elaboration of this * 0 50788. pseudo-comment |r||co|10.1.3.Step#7|cc||i| is a descendent action * 0 50789. of |w|P|i|, but not of any other process descended from |w|P|i|; * 0 50790. the process |w|P|i| is halted |r||co|2.1.4.3.f|cc||i| ~J~J; * 0 50791. |e|TRUE * 0 50792. |xe|FI * 0 50793. |n||pe|PR#finish of incompatible part#PR * 0 50794. |xc|DO SKIP OD * 0 50795. |pc|END ;|r| * 0 50796. |pb1|e)|ts1||i|OP UP |uqe| (SEMA edsger) VOID : * 0 50797. |pc|PR#start of incompatible part#PR * 0 50798. |pd|IF REF INT dijkstra |uqe| |u|f |i|OF edsger; (dijkstra +|bec| 1) |sge| 1 * 0 50799. |pd|THEN * 0 50800. |e||j|~J~J all processes are resumed |r||co|2.1.4.3.g|cc||i| * 0 50801. which are halted because the integer referred to by the name yielded by |ap|dijkstra|ap| * 0 50802. was smaller than one ~J~J * 0 50803. |n||pd|FI |pc|PR#finish of incompatible part#PR ;|r| * 0 50804. |pa||j||co|For the use of |i|DOWN|r| and |i|UP|r|, see E.W. Dijkstra, * 0 50805. Cooperating Sequential Processes, contained in Programming Languages, * 0 50806. Genuys, F. (ed.), London etc., Academic Press, 1968; see also 11.12.|cc| * 0 51000. |np| * 0 51001. |h2|10.3. Transput declarations * 0 51002. * 0 51003. |pq||j||w||co|"So it does!" said Pooh. "It goes in!" * 0 51004. |pp|"So it does!" said Piglet. "And it comes out!" * 0 51005. |pp|"Doesn|ap|t it|qe|" said Eeyore. "It goes in and out like anything." * 0 51006. |ppp|Winnie|r|-|w|the|r|-|w|Pooh, |pr|A.A. Milne.|r||cc||qq|? 0 51007. |pb||j||co|Three ways of "transput" * 0 51008. (i.e., input and output) are provided by the |b|standard-prelude|r|, * 0 51009. viz., formatless transput (10.3.3), formatted transput (10.3.5) and * 0 51010. binary transput (10.3.6).|cc| * 0 51011. * 0 51012. |h|10.3.1. Books, channels and files * 0 51013. * 0 51014. |pa||j||co|"Books", "channels" and "files" model the transput * 0 51015. devices of the physical machine used in the implementation.|cc| * 0 51016. * 0 51017. |h|10.3.1.1. Books and backfiles * 0 51018. * 0 51019. |pb2||j||co|aa)|tp2|All information within the system is to be found in a number * 0 51020. of "books". A book (a) is a structured value including a field * 0 51021. |i|text|r| of the mode specified by |i|FLEXTEXT|r| (b) * 0 51022. which refers to information in the form of characters. * 0 51023. The |i|text|r| has a variable * 0 51024. number of pages, each of which may have a variable number of lines, each of which * 0 51025. may have a variable number of characters. * 0 51026. Positions within the |i|text|r| are indicated by * 0 51027. a page number, a line number and a character number. * 0 51028. The book includes a field |i|lpos|r| which indicates the "logical * 0 51029. end" of the book, i.e., the position up to which it has been filled with * 0 51030. information, a string |i|idf|r|, which identifies the book and * 0 51031. which may possibly include other information, e.g., * 0 51032. ownership, and fields |i|putting|r| and |i|users|r| which permit the * 0 51033. book to be opened (10.3.1.4.d) on more than one file simultaneously * 0 51034. only if putting is not possible on any of them. * 0 51035. |pb2|bb)|tp2|The books in the system are accessed via a chain of backfiles. * 0 51036. The chain of books available for * 0 51037. opening (10.3.1.4.dd) is referenced by |i|chainbfile|r|. A given book * 0 51038. may be referenced by more than one backfile on this chain, thus allowing simultaneous access * 0 51039. to a single book by more than one process (10.2.4). However such access can only be * 0 51040. for reading a book, since only one process may access a book such that it may be written * 0 51041. to (aa). The chain of books which * 0 51042. have been locked (10.3.1.4.o) is referenced by |i|lockedbfile|r|. * 0 51043. |pb2|cc)|tp2|Simultaneous access by more than one process to the chain of * 0 51044. backfiles is prevented by use of the semaphore |i|bfileprotect|r|, * 0 51045. which provides mutual exclusion between such processes. * 0 51046. |pb2|dd)|tp2|Books may be created (e.g., by input) or destroyed (e.g., * 0 51047. after output) by tasks (e.g., the operating system) * 0 51048. in the |b|system-task-list|r| (10.4.2), such books * 0 51049. being then added to or removed from the chain of backfiles.|cc| * 0 51050. |n||pb1|a)|ts1||i|MODE |ra| BOOK |uqe| * 0 51051. |pc|STRUCT |ro|FLEXTEXT text, * 0 51052. |e|POS lpos ~J logical end of book ~J, * 0 51053. |e|STRING idf ~J identification ~J, * 0 51054. |e|BOOL putting ~J#true#if#the#book#may#be#written#to#~J, * 0 51055. |e|INT users ~J#the#number#of#times#the#book#is#opened#~J|rc| ;|r| * 0 51056. |pb1|b)|ts1||i|MODE |ra| TEXT |uqe| REF |so||thin||sc| |so||thin||sc| |so||thin||sc| CHAR, * 0 51057. |p||ps||i|MODE |ra| FLEXTEXT |uqe| REF FLEX |so||thin||sc| FLEX |so||thin||sc| FLEX |so||thin||sc| CHAR ;|r| * 0 51058. |pb1|c)|ts1||i|MODE |ra| POS |uqe| STRUCT (INT p, l, c) ;|r| * 0 51059. |pb1|d)|ts1||i|PRIO |ra| BEYOND |uqe| 5, * 0 51060. |p||ps||i|OP BEYOND |uqe| (POS a, b) BOOL : * 0 51061. |pc|IF p OF a |lt| p OF b THEN FALSE |pc|ELIF p OF a |sgt| p OF b THEN TRUE|g| * 0 51062. |pc|ELIF l OF a |lt| l OF b THEN FALSE |pc|ELIF l OF a |sgt| l OF b THEN TRUE|g| * 0 51063. |pc|ELSE c OF a |sgt| c OF b |pc|FI ;|r| * 0 51064. |pb1|e)|ts1||i|MODE |ra| BFILE |uqe| STRUCT (REF BOOK book, REF BFILE next) ;|r| * 0 51065. |pb1|f)|ts1||i|REF BFILE |ra| chainbfile |bec| NIL ;|r| * 0 51066. |pb1|g)|ts1||i|REF BFILE |ra| lockedbfile |bec| NIL ;|r| * 0 51067. |pb1|h)|ts1||i|SEMA |ra| bfileprotect |uqe||g| * 0 51068. (SEMA s; |u|f|i| OF s |bec| |u|PRIM|i| INT#|bec|#1;#s)#;|r| * 0 51069. * 0 51070. |h|10.3.1.2. Channels * 0 51071. * 0 51072. |pb2||j||co|aa)|tp2|A "channel" corresponds to one or more * 0 51073. physical devices (e.g., a card reader, a card punch or * 0 51074. a line printer, or even to a set up in nuclear physics * 0 51075. the results of which are collected by the computer), * 0 51076. or to a filestore maintained by the operating * 0 51077. system. A channel * 0 51078. is a structured value whose fields are routines returning truth values * 0 51079. which determine the available methods of access to a book linked * 0 51080. via that channel. Since the methods of access to a book * 0 51081. may well depend on the book as well as on the channel (e.g., a * 0 51082. certain book may have been trapped so that it may be read, but not * 0 51083. written to), most of these properties depend on both the channel * 0 51084. and the book. These properties may be examined by use of the * 0 51085. environment enquiries provided for files (10.3.1.3.ff). Two * 0 51086. environment enquiries are provided for channels. These are: * 0 51087. |xi||bt||i|estab#possible|r|, which returns |w|true|r| if another file * 0 51088. may be "established" (10.3.1.4.cc) on the channel; * 0 51089. |xi||bt||i|standconv|r|, which may be used to obtain the default "conversion * 0 51090. key" (bb) for the channel. * 0 51091. |pb2|bb)|tp2|A "conversion key" is a value of the mode specified by * 0 51092. |i|CONV|r| which is used to convert characters to and from * 0 51093. the values as stored in "internal" form and as stored in "external" form in a book. * 0 51094. It is a structured value comprising a * 0 51095. row of structures, each of which contains a value in internal form and its corresponding external * 0 51096. value. The implementation may provide additional conversion keys in its |b|library-prelude|r|. * 0 51097. |pb2|cc)|tp2|Three standard channels are provided, with properties as defined * 0 51098. below (e,f,g). The implementation may provide additional channels in its |b|library-prelude|r|. * 0 51099. The |i|channel number|r| field is provided in order that different * 0 51100. channels with otherwise identical possibilities may be distinguished.|cc| * 0 51101. |n||pb1|a)|ts1||i|MODE CHANNEL |uqe| * 0 51102. |pc|STRUCT |ro|PROC (REF BOOK) BOOL |ra| reset, |ra| set, |ra| get, * 0 51103. |ra| put, |ra| bin, |ra| compress, |ra| reidf, * 0 51104. |e|PROC BOOL |ra| estab, PROC POS |ra| max pos, * 0 51105. PROC (REF BOOK) CONV |ra| standconv, INT |ra| channel number|rc| ;|r| * 0 51106. |pb1|b)|ts1||i|MODE |ra| CONV |uqe||g|#? 0 51107. STRUCT (|so|1#:#INT (SKIP)|sc||g|#STRUCT (CHAR internal, external) |u|f|i|) ;|r| * 0 51108. |pb1|c)|ts1||i|PROC estab possible |uqe| (CHANNEL chan) BOOL :|g| estab OF chan ;|r| * 0 51109. |pb1|d)|ts1||i|PROC standconv |uqe| (CHANNEL chan) PROC (REF BOOK) CONV :|g| standconv OF chan ;|r| * 0 51110. |pb1|e)|ts1||i|CHANNEL stand in channel |uqe| ~J~J a channel value whose field selected by |ap|get|ap| * 0 51111. is a routine which always returns true, and whose other fields are some * 0 51112. suitable values ~J~J ;|r| * 0 51113. |pb1|f)|ts1||i|CHANNEL stand out channel |uqe| ~J~J a channel value whose field selected by |ap|put|ap| * 0 51114. is a routine which always returns true, and whose other fields are some * 0 51115. suitable values ~J~J ;|r| * 0 51116. |pb1|g)|ts1||i|CHANNEL stand back channel |uqe| ~J~J a channel value whose fields selected * 0 51117. by |ap|set|ap|, |ap|reset|ap|, |ap|get|ap|, |ap|put|ap| and |ap|bin|ap| are routines which always * 0 51118. return true, and whose other fields are some suitable values ~J~J ;|r| * 0 51119. * 0 51120. |h|10.3.1.3. Files * 0 51121. * 0 51122. |pb2||j||co|aa)|tp2|A "file" is the means of communication between a |b|particular-program|r| * 0 51123. and a book which has been opened on that file via some channel. * 0 51124. It is a structured value which includes a reference to the book * 0 51125. to which it has been linked (10.3.1.4.bb) and a separate reference to the |i|text|r| of the book. * 0 51126. The file also contains information necessary for the transput * 0 51127. routines to work with the book, * 0 51128. including its current position |i|cpos|r| in the |i|text|r|, its * 0 51129. current "state" (bb), its current "format" (10.3.4) * 0 51130. and the channel on which it has been opened. * 0 51131. |pb2|bb)|tp2|The "state" of a file is determined by five fields: * 0 51132. |xi||bt|#|i|read#mood|r| which is |w|true|r| if the file is being used for input; * 0 51133. |xi||bt|#|i|write#mood|r| which is |w|true|r| if the file is being used for output; * 0 51134. |xi||bt|#|i|char#mood|r| which is |w|true|r| if the file is being used for * 0 51135. character transput; * 0 51136. |xi||bt|#|i|bin#mood|r| which is |w|true|r| if the file is being used for * 0 51137. binary transput; * 0 51138. |xi||bt|#|i|opened|r| which is |w|true|r| if the file has been linked * 0 51139. to a book.? 0 51140. |pb2|cc)|tp2|A file includes some * 0 51141. "event routines", which are called when certain conditions * 0 51142. arise during transput. After opening a file, the event routines provided by default return * 0 51143. |w|false|r| when called, but the programmer may provide * 0 51144. other event routines. * 0 51145. Since the fields of a file are not directly accessible to the user, the * 0 51146. event routines may be changed by use of the "on routines" (l,m,n,o,p,q,r). * 0 51147. The event routines are always given a reference to the file as a parameter. * 0 51148. If the elaboration of an event routine is * 0 51149. terminated, then the transput routine which called it can take no * 0 51150. further action; otherwise, if it returns |w|true|r|, then it is * 0 51151. assumed that the condition has been mended in some way, and, if * 0 51152. possible, transput continues, but if it returns |w|false|r|, then * 0 51153. the system continues with its default action. * 0 51154. The on routines are: * 0 51155. |p||xi||bt||i|on#logical#file#end|r|. * 0 51156. The corresponding event routine is called when, during input from a * 0 51157. book or as a result of calling |i|set|r|, the logical end of the book is reached (see 10.3.1.6.dd). * 0 51158. |phalf||ph|Example: * 0 51159. |xh|The programmer wishes to count the number of integers * 0 51160. on his input tape. The file |i|intape|r| was opened in a surrounding * 0 51161. |b|range|r|. If he writes: * 0 51162. |phalf||pc||n||i|BEGIN INT n |bec| 0; on logical#file#end (intape, (REF FILE file) BOOL : GOTO f); * 0 51163. |xc|DO get (intape, LOC INT); n +|bec| 1 OD; * 0 51164. |xc|f|lbl| print (n) * 0 51165. |pc|END|r| , * 0 51166. |phalf||xh||j|then the assignment to the field of * 0 51167. |i|intape|r| violates the scope restriction, since the scope of the routine * 0 51168. |i|(REF FILE file) BOOL : GOTO f |r| is smaller than the scope of |i|intape|r|, so he * 0 51169. has to write: * 0 51170. |phalf||pc||n||i|BEGIN INT n |bec| 0; FILE auxin |bec| intape; on logical#file#end * 0 51171. (auxin, (REF FILE file) BOOL : GOTO f); * 0 51172. |xc|DO get (auxin, LOC INT); n +|bec| 1 OD; * 0 51173. |xc|f|lbl| print (n) * 0 51174. |pc|END|r| . * 0 51175. |phalf||xi||j||bt||i|on#physical#file#end|r|. The corresponding event routine is called when * 0 51176. the current page number of the file exceeds the number of pages in the book * 0 51177. and further transput is attempted (see 10.3.1.6.dd). * 0 51178. |phalf||xi||bt||i|on#page#end|r|. The corresponding event routine is called when the * 0 51179. current line number exceeds the number * 0 51180. of lines in the current page * 0 51181. and further transput is attempted (see 10.3.1.6.dd). * 0 51182. |phalf||xi||bt||i|on#line#end|r|. The corresponding event routine is called when the * 0 51183. current character number of the file exceeds the number * 0 51184. of characters in the current line * 0 51185. and further transput is attempted (see 10.3.1.6.dd). * 0 51186. |phalf||ph|Example: * 0 51187. |xh|The programmer wishes automatically to * 0 51188. give a heading at the start of each page * 0 51189. on his file |i|f|r|: * 0 51190. |phalf||pc||n||i|on page end (f, PROC (REF FILE file) BOOL#: * 0 51191. |pd||ro|put |ro|file, |ro|newpage,|g| "page|ivs|number|ivs|",|g| whole (i +|bec| 1, 0), * 0 51192. |g|newline|rc||rc|; TRUE|rc| * 0 51193. |e|~J it is assumed that i has been declared elsewhere ~J)|r| .? 0 51194. |phalf||j||xi||bt||i|on#char#error|r|. The corresponding event routine is called when a character * 0 51195. conversion was unsuccessful or when, during input, * 0 51196. a character is read which was not "expected" (10.3.4.1.ll). * 0 51197. The event routine is called with a reference to a character * 0 51198. suggested as a replacement. The event routine provided by the programmer may * 0 51199. assign some character other than the suggested one. If the event routine returns * 0 51200. |w|true|r|, then that suggested character as possibly modified * 0 51201. is used. * 0 51202. |ph|Example: * 0 51203. |xh|The programmer wishes to read sums of money punched as * 0 51204. |i|"|do|123.45"|r|, |i|"|vs||do|23.45"|r|, |i|"|vs||vs||do|3.45"|r|, etc.: * 0 51205. |phalf||pc||n||i|on char error |ro|stand in, (REF FILE f, REF CHAR sugg) BOOL : * 0 51206. |pd|IF sugg |uqe| "0" * 0 51207. |pd|THEN CHAR c; backspace (f); get (f, c); * 0 51208. |e|(c |uqe| "|do|" | get (f, sugg); TRUE | FALSE) * 0 51209. |pd|ELSE FALSE * 0 51210. |pd|FI#|rc|; * 0 51211. |xs|INT cents; readf ((|do| 3z "." dd |do|, cents))|r| * 0 51212. |p||xi||j||bt||i|on#value#error|r|. * 0 51213. The corresponding event routine is called when: * 0 51214. |pha11|(i)|thb1|during formatted * 0 51215. transput an attempt is made to transput a value under the control of a * 0 51216. "picture" with which it is incompatible, or when the number of * 0 51217. "frames" is insufficient. If the routine returns |w|true|r|, then * 0 51218. the current value and picture are skipped and transput continues; * 0 51219. if the routine returns |w|false|r|, then first, on * 0 51220. output, the value is output by |i|put|r|, and next |i|undefined|r| is called; * 0 51221. |pha21|(ii)|thb1|during input it is impossible to convert a string * 0 51222. to a value of some given mode (this would occur if, for example, * 0 51223. an attempt were made to read an integer larger than |i|max int|r| * 0 51224. (10.2.1.c)).? 0 51225. |p||xi||bt||i|on#format#end|r|. The corresponding event routine is called when, during formatted * 0 51226. transput, the format is exhausted while some value still remains to be * 0 51227. transput. If the routine returns |w|true|r|, then |i|undefined|r| is called if a new format * 0 51228. has not been provided for the file by the routine; otherwise, * 0 51229. the current format is repeated. * 0 51230. |pb2|dd)|tp2|The |i|conv|r| field of a file * 0 51231. is its current conversion key * 0 51232. (10.3.1.2.bb). After opening a * 0 51233. file, a default conversion key is provided. * 0 51234. Some other conversion * 0 51235. key may be provided by the programmer by means of a |b|call|r| of * 0 51236. |i|make conv|r| (j). Note that such a key must have been provided * 0 51237. in the |b|library-prelude|r|. * 0 51238. |pb2|ee)|tp2|The routine |i|make#term|r| is used to associate a string with a file. * 0 51239. This string is used when inputting a * 0 51240. variable number of characters, any of its characters * 0 51241. serving as a terminator. * 0 51242. |pb2|ff)|tp2|The available methods of access to a book which has been opened on a file may * 0 51243. be discovered by |b|calls|r| of the following routines? 0 51244. (note that the yield of such a |b|call|r| may be a function of both the book? 0 51245. and the channel, and of other environmental factors not defined by this Report): * 0 51246. |xi||bt||i|get#possible|r|, which returns |w|true|r| if the file may be used for input; * 0 51247. |xi||bt||i|put#possible|r|, which returns |w|true|r| if the file may be used for output; * 0 51248. |xi||bt||i|bin#possible|r|, which returns |w|true|r| * 0 51249. if the file may be used for binary transput; * 0 51250. |xi||bt||i|compressible|r|, which returns |w|true|r| * 0 51251. if lines and pages will be compressed (10.3.1.6.aa) during output, in which case the book is said to be "compressible"; * 0 51252. |xi||bt||i|reset#possible|r|, which returns |w|true|r| * 0 51253. if the file may be reset, i.e., its current position set to |w|(1, 1, 1)|r|; * 0 51254. |xi||bt||i|set#possible|r|, which returns |w|true|r| * 0 51255. if the file may be set, i.e., the current position changed to some specified value; * 0 51256. the book is then said to be a "random access" book and, * 0 51257. otherwise, a "sequential access" book; * 0 51258. |xi||bt||i|reidf#possible|r|, which returns |w|true|r| * 0 51259. if the |i|idf|r| field of the book may be changed; * 0 51260. |xi||bt||i|chan|r|, which returns the channel on which the file * 0 51261. has been opened (this may be used, for example, by a routine assigned by * 0 51262. |i|on#physical#file#end|r|, in order to open another file on the same channel). * 0 51263. |pb2|gg)|tp2|On sequential access books, * 0 51264. |i|undefined|r| (10.3.1.4.a) is called if binary and * 0 51265. character transput is alternated, i.e., after opening * 0 51266. or resetting (10.3.1.6.j), either is possible but, once one has taken * 0 51267. place, the other may not until * 0 51268. after another reset. * 0 51269. |pb2|hh)|tp2|On sequential access books, output immediately causes the * 0 51270. logical end of the book to be moved to the current position * 0 51271. (unless both are in the same line); thus input may not follow * 0 51272. output without first resetting (10.3.1.6.j). * 0 51273. |exx|Example: * 0 51274. |i||n||phalf||ph|BEGIN FILE f1, f2; |so|1 : 10000|sc| INT x; INT n |bec| 0; * 0 51275. |xh|open (f1, "", channel 2); * 0 51276. |xh|f2 |bec| f1; |xs|~J now f1 and f2 can be used interchangeably ~J * 0 51277. |xh|make conv (f1, flexocode); make conv (f2, telexcode); |xs|~J now f1 and f2 * 0 51278. use different codes; flexocode and telexcode are defined in the * 0 51279. library|r|-|i|prelude for this implementation ~J * 0 51280. |xh|reset (f1); * 0 51281. |xs|~J consequently, f2 is reset too ~J * 0 51282. |p||ps|on logical file end (f1, (REF FILE f) BOOL : GOTO done);? 0 51283. |xh|FOR i * 0 51284. DO#|g|get (f1, x |so|i|sc|); n |bec| i OD;? 0 51285. |xs|~J too bad if there are more than 10000 integers in the input ~J * 0 51286. |xi|done|lbl| * 0 51287. |xh|reset (f1); FOR i TO n DO put (f2, x |so|i|sc|) OD; * 0 51288. |xh|close (f2) ~J f1 is now closed too ~J * 0 51289. |ph|END|r| |cc| * 0 51290. |n||pb1|a)|ts1||i|MODE FILE |uqe| * 0 51291. |pc|STRUCT |ro|REF BOOK |ra| book, * 0 51292. UNION (FLEXTEXT, TEXT) |ra| text, * 0 51293. CHANNEL |ra| chan, * 0 51294. REF FORMAT |ra| format, * 0 51295. REF INT |ra| forp, * 0 51296. |pd|REF BOOL |ra| read mood, |ra| write mood, |ra| char mood, * 0 51297. |ra| bin mood, |ra| opened, * 0 51298. |pd|REF POS |ra| cpos ~J current position ~J, * 0 51299. |pd|STRING#|ra|#term#~J#string#terminator#~J, * 0 51300. |pd|CONV#|ra|#conv#~J#character#conversion#key#~J, * 0 51301. |pd|PROC (REF FILE) BOOL |ra| logical file mended, * 0 51302. |ra| physical file mended, |ra| page mended, |ra| line mended, * 0 51303. |ra| format mended, |ra| value error mended, * 0 51304. |pd|PROC (REF FILE, REF CHAR) BOOL |ra| char error mended|rc| ;|r| * 0 51305. |pb1|b)|ts1||i|PROC get possible |uqe| (REF FILE f) BOOL : * 0 51306. |pc|(opened OF f | (get OF chan OF f) (book OF f) | undefined; SKIP) ;|r| * 0 51307. |pb1|c)|ts1||i|PROC put possible |uqe| (REF FILE f) BOOL : * 0 51308. |pc|(opened OF f | (put OF chan OF f) (book OF f) | undefined; SKIP) ;|r| * 0 51309. |pb1|d)|ts1||i|PROC bin possible |uqe| (REF FILE f) BOOL : * 0 51310. |pc|(opened OF f | (bin OF chan OF f) (book OF f) | undefined; SKIP) ;|r| * 0 51311. |pb1|e)|ts1||i|PROC compressible |uqe| (REF FILE f) BOOL : * 0 51312. |pc|(opened OF f |g||#(compress OF chan OF f) (book OF f)#|g|| undefined;#SKIP) ;|r| * 0 51313. |pb1|f)|ts1||i|PROC reset possible |uqe| (REF FILE f) BOOL : * 0 51314. |pc|(opened OF f | (reset OF chan OF f) (book OF f) | undefined; SKIP) ;|r| * 0 51315. |pb1|g)|ts1||i|PROC set possible |uqe| (REF FILE f) BOOL : * 0 51316. |pc|(opened OF f | (set OF chan OF f) (book OF f) | undefined; SKIP) ;|r| * 0 51317. |pb1|h)|ts1||i|PROC reidf possible |uqe| (REF FILE f) BOOL : * 0 51318. |pc|(opened OF f | (reidf OF chan OF f) (book OF f) | undefined; SKIP) ;|r| * 0 51319. |pb1|i)|ts1||i|PROC chan |uqe| (REF FILE f) CHANNEL : * 0 51320. |pc|(opened OF f | chan OF f | undefined; SKIP) ;|r| * 0 51321. |pb1|j)|ts1||i|PROC make conv |uqe| (REF FILE f, PROC (REF BOOK) CONV c) VOID : * 0 51322. |pc|(opened OF f | conv OF f |bec| c (book OF f) | undefined) ;|r| * 0 51323. |pb1|k)|ts1||i|PROC make term |uqe| (REF FILE f, STRING t) VOID :#|g|term OF f |bec| t ;|r| * 0 51324. |pb1|l)|ts1||i|PROC on logical file end |uqe||g|#(REF FILE f, PROC (REF FILE) BOOL p) VOID : * 0 51325. |g|logical file mended OF f |bec| p ;|r| * 0 51326. |pb1|m)|ts1||i|PROC on physical file end |uqe||g|#(REF FILE f, PROC (REF FILE) BOOL p) VOID : * 0 51327. |g|physical file mended OF f |bec| p ;|r| * 0 51328. |pb1|n)|ts1||i|PROC on page end |uqe||g|#(REF FILE f, PROC (REF FILE) BOOL p) VOID : * 0 51329. |g|page mended OF f |bec| p ;|r| * 0 51330. |pb1|o)|ts1||i|PROC on line end |uqe||g|#(REF FILE f, PROC (REF FILE) BOOL p) VOID : * 0 51331. |g|line mended OF f |bec| p ;|r| * 0 51332. |pb1|p)|ts1||i|PROC on format end |uqe||g|#(REF FILE f, PROC (REF FILE) BOOL p) VOID : * 0 51333. |g|format mended OF f |bec| p ;|r| * 0 51334. |pb1|q)|ts1||i|PROC on value error |uqe||g|#(REF FILE f, PROC (REF FILE) BOOL p) VOID : * 0 51335. |g|value error mended OF f |bec| p ;|r| * 0 51336. |pb1|r)|ts1||i|PROC on char error |uqe||g|#(REF FILE f, PROC (REF FILE, REF CHAR) BOOL p) VOID : * 0 51337. |g|char error mended OF f |bec| p ;|r| * 0 51338. |pb1|s)|ts1||i|PROC reidf |uqe||g|#(REF FILE f, STRING idf) VOID : * 0 51339. |pc|IF opened OF f |and| reidf possible (f) |and| idf ok (idf) * 0 51340. |pc|THEN idf OF book OF f |bec| idf * 0 51341. |pc|FI ;|r| * 0 51342. * 0 51343. |h|10.3.1.4. Opening and closing files * 0 51344. * 0 51345. |pb2||j||co|aa)|tp2|When, during transput, something happens which is left undefined, * 0 51346. for example by explicitly calling |i|undefined|r| (a), this? 0 51347. does not imply that the elaboration is catastrophically and immediately * 0 51348. interrupted (2.1.4.3.h), but only that some sensible action is taken which is not or * 0 51349. cannot be described by this Report alone and is generally * 0 51350. implementation-dependent.? 0 51351. |pb2||j|bb)|tp2|A book is "linked" with a file by means of |i|establish|r| (b), * 0 51352. |i|create|r| (c) or |i|open|r| (d). * 0 51353. The linkage may be terminated by means of |i|close|r| (n), |i|lock|r| (o) or |i|scratch|r| (p). * 0 51354. |pb2|cc)|tp2|When a file is "established" on a channel, then a book is * 0 51355. generated (5.2.3) with a |i|text|r| of the given size, the given * 0 51356. identification string, with |i|putting|r| set to |w|true|r|, and the logical end of the book * 0 51357. at |w|(1,#1,#1)|r|. * 0 51358. An implementation may require (g) that the characters forming the * 0 51359. identification string should be taken from a limited set and that the * 0 51360. string should be limited in length. It may also prevent two books from * 0 51361. having the same string. * 0 51362. If the establishing is completed successfully, * 0 51363. then the value |w|0|r| is returned; otherwise, some nonzero integer is returned * 0 51364. (the value of this integer might indicate why the file was not established successfully). * 0 51365. |pg|When a file is "created" on a channel, then a file * 0 51366. is established with a book whose |i|text|r| has the default * 0 51367. size for the channel and whose identification string is undefined. * 0 51368. |pb2|dd)|tp2|When a file is "opened", then the chain of backfiles is searched for * 0 51369. the first book which is such that |i|match|r| (h) returns |w|true|r|. * 0 51370. (The precise method of matching is not defined by this * 0 51371. Report and will, in general, be implementation dependent. For example, * 0 51372. the string supplied as parameter to |i|open|r| may * 0 51373. include a password of some form.) * 0 51374. If the end of the chain of backfiles is reached or if a book has been selected, * 0 51375. but |i|putting|r| of the book yields |w|true|r|, * 0 51376. or if putting to the book via the channel is possible and the book is * 0 51377. already open, then the further elaboration is undefined. If the file * 0 51378. is already open, an |i|UP gremlins|r| provides an opportunity for an * 0 51379. appropriate system action on the book previously linked (in case no * 0 51380. other copy of the file remains to preserve that linkage). * 0 51381. |pb2|ee)|tp2|The routine |i|associate|r| may be used to associate a file with a value of the mode * 0 51382. specified by either |i|REF#|so||thin||sc|#CHAR, REF#|so||thin||sc|#|so||thin||sc|#CHAR|r| or * 0 51383. |i|REF#|so||thin||sc|#|so||thin||sc|#|so||thin||sc|#CHAR|r|, thus enabling such variables * 0 51384. to be used as the book of a file. * 0 51385. |pb2|ff)|tp2|When a file is "closed", its book is attached to * 0 51386. the chain of backfiles referenced by |i|chainbfile|r|. Some * 0 51387. |b|system-task|r| is then activated by means of an |i|UP gremlins|r|. * 0 51388. (This may reorganize the chain of backfiles, removing this book, * 0 51389. or adding further copies of it. It may also cause the book to be output * 0 51390. on some external device.) * 0 51391. |pb2|gg)|tp2|When a file is "locked", its book is attached to the chain * 0 51392. of backfiles referenced by |i|lockedbfile|r|. Some |b|system-task|r| * 0 51393. is then activated by means of an |i|UP gremlins|r|. A book * 0 51394. which has been locked cannot be re-opened until some subsequent |b|system-task|r| * 0 51395. has re-attached the book to the chain of backfiles available for opening. * 0 51396. |pb2|hh)|tp2|When a file is "scratched", some |b|system-task|r| * 0 51397. is activated by means of an |i|UP gremlins|r|. (This may cause * 0 51398. the book linked to the file to be disposed of in some manner.)|cc| * 0 51399. |pb1||j|a)|ts1||i|PROC |ra| undefined |uqe| INT : ~J~J some sensible system action yielding an * 0 51400. integer to indicate what has been done; * 0 51401. it is presumed that the system action may depend on a knowledge of * 0 51402. any values accessible |r||co|2.1.2.c|cc||i| inside the locale of any * 0 51403. environ which is older than that in which this pseudo-comment * 0 51404. is being elaborated |r||co|notwithstanding that no ALGOL 68 construct * 0 51405. written here could access those values|cc||i| ~J~J ;|r| * 0 51406. |n||pb1|b)|ts1||i|PROC establish |uqe| * 0 51407. |pc|(REF FILE file, STRING idf, CHANNEL chan, INT p, l, c) INT :? 0 51408. |pc|BEGIN * 0 51409. |pd|DOWN bfileprotect; * 0 51410. |pd||u|PRIM|i| BOOK book |bec| * 0 51411. |pe||ro||u|PRIM|i| FLEX |so|1 : p|sc| FLEX |so|1 : l|sc| FLEX |so|1 : c|sc| CHAR, * 0 51412. (1, 1, 1), idf, TRUE, 1|rc|; * 0 51413. |pd|IF file available (chan) |and| (put OF chan) (book) |g||and| estab OF chan * 0 51414. |and| |not| (POS (p, l, c) BEYOND max pos OF chan)#|g||and| * 0 51415. |not| (POS (1, 1, 1) BEYOND POS (p, l, c))#|g||and| idf ok (idf) * 0 51416. |pd|THEN * 0 51417. |pe|(opened OF file | UP gremlins | UP bfileprotect); * 0 51418. |pe|file |bec| * 0 51419. |xe||ro|book, text OF book, chan, SKIP, SKIP, * 0 51420. |pf|~J state: ~J HEAP BOOL |bec| FALSE, HEAP BOOL |bec| TRUE, * 0 51421. HEAP BOOL |bec| FALSE, HEAP BOOL |bec| FALSE, HEAP BOOL |bec| TRUE, * 0 51422. |xe|HEAP POS |bec| (1, 1, 1), "", (standconv OF chan) (book), * 0 51423. |pf|~J event routines: ~J false, false, false, false, false, false, * 0 51424. (REF FILE f, REF CHAR a) BOOL : FALSE|rc|; * 0 51425. |pe|(|not| bin possible (file) | set char mood (file)); * 0 51426. |pe|0 * 0 51427. |pd|ELSE UP bfileprotect; undefined * 0 51428. |pd|FI * 0 51429. |pc|END ;|r| * 0 51430. |pb1|c)|ts1||i|PROC create |uqe| (REF FILE file, CHANNEL chan) INT : * 0 51431. |pc|BEGIN POS max pos |uqe| max pos OF chan; * 0 51432. |pd|establish |ro|file, SKIP, chan, p OF max pos, l OF max pos, c OF max pos|rc| |pc|END ;|r| * 0 51433. |pb1|d)|ts1||i|PROC open |uqe| (REF FILE file, STRING idf, CHANNEL chan) INT : * 0 51434. |pc|BEGIN * 0 51435. |pd|DOWN bfileprotect; * 0 51436. |pd|IF file available (chan) * 0 51437. |pd|THEN REF REF BFILE bf |bec| chainbfile; * 0 51438. BOOL found |bec| FALSE; * 0 51439. |pe|WHILE (REF BFILE (bf) :|ne|: NIL) |and| |not| found * 0 51440. |pe|DO * 0 51441. |pf|IF match (idf, chan, book OF bf) * 0 51442. |pf|THEN found |bec| TRUE * 0 51443. |pf|ELSE bf |bec| next OF bf * 0 51444. |pf|FI * 0 51445. |pe|OD; * 0 51446. |pe|IF |not| found * 0 51447. |xd|THEN UP bfileprotect; undefined * 0 51448. |pe|ELSE REF BOOK book |bec| book OF bf; * 0 51449. |pf|IF putting OF book * 0 51450. |g||or| (put OF chan) (book) |and| users OF book |sgt| 0 * 0 51451. |pf|THEN * 0 51452. |pj|UP bfileprotect; undefined ~J in this case opening * 0 51453. is inhibited by other users |mi| the system may either wait, or yield? 0 51454. nonzero (indicating unsuccessful opening) immediately ~J * 0 51455. |pf|ELSE * 0 51456. |pj|users OF book +|bec| 1; * 0 51457. |pj|((put OF chan) (book) | putting OF book |bec| TRUE); * 0 51458. |pj|REF REF BFILE (bf) |bec| next OF bf; * 0 51459. ~J#remove#bfile#from#chain#~J * 0 51460. |xf|(opened OF file | UP gremlins | UP bfileprotect); * 0 51461. |pj|file |bec| * 0 51462. |xj||ro|book, text OF book, chan, SKIP, SKIP, * 0 51463. |pk|~J state: ~J HEAP BOOL |bec| FALSE, HEAP BOOL |bec| FALSE, HEAP BOOL |bec| FALSE, * 0 51464. HEAP BOOL |bec| FALSE, HEAP BOOL |bec| TRUE, |xj|HEAP POS |bec| (1, 1, 1), "", * 0 51465. (standconv OF chan) (book), * 0 51466. |pk|~J event routines: ~J false, false, false, false, false, false, * 0 51467. (REF FILE f, REF CHAR a) BOOL : FALSE|rc|; * 0 51468. |xf|(|not| bin possible (file) | set char mood (file)); * 0 51469. |xf|(|not| get possible (file) | set write mood (file)); * 0 51470. |xf|(|not| put possible (file) | set read mood (file)); * 0 51471. |xf|0 * 0 51472. |pf|FI|pe|FI * 0 51473. |pd|ELSE UP bfileprotect; undefined * 0 51474. |pd|FI * 0 51475. |pc|END ;|r| * 0 51476. |pb1|e)|ts1||i|PROC associate |uqe| * 0 51477. (REF FILE file, REF |so||thin||sc| |so||thin||sc| |so||thin||sc| CHAR sss) VOID : * 0 51478. |pc|IF INT p |uqe| LWB sss; INT l |uqe| LWB sss |so|p|sc|; * 0 51479. INT c |uqe| LWB sss |so|p|sc| |so|l|sc|; * 0 51480. |e|p |uqe| 1 |and| l |uqe| 1 |and| c |uqe| 1 * 0 51481. |pc|THEN * 0 51482. |pd|PROC t |uqe| (REF BOOK a) BOOL : TRUE; * 0 51483. |pd|PROC f |uqe| (REF BOOK a) BOOL : FALSE; * 0 51484. |pd|CHANNEL chan |uqe| |ro|t, t, t, t, f, f, f, BOOL : FALSE, * 0 51485. POS :#(max int, max int, max int), SKIP, SKIP|rc|; * 0 51486. |pd|(opened OF file | DOWN bfileprotect; UP gremlins); * 0 51487. |pd|file |bec| * 0 51488. |xd||ro|HEAP BOOK |bec| (SKIP, (UPB sss + 1, 1, 1), SKIP, TRUE, 1), * 0 51489. sss, chan, SKIP, SKIP, * 0 51490. |pe|~J state: ~J HEAP BOOL |bec| FALSE, HEAP BOOL |bec| FALSE, * 0 51491. HEAP BOOL |bec| TRUE, HEAP BOOL |bec| FALSE, * 0 51492. HEAP BOOL |bec| TRUE, |xd|HEAP POS |bec| (1, 1, 1), "", SKIP, * 0 51493. |pe|~J event routines: ~J false, false, false, false, false, false, * 0 51494. (REF FILE f, REF CHAR a) BOOL : FALSE|rc| * 0 51495. |pc|ELSE undefined * 0 51496. |pc|FI ;|r| * 0 51497. |pb1|f)|ts1||i|PROC |ra| file available |uqe| (CHANNEL chan) BOOL : * 0 51498. |pc|~J~J true if another file, at this instant of time, may be opened * 0 51499. on |ap|chan|ap| and false otherwise ~J~J ;|r|? 0 51500. |pb1|g)|ts1||i|PROC |ra| idf ok |uqe| (STRING idf) BOOL : * 0 51501. |pc|~J~J true if |ap|idf|ap| is acceptable to the implementation as the * 0 51502. identification of a new book and false otherwise ~J~J ;|r|? 0 51503. |pb1|h)|ts1||i|PROC |ra| match |uqe| * 0 51504. (STRING idf, CHANNEL chan, REF BOOK book name) BOOL : * 0 51505. |pc|~J~J true if the book referred to by |ap|book name|ap| may be identified by |ap|idf|ap|, and if the * 0 51506. book may legitimately be accessed through |ap|chan|ap|, and * 0 51507. false otherwise ~J~J ;|r| * 0 51508. |pb1|i)|ts1||i|PROC |ra| false |uqe| (REF FILE file) BOOL : FALSE * 0 51509. |pc|~J this is included for brevity in |ap|establish|ap|, |ap|open|ap| and |ap|associate|ap| ~J ;|r| * 0 51510. |pb1|j)|ts1||i|PROC |ra| set write mood |uqe| (REF FILE f) VOID : * 0 51511. |pc|IF |not| put possible (f) |or||g| * 0 51512. |not| set possible (f) |and| bin mood OF f |and| read mood OF f * 0 51513. |pc|THEN undefined * 0 51514. |pc|ELSE REF BOOL (read mood OF f) |bec| FALSE; * 0 51515. REF BOOL (write mood OF f) |bec| TRUE * 0 51516. |pc|FI ;|r| * 0 51517. |pb1|k)|ts1||i|PROC |ra| set read mood |uqe| (REF FILE f) VOID : * 0 51518. |pc|IF |not| get possible (f) |or||g| * 0 51519. |not| set possible (f) |and| bin mood OF f |and| write mood OF f * 0 51520. |pc|THEN undefined * 0 51521. |pc|ELSE REF BOOL (read mood OF f) |bec| TRUE; * 0 51522. REF BOOL (write mood OF f) |bec| FALSE * 0 51523. |pc|FI ;|r| * 0 51524. |pb1|l)|ts1||i|PROC |ra| set char mood |uqe| (REF FILE f) VOID : * 0 51525. |pc|IF |not| set possible (f) |and| bin mood OF f * 0 51526. |pc|THEN undefined * 0 51527. |pc|ELSE REF BOOL (char mood OF f) |bec| TRUE; * 0 51528. REF BOOL (bin mood OF f) |bec| FALSE * 0 51529. |pc|FI ;|r| * 0 51530. |pb1|m)|ts1||i|PROC |ra| set bin mood |uqe| (REF FILE f) VOID : * 0 51531. |pc|IF |not| bin possible (f) |or||g| * 0 51532. |not| set possible (f) |and| char mood OF f * 0 51533. |pc|THEN undefined * 0 51534. |pc|ELSE REF BOOL (char mood OF f) |bec| FALSE; * 0 51535. REF BOOL (bin mood OF f) |bec| TRUE * 0 51536. |pc|FI ;|r| * 0 51537. |pb1|n)|ts1||i|PROC close |uqe| (REF FILE file) VOID : * 0 51538. |pc|IF opened OF file * 0 51539. |pc|THEN * 0 51540. |pd|DOWN bfileprotect; * 0 51541. |pe|REF BOOL (opened OF file) |bec| FALSE; * 0 51542. |pe|REF BOOK book |uqe| book OF file; * 0 51543. |xd|putting OF book |bec| FALSE; users OF book |mi||bec| 1; * 0 51544. |pe|(text OF file | (FLEXTEXT): chainbfile |bec| * 0 51545. |e||u|PRIM|i| BFILE |bec| (book, chainbfile)); * 0 51546. |pd|UP gremlins * 0 51547. |pc|FI ;|r| * 0 51548. |pb1|o)|ts1||i|PROC lock |uqe| (REF FILE file) VOID : * 0 51549. |pc|IF opened OF file * 0 51550. |pc|THEN * 0 51551. |pd|DOWN bfileprotect; * 0 51552. |pe|REF BOOL (opened OF file) |bec| FALSE; * 0 51553. |pe|REF BOOK book |uqe| book OF file; * 0 51554. |xd|putting OF book |bec| FALSE; users OF book |mi||bec| 1; * 0 51555. |pe|(text OF file | (FLEXTEXT): lockedbfile |bec| * 0 51556. |g||u|PRIM|i| BFILE |bec| (book, lockedbfile)); * 0 51557. |pd|UP gremlins * 0 51558. |pc|FI ;|r| * 0 51559. |pb1|p)|ts1||i|PROC scratch |uqe| (REF FILE file) VOID : * 0 51560. |pc|IF opened OF file * 0 51561. |pc|THEN * 0 51562. |pd|DOWN bfileprotect; * 0 51563. |pe|REF BOOL (opened OF file) |bec| FALSE; * 0 51564. |pe|putting OF book OF file |bec| FALSE; * 0 51565. |pe|users OF book OF file |mi||bec| 1; * 0 51566. |pd|UP gremlins * 0 51567. |pc|FI ;|r| * 0 51568. * 0 51569. |h|10.3.1.5. Position enquiries * 0 51570. * 0 51571. |pb2||j||co|aa)|tp2|The "current position" of a book opened on a given file is * 0 51572. the value referred to by the |i|cpos|r| field of that file. It is * 0 51573. advanced by each transput operation in accordance with the number of * 0 51574. characters written or read. * 0 51575. |pg|If |w|c|r| is the current character number and |w|lb|r| is the * 0 51576. length of the current line, then at all times * 0 51577. |w|1#|le|#c#|le|#lb#+#1|r|. |w|c#|uqe|#1|r| implies that the next transput * 0 51578. operation will be to the first character of the line and * 0 51579. |w|c#|uqe|#lb#+#1|r| implies that the line has overflowed and that the next * 0 51580. transput operation will call an event routine. If |w|lb#|uqe|#0|r|, then * 0 51581. the line is empty and is therefore always in the * 0 51582. overflowed state. Corresponding restrictions apply to the current * 0 51583. line and page numbers. Note that, if the page has overflowed, the * 0 51584. current line is empty and, if the book has overflowed, the current * 0 51585. page and line are both empty (e). * 0 51586. |pb2|bb)|tp2|#The user may determine the current position by means of the routines * 0 51587. |i|char number|r|, |i|line number|r| and |i|page number|r| (a, b, c). * 0 51588. |pb2|cc)|tp2|If the current position has overflowed the line, page or book, * 0 51589. then it is said to be outside the "physical file" (f, g, h). * 0 51590. |pb2|dd)|tp2|If, on reading, the current position is at the logical end, * 0 51591. then it is said to be outside the "logical file" (i).|cc| * 0 51592. |pa||co|Each routine in this section calls |i|undefined|r| * 0 51593. if the file is not open on entry.|cc| * 0 51594. |n||pb1|a)|ts1||i|PROC char number |uqe| (REF FILE f) INT : * 0 51595. |pc|(opened OF f | c OF cpos OF f | undefined) ;|r| * 0 51596. |pb1|b)|ts1||i|PROC line number |uqe| (REF FILE f) INT : * 0 51597. |pc|(opened OF f | l OF cpos OF f | undefined) ;|r| * 0 51598. |pb1|c)|ts1||i|PROC page number |uqe| (REF FILE f) INT : * 0 51599. |pc|(opened OF f | p OF cpos OF f | undefined) ;|r| * 0 51600. |pb1|d)|ts1||i|PROC |ra| current pos |uqe| (REF FILE f) POS : * 0 51601. |pc|(opened OF f | cpos OF f | undefined ; SKIP) ;|r| * 0 51602. |pb1|e)|ts1||i|PROC |ra| book bounds |uqe| (REF FILE f) POS : * 0 51603. |pc|BEGIN POS cpos |uqe| current pos (f); * 0 51604. |pd|INT p |uqe| p OF cpos, l |uqe| l OF cpos; * 0 51605. |pd|CASE text OF f IN * 0 51606. |pe|(TEXT t1): * 0 51607. |pf|(INT pb |uqe| UPB t1; * 0 51608. |pf|INT lb |uqe| (p |le| 0 |or| p |sgt| pb | 0 | UPB t1 |so|p|sc|); * 0 51609. |pf|INT cb |uqe| (l |le| 0 |or| l |sgt| lb | 0 | UPB t1 |so|p|sc| |so|l|sc|); * 0 51610. |pf|(pb, lb, cb)) , * 0 51611. |pe|(FLEXTEXT t2): * 0 51612. |pf|(INT pb |uqe| UPB t2; * 0 51613. |pf|INT lb |uqe| (p |le| 0 |or| p |sgt| pb | 0 | UPB t2 |so|p|sc|); * 0 51614. |pf|INT cb |uqe| (l |le| 0 |or| l |sgt| lb | 0 | UPB t2 |so|p|sc| |so|l|sc|); * 0 51615. |pf|(pb, lb, cb)) * 0 51616. |xc|ESAC * 0 51617. |pc|END ;|r| * 0 51618. |pb1|f)|ts1||i|PROC |ra| line ended |uqe| (REF FILE f) BOOL : * 0 51619. |xs|(INT c |uqe| c OF current pos (f); c |sgt| c OF book bounds (f)) ;|r|? 0 51620. |pb1|g)|ts1||i|PROC |ra| page ended |uqe| (REF FILE f) BOOL : * 0 51621. |xs|(INT l |uqe| l OF current pos (f); l |sgt| l OF book bounds (f)) ;|r|? 0 51622. |pb1|h)|ts1||i|PROC |ra| physical file ended |uqe| (REF FILE f) BOOL : * 0 51623. |xs|(INT p |uqe| p OF current pos (f); p |sgt| p OF book bounds (f)) ;|r|? 0 51624. |pb1|i)|ts1||i|PROC |ra| logical file ended |uqe| (REF FILE f) BOOL : * 0 51625. |pc||not| (lpos OF book OF f BEYOND current pos (f)) ;|r| * 0 51626. * 0 51627. |h|10.3.1.6. Layout routines * 0 51628. * 0 51629. |pb2||j||co|aa)|tp2|A book input from an external medium by some * 0 51630. |b|system-task|r| may contain lines and pages not all of the same length. * 0 51631. Contrariwise, the lines and pages of a book which has been established * 0 51632. (10.3.1.4.cc) are all initially of the size specified by the user. * 0 51633. However if, during output to a compressible book (10.3.1.3.ff), * 0 51634. |i|newline|r| (|i|newpage|r|) is called with the current position * 0 51635. in the same line (page) as the logical end of the book, then that line * 0 51636. (the page containing that line) is shortened to the character number * 0 51637. (line number) of the logical end. Thus |i|print (("abcde", newline))|r| * 0 51638. could cause the current line to be reduced to |w|5|r| characters in * 0 51639. length. Note that it is perfectly meaningful for a line to contain * 0 51640. no characters and for a page to contain no lines. * 0 51641. |pg|Although the effect of a channel whose books are both compressible * 0 51642. and of random access (10.3.1.3.ff) is well defined, it is not * 0 51643. anticipated that such a combination is likely to occur in actual * 0 51644. implementations. * 0 51645. |pb2|bb)|tp2|The routines |i|space|r| (a), |i|newline|r| (c) and |i|newpage|r| * 0 51646. (d) serve to advance the current position to the next character, line * 0 51647. or page, respectively. They do not, however, (except as provided in * 0 51648. cc below) alter the contents of the positions skipped over. * 0 51649. Thus |i|print (("a", backspace, space))|r| has a different effect from * 0 51650. |i|print (("a", backspace, blank))|r|. * 0 51651. |pg|The current position may be altered also by calls of |i|backspace|r| * 0 51652. (b), |i|set char number|r| (k) and, on appropriate channels, * 0 51653. of |i|set|r| (i) and |i|reset|r| (j). * 0 51654. |pb2|cc)|tp2|The contents of a newly established book are undefined and * 0 51655. both its current position and its logical end are at |w|(1,#1,#1)|r|. * 0 51656. As output proceeds, it is filled with characters and the logical end is * 0 51657. moved forward accordingly. If, during character output with the current * 0 51658. position at the logical end of the book, |i|space|r| is called, then * 0 51659. a space character is written (similar action being taken in the case of * 0 51660. |i|newline|r| and |i|newpage|r| if the book is not compressible). * 0 51661. |pg|A call of |i|set|r| which attempts to leave the current position * 0 51662. beyond the logical end results in a call of * 0 51663. |i|undefined|r| (a sensible system action might then be to advance * 0 51664. the logical end to the current position, or even to the physical end * 0 51665. of the book). There is thus no defined way in which the current * 0 51666. position can be made to be beyond the logical end, nor in which * 0 51667. any character within the logical file can remain in its initial * 0 51668. undefined state.? 0 51669. |pb2|dd)|tp2|A reading or writing operation, or a |b|call|r| of |i|space|r|, * 0 51670. |i|newline|r|, |i|newpage|r|, |i|set|r| or |i|set char number|r|, * 0 51671. may bring the current position outside the physical or logical file * 0 51672. (10.3.1.5.cc, dd), but this does not have any immediate consequence. * 0 51673. However, before any further transput is attempted, or a further call * 0 51674. of |i|space|r|, |i|newline|r| or |i|newpage|r| (but not of |i|set|r| or * 0 51675. |i|set char number|r|) is made, the current position must be brought * 0 51676. to a "good" position. The file is "good" if, on writing (reading), the * 0 51677. current position is not outside the physical (logical) file (10.3.1.5.cc, dd). * 0 51678. The page (line) is "good" if the line number (character number) has * 0 51679. not overflowed. The event routine (10.3.1.3.cc) corresponding to * 0 51680. |i|on logical file end|r|, |i|on physical file end|r|, |i|on page end|r| * 0 51681. or |i|on line end|r| is therefore called as appropriate. Except in the * 0 51682. case of formatted transput (which uses |i|check pos|r|, 10.3.3.2.c), * 0 51683. the default action, if the event routine returns |w|false|r|, * 0 51684. is to call, respectively, |i|undefined|r|, |i|undefined|r|, |i|newpage|r| * 0 51685. or |i|newline|r|. After this (or if |w|true|r| is returned), * 0 51686. if the position is still not good, an event routine (not necessarily * 0 51687. the same one) is called again. * 0 51688. |pb2|ee)|tp2|The state of the file (10.3.1.3.bb) controls some effects of * 0 51689. the layout routines. If the read/write mood is reading, the effect of * 0 51690. |i|space|r|, |i|newline|r| and |i|newpage|r|, upon attempting to pass * 0 51691. the logical end, is to call the event routine corresponding to * 0 51692. |i|on logical file end|r| with default action |i|undefined|r|; if it * 0 51693. is writing, the effect is to output spaces (or, in bin mood, to write some * 0 51694. undefined character) or to compress the current line or page * 0 51695. (see cc). If the read/write mood is not determined on entry to a * 0 51696. layout routine, |i|undefined|r| is called. On exit, the read/write mood * 0 51697. present on entry is restored.|cc| * 0 51698. |n||pb1|a)|ts1||i|PROC space |uqe| (REF FILE f) VOID : * 0 51699. |pc|IF |not| opened OF f THEN undefined * 0 51700. |pc|ELSE * 0 51701. |pd|BOOL reading |uqe| * 0 51702. |pe|(read mood OF f | TRUE |: write mood OF f | FALSE * 0 51703. |pe|#| undefined; SKIP); * 0 51704. |pd|(|not| get good line (f, reading) | undefined); * 0 51705. |pd|REF POS cpos |uqe| cpos OF f; * 0 51706. |pd|IF reading THEN c OF cpos +|bec| 1 * 0 51707. |pd|ELSE * 0 51708. |pe|IF logical file ended (f) THEN * 0 51709. |pf|IF bin mood OF f THEN * 0 51710. |pj|(text OF f | (FLEXTEXT t2): * 0 51711. |pk|t2 |so|p OF cpos|sc| |so|l OF cpos|sc| |so|c OF cpos|sc| |bec| SKIP); * 0 51712. |pj|c OF cpos +|bec| 1; lpos OF book OF f |bec| cpos * 0 51713. |pf|ELSE put char (f, "|vs|") * 0 51714. |pf|FI * 0 51715. |pe|ELSE c OF cpos +|bec| 1 * 0 51716. |pe|FI * 0 51717. |pd|FI * 0 51718. |pc|FI ;|r| * 0 51719. |pb1|b)|ts1||i|PROC backspace |uqe| (REF FILE f) VOID : * 0 51720. |pc|IF |not| opened OF f THEN undefined * 0 51721. |pc|ELSE REF INT c |uqe| c OF cpos OF f; * 0 51722. |pd|(c |sgt| 1 | c |mi||bec| 1 | undefined) * 0 51723. |pc|FI ;|r| * 0 51724. |pb1|c)|ts1||i|PROC newline |uqe| (REF FILE f) VOID : * 0 51725. |pc|IF |not| opened OF f THEN undefined * 0 51726. |pc|ELSE * 0 51727. |pd|BOOL reading |uqe| * 0 51728. |pe|(read mood OF f | TRUE#|g||: write mood OF f | FALSE * 0 51729. |pe|#| undefined; SKIP); * 0 51730. |pd|(|not| get good page (f, reading) | undefined); * 0 51731. |pd|REF POS cpos |uqe| cpos OF f, lpos |uqe| lpos OF book OF f; * 0 51732. |pd|IF p OF cpos |uqe| p OF lpos |and| l OF cpos |uqe| l OF lpos * 0 51733. |pd|THEN c OF cpos |bec| c OF lpos; * 0 51734. |pe|IF reading THEN newline (f) * 0 51735. |pe|ELSE * 0 51736. |pf|IF compressible (f) * 0 51737. |pf|THEN REF INT pl |uqe| p OF lpos, ll |uqe| l OF lpos; * 0 51738. |pj|FLEXTEXT text |uqe| (text OF f | (FLEXTEXT t2): t2); * 0 51739. |pj|text |so|pl|sc| |so|ll|sc| |bec| text |so|pl|sc| |so|ll|sc| |so| : c OF lpos |mi| 1|sc| * 0 51740. |pf|ELSE WHILE |not| line ended (f) DO space (f) OD * 0 51741. |pf|FI; * 0 51742. |pf|cpos |bec| lpos |bec| (p OF cpos, l OF cpos + 1, 1) * 0 51743. |pe|FI * 0 51744. |pd|ELSE cpos |bec| (p OF cpos, l OF cpos + 1, 1) * 0 51745. |pd|FI * 0 51746. |pc|FI ;|r| * 0 51747. |pb1|d)|ts1||i|PROC newpage |uqe| (REF FILE f) VOID : * 0 51748. |pc|IF |not| opened OF f THEN undefined * 0 51749. |pc|ELSE * 0 51750. |pd|BOOL reading |uqe| * 0 51751. |e|(read mood OF f | TRUE|g|#|: write mood OF f | FALSE * 0 51752. #|g|| undefined; SKIP); * 0 51753. |pd|(|not| get good file (f, reading) | undefined); * 0 51754. |pd|REF POS cpos |uqe| cpos OF f, lpos |uqe| lpos OF book OF f; * 0 51755. |pd|IF p OF cpos |uqe| p OF lpos * 0 51756. |pd|THEN cpos |bec| lpos; * 0 51757. |pe|IF reading THEN newpage (f) * 0 51758. |pe|ELSE * 0 51759. |pf|IF compressible (f) * 0 51760. |and| l OF lpos |le| l OF book bounds (f) * 0 51761. |pf|THEN REF INT pl |uqe| p OF lpos, ll |uqe| l OF lpos; * 0 51762. |pj|FLEXTEXT text |uqe| (text OF f | (FLEXTEXT t2): t2); * 0 51763. |pj|text |so|pl|sc| |so|ll|sc| |bec| text |so|pl|sc| |so|ll|sc| |so| : c OF lpos |mi| 1|sc|; * 0 51764. |pj|text |so|pl|sc| |bec| * 0 51765. text |so|pl|sc| |so| : (c OF lpos |sgt| 1 | ll | ll |mi| 1)|sc| * 0 51766. |pf|ELSE WHILE |not| page ended (f) DO newline (f) OD * 0 51767. |pf|FI; * 0 51768. |pf|cpos |bec| lpos |bec| (p OF cpos + 1, 1, 1) * 0 51769. |pe|FI * 0 51770. |pd|ELSE cpos |bec| (p OF cpos + 1, 1, 1) * 0 51771. |pd|FI * 0 51772. |pc|FI ;|r| * 0 51773. |j||pa||co|Each of the following 3 routines either returns |w|true|r|, * 0 51774. in which case the line, page or file is good (dd), or it returns * 0 51775. |w|false|r|, in which case the current position may be outside the * 0 51776. logical file or the page number may have overflowed, or it loops * 0 51777. until the matter is resolved, or it is terminated by a |b|jump|r|. * 0 51778. On exit, the read/write mood is as determined by its |i|reading|r| * 0 51779. parameter.|cc| * 0 51780. |n||pb1|e)|ts1||i|PROC |ra| get good line |uqe| * 0 51781. (REF FILE f, BOOL reading) BOOL : * 0 51782. |pc|BEGIN BOOL not ended; * 0 51783. |pd|WHILE not ended |bec| get good page (f, reading); * 0 51784. |pe|line ended (f) |and| not ended * 0 51785. |pd|DO (|not| (line mended OF f) (f) * 0 51786. |g|| set mood (f, reading); newline (f)) * 0 51787. |pd|OD; * 0 51788. |pd|not ended * 0 51789. |pc|END ;|r| * 0 51790. |pb1|f)|ts1||i|PROC |ra| get good page |uqe| * 0 51791. (REF FILE f, BOOL reading) BOOL : * 0 51792. |pc|BEGIN BOOL not ended; * 0 51793. |pd|WHILE not ended |bec| get good file (f, reading); * 0 51794. |pe|page ended (f) |and| not ended * 0 51795. |pd|DO (|not| (page mended OF f) (f) * 0 51796. |g|| set mood (f, reading); newpage (f)) * 0 51797. OD; * 0 51798. |pd|not ended * 0 51799. |pc|END ;|r| * 0 51800. |pb1|g)|ts1||i|PROC |ra| get good file |uqe| (REF FILE f, BOOL reading) BOOL : * 0 51801. |pc|BEGIN BOOL not ended |bec| TRUE; * 0 51802. |pd|WHILE set mood (f, reading); * 0 51803. |pe|not ended |and| * 0 51804. |pe|(reading | logical file ended * 0 51805. |g|| physical file ended) (f) * 0 51806. |pd|DO not ended |bec| (reading | logical file mended OF f * 0 51807. |g|| physical file mended OF f) (f) * 0 51808. |pd|OD; * 0 51809. |pd|not ended * 0 51810. |pc|END ;|r| * 0 51811. |pb1|h)|ts1||i|PROC |ra| set mood |uqe| (REF FILE f, BOOL reading) VOID : * 0 51812. |pc|(reading | set read mood (f) | set write mood (f)) ;|r| * 0 51813. |pb1|i)|ts1||i|PROC set |uqe| (REF FILE f, INT p, l, c) VOID : * 0 51814. |pc|IF |not| opened OF f |or| |not| set possible (f) THEN undefined * 0 51815. |pc|ELSE BOOL reading |uqe| * 0 51816. |e|(read mood OF f | TRUE |: write mood OF f | FALSE * 0 51817. |g|| undefined; SKIP); * 0 51818. |pd|REF POS cpos |uqe| cpos OF f, lpos |uqe| lpos OF book OF f; * 0 51819. |pd|POS ccpos |uqe| cpos; * 0 51820. |pd|IF (cpos |bec| (p, l, c)) BEYOND lpos * 0 51821. |pd|THEN cpos |bec| lpos; * 0 51822. |pe|(|not| (logical file mended OF f) (f) | undefined); * 0 51823. |pe|set mood (f, reading) * 0 51824. |pd|ELIF POS bounds |uqe| book bounds (f); * 0 51825. |pe|p |lt| 1 |or| p |sgt| p OF bounds + 1 * 0 51826. |pe||or| l |lt| 1 |or| l |sgt| l OF bounds + 1 * 0 51827. |pe||or| c |lt| 1 |or| c |sgt| c OF bounds + 1 * 0 51828. |pd|THEN cpos |bec| ccpos; undefined * 0 51829. |pd|FI * 0 51830. |pc|FI ;|r| * 0 51831. |pb1|j)|ts1||i|PROC reset |uqe| (REF FILE f) VOID : * 0 51832. |pc|IF |not| opened OF f |or| |not| reset possible (f) * 0 51833. THEN undefined * 0 51834. |pc|ELSE * 0 51835. |pd|REF BOOL (read#mood OF f) |bec| |not| put possible (f); * 0 51836. |pd|REF BOOL (write#mood OF f) |bec| |not| get possible (f); * 0 51837. |pd|REF BOOL (char#mood OF f) |bec| |not| bin possible (f); * 0 51838. |pd|REF BOOL (bin#mood OF f) |bec| FALSE; * 0 51839. |pd|REF POS (cpos OF f) |bec| (1, 1, 1) * 0 51840. |pc|FI ;|r| * 0 51841. |pb1|k)|ts1||i|PROC set char number |uqe| (REF FILE f, INT c) VOID : * 0 51842. |pc|IF |not| opened OF f THEN undefined * 0 51843. |pc|ELSE REF REF POS cpos |uqe| cpos OF f; * 0 51844. |pd|WHILE c OF cpos |ne| c * 0 51845. |pd|DO * 0 51846. |pe|IF c |lt| 1 |or| c |sgt| c OF book#bounds (f) + 1? 0 51847. |pe|THEN undefined * 0 51848. |pe|ELIF c |sgt| c OF cpos * 0 51849. |pe|THEN space (f) * 0 51850. |pe|ELSE backspace (f) * 0 51851. |pe|FI * 0 51852. |pd|OD? 0 51853. |pc|FI ;|r| * 0 51854. * 0 51855. |h|10.3.2. Transput values * 0 51856. * 0 51857. |h|10.3.2.1. Conversion routines * 0 51858. * 0 51859. |pa||j||co|The routines |i|whole|r|, |i|fixed|r| and |i|float|r| are * 0 51860. intended to be used with the formatless output routines |i|put|r|, * 0 51861. |i|print|r| and |i|write|r| when it is required to have a little * 0 51862. extra control over the layout produced. Each of these routines * 0 51863. has a |i|width|r| parameter whose absolute value specifies the * 0 51864. length of the string to be produced by conversion of the arithmetic * 0 51865. value |w|V|r| provided. Each of |i|fixed|r| and |i|float|r| has an * 0 51866. |i|after|r| parameter to specify the number of digits required after * 0 51867. the decimal point, and an |i|exp|r| parameter in |i|float|r| specifies * 0 51868. the width allowed for the exponent. If |w|V|r| cannot be expressed as * 0 51869. a string within the given |i|width|r|, even when the value of |i|after|r|, * 0 51870. if provided, has been reduced, then a string filled with * 0 51871. |i|errorchar|r| (10.2.1.t) is returned instead. * 0 51872. |pg|Leading zeroes are replaced by spaces and a sign is * 0 51873. normally included. The user can, however, specify * 0 51874. that a sign is to be included only for negative values * 0 51875. by specifying a negative width. If the width specified is zero, * 0 51876. then the shortest possible string into which |w|V|r| can be converted, * 0 51877. consistently with the other parameters, is returned. The following * 0 51878. examples illustrate some of the possibilities: * 0 51879. |p||ps||n||i|print (whole (i, |mi|4))|r| * 0 51880. |e||j|which might print |i|"|vs||vs||vs|0"|r|, |i|"|vs||vs|99"|r|, * 0 51881. |i|"|vs||mi|99"|r|, |i|"9999"|r| or, if |i|i|r| were greater than |w|9999|r|, * 0 51882. |i|"****"|r|, where |i|"*"|r| is the yield of |i|errorchar|r|; * 0 51883. |p||ps||n||i|print (whole (i, 4))|r| * 0 51884. |e||j|which would print |i|"|vs|+99"|r| rather than |i|"|vs||vs|99"|r|; * 0 51885. |p||ps||n||i|print (whole (i, 0))|r| * 0 51886. |e||j|which might print |i|"0"|r|, |i|"99"|r|, |i|"|mi|99"|r|, * 0 51887. |i|"9999"|r| or |i|"99999"|r|; * 0 51888. |p||ps||n||i|print (fixed (x, |mi|6, 3))|r|? 0 51889. |e||j|which might print |i|"|vs|2.718"|r|, |i|"27.183"|r| or * 0 51890. |i|"271.83"|r| (in which one place after the decimal point has * 0 51891. been sacrificed in order to fit the number in); * 0 51892. |p||ps||n||i|print (fixed (x, 0, 3))|r|? 0 51893. |e||j|which might print |i|"2.718"|r|, |i|"27.183"|r| or |i|"271.828"|r|; * 0 51894. |p||ps||n||i|print (float (x, 9, 3, 2))|r| * 0 51895. |e||j|which might print |i|"|mi|2.718|ttp|+0"|r|, |i|"+2.718|ttp||mi|1"|r|, * 0 51896. or |i|"+2.72|ttp|+11"|r| (in which one place after the decimal point * 0 51897. has been sacrificed in order to make room for the unexpectedly large * 0 51898. exponent).|cc| * 0 51899. |n||pb1|a)|ts1||i|MODE |ra| NUMBER |uqe| UNION (|nl||u|L|i|#REAL|ng|, |nl||u|L|i|#INT|ng|) ;|r| * 0 51900. |pb1|b)|ts1||i|PROC whole |uqe| (NUMBER v, INT width) STRING : * 0 51901. |pc|CASE v IN * 0 51902. |xc||nl|(|u|L|i|#INT x): * 0 51903. |pe|(INT length |bec|#|g|ABS width |mi| (x |lt| |u|L|i| 0 |or| width |sgt| 0 | 1 | 0), * 0 51904. |xd||u|L|i|#INT n |bec| ABS x; * 0 51905. |xd|IF width |uqe| 0 THEN * 0 51906. |xe||u|L|i|#INT m |bec| n; length |bec| 0; * 0 51907. |pf|WHILE m |sq||bec| |u|L|i| 10; length +|bec| 1; m |ne| |u|L|i| 0 * 0 51908. |xe|DO SKIP OD * 0 51909. |xd|FI; * 0 51910. |xd|STRING s |bec| subwhole (n, length); * 0 51911. |pe|IF length |uqe| 0 |g||or| char in string (errorchar, LOC INT, s) * 0 51912. |pe|THEN ABS width |sx| errorchar * 0 51913. |xd|ELSE * 0 51914. |pf|(x |lt| |u|L|i| 0 | "|mi|" |: width |sgt| 0 | "+" | "") PLUSTO s; * 0 51915. |pf|(width |ne| 0 | (ABS width |mi| UPB s) |sx| "|vs|" PLUSTO s); * 0 51916. |xe|s * 0 51917. |xd|FI)|ng| , * 0 51918. |xc||nl|(|u|L|i|#REAL x): fixed (x, width, 0)|ng| * 0 51919. |xs|ESAC ;|r| * 0 51920. |pb1|c)|ts1||i|PROC fixed |uqe| (NUMBER v, INT width, after) STRING : * 0 51921. |pc|CASE v IN * 0 51922. |pd||nl|(|u|L|i|#REAL x): * 0 51923. |pe|IF INT length |bec|#|g|ABS width |mi| (x |lt| |u|L|i| 0 |or| width |sgt| 0 | 1 | 0); * 0 51924. |e|after |sge| 0 |and| (length |sgt| after |or| width |uqe| 0) * 0 51925. |pe|THEN |u|L|i|#REAL y |uqe| ABS x; * 0 51926. |pf|IF width |uqe| 0 * 0 51927. |pf|THEN length |bec| (after |uqe| 0 | 1 | 0 ); * 0 51928. |pj|WHILE y + |u|L|i| .5 |sx| |u|L|i| .1 |up| after |sge| |u|L|i| 10 |up| length * 0 51929. |pj|DO length +|bec| 1 OD; * 0 51930. |pj|length +|bec| (after |uqe| 0 | 0 | after + 1) * 0 51931. |xe|FI; * 0 51932. |e|STRING s |bec| subfixed (y, length, after); * 0 51933. |pf|IF |not| char in string (errorchar, LOC INT, s) * 0 51934. |pf|THEN (length |sgt| UPB s |and| y |lt| |u|L|i| 1.0 | "0" PLUSTO s); * 0 51935. |pj|(x |lt| |u|L|i| 0 | "|mi|" |: width |sgt| 0 | "+" | "") |g|PLUSTO s; * 0 51936. |xf|(width |ne| 0 |g|| (ABS width |mi| UPB s) |sx| "|vs|" PLUSTO s); * 0 51937. |xf|s * 0 51938. |pf|ELIF after |sgt| 0 * 0 51939. |pf|THEN fixed (v, width, after |mi| 1) * 0 51940. |pf|ELSE ABS width |sx| errorchar * 0 51941. |xe|FI * 0 51942. |pe|ELSE undefined; ABS width |sx| errorchar * 0 51943. |xd|FI|ng| , * 0 51944. |pd||nl|(|u|L|i|#INT x): fixed (|u|L#|i|REAL (x), width, after)|ng| * 0 51945. |xs|ESAC ;|r| * 0 51946. |pb1|d)|ts1||i|PROC float |uqe| (NUMBER v, INT width, after, exp) STRING : * 0 51947. |pc|CASE v IN * 0 51948. |pd||nl|(|u|L|i|#REAL x): * 0 51949. |pe|IF INT before |uqe|#|g|ABS width |mi| ABS exp * 0 51950. |mi| (after |ne| 0 | after + 1 | 0) |mi| 2; * 0 51951. SIGN before + SIGN after |sgt| 0 * 0 51952. |pe|THEN STRING s, |u|L|i|#REAL y |bec| ABS x, INT p |bec| 0; * 0 51953. |e||u|l|i|#standardize (y, before, after, p); * 0 51954. |pf|s |bec| * 0 51955. |pj|fixed |ro|SIGN x |sx| y, SIGN width |sx| (ABS width |mi| ABS exp |mi| 1), * 0 51956. after|rc| + "|ttp|" + whole (p, exp); * 0 51957. |pf|IF exp |uqe| 0 |or| char in string (errorchar, LOC INT, s) * 0 51958. |pf|THEN * 0 51959. |pj|float |ro|x, width, (after |ne| 0 | after |mi| 1 | 0), * 0 51960. (exp#|sgt|#0 | exp#+#1 | exp#|mi|#1)|rc|#? 0 51961. |pf|ELSE s * 0 51962. |xe|FI * 0 51963. |pe|ELSE undefined; ABS width |sx| errorchar * 0 51964. |xd|FI|ng| , * 0 51965. |pd||nl|(|u|L|i|#INT x): |g|float (|u|L|i|#REAL (x), width, after, exp)|ng| * 0 51966. |xs|ESAC ;|r| * 0 51967. |pb1|e)|ts1||i|PROC |ra| subwhole |uqe| (NUMBER v, INT width) STRING : * 0 51968. |pd|~J returns a string of maximum length |ap|width|ap| containing a * 0 51969. decimal representation of the positive integer |ap|v|ap| ~J * 0 51970. |pc|CASE v IN * 0 51971. |pd||nl|(|u|L|i|#INT x): * 0 51972. |pe|BEGIN STRING s, |u|L|i|#INT n |bec| x;? 0 51973. |pf|WHILE dig char (|u|S|i| (n MOD |u|L|i| 10)) PLUSTO s; * 0 51974. |pj|n |sq||bec| |u|L|i| 10; n |ne| |u|L|i| 0 * 0 51975. |pf|DO SKIP OD; * 0 51976. |pf|(UPB s |sgt| width | width |sx| errorchar | s) * 0 51977. |pe|END |ng| * 0 51978. |xs|ESAC ;|r| * 0 51979. |pb1|f)|ts1||i|PROC |ra| subfixed |uqe| (NUMBER v, INT width, after) STRING : * 0 51980. |pd|~J returns a string of maximum length |ap|width|ap| containing a rounded * 0 51981. decimal representation of the positive real number |ap|v|ap|; * 0 51982. if |ap|after|ap| is greater than zero, this string contains a decimal * 0 51983. point followed by |ap|after|ap| digits ~J * 0 51984. |pc|CASE v IN * 0 51985. |xc||nl|(|u|L|i|#REAL x): * 0 51986. |xd|BEGIN STRING s, INT before |bec| 0;? 0 51987. |pf||u|L|i|#REAL y |bec| x + |u|L|i| .5 |sx| |u|L|i| .1 |up| after; * 0 51988. |pf|PROC choosedig |uqe| (REF |u|L|i|#REAL y) CHAR : * 0 51989. |pj|dig char ((INT c |bec| |u|S|i| ENTIER (y |sx||bec| |u|L|i| 10.0); (c |sgt| 9 | c |bec| 9); * 0 51990. |g| y |mi||bec| |u|K|i|#c; c)); * 0 51991. |pf|WHILE y |sge| |u|L|i| 10.0 |up| before * 0 51992. DO before +|bec| 1 OD; * 0 51993. |xe|y /|bec| |u|L|i| 10.0 |up| before; * 0 51994. |xe|TO before DO s PLUSAB choosedig (y) OD; * 0 51995. |xe|(after |sgt| 0 | s PLUSAB "."); * 0 51996. |xe|TO after DO s PLUSAB choosedig (y) OD; * 0 51997. |xe|(UPB s |sgt| width | width |sx| errorchar | s) * 0 51998. |xd|END |ng| * 0 51999. |xs|ESAC ;|r| * 0 52000. |pb1|g)|ts1||i|PROC |ra| |u|l|i| standardize |uqe| * 0 52001. |ef|(REF |u|L|i|#REAL y, INT before, after, REF INT p) VOID : * 0 52002. |pd|~J adjusts the value of |ap|y|ap| so that it may be transput according * 0 52003. to the format |do| n(before)d . n(after)d |do|; |ap|p|ap| is set so that * 0 52004. y#|sx|#10#|up|#p is equal to the original value of |ap|y|ap| ~J * 0 52005. |pc|BEGIN * 0 52006. |pd||u|L|i|#REAL g |uqe| |u|L|i| 10.0 |up| before; * 0 52007. |ef||u|L|i|#REAL h |uqe| g |sx| |u|L|i| .1; * 0 52008. |pd|WHILE y |sge| g DO y |sx||bec| |u|L|i| .1; p +|bec| 1 OD; * 0 52009. |pd|(y |ne| |u|L|i| 0.0 * 0 52010. |#WHILE y |lt| h DO y |sx||bec| |u|L|i| 10.0; p |mi||bec| 1 OD); * 0 52011. |pd|(y + |u|L|i| .5 |sx| |u|L|i| .1 |up| after |sge| g | y |bec| h; p +|bec| 1) * 0 52012. |xs|END ;|r| * 0 52013. |pb1|h)|ts1||i|PROC |ra| dig char |uqe| (INT x) CHAR : "0123456789abcdef" |so|x + 1|sc| ;|r| * 0 52014. |pb1|i)|ts1||i|PROC |ra| string to |u|l|i|#int |uqe| * 0 52015. |ef|(STRING s, INT radix, REF |u|L|i|#INT i) BOOL : * 0 52016. |pd|~J returns true if the absolute value of the result is |le|#|u|l|i|#max#int ~J * 0 52017. |pc|BEGIN * 0 52018. |pd||u|L|i|#INT lr |uqe| |u|K|i|#radix; BOOL safe |bec| TRUE; * 0 52019. |pd||u|L|i|#INT n |bec| |u|L|i|#0, |u|L|i|#INT m |uqe| |u|l|i|#max int |sq| lr; * 0 52020. |pd||u|L|i|#INT m1 |uqe| |u|l|i|#max int |mi| m |sx| lr; * 0 52021. |pd|FOR i FROM 2 TO UPB s * 0 52022. |pd|WHILE |u|L|i| INT dig |uqe| |u|K|i|#char dig (s |so|i|sc|); * 0 52023. |e|safe |bec| n |lt| m |or| n |uqe| m |and| dig |le| m1 * 0 52024. |pd|DO n |bec| n |sx| lr + dig OD; * 0 52025. |pd|IF safe * 0 52026. |pd|THEN i |bec| (s |so|1|sc| |uqe| "+" | n | |mi| n); TRUE * 0 52027. |pd|ELSE FALSE * 0 52028. |pd|FI * 0 52029. |xs|END ;|r| * 0 52030. |pb1|j)|ts1||i|PROC |ra| string to |u|l|i|#real |uqe| (STRING s, REF |u|L#|i|REAL r) BOOL : * 0 52031. |pd|~J returns true if the absolute value of the result is#|le| |u|l|i|#max#real ~J? 0 52032. |pc|BEGIN * 0 52033. |pd|INT e |bec| UPB s + 1;? 0 52034. |pd|char in string ("|ttp|", e, s); * 0 52035. |pd|INT p |bec| e; char in string (".", p, s); * 0 52036. |pd|INT j |bec| 1, length |bec| 0, |u|L|i|#REAL x |bec| |u|L|i| 0.0;? 0 52037. |pd|~J skip leading zeroes: ~J? 0 52038. |pd|FOR i FROM 2 TO e |mi| 1 * 0 52039. |pd|WHILE s |so|i|sc| |uqe| "0" |or| s |so|i|sc| |uqe| "." |or| s |so|i|sc| |uqe| "|vs|" * 0 52040. |pd|DO j |bec| i OD; * 0 52041. |pd|FOR i FROM j + 1 TO e |mi| 1 WHILE length |lt| |u|L|i| real width * 0 52042. |pd|DO? 0 52043. |pe|IF s |so|i|sc| |ne| "." * 0 52044. |pe|THEN x |bec| x |sx| |u|L|i| 10.0 + |u|K|i| char dig (s |so|j |bec| i|sc|); length +|bec| 1? 0 52045. |pe|FI ~J all significant digits converted ~J? 0 52046. |xc|OD; * 0 52047. |pd|~J set preliminary exponent: ~J * 0 52048. |pd|INT exp |bec| (p |sgt| j | p |mi| j |mi| 1 | p |mi| j), expart |bec| 0; * 0 52049. |pd|~J convert exponent part: ~J? 0 52050. |pd|BOOL safe |bec| * 0 52051. |xd|IF e |lt| UPB s * 0 52052. |xd|THEN string to |u|l|i| int (s |so|e + 1 : |sc|, 10, expart) * 0 52053. |xd|ELSE TRUE * 0 52054. |xd|FI; * 0 52055. |pd|~J prepare a representation of |u|L|i| max real to compare with * 0 52056. the |u|L|i| REAL value to be delivered: ~J * 0 52057. |pd||u|L|i| REAL max stag |bec| |u|L|i| max real, INT max exp |bec| 0; * 0 52058. |pd||u|l|i| standardize (max stag, length, 0, max exp); * 0 52059. |pd|exp +|bec| expart; * 0 52060. |pd|IF |not| safe |or| |g|(exp |sgt| max exp |or| exp |uqe| max exp |and| x |sgt| max stag) * 0 52061. |pd|THEN FALSE? 0 52062. |pd|ELSE r |bec| (s |so|1|sc| |uqe| "+" | x | |mi| x) |sx| |u|L|i| 10.0 |up| exp; TRUE? 0 52063. |pd|FI? 0 52064. |pc|END ;|r|? 0 52065. |pb1|k)|ts1||i|PROC |ra| char dig |uqe| (CHAR x) INT : * 0 52066. |pc|(x |uqe| "|vs|" | 0 | INT i; * 0 52067. char in string (x, i, "0123456789abcdef"); i |mi| 1) ;|r| * 0 52068. |pb1|l)|ts1||i|PROC char in string |uqe| (CHAR c, REF INT i, STRING s) BOOL : * 0 52069. |pc|(BOOL found |bec| FALSE; * 0 52070. |pc|FOR k FROM LWB s TO UPB s WHILE |not| found * 0 52071. |pc|DO * 0 52072. (c |uqe| s |so|k|sc| | i |bec| k; found |bec| TRUE) OD; * 0 52073. |xs|found) ;|r|? 0 52074. |pb1|m)|ts1||i|INT |u|l|i|#int width |uqe| * 0 52075. |xc|~J the smallest integral value such that |ap||u|l#|i|max#int|ap| may * 0 52076. be converted without error using the pattern n(|u|l#|i|int#width)d ~J * 0 52077. |xs|(INT c |bec| 1; * 0 52078. |xs|WHILE |u|L|i|#10 |up| (c |mi| 1) |lt| |u|L|i|#.1 |sx| |u|l|i|#max int * 0 52079. |g|DO c +|bec| 1 OD; |xs|c) ;|r| * 0 52080. |pb1|n)|ts1||i|INT |u|l|i|#real width |uqe| * 0 52081. |xc|~J the smallest integral value such that different strings are * 0 52082. produced by conversion of |ap|1.0|ap| and of |ap|1.0#+#|u|l#|i|small#real|ap| * 0 52083. using the pattern d#.#n(|u|l#|i|real#width#|mi|#1)d ~J * 0 52084. |pc|1 |mi| |u|S|i|#ENTIER |g|(|u|l|i|#ln (|u|l|i|#small real) / * 0 52085. |u|l|i|#ln (|u|L|i|#10)) ;|r| * 0 52086. |pb1|o)|ts1||i|INT |u|l|i|#exp width |uqe| * 0 52087. |xc|~J the smallest integral value such that |ap||u|l#|i|max#real|ap| * 0 52088. may be converted without error using the pattern * 0 52089. d#.#n(|u|l#|i|real#width#|mi|#1)d#e#n(|u|l#|i|exp#width)d ~J * 0 52090. |pc|1 + |u|S|i|#ENTIER (|u|l|i|#ln (|u|l|i|#ln (|u|l|i|#max real) / * 0 52091. |g|#|u|l|i|#ln (|u|L|i|#10)) / |u|l|i|#ln (|u|L|i|#10)) ;|r| * 0 52092. * 0 52093. |h|10.3.2.2. Transput modes * 0 52094. * 0 52095. |pb1|a)|ts1||i|MODE |ra| SIMPLOUT |uqe| * 0 52096. UNION |ro||nl||u|L#|i|INT|ng|, |nl||u|L#|i|REAL|ng|, |nl||u|L#|i|COMPL|ng|, BOOL, * 0 52097. |nl||u|L#|i|BITS|ng|, CHAR, |so||thin||sc| CHAR|rc| ;|r| * 0 52098. |pb1|b)|ts1||i|MODE |ra| OUTTYPE |uqe| * 0 52099. ~J~J an actual|r|-|i|declarer specifying a mode united from |r||co|2.1.3.6.a|cc||i| * 0 52100. a sufficient set of modes none of which is |b||ap|void|ap||i| or contains * 0 52101. |b||ap|flexible|ap||i|, |b||ap|reference#to|ap||i|, * 0 52102. |b||ap|procedure|ap||i| or |b||ap|union of|ap||i| ~J~J ;|r|? 0 52103. |pb1|c)|ts1||i|MODE |ra| SIMPLIN |uqe| UNION |ro||nl|REF |u|L#|i|INT|ng|, |nl|REF * 0 52104. |u|L#|i|REAL|ng|, |nl|REF |u|L|i| COMPL|ng|, REF BOOL, |nl|REF |u|L#|i|BITS|ng|, REF CHAR, * 0 52105. REF |so||thin||sc| CHAR, REF STRING|rc| ;|r| * 0 52106. |pb1|d)|ts1||i|MODE |ra| INTYPE |uqe| ~J~J an actual|r|-|i|declarer specifying a * 0 52107. mode united from |r||co|2.1.3.6.a|cc| |b||ap|reference to flexible row of character|ap||i| * 0 52108. together with a sufficient set of modes each of which is * 0 52109. |b||ap|reference#to|ap||i| followed by a mode which * 0 52110. does not contain |b||ap|flexible|ap||i|, |b||ap|reference#to|ap||i|, * 0 52111. |b||ap|procedure|ap||i| or |b||ap|union#of|ap||i| ~J~J ;|r|? 0 52112. |pa||co|See the remarks after 10.2.3.1 concerning the term "sufficient set".|cc| * 0 52113. * 0 52114. |h|10.3.2.3. Straightening * 0 52115. * 0 52116. |pb1|a)|ts1||i|OP |ra| STRAIGHTOUT |uqe| (OUTTYPE x) |so||thin||sc| SIMPLOUT : * 0 52117. |e|~J~J the result of "straightening" |ap|x|ap| ~J~J ;|r| * 0 52118. |pb1|b)|ts1||i|OP |ra| STRAIGHTIN |uqe| (INTYPE x) |so||thin||sc| SIMPLIN : * 0 52119. |e|~J~J the result of straightening |ap|x|ap| ~J~J ;|r| * 0 52120. |pb1||j|c)|tp1|The result of "straightening" a given value |w|V|r| is a * 0 52121. multiple value |w|W|r| |co|of one dimension|cc| obtained as follows: * 0 52122. |et|it is required that |w|V|r| |co|if it is a name|cc| be not nil;? 0 52123. |et|a counter |w|i|r| is set to |w|0|r|; * 0 52124. |et||w|V|r| is "traversed" |co|d|cc| using |w|i|r|; * 0 52125. |et||w|W|r| is composed of a descriptor |w|((1,#i))|r| and * 0 52126. the elements obtained by traversing |w|V|r|; * 0 52127. |et|if |w|V|r| is not (is) a name, then the mode of the result * 0 52128. is the mode specified by |i||so||thin||sc| SIMPLOUT|r| * 0 52129. (|i||so||thin||sc| SIMPLIN|r|). * 0 52130. |pb1|d)|tp1|A value |w|V|r| is "traversed", using a counter |w|i|r|, as follows: * 0 52131. |pi|If |w|V|r| is (refers to) a value from whose mode that * 0 52132. specified by |i|SIMPLOUT|r| is united, * 0 52133. |pi|then * 0 52134. |et||w|i|r| is increased by one; * 0 52135. |et|the element of |w|W|r| selected by |w|(i)|r| is |w|V|r|; * 0 52136. |pi|otherwise, * 0 52137. |ph|Case#A:#|w|V|r| is (refers to) a multiple value |co|of one dimension|cc| having a descriptor * 0 52138. |w|((l,#u))|r|: * 0 52139. |et|for |w|j#|uqe|#l, ...#, u|r|, the element (the subname) of |w|V|r| * 0 52140. selected by |w|(j)|r| is traversed using |w|i|r|; * 0 52141. |ph|Case#B:#|w|V|r| is (refers to) a multiple value * 0 52142. |co|of |w|n|r| dimensions, |w|n#|sge|#2|r||cc| whose descriptor is * 0 52143. |w|((l|s0|1|s1|,#u|s0|1|s1|), (l|s0|2|s1|,#u|s0|2|s1|), ...#, * 0 52144. (l|s0|n|s1|,#u|s0|n|s1|))|r| where |w|n#|sge|#2|r|:? 0 52145. |et|for |w|j#|uqe|#l|s0|1|s1|, ...#, u|s0|1|s1||r|, * 0 52146. the multiple value selected |co|2.1.3.4.i|cc| * 0 52147. by (the name generated |co|2.1.3.4.j|cc| by) the trim * 0 52148. |w|(j,#(l|s0|2|s1|,#u|s0|2|s1|,#0),#...#,|g|#(l|s0|n|s1|,#u|s0|n|s1|,#0))|r|? 0 52149. is traversed using |w|i|r|; * 0 52150. |ph|Case#C:#|w|V|r| is (refers to) a structured value |w|V1|r|:? 0 52151. |et|the fields (the subnames of |w|V|r| referring to the fields) of |w|V1|r|, * 0 52152. taken in order, are traversed using |w|i|r|. * 0 52153. * 0 52154. |h|10.3.3. Formatless transput * 0 52155. * 0 52156. |pa||j||co|In formatless transput, the elements of a "data list" are * 0 52157. transput, one after the other, via a specified file. Each element * 0 52158. of the data list is either a layout routine of the mode specified by * 0 52159. |i|PROC (REF FILE) VOID|r| (10.3.1.6) or a value of the mode specified by * 0 52160. |i|OUTTYPE|r| (on output) or |i|INTYPE|r| (on input). On * 0 52161. encountering a layout routine in the data list, that routine is * 0 52162. called with the specified file as parameter. Other values in the * 0 52163. data list are first straightened (10.3.2.3) and the resulting * 0 52164. values are then transput via the given file one after the other. * 0 52165. |pg|Transput normally takes place at the current position but, if * 0 52166. there is no room on the current line (on output) or if a readable * 0 52167. value is not present there (on input), then first, the event routine * 0 52168. corresponding to |i|on line end|r| (or, where appropriate, to * 0 52169. |i|on#page#end|r|, |i|on#physical#file#end|r| or |i|on#logical#file#end|r|) is called, * 0 52170. and next, if this returns |w|false|r|, the next "good" character * 0 52171. position of the book is found, viz., the first character position of * 0 52172. the next nonempty line.|cc| * 0 52173. * 0 52174. |h|10.3.3.1. Formatless output * 0 52175. * 0 52176. |pa||j||co|For formatless output, |i|put|r| (a) and |i|print|r| (or |i|write|r|) (10.5.1.d) * 0 52177. may be used. Each straightened value |w|V|r| from the data list is output as * 0 52178. follows: * 0 52179. |pb2|aa)|tp2|If the mode of |w|V|r| is specified by |u|L#|i|INT|r|, * 0 52180. then first, if there is not enough room for |u|l#|i|int width + 2|r| * 0 52181. characters on the remainder of the current line, a good position is found on * 0 52182. a subsequent line (see 10.3.3); * 0 52183. next, when not at the beginning of a line, a space is given and then * 0 52184. |w|V|r| is output as if under the control of the |b|picture|r| * 0 52185. |i|n(|u|l#|i|int width |mi| 1)z + d|r|. * 0 52186. |pb2|bb)|tp2|If the mode of |w|V|r| is specified by |u|L#|i|REAL|r|, * 0 52187. then first, if there is not enough room for * 0 52188. |u|l#|i|real width + |u|l#|i|exp width + 5|r| characters on the * 0 52189. current line, then a good position is found on a subsequent line; * 0 52190. next, when not at the beginning of a line, a space is given and then * 0 52191. |w|V|r| is output as if under control of the |b|picture|r| * 0 52192. |n||p||ps||i|+d . n(|u|l#|i|real width |mi| 1)d#e#n(|u|l#|i|exp width |mi| 1)z +d|r|.? 0 52193. |pb2||j|cc)|tp2|If the mode of |w|V|r| is specified by |u|L#|i|COMPL|r|, * 0 52194. then first, if there is not enough room for * 0 52195. |i|2 |sx| (|u|l#|i|real width + |u|l#|i|exp width) + 11|r| characters * 0 52196. on the current line, then a good position is found on a subsequent line; * 0 52197. next, when not at the beginning of a line, a space is given and then * 0 52198. |w|V|r| is output as if under control of the |b|picture|r| * 0 52199. |n||p||ps||i|+d . n(|u|l#|i|real width |mi| 1)d#e#n(|u|l#|i|exp width |mi| 1)z +d? 0 52200. |g|"|vs|"i |g|+d . n(|u|l#|i|real width |mi| 1)d#e#n? 0 52201. (|u|l#|i|exp width |mi| 1)z +d|r|. * 0 52202. |pb2||j|dd)|tp2|If the mode of |w|V|r| is specified by |i|BOOL|r|, * 0 52203. then first, if the current line is full, a good position is found * 0 52204. on a subsequent line; next, if |w|V|r| is |w|true|r| (|w|false|r|), * 0 52205. the character yielded by |i|flip|r| (|i|flop|r|) is output * 0 52206. (with no intervening space). * 0 52207. |pb2|ee)|tp2|If the mode of |w|V|r| is specified by |u|L#|i|BITS|r|, * 0 52208. then the elements of the only field of |w|V|r| are output (as in dd) * 0 52209. one after the other (with no intervening spaces, and with new lines * 0 52210. being taken as required). * 0 52211. |pb2|ff)|tp2|If the mode of |w|V|r| is specified by |i|CHAR|r|, * 0 52212. then first, if the current line is full, a good position is found * 0 52213. on a subsequent line; next |w|V|r| is output (with no intervening * 0 52214. space). * 0 52215. |pb2|gg)|tp2|If the mode of |w|V|r| is specified by |i||so||thin||sc| CHAR|r|, * 0 52216. then the elements of |w|V|r| are output (as in ff) one after the other * 0 52217. (with no intervening spaces, and with new lines being taken as * 0 52218. required).|cc| * 0 52219. |n||pb1|a)|ts1||i|PROC put |uqe|? 0 52220. |g|#(REF FILE f,$#|so||thin||sc|#UNION (OUTTYPE, PROC (REF FILE) VOID) x) VOID :? 0 52221. |pc|IF opened OF f THEN * 0 52222. |pd|FOR i TO UPB x * 0 52223. |pd|DO CASE * 0 52224. set write mood (f); set char mood (f); * 0 52225. x#|so|i|sc| IN * 0 52226. |pe|(PROC (REF FILE) VOID pf): pf (f) , * 0 52227. |pe|(OUTTYPE ot): * 0 52228. |pe|BEGIN * 0 52229. |pf||so||thin||sc| SIMPLOUT y |uqe| STRAIGHTOUT ot; * 0 52230. |pf||nl|PROC |u|l|i| real conv |uqe| (|u|L#|i|REAL r) STRING : * 0 52231. |pj|float (r, |u|l|i|#real width + |u|l|i|#exp width + 4,|g| * 0 52232. |u|l|i|#real width |mi| 1, |u|l|i|#exp width + 1)|ng|; * 0 52233. |pf|FOR j TO UPB y * 0 52234. |pf|DO CASE y |so|j|sc| IN * 0 52235. |pj|(UNION (NUMBER, |nl||u|L#|i|COMPL|ng|) nc): * 0 52236. |pk|BEGIN STRING s |bec| * 0 52237. |pkk|CASE nc IN * 0 52238. |e||nl|(|u|L|i| INT k): |g|whole (k, |u|l|i|#int width + 1)|ng| , * 0 52239. |e||nl|(|u|L#|i|REAL r): |u|l|i| real conv (r)|ng| , * 0 52240. |e||nl|(|u|L#|i|COMPL z): * 0 52241. |g||u|l|i| real conv (RE z) + "|vs||tip|"|g|#? 0 52242. + |u|l|i| real conv (IM z)|ng| * 0 52243. |xk|ESAC;? 0 52244. |xk|REF REF POS cpos |uqe| cpos OF f, INT n |uqe| UPB s; * 0 52245. |pkk|WHILE next pos (f); * 0 52246. (n |sgt| c OF book bounds (f) | undefined); * 0 52247. |e|c OF cpos + (c OF cpos |uqe| 1 | n | n + 1) |sgt| * 0 52248. |g| c OF book bounds (f) + 1 * 0 52249. |pkk|DO (|not| (line mended OF f) (f) | put (f, newline)); * 0 52250. set write mood (f) * 0 52251. |xk|OD; * 0 52252. |e|(c OF cpos |ne| 1 | "|vs|" PLUSTO s); * 0 52253. |e|FOR k TO UPB s DO put char (f, s |so|k|sc|) OD * 0 52254. |xj|END ~J numeric ~J , * 0 52255. |pj|(BOOL b): * 0 52256. |ef|(next pos (f); put char (f, (b | flip | flop))) , * 0 52257. |pj||nl|(|u|L#|i|BITS lb): * 0 52258. |xj|FOR k TO |u|l|i|#bits width * 0 52259. |xj|DO put (f, (|u|l#f|i|#OF#lb) |so|k|sc|) OD|ng| , * 0 52260. |pj|(CHAR k): * 0 52261. |g|(next pos (f); put char (f, k)) , * 0 52262. |pj|(|so||thin||sc| CHAR ss): * 0 52263. |xj|FOR k FROM LWB ss TO UPB ss * 0 52264. |e|DO next pos (f); put char (f, ss |so|k|sc|) OD * 0 52265. |pf|ESAC * 0 52266. OD * 0 52267. |xd|END * 0 52268. |xc|ESAC * 0 52269. OD? 0 52270. |xs|ELSE undefined * 0 52271. |xs|FI ;|r| * 0 52272. |pb1|b)|ts1||i|PROC |ra| put char |uqe| (REF FILE f, CHAR char) VOID : * 0 52273. |pc|IF opened OF f |and| |not| line ended (f) * 0 52274. |pc|THEN REF POS cpos |uqe| cpos OF f, lpos |uqe| lpos OF book OF f; * 0 52275. |pd|set char mood (f); set write mood (f); * 0 52276. |xc|REF INT p |uqe| p OF cpos, l |uqe| l OF cpos, c |uqe| c OF cpos; * 0 52277. |e|CHAR k; BOOL found |bec| FALSE; * 0 52278. |pd|CASE text OF f IN * 0 52279. |xd|(TEXT): (k |bec| char; found |bec| TRUE) , * 0 52280. |xd|(FLEXTEXT): * 0 52281. |pf|FOR i TO UPB |u|f|i| OF conv OF f WHILE |not| found * 0 52282. |pf|DO * 0 52283. STRUCT (CHAR internal, external) key |uqe|#|g|(|u|f|i| OF conv OF f) |so|i|sc|;? 0 52284. |pj|(internal OF key |uqe| char | k |bec| external OF key; found |bec| TRUE)? 0 52285. |pf|OD * 0 52286. |xc|ESAC; * 0 52287. |pd|IF found THEN * 0 52288. |pe|CASE text OF f IN * 0 52289. |pf|(TEXT t1): t1 |so|p|sc| |so|l|sc| |so|c|sc| |bec| k , * 0 52290. |pf|(FLEXTEXT t2): t2 |so|p|sc| |so|l|sc| |so|c|sc| |bec| k * 0 52291. |xd|ESAC; * 0 52292. |e|c +|bec| 1; * 0 52293. |pe|IF cpos BEYOND lpos THEN lpos |bec| cpos * 0 52294. |pe|ELIF |not| set possible (f) |g||and| POS (p OF lpos, l OF lpos, 1) * 0 52295. BEYOND cpos * 0 52296. |pe|THEN lpos |bec| cpos; * 0 52297. |pf|(compressible (f) | * 0 52298. |pj|~J~J the size of the line and page containing the logical end of the * 0 52299. book and of all subsequent lines and pages may be increased * 0 52300. |r||co|e.g., to the sizes with which the book was originally established * 0 52301. (10.3.1.4.cc) or to the sizes implied by |i|max#pos OF chan OF#f|cc| ~J~J) * 0 52302. |xd|FI * 0 52303. |pd|ELSE k |bec| "|vs|"; * 0 52304. |pe|IF |not| (char error mended OF f) (f, k)? 0 52305. |pe|THEN undefined; k |bec| "|vs|"? 0 52306. |xd|FI; * 0 52307. |e|check pos (f); put char (f, k)? 0 52308. |xc|FI * 0 52309. |xs|ELSE undefined * 0 52310. |xs|FI ~J write mood is still set ~J ;|r|? 0 52311. |pb1|c)|ts1||i|PROC |ra| next pos |uqe| (REF FILE f) VOID : * 0 52312. |pc|(|not| get good line (f, read mood OF f) | undefined) * 0 52313. |xc|~J the line is now good |r||co|10.3.1.6.dd|cc||i| and * 0 52314. the read/write mood is as on entry ~J ;|r| * 0 52315. * 0 52316. |h|10.3.3.2. Formatless input * 0 52317. * 0 52318. |pa||j||co|For formatless input, |i|get|r| (a) and |i|read|r| (10.5.1.e) may be used. * 0 52319. Values from the book are assigned to each straightened name |w|N|r| * 0 52320. from the data list as follows: * 0 52321. |pb2|aa)|tp2|If the mode of |w|N|r| is specified by |i|REF#|u|L#|i|INT|r|, * 0 52322. then first, the book is searched for the first character that * 0 52323. is not a space (finding good positions on subsequent lines as * 0 52324. necessary); * 0 52325. next, the largest string is read from the book that could be "indited" (10.3.4.1.1.kk) * 0 52326. under the control of some |b|picture|r| of the form * 0 52327. |i|+#n(k1)"|vs|"#n(k2)d#d|r| or |i|n(k2)d#d|r| (where |i|k1|r| and * 0 52328. |i|k2|r| yield arbitrary nonnegative integers); this string is * 0 52329. converted to an integer and assigned to |w|N|r|; * 0 52330. if the conversion is unsuccessful, the event routine corresponding to * 0 52331. |i|on value error|r| is called. * 0 52332. |pb2|bb)|tp2|If the mode of |w|N|r| is specified by |i|REF#|u|L#|i|REAL|r|, * 0 52333. then first, the book is searched for the first character that is not * 0 52334. a space (finding good positions on subsequent lines as necessary); * 0 52335. next, the largest string is read from the book that could be indited * 0 52336. under the control of some |b|picture|r| of the form * 0 52337. |i|+ n(k1)"|vs|" n(k2)d|r| or |i|n(k2)d|r| followed by * 0 52338. |i|. n(k3)d d|r| or by |i|ds.|r|, possibly followed again by * 0 52339. |i|e n(k4)"|vs|" + n(k5)"|vs|" n(k6)d d|r| or by * 0 52340. |i|e n(k5)"|vs|" n(k6)d d|r|; this string is converted to a real * 0 52341. number and assigned to |w|N|r|; * 0 52342. if the conversion is unsuccessful, the event routine corresponding to * 0 52343. |i|on value error|r| is called. * 0 52344. |pb2|cc)|tp2|If the mode of |w|N|r| is specified by |i|REF#|u|L#|i|COMPL|r|, * 0 52345. then first, a real number is input (as in bb) and assigned to the first * 0 52346. subname of |w|N|r|; * 0 52347. next, the book is searched for the first character that is not a space; * 0 52348. next, a character is input and, if it is not |i|"|tip|"|r| or |i|"i"|r|, * 0 52349. then the event routine corresponding to |i|on char error|r| (10.3.1.3.cc) is called, * 0 52350. the suggestion being |i|"|tip|"|r|; * 0 52351. finally, a real number is input and assigned to the second * 0 52352. subname of |w|N|r|. * 0 52353. |pb2|dd)|tp2|If the mode of |w|N|r| is specified by |i|REF#BOOL|r|, * 0 52354. then first, the book is searched for the first character that is not * 0 52355. a space (finding good positions on subsequent lines as necessary); * 0 52356. next, a character is read; if this character is the same as that yielded * 0 52357. by |i|flip|r| (|i|flop|r|), then |w|true|r| (|w|false|r|) * 0 52358. is assigned to |w|N|r|; otherwise, the event routine corresponding to * 0 52359. |i|on char error|r| is called, the suggestion being * 0 52360. |i|flop|r|. * 0 52361. |pb2|ee)|tp2|If the mode of |w|N|r| is specified by |i|REF#|u|L#|i|BITS|r|, * 0 52362. then input takes place (as in dd) to the subnames of |w|N|r| one after * 0 52363. the other (with new lines being taken as required). * 0 52364. |pb2|ff)|tp2|If the mode of |w|N|r| is specified by |i|REF CHAR|r|, * 0 52365. then first, if the current line is exhausted, a good position * 0 52366. is found on a subsequent line; * 0 52367. next, a character is read and assigned to |w|N|r|. * 0 52368. |pb2|gg)|tp2|If the mode of |w|N|r| is specified by * 0 52369. |i|REF#|so||thin||sc|#CHAR|r|, * 0 52370. then input takes place (as in ff) to the subnames of |w|N|r| one after * 0 52371. the other (with new lines being taken as required). * 0 52372. |pb2|hh)|tp2|If the mode of |w|N|r| is specified by |i|REF#STRING|r|, * 0 52373. then characters are read until either * 0 52374. |xi||pha11|(i)|thb1|a character is encountered which is contained in the * 0 52375. string associated with the file * 0 52376. by a call of the routine |i|make term|r|, or * 0 52377. |xi||pha21|(ii)|thb1|the current line is exhausted, whereupon the event routine * 0 52378. corresponding to |i|on line end|r| (or, where appropriate, to * 0 52379. |i|on page end|r|, |i|on physical file end|r| or |i|on logical file end|r|) is called; * 0 52380. if the event routine moves the current position to a good position * 0 52381. (see 10.3.3), then input of characters is resumed. * 0 52382. |p|The string consisting of the characters read is assigned to |w|N|r| * 0 52383. (note that, if the current line has already been exhausted, * 0 52384. or if the current position is at the start of an empty line * 0 52385. or outside the logical file, * 0 52386. then an empty string is assigned to |w|N|r|).|cc| * 0 52387. |n||pb1|a)|ts1||i|PROC get |uqe||g|#? 0 52388. (REF FILE f,|g|#|so||thin||sc|#UNION#(INTYPE, PROC (REF FILE) VOID) x) VOID : * 0 52389. |pc|IF opened OF f THEN * 0 52390. |pc|FOR i TO UPB x * 0 52391. |pc|DO CASE * 0 52392. |ef|set read mood (f); set char mood (f); * 0 52393. |ef|x#|so|i|sc| * 0 52394. IN * 0 52395. |pd|(PROC (REF FILE) VOID pf): pf (f) , * 0 52396. |pd|(INTYPE it): * 0 52397. |pd|BEGIN * 0 52398. |pe||so||thin||sc| SIMPLIN y |uqe| STRAIGHTIN it; CHAR k; BOOL k empty; * 0 52399. |pe|OP |qe| |uqe| (STRING s) BOOL : * 0 52400. |xf|~J true if the next character, if any, in the current line is * 0 52401. contained in |ap|s|ap| (the character is assigned to |ap|k|ap|) * 0 52402. and false otherwise ~J * 0 52403. |pf|IF k empty |and| (line ended (f) |or| logical file ended (f))? 0 52404. |pf|THEN FALSE * 0 52405. |pf|ELSE (k empty | get char (f, k)); * 0 52406. |e|k empty |bec| char in string (k, LOC INT, s) * 0 52407. |pf|FI; * 0 52408. |pe|OP |qe| |uqe| (CHAR c) BOOL : |qe| STRING (c); * 0 52409. |pe|PRIO ! |uqe| 8; * 0 52410. |pe|OP ! |uqe| (STRING s, CHAR c) CHAR : * 0 52411. |xf|~J expects a character contained in |ap|s|ap|; if the character read is * 0 52412. not in |ap|s|ap|, the event routine corresponding to |ap|on#char#error|ap| * 0 52413. is called with the suggestion |ap|c|ap| ~J * 0 52414. |pf|IF (k empty | check pos (f);|g| get char (f, k)); * 0 52415. k empty |bec| TRUE; * 0 52416. |pj|char in string (k, LOC INT, s) * 0 52417. |pf|THEN k * 0 52418. |pf|ELSE CHAR sugg |bec| c; * 0 52419. |pj|IF (char error mended OF f) (f, sugg) THEN * 0 52420. |xj|(char in string (sugg, LOC INT, s)? 0 52421. |e|| sugg * 0 52422. |e|| undefined;#c) * 0 52423. |pj|ELSE undefined; c * 0 52424. |pj|FI; * 0 52425. |pj|set read mood (f) * 0 52426. |pf|FI; * 0 52427. |pe|OP ! |uqe| (CHAR s, c) CHAR : STRING (s) ! c; * 0 52428. |pe|PROC skip initial spaces |uqe| VOID : * 0 52429. |pf|WHILE (k empty | next pos (f));|g| |qe| "|vs|" * 0 52430. DO SKIP OD; * 0 52431. |pe|PROC skip spaces |uqe| VOID : * 0 52432. WHILE |qe| "|vs|" DO SKIP OD; * 0 52433. |pe|PROC read dig |uqe| STRING : * 0 52434. |pf|(STRING t |bec| "0123456789" ! "0"; * 0 52435. |pf|WHILE |qe| "0123456789" DO t PLUSAB k OD; t); * 0 52436. |pe|PROC read sign |uqe| CHAR : * 0 52437. |pf|(CHAR t |uqe| (skip spaces; |qe| "+|mi|" | k | "+"); * 0 52438. skip spaces; t); * 0 52439. |pe|PROC read num |uqe| STRING : * 0 52440. |pf|(CHAR t |uqe| read sign; t + read dig); * 0 52441. |pe|PROC read real |uqe| STRING : * 0 52442. |pf|(STRING t |bec| read sign; * 0 52443. |pf|(|not| |qe| "." | t PLUSAB read dig | k#empty |bec| FALSE);? 0 52444. |pf|(|qe| "." | t PLUSAB "." + read dig); * 0 52445. |pf|(|qe| "|ttp||ttp2|e" | t PLUSAB "|ttp|" + read num); t);? 0 52446. |phalf||pe|FOR j TO UPB y * 0 52447. |pe|DO BOOL incomp |bec| FALSE; k empty |bec| TRUE; * 0 52448. |xe|CASE y |so|j|sc| IN * 0 52449. |pf||nl|(REF |u|L#|i|INT ii): * 0 52450. |pj|(skip initial spaces; incomp |bec| |not| string to |u|l|i|#int (read num, 10, ii))|ng| ,? 0 52451. |pf||nl|(REF |u|L#|i|REAL rr): * 0 52452. |pj|(skip initial spaces; incomp |bec| |not| string to |u|l|i|#real (read real, rr))|ng| ,? 0 52453. |pf||nl|(REF |u|L#|i|COMPL zz): * 0 52454. |pj|(skip initial spaces; incomp |bec| |not| string to |u|l|i|#real (read real, re OF zz); * 0 52455. skip spaces; "i|tip|" ! "|tip|"; * 0 52456. |e|incomp |bec| incomp |or||g| |not| string to |u|l|i|#real (read real, im OF zz))|ng| ,? 0 52457. |pf|(REF BOOL bb): * 0 52458. |pj|(skip initial spaces; * 0 52459. |pj|bb |bec| (flip + flop) ! flop |uqe| flip) , * 0 52460. |pf||nl|(REF |u|L#|i|BITS lb): * 0 52461. |pj|FOR i TO |u|l|i|#bits width * 0 52462. |pj|DO * 0 52463. get (f, (|u|l#f|i| OF lb) |so|i|sc|) OD|ng| , * 0 52464. |pf|(REF CHAR cc): * 0 52465. (next pos (f); get char (f, cc)) , * 0 52466. |pf|(REF |so||thin||sc| CHAR ss): * 0 52467. |pj|FOR i FROM LWB ss TO UPB ss * 0 52468. |pj|DO * 0 52469. next pos (f); get char (f, ss |so|i|sc|) OD , * 0 52470. |pf|(REF STRING ss): * 0 52471. |pj|BEGIN STRING t; * 0 52472. |pj|WHILE check pos (f); * 0 52473. |pk|IF line ended (f) |or| logical file ended (f) * 0 52474. |pk|THEN FALSE? 0 52475. |pk|ELSE get char (f, k);? 0 52476. |pkk|k empty |bec| |g||not| char in string (k, LOC INT, term OF f)? 0 52477. |pk|FI * 0 52478. |pj|DO t PLUSAB k OD; * 0 52479. |pj|ss |bec| t * 0 52480. |pj|END * 0 52481. |xe|ESAC; * 0 52482. |e|(|not| k empty | backspace (f)); * 0 52483. |pf|IF incomp * 0 52484. |pf|THEN (|not| (value error mended OF f) (f) | undefined); set read mood (f) * 0 52485. |xe|FI * 0 52486. |pe|OD * 0 52487. |pd|END * 0 52488. |xs|ESAC OD? 0 52489. |xs|ELSE undefined * 0 52490. |xs|FI ;|r| * 0 52491. |pb1|b)|ts1||i|PROC |ra| get char |uqe| (REF FILE f, REF CHAR char) VOID : * 0 52492. |pc|IF opened OF f * 0 52493. |g||and| |not| line ended (f) |and| |not| logical file ended (f) * 0 52494. |pc|THEN REF POS cpos |uqe| cpos OF f; * 0 52495. |pd|set char mood (f); set read mood (f); * 0 52496. |pd|INT p |uqe| p OF cpos, l |uqe| l OF cpos, c |uqe| c OF cpos; * 0 52497. |pd|c OF cpos +|bec| 1; * 0 52498. |pd|char |bec| CASE text OF f IN * 0 52499. |xd|(TEXT t1): t1 |so|p|sc| |so|l|sc| |so|c|sc| , * 0 52500. |xd|(FLEXTEXT t2): * 0 52501. |pf||ro|CHAR k |bec| t2 |so|p|sc| |so|l|sc| |so|c|sc|; * 0 52502. |pf|BOOL found |bec| FALSE;? 0 52503. |pf|FOR i TO UPB |u|f|i| OF conv OF f WHILE |not| found * 0 52504. |pf|DO * 0 52505. STRUCT (CHAR internal, external) key |uqe||g|#(|u|f|i| OF conv OF f) |so|i|sc|;? 0 52506. |pj|(external OF key |uqe| k | k |bec| internal OF key; found |bec| TRUE)? 0 52507. |pf|OD;? 0 52508. |pf|IF found THEN k * 0 52509. |pf|ELSE k |bec| "|vs|";? 0 52510. |pj|IF (char error mended OF f) (f, k) * 0 52511. |pj|THEN k? 0 52512. |pj|ELSE undefined; "|vs|"? 0 52513. |pj|FI; * 0 52514. |pj|set read mood (f) * 0 52515. |pf|FI|rc| * 0 52516. |xc|ESAC? 0 52517. |pc|ELSE undefined * 0 52518. |pc|FI ~J read mood is still set ~J ;|r|? 0 52519. |pb1|c)|ts1||i|PROC |ra| check pos |uqe| (REF FILE f) VOID : * 0 52520. |pc|BEGIN BOOL reading |uqe| read mood OF f; * 0 52521. |pd|BOOL not ended |bec| TRUE; * 0 52522. |pd|WHILE not ended |bec| not ended * 0 52523. |g||and| get good page (f, reading); * 0 52524. |pe|line ended (f) |and| not ended * 0 52525. |pd|DO not ended |bec| (line mended OF f) (f) OD * 0 52526. |pc|END ;|r| * 0 52527. |j||pa||co|The routine |i|check pos|r| is used in formatted transput * 0 52528. before each call of |i|put char|r| or |i|get char|r|. If the position * 0 52529. is not good (10.3.1.6.dd), it calls the appropriate event routine, * 0 52530. and may call further event routines if |w|true|r| is returned. If the * 0 52531. event routine corresponding to |i|on page end|r| returns |w|false|r|, * 0 52532. |i|newpage|r| is called but, if any other event routine returns * 0 52533. |w|false|r|, no default action is taken and no more event routines * 0 52534. are called. On exit, the read/write mood is as on entry, but the * 0 52535. current position may not be good, in which case |i|undefined|r| will * 0 52536. be called in the following |i|put char|r| or |i|get char|r|. * 0 52537. However, |i|check pos|r| is also called when getting strings (hh), in * 0 52538. which case the string is then terminated if the current position is * 0 52539. not good.|cc| * 0 52540. * 0 52541. |h|10.3.4. Format texts * 0 52542. * 0 52543. |pa||j||co|In formatted transput, each straightened value from a data list * 0 52544. (cf.#10.3.3) is matched against a constituent |b|picture|r| of a * 0 52545. |b|format-text|r| provided by the user. A |b|picture|r| specifies * 0 52546. how a value is to be converted to or from a sequence of characters * 0 52547. and prescribes the layout of those characters in the book. * 0 52548. Features which may be specified include the number of digits, the * 0 52549. position of the decimal point and of the sign, if any, suppression * 0 52550. of zeroes and the insertion of arbitrary strings. For example, using * 0 52551. the |b|picture|r| |i||mi|d.3d "|vs|" 3d "|vs|" e z+d|r|, the value * 0 52552. |w|1234.567|r| would be transput as the string * 0 52553. |i|"|vs|1.234|vs|567|vs||ttp||vs|+3"|r|. * 0 52554. |pa|A "format" is a structured value (i.e., an internal object) of * 0 52555. mode |b||ap|FORMAT|ap||r|, which mirrors the hierarchical structure of a * 0 52556. |b|format-text|r| (which is an external object). In this section are * 0 52557. given the syntax of |b|format-texts|r| and the semantics for * 0 52558. obtaining their corresponding formats. The actual formatted transput * 0 52559. is performed by the routines given in section 10.3.5 but, for * 0 52560. convenience, a description of their operation is given here, in * 0 52561. association with the corresponding syntax.|cc| * 0 52562. * 0 52563. |h1|10.3.4.1. Collections and pictures * 0 52564. * 0 52565. |h1|10.3.4.1.1. Syntax * 0 52566. * 0 52567. |pa||j||co|The following |b|mode-declarations|r| (taken from 10.3.5.a) * 0 52568. are reflected in the metaproduction rules A to K below. * 0 52569. |n||p||pu|A)|po||i|MODE FORMAT |uqe| STRUCT (FLEX |so|1 : 0|sc| PIECE |u|f|i|) ;|r| * 0 52570. |pu|B)|po||i|MODE PIECE |uqe| STRUCT |ro|INT cp, count, bp, * 0 52571. FLEX |so|1 : 0|sc| COLLECTION c|rc| ;|r| * 0 52572. |pu|C)|po||i|MODE COLLECTION |uqe||g| UNION (PICTURE, COLLITEM) ;|r| * 0 52573. |pu|D)|po||i|MODE COLLITEM |uqe| * 0 52574. |e|STRUCT |ro|INSERTION i1, PROC INT rep, INT p, INSERTION i2|rc| ;|r|? 0 52575. |pu|E)|po||i|MODE INSERTION |uqe| * 0 52576. |e|FLEX |so|1 : 0|sc| STRUCT |g|(PROC INT rep, UNION (STRING, CHAR) sa) ;|r| * 0 52577. |pu|F)|po||i|MODE PICTURE |uqe| STRUCT * 0 52578. |g||ro|UNION (PATTERN, CPATTERN, FPATTERN, GPATTERN, VOID)#p, INSERTION i|rc| ;|r| * 0 52579. |pu|G)|po||i|MODE PATTERN |uqe| |g|STRUCT (INT type, * 0 52580. FLEX |so|1 : 0|sc| FRAME frames) ;|r| * 0 52581. |pu|H)|po||i|MODE FRAME |uqe| * 0 52582. |e|STRUCT |ro|INSERTION i, PROC INT rep, BOOL supp, CHAR marker|rc| ;|r| * 0 52583. |pu|I)|po||i|MODE CPATTERN |uqe| * 0 52584. |e|STRUCT |ro|INSERTION i, INT type, * 0 52585. |e|STRUCT |ro|INSERTION i, INT type, FLEX |so|1 : 0|sc| INSERTION c|rc| ;|r| * 0 52586. |pu|J)|po||i|MODE FPATTERN |uqe| |g|STRUCT (INSERTION i, PROC FORMAT pf) ;|r|? 0 52587. |pu|K)|po||i|MODE GPATTERN |uqe| |g|STRUCT (INSERTION i, FLEX |so|1 : 0|sc| PROC INT spec) ;#|r||cc|? 0 52588. |pb1|A)|ts1||b|FORMAT :: structured with * 0 52589. row of PIECE field$#letter aleph mode.|r|? 0 52590. |p1|B)|ts1||b|PIECE :: structured with integral field letter c letter p$#? 0 52591. integral field letter c letter o letter u letter n letter t$#? 0 52592. integral field letter b letter p$#row of * 0 52593. COLLECTION field letter c mode.|r|? 0 52594. |p1|C)|ts1||b|COLLECTION :: union of PICTURE COLLITEM mode.|r|? 0 52595. |p1|D)|ts1||b|COLLITEM :: structured with INSERTION field letter i digit one$#? 0 52596. procedure yielding integral$#field$#letter r letter e letter p$#? 0 52597. integral field letter p$#? 0 52598. INSERTION field letter i digit two mode.|r|? 0 52599. |p1|E)|ts1||b|INSERTION :: * 0 52600. |g|#row of structured with$#procedure yielding integral$#field$#letter r letter e letter p$#? 0 52601. union of row of character character mode$#field$#letter s letter a mode.|r|? 0 52602. |p1|F)|ts1||b|PICTURE :: structured with * 0 52603. union of$#PATTERN CPATTERN FPATTERN GPATTERN void mode$#field letter p$#? 0 52604. INSERTION field letter i mode.|r|? 0 52605. |p1|G)|ts1||b|PATTERN :: structured with$#integral field letter t letter y letter p letter e$#? 0 52606. row of FRAME field$#letter f letter r letter a letter m letter e letter s mode.|r|? 0 52607. |p1|H)|ts1||b|FRAME :: structured with$#INSERTION field letter i * 0 52608. $#procedure yielding integral$#field$#letter r letter e letter p$#? 0 52609. boolean field letter s letter u letter p letter p$#? 0 52610. character field$#letter m letter a letter r letter k letter e letter r mode.|r|? 0 52611. |p1|I)|ts1||b|CPATTERN :: structured with INSERTION field letter i$#? 0 52612. integral field letter t letter y letter p letter e$#? 0 52613. row of INSERTION field letter c mode.|r|? 0 52614. |p1|J)|ts1||b|FPATTERN :: structured with INSERTION field letter i$#? 0 52615. procedure yielding FIVMAT$#field$#letter p letter f mode.|r|? 0 52616. |p1|K)|ts1||b|GPATTERN :: structured with INSERTION$#field$#letter i$#? 0 52617. row of procedure yielding integral field$#letter s letter p letter e letter c mode.|r| * 0 52618. |p1|L)|ts1||b|FIVMAT :: |pc|mui definition of structured with |pd|row of structured with |g|integral field * 0 52619. letter c letter p |g|integral field letter c letter o letter u letter n letter t |g|? 0 52620. integral field letter b letter p |pe|row of * 0 52621. union of |pf|structured with |pj|union of * 0 52622. PATTERN CPATTERN |pk|structured with INSERTION field * 0 52623. letter i |g|procedure yielding mui application field|g| letter p letter f |xj|mode |e|GPATTERN void * 0 52624. |xf|mode field letter p |e|INSERTION field letter i |xe|mode * 0 52625. |e|COLLITEM |xd|mode field letter c |xc|mode field * 0 52626. letter aleph |xs|mode.|r| * 0 52627. |p||ps||co||b||ap|FIVMAT|ap||r| is equivalent (2.1.1.2.a) to |b||ap|FORMAT|ap||r|.|cc| * 0 52628. |pb1|M)|ts1||b|MARK :: sign ; point ; exponent ; complex ; boolean.|r|? 0 52629. |p1|N)|ts1||b|COMARK :: zero ; digit ; character.|r|? 0 52630. |p1|O)|ts1||b|UNSUPPRESSETY :: unsuppressible ; EMPTY.|r|? 0 52631. |p1|P)|ts1||b|TYPE :: integral ; real ; boolean ; complex ; string ; bits ; * 0 52632. integral choice ; boolean choice ; format ; general.|r| * 0 52633. |pb1|a)|ts1||b|FORMAT NEST format text|co||r|5D|b||cc| : * 0 52634. formatter|co||r|94f|b||cc| token, NEST collection|co||r|b|b||cc| list, * 0 52635. formatter|co||r|94f|b||cc| token.|r| * 0 52636. |p1|b)|ts1||b|NEST collection|co||r|a,b|b||cc| : * 0 52637. |e|pragment|co||r|92a|b||cc| sequence option, NEST picture|co||r|c|b||cc| ; * 0 52638. |e|pragment|co||r|92a|b||cc| sequence option, NEST insertion|co||r|d|b||cc|, * 0 52639. NEST replicator|co||r|g|b||cc|, NEST collection|co||r|b|b||cc| list brief pack, * 0 52640. pragment|co||r|92a|b||cc| sequence option, NEST insertion|co||r|d|b||cc|.|r|? 0 52641. |p1|c)|ts1||b|NEST picture|co||r|b|b||cc| : * 0 52642. NEST TYPE pattern|co||r|A342a,$#A343a,$#A344a,$#A345a,$#A346a,$#? 0 52643. A347a,$#A348a,$#b,$#A349a,$#A34Aa|b||cc| option, * 0 52644. NEST insertion|co||r|d|b||cc|.|r| * 0 52645. |p1|d)|ts1||b|NEST insertion|co||r|b,c,j,k,A347b,A348a,b,A349a,A34Aa|b||cc| : * 0 52646. NEST literal|co||r|i|b||cc| option, * 0 52647. NEST alignment|co||r|e|b||cc| sequence option.|r| * 0 52648. |p1|e)|ts1||b|NEST alignment|co||r|d|b||cc| : * 0 52649. |e|NEST replicator|co||r|g|b||cc|, * 0 52650. alignment code|co||r|f|b||cc|, * 0 52651. NEST literal|co||r|i|b||cc| option.|r| * 0 52652. |p1|f)|ts1||b|alignment code|co||r|e|b||cc| : letter k|co||r|94a|b||cc| symbol ; * 0 52653. letter x|co||r|94a|b||cc| symbol ; letter y|co||r|94a|b||cc| symbol ; * 0 52654. letter l|co||r|94a|b||cc| symbol ; letter p|co||r|94a|b||cc| symbol ; * 0 52655. letter q|co||r|94a|b||cc| symbol.|r| * 0 52656. |p1|g)|ts1||b|NEST replicator|co||r|b,e,i,k|b||cc| : * 0 52657. NEST unsuppressible replicator|co||r|h|b||cc| option.|r| * 0 52658. |p1|h)|ts1||b|NEST unsuppressible replicator|co||r|g,i|b||cc| : * 0 52659. fixed point numeral|co||r|811b|b||cc| ; * 0 52660. |e|letter n|co||r|94a|b||cc| symbol, meek integral NEST ENCLOSED clause|co||r|31a,34a,|mi||b||cc|, * 0 52661. pragment|co||r|92a|b||cc| sequence option.|r| * 0 52662. |p1|i)|ts1||b|NEST UNSUPPRESSETY literal|co||r|d,e,i,A348c|b||cc| : * 0 52663. NEST UNSUPPRESSETY replicator|co||r|g,h|b||cc|, * 0 52664. strong row of character NEST denoter|co||r|80a|b||cc| coercee|co||r|61a|b||cc|, * 0 52665. NEST unsuppressible literal|co||r|i|b||cc| option.|r| * 0 52666. |p1|j)|ts1||b|NEST UNSUPPRESSETY MARK frame|co||r|A342c,A343b,c,A344a,A345a|b||cc| : * 0 52667. |e|NEST insertion|co||r|d|b||cc|, * 0 52668. UNSUPPRESSETY suppression|co||r|l|b||cc|, MARK marker|co||r|A342e,A343d,e,A344b,A345b|b||cc|.|r|? 0 52669. |p1|k)|ts1||b|NEST UNSUPPRESSETY COMARK frame|co||r|A342b,c,A346a|b||cc| : * 0 52670. NEST insertion|co||r|d|b||cc|, NEST replicator|co||r|g|b||cc|, * 0 52671. UNSUPPRESSETY suppression|co||r|l|b||cc|, COMARK marker|co||r|A342d,f,A346b|b||cc|.|r| * 0 52672. |p1|l)|ts1||b|UNSUPPRESSETY suppression|co||r|j,k,A347b|b||cc| : * 0 52673. where (UNSUPPRESSETY) is (unsuppressible), EMPTY ; * 0 52674. where (UNSUPPRESSETY) is (EMPTY), letter s|co||r|94a|b||cc| symbol option.|r|? 0 52675. |p1|m)|ts1||star||b|frame : NEST UNSUPPRESSETY MARK frame|co||r|j|b||cc| ; * 0 52676. NEST UNSUPPRESSETY COMARK frame|co||r|k|b||cc| ; * 0 52677. NEST RADIX frame|co||r|A347b|b||cc|.|r|? 0 52678. |p1|n)|ts1||star||b|marker : MARK marker|co||r|A342e,A343d,e,A344b,A345b|b||cc| ; * 0 52679. COMARK marker|co||r|A342d,f,A346b|b||cc| ; radix marker|co||r|A347c|b||cc|.|r| * 0 52680. |p1|o)|ts1||star||b|pattern : NEST TYPE pattern|co||r|A342a,$#A343a,$#A344a,$#A345a,? 0 52681. $#A346a,$#A347a,$#A348a,$#b,$#A349a,$#A34Aa|b||cc|.|r|? 0 52682. |w5||exx||co|Examples: * 0 52683. |ex|a) |i||do|#p#"table|ivs|of"x#10a, |gc|? 0 52684. l#n (lim |mi| 1) |ro|"x|uqe|"#12z+d#2x, +.12de+2d#3q"+j|sx|"3"|vs|" * 0 52685. si#+.10de+2d#l|rc|#p#|do||r| * 0 52686. |ey|b) |i|p#"table|ivs|of"x#10a|qs|? 0 52687. l#n (lim |mi| 1) |ro|"x|uqe|"#12z+d#2x, +.12de+2d#3q"+j|sx|"3"|vs|" * 0 52688. si +.10de+2d#l|rc|#p|r| * 0 52689. |ey|c) |i|l#20k c |ro|"mon", "tues", "wednes", "thurs", "fri", * 0 52690. "satur", "sun"|rc||g|#"day"|r| * 0 52691. |ey|d) |i|p#"table|ivs|of"x|r| * 0 52692. |ey|e) |i|p#"table|ivs|of"|r| * 0 52693. |ey|h) |i|10|qs|n (lim |mi| 1)|r| * 0 52694. |ey|i) |i|"+j|sx|"3"|vs|"|r| * 0 52695. |ey|j) |i|si|r| * 0 52696. |ey|k) |i|"x|uqe|"#12z|r| * 0 52697. |ey|l) |i|s|r|#|cc| * 0 52698. |pa||j||co|The positions where |b|pragments|r| (9.2.1.a) may occur in * 0 52699. |b|format-texts|r| are restricted. In general (as elsewhere in the * 0 52700. language), a |b|pragment|r| may not occur between two |b|DIGIT-|r| * 0 52701. or |b|LETTER-symbols|r|.|cc| * 0 52702. |pb2||j||co|aa)|tp2|For formatted output, |i|putf|r| (10.3.5.1.a) * 0 52703. and |i|printf|r| (or |i|writef|r|) * 0 52704. (10.5.1.f) may be used and, for formatted input, * 0 52705. |i|getf|r| (10.3.5.2.a) and * 0 52706. |i|readf|r| (10.5.1.g). Each element in the data * 0 52707. list (cf.#10.3.3) is either a format to * 0 52708. be associated with the file or a value to be transput (thus a format may * 0 52709. be included in the data list immediately * 0 52710. before the values to be transput * 0 52711. using that format). * 0 52712. |pb2|bb)|tp2|During a call of |i|putf|r| or |i|getf|r|, * 0 52713. transput proceeds as follows: * 0 52714. |pi|For each element of the data list, considered in turn, * 0 52715. |ph|If it is a format, * 0 52716. |ph|then it is made to be the current format of the file by * 0 52717. |i|associate format|r| (10.3.5.k); * 0 52718. |ph|otherwise, the element is straightened (10.3.2.3.c) and each * 0 52719. element of the resulting multiple value is output (hh) or input (ii) * 0 52720. using the next "picture" (cc, gg) from the current format. * 0 52721. |pb2|cc)|tp2|A "picture" is the yield of a |b|picture|r|. It is composed of * 0 52722. a "pattern" of some specific |b||ap|TYPE|ap||r| (according to the syntax of * 0 52723. the |b|TYPE-pattern|r| of that |b|picture|r|), followed by an * 0 52724. "insertion" (ee). Patterns, apart from |b||ap|choice|ap||r|, |b||ap|format|ap||r| * 0 52725. and |b||ap|general|ap||r| patterns, are composed of "frames", * 0 52726. possibly "suppressed", each of * 0 52727. which has an insertion, a "replicator" (dd), and a "marker" to indicate * 0 52728. whether it is a |i|"d"|r|, |i|"z"|r|, |i|"i"|r| etc. frame. * 0 52729. The frames of * 0 52730. each pattern may be grouped into "sign moulds", "integral moulds", etc., * 0 52731. according to the syntax of the corresponding |b|pattern|r|. * 0 52732. |pb2|dd)|tp2|A "replicator" is a routine, returning an integer, * 0 52733. constructed from a |b|replicator|r| (10.3.4.1.2.c). * 0 52734. For example, the |b|replicator|r| |i|10|r| * 0 52735. gives rise to a routine composed from |i|INT : 10|r|; * 0 52736. moreover, |i|n#(lim#|mi|#1)|r| is a "dynamic" |b|replicator|r| and gives rise * 0 52737. to |i|INT : (lim#|mi|#1)|r|. Note that the scope of a replicator * 0 52738. restricts the scope of any format containing it, and thus it * 0 52739. may be necessary to take a local copy of a file before associating * 0 52740. a format with it (see, e.g., 11.13). * 0 52741. A replicator which returns a negative value is treated as if * 0 52742. it had returned zero (|i|"k"|r| alignments apart). * 0 52743. |pg|When a picture is "staticized", all of its replicators and other * 0 52744. routines (including those contained in its insertions) are called * 0 52745. collaterally. * 0 52746. A staticized pattern may be said to "control" a string, * 0 52747. and there is then a correspondence between the frames of * 0 52748. that pattern, taken in order, and the characters of the string. * 0 52749. Each frame controls * 0 52750. |w|n|r| consecutive characters of the string, where |w|n|r| * 0 52751. is |w|0|r| for an |i|"r"|r| frame and, otherwise, * 0 52752. is the integer returned by the replicator of the frame (which is * 0 52753. always |w|1|r| for a |i|"+"|r|, |i|"|mi|"|r|, |i|"."|r|, |i|"e"|r|, * 0 52754. |i|"i"|r| or |i|"b"|r| frame). * 0 52755. Each controlled * 0 52756. character must be one of a limited set appropriate to that frame. * 0 52757. |pb2|ee)|tp2|An "insertion", which is the yield of * 0 52758. an |b|insertion|r| (10.3.4.1.2.d), * 0 52759. is a sequence of replicated "alignments" and strings; * 0 52760. an insertion containing no alignments is termed a "literal". * 0 52761. An insertion is "performed" * 0 52762. by performing its alignments (ff) and on output (input) writing * 0 52763. ("expecting" (ll)) each character of its replicated strings * 0 52764. (a string is replicated by repeating it the number of times * 0 52765. returned by its replicator). * 0 52766. |pb2|ff)|tp2|An "alignment" is the character yielded * 0 52767. by an |b|alignment-code|r| (10.3.4.1.2.d). * 0 52768. An alignment which has been replicated * 0 52769. |w|n|r| times is performed as follows: * 0 52770. |xi||bt||i|"k"|r| causes |i|set char number|r| to be called, * 0 52771. with |w|n|r| as its second parameter; * 0 52772. |et||i|"x"|r| causes |i|space|r| to be called |w|n|r| times; * 0 52773. |et||i|"y"|r| causes |i|backspace|r| to be called |w|n|r| times; * 0 52774. |et||i|"l"|r| causes |i|newline|r| to be called |w|n|r| times; * 0 52775. |et||i|"p"|r| causes |i|newpage|r| to be called |w|n|r| times; * 0 52776. |et||i|"q"|r| on output (input) causes the character * 0 52777. |i|blank|r| to be written (expected) |w|n|r| times. * 0 52778. |pb2|gg)|tp2|A format may consist of a sequence of pictures, each of which * 0 52779. is selected in turn by |i|get next picture|r| (10.3.5.b). * 0 52780. In addition, a set of pictures may be grouped together to form * 0 52781. a replicated "collection" (which may contain further such * 0 52782. collections). When the last picture in a collection * 0 52783. has been selected, its first picture is selected again, and so * 0 52784. on until the whole collection has been repeated |w|n|r| times, * 0 52785. where |w|n|r| is the integer returned by its * 0 52786. replicator. A collection may be provided with two insertions, * 0 52787. the first to be performed before the collection, the second * 0 52788. afterwards. * 0 52789. |pg|A format may also invoke other formats * 0 52790. by means of |b||ap|format|ap||r| patterns (10.3.4.9.1). * 0 52791. |pg|When a format has been exhausted, the event routine * 0 52792. corresponding to |i|on format end|r| is called; if this returns * 0 52793. |w|false|r|, the format is repeated; otherwise, if the event routine * 0 52794. has failed to provide a new format, |i|undefined|r| is called. * 0 52795. |pb2|hh)|tp2|A value |w|V|r| is output, using a picture |w|P|r|, as follows: * 0 52796. |pi|If the pattern |w|Q|r| of |w|P|r| is * 0 52797. a |b||ap|choice|ap||r| or |b||ap|general|ap||r| pattern, * 0 52798. |pi|then |w|V|r| is output using |w|P|r| * 0 52799. (see 10.3.4.8.1.aa,dd, 10.3.4.10.1.aa); * 0 52800. |pi|otherwise, |w|V|r| is output as follows: * 0 52801. |et||w|P|r| is staticized; * 0 52802. |ph|If the mode of |w|V|r| is "output compatible" with |w|Q|r| * 0 52803. (see the separate section dealing with each type of pattern), * 0 52804. |ph|then * 0 52805. |et||w|V|r| is converted into a string controlled (dd) by |w|Q|r| * 0 52806. (see the appropriate section); * 0 52807. |ph|If the mode is not output compatible, or if the conversion is * 0 52808. unsuccessful, * 0 52809. |ph|then * 0 52810. |et|the event routine corresponding to |i|on value error|r| is called; * 0 52811. |et|if this returns |w|false|r|, |w|V|r| is output using |i|put|r| * 0 52812. and |i|undefined|r| is called; * 0 52813. |ph|otherwise, the string is "edited" (jj) using |w|Q|r|; * 0 52814. |xi||bt|the insertion of |w|P|r| is performed. * 0 52815. |pb2|ii)|tp2|A value is input to a name |w|N|r|, using a picture * 0 52816. |w|P|r|, as follows: * 0 52817. |pi|If the pattern |w|Q|r| of |w|P|r| is a * 0 52818. |b||ap|choice|ap||r| or |b||ap|general|ap||r| pattern, * 0 52819. |pi|then a value is input to |w|N|r| using |w|P|r| * 0 52820. (see 10.3.4.8.1.bb,ee, 10.3.4.10.1.bb); * 0 52821. |pi|otherwise, * 0 52822. |et||w|P|r| is staticized; * 0 52823. |et|a string controlled by |w|Q|r| is "indited" (kk); * 0 52824. |ph|If the mode of |w|N|r| is "input compatible" with |w|Q|r| * 0 52825. (see the appropriate section), * 0 52826. |ph|then * 0 52827. |et|the string is converted to an appropriate value suitable for |w|N|r| * 0 52828. using |w|Q|r| (see the appropriate section); * 0 52829. |et|if the conversion is successful, the value is assigned to |w|N|r|; * 0 52830. |ph|If the mode is not input-compatible, or if the conversion is * 0 52831. unsuccessful, * 0 52832. |ph|then * 0 52833. |et|the event routine corresponding to |i|on value error|r| is called; * 0 52834. |et|if this returns |w|false|r|, |i|undefined|r| is called; * 0 52835. |xi||bt|the insertion of |w|P|r| is performed. * 0 52836. |pb2|jj)|tp2|A string is "edited", using a pattern |w|P|r|, as follows: * 0 52837. |pi|In each part of the string controlled by a sign mould, * 0 52838. |et|if the first character of the string * 0 52839. (which indicates the sign) is |i|"+"|r| * 0 52840. and the sign mould contains a |i|"|mi|"|r| frame, * 0 52841. then that character is replaced by |i|"|vs|"|r|; * 0 52842. |et|the first character (i.e., the sign) is shifted * 0 52843. to the right across all leading zeroes in this * 0 52844. part of the string and these zeroes are replaced by spaces * 0 52845. (for example, using the sign mould |i|4z+|r|, the string * 0 52846. |i|"+0003"|r| becomes |i|"|vs||vs||vs|+3"|r|); * 0 52847. |pi|In each part of the string controlled by an integral mould, * 0 52848. |et|zeroes controlled by |i|"z"|r| frames are replaced by spaces * 0 52849. as follows: * 0 52850. |xh||bt|between the start of the string and the first * 0 52851. nonzero digit; * 0 52852. |et|between each |i|"d"|r|, |i|"e"|r| or |i|"i"|r| frame * 0 52853. and the next nonzero digit; * 0 52854. |xi|(for example, using the pattern |i|zdzd2d|r|, the string * 0 52855. |i|"180168"|r| becomes |i|"18|vs|168"|r|;) * 0 52856. |pi|For each frame |w|F|r| of |w|P|r|, * 0 52857. |et|the insertion of |w|F|r| is performed; * 0 52858. |et|if |w|F|r| is not suppressed, the characters controlled by * 0 52859. |w|F|r| are written; * 0 52860. |p|(for example, the string |i|"+0003.5"|r|, when edited using the * 0 52861. pattern |i|4z+ s. "," d|r|, causes the string * 0 52862. |i|"|vs||vs||vs|+3,5"|r| to be written * 0 52863. and the string |i|"180168"|r|, using the pattern * 0 52864. |i|zd"|mi|"zd"|mi|19"2d|r|, gives rise to |i|"18|mi||vs|1|mi|1968"|r|). * 0 52865. |pb2|kk)|tp2|A string is "indited", using a pattern |w|P|r|, as follows: * 0 52866. |pi|For each frame |w|F|r| of |w|P|r|, * 0 52867. |et|the insertion of |w|F|r| is performed; * 0 52868. |ph|For each element of the string controlled by |w|F|r|, a * 0 52869. character is obtained as follows: * 0 52870. |p||ps|If |w|F|r| is contained in a sign mould, * 0 52871. |p||ps|then * 0 52872. |et|if a sign has been found, a digit is expected, with |i|"0"|r| * 0 52873. as suggestion; * 0 52874. |et|otherwise, either a |i|"+"|r| or a |i|"|mi|"|r| is * 0 52875. expected, with |i|"+"|r| as suggestion, * 0 52876. and, in addition, if the sign mould contains a |i|"|mi|"|r| * 0 52877. frame, then a space preceding the first digit will be accepted * 0 52878. as the sign (and replaced by |i|"+"|r|); * 0 52879. |p||ps|otherwise, if |w|F|r| is contained in an * 0 52880. integral mould, * 0 52881. |p||ps|then * 0 52882. |pc|If |w|F|r| is suppressed, * 0 52883. |pc|then * 0 52884. |i|"0"|r| is supplied; * 0 52885. |pc|otherwise, * 0 52886. |pd|Case#A:#|w|F|r| is a |i|"d"|r| frame: * 0 52887. |et|a digit is expected, with |i|"0"|r| as suggestion; * 0 52888. |pd|Case#B:#|w|F|r| is a |i|"z"|r| frame: * 0 52889. |et|a digit or space is expected, with |i|"0"|r| as suggestion, * 0 52890. but a space is only acceptable as follows: * 0 52891. |xe||bt|between the start of the string * 0 52892. and the first nonzero digit; * 0 52893. |et|between each |i|"d"|r|, |i|"e"|r| or |i|"i"|r| frame and the next * 0 52894. nonzero digit; * 0 52895. |xd||bt|such spaces are replaced by zeroes; * 0 52896. |p||ps|otherwise, if |w|F|r| is an |i|"a"|r| * 0 52897. frame, * 0 52898. |p||ps|then * 0 52899. if |w|F|r| is not suppressed, a character is read * 0 52900. and supplied; otherwise |i|"|vs|"|r| is supplied; * 0 52901. |p||ps|otherwise, if |w|F|r| is not suppressed, * 0 52902. |p||ps|then if |w|F|r| is a |i|"."|r| (|i|"e"|r|, |i|"i"|r|, |i|"b"|r|) frame, a * 0 52903. |i|"."|r| (|i|"|ttp|"|r| or |i|"|ttp2|"|r| or |i|"e"|r|, * 0 52904. |i|"|tip|"|r| or |i|"i"|r|, |i|flip|r| or |i|flop|r|) * 0 52905. is expected, with * 0 52906. |i|"."|r| (|i|"|ttp|"|r|, |i|"|tip|"|r|, |i|flop|r|) * 0 52907. as suggestion; * 0 52908. |p||ps|otherwise, if |w|F|r| is a * 0 52909. suppressed |i|"."|r| (|i|"e"|r|, |i|"i"|r|) * 0 52910. frame, the character * 0 52911. |i|"."|r| (|i|"|ttp|"|r|, |i|"|tip|"|r|) * 0 52912. is supplied. * 0 52913. |pb2|ll)|tp2|A member of a set of characters |w|S|r| is "expected", * 0 52914. with the character |w|C|r| * 0 52915. as suggestion, as follows: * 0 52916. |et|a character is read; * 0 52917. |pi|If that character is one of the expected characters * 0 52918. (i.e., a member of |w|S|r|), * 0 52919. |pi|then * 0 52920. that character is supplied; * 0 52921. |pi|otherwise, * 0 52922. the event routine corresponding to |i|on char error|r| * 0 52923. is called, with |w|C|r| as suggestion; if this returns |w|true|r| * 0 52924. and |w|C|r|, as possibly replaced, is one of the expected characters, then * 0 52925. that character is supplied; otherwise, |i|undefined|r| is * 0 52926. called.|cc| * 0 52927. * 0 52928. |h|10.3.4.1.2. Semantics * 0 52929. * 0 52930. |pa||j||co|A format is brought into being by means of a |b|format-text|r|. * 0 52931. A format is best regarded as a tree, with a collection at each node and a * 0 52932. picture at each tip. In order to avoid violation of the scope * 0 52933. restrictions, each node of this tree is, in this Report, packed * 0 52934. into a value of mode |b||ap|PIECE|ap||r|. A format is composed of a row * 0 52935. of such pieces and the pieces contain pointers to each other in the form * 0 52936. of indices selecting from that row. An implementer will doubtless * 0 52937. store the tree in a more efficient manner. This is possible because * 0 52938. the |b|field-selector|r| of a format is hidden from the user in * 0 52939. order that he may not break it open. * 0 52940. |pa|Although a |b|format-text|r| may contain |b|ENCLOSED-? 0 52941. clauses|r| (in |b|replicators|r| and |b|format-patterns|r|) or * 0 52942. |b|units|r| (in |b|general-patterns|r|), these are not elaborated * 0 52943. at this stage but are, rather, turned into routines for subsequent * 0 52944. calling as and when they are encountered during formatted transput. * 0 52945. Indeed, the elaboration of a |b|format-text|r| does not result * 0 52946. in any actions of any significance to the user.|cc| * 0 52947. |pb1||j|a)|tp1|The yield of a |b|format-text|r| |w|F|r|, in an environ |w|E|r|, * 0 52948. is a structured value whose only field * 0 52949. is a multiple value |w|W|r|, whose mode is |b||ap|row of PIECE|ap||r|, * 0 52950. composed of a descriptor |w|((1,#n))|r| and |w|n|r| elements determined as follows:? 0 52951. |et|a counter |w|i|r| is set to |w|1|r|; * 0 52952. |et||w|F|r| is "transformed" |co|b|cc| in |w|E|r| into |w|W|r|, using |w|i|r|. * 0 52953. |pb1|b)|tp1|A |b|format-text|r| or a |b|collection-list-pack|r| |w|C|r| is "transformed" * 0 52954. in an environ |w|E|r| into a multiple value |w|W|r| * 0 52955. whose mode is |b||ap|row of PIECE|ap||r|, using a counter |w|i|r|, * 0 52956. as follows: * 0 52957. |et|the element of |w|W|r| selected by |w|(i)|r| is a structured value, whose mode is * 0 52958. |b||ap|PIECE|ap||r| and whose fields, taken in order, are * 0 52959. |xi||bt||co||i|cp|r||cc| undefined; * 0 52960. |xi||bt||co||i|count|r||cc| undefined; * 0 52961. |xi||bt||co||i|bp|r||cc| undefined; * 0 52962. |xi||bt||co||i|c|r||cc| a multiple value |w|V|r|, * 0 52963. whose mode is |b||ap|row of COLLECTION|ap||r|, having a descriptor |w|((1,#m))|r|, * 0 52964. where |w|m|r| is the number of constituent |b|collections|r| of |w|C|r|, and elements * 0 52965. determined as follows: * 0 52966. |ph|For |w|j#|uqe|#1,#...#,#m|r|, letting |w|C|s0|j|s1||r| be * 0 52967. the |w|j|r||hy|th constituent |b|collection|r| of |w|C|r|, * 0 52968. |p||ps|Case#A:#The direct descendents of |w|C|s0|j|s1||r| include a |b|picture|r| |w|P|r|: * 0 52969. |et|the constituent |b|pattern|r| |w|T|r|, if any, * 0 52970. and the |b|insertion|r| |w|I|r| of |w|P|r| are elaborated collaterally; * 0 52971. |et|the |w|j|r||hy|th element of |w|V|r| is a structured value, whose mode is |b||ap|PICTURE|ap||r| * 0 52972. and whose fields, taken in order, are * 0 52973. |xc||bt||co||i|p|r||cc| the yield of |w|T|r|, * 0 52974. if any, |co|e, 10.3.4.8.2, 10.3.4.9.2, 10.3.4.10.2|cc| * 0 52975. and, otherwise, |w|empty|r|; * 0 52976. |xc||bt||co||i|i|r||cc| the yield of |w|I|r| |co|d|cc|; * 0 52977. |p||ps|Case#B:#The direct descendents of |w|C|s0|j|s1||r| include a first |b|insertion|r| |w|I1|r|, a * 0 52978. |b|replicator|r| |w|REP|r|, a |b|collection-list-pack|r| |w|P|r| and a second * 0 52979. |b|insertion|r| |w|I2|r|: * 0 52980. |et||w|i|r| is increased by |w|1|r|; * 0 52981. |et||w|I1|r|, |w|REP|r| and |w|I2|r| are elaborated collaterally; * 0 52982. |et|the |w|j|r||hy|th element of |w|V|r| is a structured value whose mode is |b||ap|COLLITEM|ap||r| * 0 52983. and whose fields, taken in order, are * 0 52984. |xc||bt||co||i|i1|r||cc| the yield of |w|I1|r| |co|d|cc|; * 0 52985. |xc||bt||co||i|rep|r||cc| the yield of |w|REP|r| |co|c|cc|; * 0 52986. |xc||bt||co||i|p|r||cc| |w|i|r|; * 0 52987. |xc||bt||co||i|i2|r||cc| the yield of |w|I2|r|; * 0 52988. |xs||bt||w|P|r| is transformed in |w|E|r| into |w|W|r|, using |w|i|r|. * 0 52989. |pb1|c)|tp1|The yield, in an environ |w|E|r|, of a |b|NEST-UNSUPPRESSETY-replicator|r| * 0 52990. |w|R|r| |co|10.3.4.1.1.g,h|cc| * 0 52991. is a routine whose mode is |b||ap|procedure yielding integral|ap||r|, composed of a * 0 52992. |b|procedure-yielding-integral-NEST-routine-text|r| whose |b|unit|r| is |w|U|r|, * 0 52993. together with the environ necessary |co|7.2.2.c|cc| for |w|U|r| in |w|E|r|, where |w|U|r| * 0 52994. is determined as follows: * 0 52995. |pi|Case#A:#|w|R|r| contains a |b|meek-integral-ENCLOSED-clause|r| |w|C|r|: * 0 52996. |et||w|U|r| is a new |b|unit|r| akin |co|1.1.3.2.k|cc| to |w|C|r|; * 0 52997. |pi|Case#B:#|w|R|r| contains a |b|fixed-point-numeral|r| |w|D|r|, but no |b|ENCLOSED-clause: * 0 52998. |et||w|U|r| is a new |b|unit|r| akin to |w|D|r|; * 0 52999. |pi|Case#C:#|w|R|r| is invisible: * 0 53000. |et||w|U|r| is a new |b|unit|r| akin to a |b|fixed-point-numeral|r| * 0 53001. which has an intrinsic value |co|8.1.1.2|cc| of |w|1|r|. * 0 53002. |pb1|d)|tp1|The yield of an |b|insertion|r| |w|I|r| |co|10.3.4.1.1.d|cc| is a * 0 53003. multiple value |w|W|r| whose mode is * 0 53004. |b||ap|INSERTION|ap||r|, determined as follows: * 0 53005. |et|let |w|U|s0|1|s1|, ...#,#U|s0|n|s1||r| be the constituent |b|UNSUPPRESSETY-replicators|r| of |w|I|r|, * 0 53006. and let |w|A|s0|i|s1|, i#|uqe|#1, ...#,#n|r|, be the |b|denoter-coercee|r| or |b|alignment-code|r| * 0 53007. |co|immediately|cc| following |w|U|s0|i|s1||r|; * 0 53008. |et|let |w|R|s0|1|s1|, ...#,#R|s0|n|s1||r| and |w|D|s0|1|s1|, ...#,#D|s0|n|s1||r| be the |co|collateral|cc| yields * 0 53009. of |w|U|s0|1|s1|,#...#,#U|s0|n|s1||r| and |w|A|s0|1|s1|,#...#,#A|s0|n|s1||r|, * 0 53010. where the yield of an |b|alignment-code|r| * 0 53011. is the |co|character which is the|cc| intrinsic value |co|8.1.4.2.b|cc| of its |b|LETTER-symbol|r|; * 0 53012. |et|the descriptor of |w|W|r| is |w|((1,#n))|r|; * 0 53013. |et|the element of |w|W|r| selected by |w|(i)|r|, |w|i#|uqe|#1, ...#,#n|r|, * 0 53014. is a structured value |co|of the mode specified by * 0 53015. |i|STRUCT (PROC INT rep, UNION (STRING, CHAR) sa)|r||cc| whose fields, taken in order, are * 0 53016. |xi||bt||co||i|rep|r||cc| |w|R|s0|i|s1||r|; * 0 53017. |xi||bt||co||i|sa|r||cc| |w|D|s0|i|s1||r|. * 0 53018. |pb1|e)|tp1|The yield of an |b|integral-|r|, |b|real-|r|, |b|boolean-|r|, * 0 53019. |b|complex-|r|, |b|string-|r| or |b|bits-pattern|r| |w|P|r| * 0 53020. |co|10.3.4.2.1.a, 10.3.4.3.1.a,#...#, 10.3.4.7.1.a|cc| * 0 53021. is a structured * 0 53022. value |w|W|r| whose mode is |b||ap|PATTERN|ap||r|, determined as follows: * 0 53023. |et|let |w|V|s0|1|s1|,#...#,#V|s0|n|s1||r| be the |co|collateral|cc| yields of * 0 53024. the constituent |b|frames|r| of#|g||w|P|r|#|co|f|cc|; * 0 53025. |et|the fields of |w|W|r|, taken in order, are * 0 53026. |xi||bt||co||i|type|r||cc| |w|1|r| (|w|2|r|, |w|3|r|, |w|4|r|, |w|5|r|) if * 0 53027. |w|P|r| is an |b|integral-|r| (|b|real-|r|, |b|boolean-|r|, |b|complex-|r|, |b|string-|r|) |b|-pattern|r| * 0 53028. and |w|6|r| (|w|8|r|, |w|12|r|, |w|20|r|) if |w|P|r| is a |b|bits-pattern|r| whose constituent * 0 53029. |b|RADIX|r| is a |b|radix-two|r| (|b|-four|r|, |b|-eight|r|, |b|-sixteen|r|); * 0 53030. |xi||bt||co||i|frames|r||cc| a multiple value, whose mode is * 0 53031. |b||ap|row of FRAME|ap||r|, having a descriptor |w|((1,#n))|r| * 0 53032. and |w|n|r| elements, that selected by |w|(i)|r| being |w|V|s0|i|s1||r|. * 0 53033. |pb1|f)|tp1|The yield of a |b|frame|r| |w|F|r| |co|10.3.4.1.1.m|cc| * 0 53034. is a structured value |w|W|r| whose mode is |b||ap|FRAME|ap||r|, * 0 53035. determined as follows: * 0 53036. |et|the |b|insertion|r| and the |b|replicator|r|, if any, of |w|F|r| are elaborated collaterally; * 0 53037. |et|the fields of |w|W|r|, taken in order, are * 0 53038. |xi||bt||co||i|i|r||cc| the yield of its |b|insertion|r|; * 0 53039. |xi||bt||co||i|rep|r||cc| the yield of its * 0 53040. |b|replicator|r| |co|c|cc|, if any, * 0 53041. and, otherwise, the yield of an invisible |b|replicator|r|; * 0 53042. |xi||bt||co||i|supp|r||cc| |w|true|r| if its |b|UNSUPPRESSETY-? 0 53043. suppression|r| contains a |b|letter-s-symbol|r| and, otherwise, |w|false|r|; * 0 53044. |xi||bt||co||i|marker|r||cc| |co|the character which is|cc| the * 0 53045. intrinsic value |co|8.1.4.2.b|cc| of a |b|symbol|r| |w|S|r| determined as follows: * 0 53046. |ph|Case#A:#|w|F|r| is a constituent |b|unsuppressible-zero-frame|r| * 0 53047. of a |b|sign-mould|r| |co|such as |i|3z+|r||cc| whose constituent * 0 53048. |b|sign-marker|r| contains a |b|plus-symbol|r|: * 0 53049. |et||w|S|r| is a |b|letter-u-symbol|r|; * 0 53050. |ph|Case#B:#|w|F|r| is a constituent |b|unsuppressible-zero-frame|r| * 0 53051. of a |b|sign-mould|r| |co|such as |i|3z-|r||cc| whose constituent * 0 53052. |b|sign-marker|r| contains a |b|minus-symbol|r|: * 0 53053. |et||w|S|r| is a |b|letter-v-symbol|r|; * 0 53054. |ph|Other cases: * 0 53055. |et||w|S|r| is the constituent |b|symbol|r| of the |b|marker|r| of |w|F|r|. * 0 53056. |p||co|Thus the |b|zero-marker|r| |i|z|r| may be passed on as the character * 0 53057. |i|"u"|r|, |i|"v"|r| or |i|"z"|r| according to whether it forms part * 0 53058. of a |b|sign-mould|r| (with descendent |b|plus-symbol|r| or |b|minus-? 0 53059. symbol|r|) or of an |b|integral-mould|r|.|cc| * 0 53060. * 0 53061. |h|10.3.4.2. Integral patterns * 0 53062. * 0 53063. |h1|10.3.4.2.1. Syntax * 0 53064. * 0 53065. |pb1|a)|ts1||b|NEST integral pattern|co||r|A341c,A343c|b||cc| : * 0 53066. |e|NEST sign mould|co||r|c|b||cc| option, * 0 53067. NEST integral mould|co||r|b|b||cc|.|r|? 0 53068. |p1|b)|ts1||b|NEST integral mould|co||r|a,A343b,c,A347a|b||cc| : * 0 53069. NEST digit frame|co||r|A341k|b||cc| sequence.|r| * 0 53070. |p1|c)|ts1||b|NEST sign mould|co||r|a,A343a|b||cc| : * 0 53071. NEST unsuppressible zero frame|co||r|A341k|b||cc| sequence option, * 0 53072. NEST unsuppressible sign frame|co||r|A341j|b||cc|.|r|? 0 53073. |p1|d)|ts1||b|zero marker|co||r|f,A341k|b||cc| : letter z|co||r|94a|b||cc| symbol.|r|? 0 53074. |p1|e)|ts1||b|sign marker|co||r|A341j|b||cc| : * 0 53075. plus|co||r|94c|b||cc| symbol ; minus|co||r|94c|b||cc| symbol.|r| * 0 53076. |p1|f)|ts1||b|digit marker|co||r|A341k|b||cc| : * 0 53077. letter d|co||r|94a|b||cc| symbol ; zero marker|co||r|d|b||cc|.|r| * 0 53078. |w5||exx||co|Examples: * 0 53079. |ex|a) |i|"x|uqe|"#12z+d|r| * 0 53080. |ez|b) |i|d|r| * 0 53081. |ey|c) |i|"x|uqe|"#12z+|r|#|cc| * 0 53082. |j||pa||co||r|For the semantics of |b|integral-patterns|r| * 0 53083. see 10.3.4.1.2.e.|cc| * 0 53084. |pb2||co|aa)|tp2|The modes which are output (input) compatible with an * 0 53085. |b||ap|integral|ap||r| pattern are those specified by |u|L|i|#INT|r| * 0 53086. (by |i|REF#|u|L|i|#INT|r|). * 0 53087. |pb2|bb)|tp2|A value |w|V|r| is converted to a string |w|S|r| using an * 0 53088. |b||ap|integral|ap||r| pattern |w|P|r| as follows: * 0 53089. |et|if |w|P|r| contains a sign mould, then the first character of * 0 53090. |w|S|r| is the sign of |w|V|r|; otherwise, if |w|V#|lt|#0|r|, * 0 53091. the conversion is unsuccessful; * 0 53092. |et|the remainder of |w|S|r| contains a decimal representation of * 0 53093. |w|V|r| determined as follows: * 0 53094. |xi||bt|the elements of |w|S|r| controlled by |i|"d"|r| and |i|"z"|r| frames are * 0 53095. the appropriate digits (thus the pattern specifies the number of digits * 0 53096. to be used); * 0 53097. |et|if |w|V|r| cannot be represented by such a string, the conversion * 0 53098. is unsuccessful. * 0 53099. |p|(For example, the value |w|99|r| could be converted to a string * 0 53100. using the pattern |i|zzd|r|, but |w|9999|r| and |w|-99|r| * 0 53101. could not.) * 0 53102. |pb2|cc)|tp2|A string |w|S|r| is converted to an integer suitable for * 0 53103. a name |w|N|r|, using an |b||ap|integral|ap||r| pattern, as follows: * 0 53104. |et|the integer |w|I|r| for which |w|S|r| contains a decimal * 0 53105. representation (8.1.1.2) is considered; * 0 53106. |et|if |w|I|r| is greater than the largest value * 0 53107. to which |w|N|r| can refer, the conversion is * 0 53108. unsuccessful; otherwise, |w|I|r| is the required integer * 0 53109. (e.g., if the mode of |w|N|r| is specified by * 0 53110. |i|REF#SHORT#INT|r|, and the value of |i|short max int|r| is * 0 53111. |w|65535|r|, then no string containing a decimal representation of a * 0 53112. value greater than |w|65535|r| may be converted).|cc| * 0 53113. * 0 53114. |h1|10.3.4.3. Real patterns * 0 53115. * 0 53116. |h1|10.3.4.3.1. Syntax * 0 53117. * 0 53118. |pb1|a)|ts1||b|NEST real pattern|co||r|A341c,A345a|b||cc| : * 0 53119. NEST sign mould|co||r|A342c|b||cc| option, * 0 53120. NEST variable point mould|co||r|b|b||cc|$#or alternatively * 0 53121. NEST floating point mould|co||r|c|b||cc|.|r| * 0 53122. |p1|b)|ts1||b|NEST variable point mould|co||r|a,c|b||cc| : NEST integral mould|co||r|A342b|b||cc|, * 0 53123. NEST point frame|co||r|A341j|b||cc|, NEST integral mould|co||r|A342b|b||cc| option ; * 0 53124. NEST point frame|co||r|A341j|b||cc|, NEST integral mould|co||r|A342b|b||cc|.|r|? 0 53125. |p1|c)|ts1||b|NEST floating point mould|co||r|a|b||cc| : * 0 53126. |e|NEST variable point mould|co||r|b|b||cc|$#or * 0 53127. alternatively NEST integral mould|co||r|A342b|b||cc|, * 0 53128. |e|NEST exponent frame|co||r|A341j|b||cc|, * 0 53129. NEST integral pattern|co||r|A342a|b||cc|.|r| * 0 53130. |p1|d)|ts1||b|point marker|co||r|A341j|b||cc| : point|co||r|94b|b||cc| symbol.|r|? 0 53131. |p1|e)|ts1||b|exponent marker|co||r|A341j|b||cc| : letter e|co||r|94a|b||cc| symbol.|r|? 0 53132. |w5||exx||co|Examples: * 0 53133. |ex|a) |i|+zd.11d|qs|+.12de+2d|r| * 0 53134. |ez|b) |i|zd.11d|qs|.12d|r| * 0 53135. |ey|c) |i|.12de+2d|r|#|cc| * 0 53136. |j||pa||co|For the semantics of |b|real-patterns|r| see 10.3.4.1.2.e.|cc| * 0 53137. |pb2||co|aa)|tp2|The modes which are output (input) compatible with a * 0 53138. |b||ap|real|ap||r| pattern are those specified by |u|L|i|#REAL|r| and * 0 53139. |u|L|i|#INT|r| (by |i|REF#|u|L|i|#REAL|r|). * 0 53140. |pb2|bb)|tp2|A value |w|V|r| is converted to a string |w|S|r| using * 0 53141. a |b||ap|real|ap||r| pattern |w|P|r| as follows: * 0 53142. |et|if |w|P|r| contains a sign mould, then the first character of * 0 53143. |w|S|r| is the sign of |w|V|r|; otherwise, if |w|V#|lt|#0|r|, the * 0 53144. conversion is unsuccessful; * 0 53145. |et|the remainder of |w|S|r| contains a decimal representation of * 0 53146. |w|V|r| determined as follows: * 0 53147. |xi||bt|if necessary, |w|V|r| is widened to a real number; * 0 53148. |et|the element of |w|S|r| controlled by the |i|"."|r| (|i|"e"|r|) * 0 53149. frame, if any, of |w|P|r| is |i|"."|r| (|i|"|ttp|"|r|); * 0 53150. |ph|If |w|P|r| contains an |i|"e"|r| frame, * 0 53151. |ph|then * 0 53152. |et|let |w|W|r| be the sequence of frames preceding, and |w|IP|r| * 0 53153. be the |b||ap|integral|ap||r| pattern following, that |i|"e"|r| frame; * 0 53154. |et|an exponent |w|E|r| is calculated by standardizing |w|V|r| * 0 53155. to the largest value convertible using |w|W|r| (see below); * 0 53156. |et|the part of |w|S|r| controlled by |w|IP|r| is obtained by * 0 53157. converting |w|E|r| using |w|IP|r| (see 10.3.4.2.1.bb); * 0 53158. |ph|otherwise, * 0 53159. |et|let |w|W|r| be the whole of |w|P|r|; * 0 53160. |xi||bt|the elements of |w|S|r| controlled by the |i|"d"|r| and * 0 53161. |i|"z"|r| frames of |w|W|r| are the appropriate digits (thus the pattern * 0 53162. specifies the number of digits to be used, and the number of digits to be placed * 0 53163. after the decimal point, if any); * 0 53164. |et|if |w|V|r| cannot be represented by such a string, the conversion * 0 53165. is unsuccessful. * 0 53166. |pb2|cc)|tp2|A string |w|S|r| is converted to a real number suitable for * 0 53167. a name |w|N|r|, using a |b||ap|real|ap||r| pattern, as follows: * 0 53168. |et|the real number |w|R|r| for which |w|S|r| contains a decimal * 0 53169. representation is considered;? 0 53170. |et|if |w|R|r| is greater than the largest value * 0 53171. to which |w|N|r| can refer, the conversion is unsuccessful; * 0 53172. otherwise, |w|R|r| is the required real number.|cc| * 0 53173. * 0 53174. |h|10.3.4.4. Boolean patterns * 0 53175. * 0 53176. |h1|10.3.4.4.1. Syntax * 0 53177. * 0 53178. |pb1|a)|ts1||b|NEST boolean pattern|co||r|A341c|b||cc| : * 0 53179. NEST unsuppressible boolean frame|co||r|A341j|b||cc|.|r| * 0 53180. |p1|b)|ts1||b|boolean marker|co||r|A341j,A348b|b||cc| : letter b|co||r|94a|b||cc| symbol.|r|? 0 53181. |w5||exx||co|Example: * 0 53182. |ex|a) |i|14x#b|r|#|cc| * 0 53183. |j||pa||co||r|For the semantics of |b|boolean-patterns|r| * 0 53184. see 10.3.4.1.2.e.|cc| * 0 53185. |pb2||co|aa)|tp2|The mode which is output (input) compatible with a * 0 53186. |b||ap|boolean|ap||r| pattern is that specified by |i|BOOL|r| (|i|REF#BOOL|r|). * 0 53187. |pb2|bb)|tp2|A value |w|V|r| is converted to a string using a |b||ap|boolean|ap||r| * 0 53188. pattern as follows: * 0 53189. |et|if |w|V|r| is |w|true|r| (|w|false|r|), then the string is that * 0 53190. yielded by |i|flip|r| (|i|flop|r|). * 0 53191. |pb2|cc)|tp2|A string |w|S|r| is converted to a boolean value, * 0 53192. using a |b||ap|boolean|ap||r| pattern, as * 0 53193. follows: * 0 53194. |et|if |w|S|r| is the same as the string yielded by |i|flip|r| * 0 53195. (|i|flop|r|), then the required value is |w|true|r| (|w|false|r|).|cc| * 0 53196. * 0 53197. |h|10.3.4.5. Complex patterns * 0 53198. * 0 53199. |h1|10.3.4.5.1. Syntax * 0 53200. * 0 53201. |pb1|a)|ts1||b|NEST complex pattern|co||r|A341c|b||cc| : * 0 53202. NEST real pattern|co||r|A343a|b||cc|, * 0 53203. NEST complex frame|co||r|A341j|b||cc|, * 0 53204. NEST real pattern|co||r|A343a|b||cc|.|r| * 0 53205. |p1|b)|ts1||b|complex marker|co||r|A341j|b||cc| : letter i|co||r|94a|b||cc| symbol.|r|? 0 53206. |w5||exx||co|Example: * 0 53207. |ex|a) |i|+.12de+2d#3q"+j|sx|"3"|vs|" si#+.10de+2d|r|#|cc| * 0 53208. |j||pa||co||r|For the semantics of |b|complex-patterns|r| see 10.3.4.1.2.e.|cc| * 0 53209. |pb2||co|aa)|tp2|The modes which are output (input) compatible with * 0 53210. a |b||ap|complex|ap||r| pattern are those specified by |u|L|i|#COMPL|r|, * 0 53211. |u|L|i|#REAL|r| and |u|L|i|#INT|r| (by |i|REF#|u|L|i|#COMPL|r|). * 0 53212. |pb2|bb)|tp2|A value |w|V|r| is converted to a string using a |b||ap|complex|ap||r| * 0 53213. pattern |w|P|r| as follows: * 0 53214. |et|if necessary, |w|V|r| is widened to a complex number; * 0 53215. |et|the element of |w|S|r| controlled by the |i|"i"|r| frame of * 0 53216. |w|P|r| is |i|"|tip|"|r|; * 0 53217. |et|the part of |w|S|r| controlled by the first (second) |b||ap|real|ap||r| * 0 53218. pattern of |w|P|r| is that obtained by converting the first (second) * 0 53219. field of |w|V|r| to a string using the first (second) * 0 53220. |b||ap|real|ap||r| pattern of |w|P|r| (10.3.4.1.bb); * 0 53221. |et|if either conversion is unsuccessful, the conversion * 0 53222. of |w|V|r| is unsuccessful. * 0 53223. |pb2|cc)|tp2|A string is converted to a complex * 0 53224. value |w|C|r| suitable for * 0 53225. a name |w|N|r|, using a |b||ap|complex|ap||r| pattern |w|P|r|, as follows: * 0 53226. |et|the part of the string controlled by the first (second) |b||ap|real|ap||r| * 0 53227. pattern of |w|P|r| is converted to a suitable real number (10.3.4.1.cc), * 0 53228. which then forms * 0 53229. the first (second) field of |w|C|r|; * 0 53230. |et|if either conversion is unsuccessful, * 0 53231. the conversion to |w|C|r| is unsuccessful.|cc| * 0 53232. * 0 53233. |h1|10.3.4.6. String patterns * 0 53234. * 0 53235. |h1|10.3.4.6.1. Syntax? 0 53236. * 0 53237. |pb1|a)|ts1||b|NEST string pattern|co||r|A341c|b||cc| : * 0 53238. NEST character frame|co||r|A341k|b||cc| sequence.|r| * 0 53239. |p1|b)|ts1||b|character marker|co||r|A341k|b||cc| : letter a|co||r|94a|b||cc| symbol.|r|? 0 53240. |w5||exx||co|Example: * 0 53241. |ex|a) |i|p#"table|ivs|of"x#10a|r|#|cc| * 0 53242. |pa||j||co||r|For the semantics of |b|string-patterns|r| see 10.3.4.1.2.e.|r||cc| * 0 53243. |pb2||co|aa)|tp2|The modes which are output (input) compatible with a * 0 53244. |b||ap|string|ap||r| pattern are those specified by |i|CHAR|r| and * 0 53245. |i||so||thin||sc| CHAR|r| (by |i|REF CHAR|r|, |i|REF |so||thin||sc| CHAR|r| and * 0 53246. |i|REF STRING|r|). * 0 53247. |pb2|bb)|tp2|A value |w|V|r| is converted to a string using a |b||ap|string|ap||r| * 0 53248. pattern |w|P|r| as follows: * 0 53249. |et|if necessary, |w|V|r| is rowed to a string; * 0 53250. |et|if the length of the string |w|V|r| is * 0 53251. equal to the length of the string * 0 53252. controlled by |w|P|r|, then |w|V|r| is supplied; otherwise, * 0 53253. the conversion is unsuccessful. * 0 53254. |pb2|cc)|tp2|A string |w|S|r| is converted to a character or a string * 0 53255. suitable for a name |w|N|r|, using a |b||ap|string|ap||r| pattern, * 0 53256. as follows: * 0 53257. |pi|Case#A:#The mode of |w|N|r| is specified by |i|REF CHAR|r|: * 0 53258. |et|if |w|S|r| does not consist of one character, * 0 53259. the conversion is unsuccessful; * 0 53260. otherwise, that character is supplied; * 0 53261. |pi|Case#B:#The mode of |w|N|r| is specified by * 0 53262. |i|REF |so||thin||sc| CHAR|r|: * 0 53263. |et|if the length of |w|S|r| is not equal to the number of characters * 0 53264. referred to by |w|N|r|, * 0 53265. the conversion is unsuccessful; * 0 53266. otherwise, |w|S|r| is supplied; * 0 53267. |pi|Case#C:#The mode of |w|N|r| is specified by * 0 53268. |i|REF STRING|r|: * 0 53269. |et||w|S|r| is supplied.|cc| * 0 53270. * 0 53271. |h1|10.3.4.7. Bits patterns * 0 53272. * 0 53273. |h1|10.3.4.7.1. Syntax * 0 53274. * 0 53275. |pb1|a)|ts1||b|NEST bits pattern|co||r|A341c|b||cc| : * 0 53276. |e|NEST RADIX frame|co||r|b|b||cc|, NEST integral mould|co||r|A342b|b||cc|.|r| * 0 53277. |p1|b)|ts1||b|NEST RADIX frame|co||r|a|b||cc| : NEST insertion|co||r|A341d|b||cc|, * 0 53278. RADIX|co||r|82d,e,f,g|b||cc|, unsuppressible suppression|co||r|A341l|b||cc|, * 0 53279. radix marker|co||r|c|b||cc|.|r| * 0 53280. |p1|c)|ts1||b|radix marker|co||r|b|b||cc| : letter r|co||r|94a|b||cc| symbol.|r|? 0 53281. |w5||exx||co|Examples: * 0 53282. |ex|a) |i|2r6d26sd|r| * 0 53283. |ez|b) |i|2r|r|#|cc| * 0 53284. |j||pa||co||r|For the semantics of |b|bits-patterns|r| see 10.3.4.1.2.e.|cc| * 0 53285. |pb2||co|aa)|tp2|The modes which are output (input) compatible with a * 0 53286. |b||ap|bits|ap||r| pattern are those specified by |u|L|i|#BITS|r| * 0 53287. (|i|REF#|u|L|i|#BITS|r|). * 0 53288. |pb2|bb)|tp2|A value |w|V|r| is converted to a string using a * 0 53289. |b||ap|bits|ap||r| pattern |w|P|r| as follows: * 0 53290. |et|the integer |w|I|r| corresponding to |w|V|r| is determined, * 0 53291. using the |b|operator|r| |i|ABS|r| (10.2.3.8.i); * 0 53292. |pi||bt|If the |i|"r"|r| frame of |w|P|r| * 0 53293. was yielded by a |b|radix|hy|two|hy||r| * 0 53294. (|b||hy|four|hy||r|, |b||hy|eight|hy||r|, |b||hy|sixteen|hy||r|) |b||hy|frame|r|, * 0 53295. |e|then |w|I|r| is converted to a string, * 0 53296. controlled by the integral mould * 0 53297. of |w|P|r|, containing a binary (quaternary, octal, hexadecimal) * 0 53298. representation of |w|I|r| (cf.#10.3.4.2.1.bb); * 0 53299. |et|if |w|I|r| cannot be represented by such a string, * 0 53300. the conversion is unsuccessful. * 0 53301. |pb2|cc)|tp2|A string |w|S|r| is converted to a bits value * 0 53302. suitable for a name |w|N|r|, using a |b||ap|bits|ap||r| pattern |w|P|r|, * 0 53303. as follows: * 0 53304. |et|if the |i|"r"|r| frame of |w|P|r| was yielded by a |b|radix|hy|two|hy||r| * 0 53305. (|b||hy|four|hy||r|, |b||hy|eight|hy||r|, |b||hy|sixteen|hy||r|) * 0 53306. |b||hy|frame|r|, then the integer * 0 53307. |w|I|r| for which |w|S|r| contains a binary (quaternary, octal, * 0 53308. hexadecimal) representation is determined; * 0 53309. |et|the bits value |w|B|r| corresponding to |w|I|r| is determined, * 0 53310. using the |b|operator|r| |i|BIN|r| (10.2.3.8.j); * 0 53311. |et|if the width of |w|B|r| is greater than * 0 53312. that of the value to which |w|N|r| refers, * 0 53313. the conversion is unsuccessful.|cc| * 0 53314. * 0 53315. |h|10.3.4.8. Choice patterns * 0 53316. * 0 53317. |h1|10.3.4.8.1. Syntax * 0 53318. * 0 53319. |pb1|a)|ts1||b|NEST integral choice pattern|co||r|A341c|b||cc| : * 0 53320. NEST insertion|co||r|A341d|b||cc|, * 0 53321. letter c|co||r|94a|b||cc| symbol, NEST praglit|co||r|c|b||cc| list brief pack, * 0 53322. pragment|co||r|92a|b||cc| sequence option.|r| * 0 53323. |p1|b)|ts1||b|NEST boolean choice pattern|co||r|A341c|b||cc| : * 0 53324. |e|NEST insertion|co||r|A341d|b||cc|, boolean marker|co||r|A344b|b||cc|, * 0 53325. brief begin|co||r|94f|b||cc| token, NEST praglit|co||r|c|b||cc|, and also|co||r|94f|b||cc| token, * 0 53326. NEST praglit|co||r|c|b||cc|, brief end|co||r|94f|b||cc| token, pragment|co||r|92a|b||cc| sequence option.|r| * 0 53327. |p1|c)|ts1||b|NEST praglit|co||r|a,b|b||cc| : * 0 53328. pragment|co||r|92a|b||cc| sequence option, NEST literal|co||r|A341i|b||cc|.|r| * 0 53329. |w5||exx||co|Examples: * 0 53330. |ex|a) |i|l#20k c |ro|"mon", "tues", "wednes", "thurs", "fri", * 0 53331. "satur", "sun"|rc||r| * 0 53332. |ey|b) |i|b ("", "error")|r| * 0 53333. |ey|c) |i|"mon"|r| |cc| * 0 53334. |pb2||j||co|aa)|tp2|A value |w|V|r| is output using * 0 53335. a picture |w|P|r| whose pattern |w|Q|r| was yielded by * 0 53336. an |b|integral-choice-pattern|r| * 0 53337. |w|C|r| as follows: * 0 53338. |p||bt|the insertion of |w|Q|r| is staticized (10.3.4.1.1.dd) * 0 53339. and performed (10.3.4.1.1.ee); * 0 53340. |pi|If the mode of |w|V|r| is specified by |i|INT|r|, * 0 53341. if |w|V#|sgt|#0|r|, and if the number * 0 53342. of constituent |b|literals|r| in the * 0 53343. |b|praglit-list-pack|r| * 0 53344. of |w|C|r| is at least |w|V|r|, * 0 53345. |pi|then * 0 53346. |et|the literal yielded by the |w|V|r||hy|th |b|literal|r| is * 0 53347. staticized and performed; * 0 53348. |pi|otherwise, * 0 53349. |et|the event routine corresponding to |i|on value error|r| * 0 53350. is called; * 0 53351. |et|if this returns |w|false|r|, |w|V|r| is output * 0 53352. using |i|put|r| and |i|undefined|r| is called; * 0 53353. |p||bt|the insertion of |w|P|r| is staticized and performed.? 0 53354. |pb2|bb)|tp2|A value is input to a name |w|N|r| * 0 53355. using a picture |w|P|r| whose * 0 53356. pattern |w|Q|r| was yielded by an * 0 53357. |b|integral-choice-pattern|r| |w|C|r| as follows: * 0 53358. |p||bt|the insertion of |w|Q|r| is staticized and performed; * 0 53359. |p||bt|each of the literals yielded by the * 0 53360. constituent |b|literals|r| of the * 0 53361. |b|praglit-list-pack|r| of |w|C|r| is staticized * 0 53362. and "searched for" (cc) in turn; * 0 53363. |pi|If the mode of |w|N|r| is specified by |i|REF INT|r| * 0 53364. and the |w|i|r||hy|th literal is the first one present, * 0 53365. |pi|then |w|i|r| is assigned to |w|N|r|; * 0 53366. |pi|otherwise, * 0 53367. |et|the event routine corresponding to |i|on value error|r| * 0 53368. is called; * 0 53369. |et|if this returns |w|false|r|, * 0 53370. |i|undefined|r| is called; * 0 53371. |et|the insertion of |w|P|r| is staticized and performed. * 0 53372. |pb2|cc)|tp2|A literal is "searched for" by reading * 0 53373. characters and matching them against successive * 0 53374. characters of the literal. If the end of the current line * 0 53375. or the logical end of the file * 0 53376. is reached, or if a character fails to match, the search * 0 53377. is unsuccessful and the current position is returned to where it * 0 53378. started from. * 0 53379. |pb2|dd)|tp2|A value |w|V|r| is output using * 0 53380. a picture |w|P|r| whose * 0 53381. pattern |w|Q|r| was yielded by * 0 53382. a |b|boolean-choice-pattern|r| * 0 53383. |w|C|r| as follows: * 0 53384. |p||bt|the insertion of |w|Q|r| is staticized and performed; * 0 53385. |pi|If the mode of |w|V|r| is specified by |i|BOOL|r|, * 0 53386. |pi|then * 0 53387. |et|if |w|V|r| is |w|true|r| * 0 53388. (|w|false|r|), the literal yielded by * 0 53389. the first (second) constituent |b|literal|r| of * 0 53390. |w|C|r| is staticized and performed; * 0 53391. |pi|otherwise, * 0 53392. |et|the event routine corresponding to |i|on value error|r| * 0 53393. is called; * 0 53394. |et|if this returns |w|false|r|, |w|V|r| is output * 0 53395. using |i|put|r| and |i|undefined|r| is called; * 0 53396. |et|the insertion of |w|P|r| is staticized and performed. * 0 53397. |pb2|ee)|tp2|A value is input to a name |w|N|r| using * 0 53398. a picture |w|P|r| whose * 0 53399. pattern |w|Q|r| was yielded by a * 0 53400. |b|boolean-choice-pattern|r| |w|C|r| as follows: * 0 53401. |et|the insertion of |w|Q|r| is staticized and performed; * 0 53402. |et|each of the literals yielded by the constituent |b|literals|r| of * 0 53403. |w|C|r| is staticized and searched for in turn; * 0 53404. |pi|If the mode of |w|N|r| is specified by |i|REF BOOL|r|, * 0 53405. and the first (second) insertion is present, * 0 53406. |pi|then |w|true|r| (|w|false|r|) is assigned to |w|N|r|; * 0 53407. |pi|otherwise, * 0 53408. |et|the event routine corresponding to |i|on value error|r| * 0 53409. is called; * 0 53410. |et|if this returns |w|false|r|, * 0 53411. |i|undefined|r| is called; * 0 53412. |et|the insertion of |w|P|r| is staticized and performed.|cc| * 0 53413. * 0 53414. |h|10.3.4.8.2. Semantics * 0 53415. * 0 53416. |pa||j|The yield of a |b|choice-pattern|r| |w|P|r| is a * 0 53417. structured value |w|W|r| whose mode is |b||ap|CPATTERN|ap||r|, * 0 53418. determined as follows: * 0 53419. |p||bt|let |w|n|r| be the number of constituent |b|NEST-literals|r| of * 0 53420. the |b|praglit-list-pack|r| of |w|P|r|; * 0 53421. |p||bt|let |w|S|s0|i|s1||r|, |w|i#|uqe|#1, ...#,#n|r|, be a |b|NEST-insertion|r| akin |co|1.1.3.2.k|cc| to * 0 53422. the |w|i|r||hy|th of those constituent |b|NEST-literals|r|; * 0 53423. |p||bt|the insertion |w|I|r| of |w|P|r| and all of |w|S|s0|1|s1|, * 0 53424. S|s0|2|s1|,#...#,#S|s0|n|s1||r| are elaborated collaterally; * 0 53425. |p||bt|the fields of |w|W|r|, taken in order, are * 0 53426. |xi||bt||co||i|i|r||cc| the yield of |w|I|r|; * 0 53427. |xi||bt||co||i|type|r||cc| |w|1|r| (|w|2|r|) if |w|P|r| is a * 0 53428. |b|boolean|hy||r| (|b|integral|hy||r|) |b||hy|choice|hy|pattern|b|; * 0 53429. |xi||bt||co||i|c|r||cc| a multiple value whose mode is * 0 53430. |b||ap|row of INSERTION|ap||r|, having a descriptor |w|((1,#n))|r| * 0 53431. and |w|n|r| elements, that selected by |w|(i)|r|, * 0 53432. |w|i#|uqe|#1, ...#,#n|r|, being the yield of |w|S|s0|i|s1||r|. * 0 53433. * 0 53434. |h1|10.3.4.9. Format patterns * 0 53435. * 0 53436. |h1|10.3.4.9.1. Syntax * 0 53437. * 0 53438. |pb1|a)|ts1||b|NEST format pattern|co||r|A341c|b||cc| : * 0 53439. |e|NEST insertion|co||r|A341d|b||cc|, letter f|co||r|94a|b||cc| symbol, * 0 53440. meek FORMAT NEST ENCLOSED clause|co||r|31a,34a|b||cc|, pragment|co||r|92a|b||cc| sequence option.|r|? 0 53441. |w5||exx||co|Example: * 0 53442. |ex|a) |i|f (uir | (INT): |do| 5d |do|, (REAL): |do| d.3d |do|)|r|#|cc| * 0 53443. |pa||j||co|A |b|format-pattern|r| may be used to provide * 0 53444. formats dynamically for use in transput. * 0 53445. When a |b||ap|format|ap||r| pattern is encountered * 0 53446. during a call of |i|get#next#picture|r|, * 0 53447. it is staticized and its insertion is performed. * 0 53448. The first picture of the format returned by the routine * 0 53449. of the pattern is supplied as the next picture, and * 0 53450. subsequent pictures are taken from * 0 53451. that format until it has been exhausted.|cc| * 0 53452. * 0 53453. |h|10.3.4.9.2. Semantics * 0 53454. * 0 53455. |pa||j|The yield, in an environ |w|E|r|, of a |b|NEST-format-pattern|r| |w|P|r| is a structured value * 0 53456. whose mode is |b||ap|FPATTERN|ap||r| and whose fields, taken in order, are * 0 53457. |xi||bt||co||i|i|r||cc| the yield of its |b|insertion|r|; * 0 53458. |xi||bt||co||i|pf|r||cc| a routine whose mode is * 0 53459. |b||ap|procedure yielding FORMAT|ap||r|, composed of a |b|procedure-yielding-FORMAT-NEST-routine-text|r| * 0 53460. whose |b|unit|r| |w|U|r| is a new |b|unit|r| akin |co|1.1.3.2.k|cc| to * 0 53461. the |b|meek-FORMAT-ENCLOSED-clause|r| of |w|P|r|, together with the environ * 0 53462. necessary for |w|U|r| in |w|E|r|. * 0 53463. * 0 53464. |h1|10.3.4.10. General patterns * 0 53465. * 0 53466. |h1|10.3.4.10.1. Syntax * 0 53467. * 0 53468. |pb1|a)|ts1||b|NEST general pattern|co||r|A341c|b||cc| : * 0 53469. NEST insertion|co||r|A341d|b||cc|, letter g|co||r|94a|b||cc| symbol, * 0 53470. NEST width specification|co||r|b|b||cc| option.|r|? 0 53471. |p1|b)|ts1||b|NEST width specification|co||r|a|b||cc| : * 0 53472. brief begin|co||r|94f|b||cc| token, meek integral NEST unit|co||r|32d|b||cc|, * 0 53473. NEST after specification|co||r|c|b||cc| option, * 0 53474. brief end|co||r|94f|b||cc| token, pragment|co||r|92a|b||cc| sequence option.|r| * 0 53475. |p1|c)|ts1||b|NEST after specification|co||r|b|b||cc| : * 0 53476. |e|and also|co||r|94f|b||cc| token, * 0 53477. meek integral NEST unit|co||r|32d|b||cc|, NEST exponent specification|co||r|d|b||cc| option.|r|? 0 53478. |p1|d)|ts1||b|NEST exponent specification|co||r|c|b||cc| : * 0 53479. |e|and also|co||r|94f|b||cc| token, * 0 53480. meek integral NEST unit|co||r|32d|b||cc|.|r|? 0 53481. |w5||exx||co|Examples: * 0 53482. |ex|a) |i|g|qs|g (|mi|18, 12, |mi|3)|r| * 0 53483. |ez|b) |i||mi|18, 12, |mi|3|r| * 0 53484. |ey|c) |i|, 12, |mi|3|r| * 0 53485. |ez|d) |i|, |mi|3|r|#|cc| * 0 53486. |pb2||j||co|aa)|tp2|A value |w|V|r| is output using a picture * 0 53487. |w|P|r| whose pattern |w|Q|r| was yielded by * 0 53488. a |b|general-pattern|r| |w|G|r| * 0 53489. as follows: * 0 53490. |et||w|P|r| is staticized; * 0 53491. |et|the insertion of |w|Q|r| is performed; * 0 53492. |pi|If |w|Q|r| is not parametrized * 0 53493. (i.e., |w|G|r| contains no |b|width-specification|r|), * 0 53494. |pi|then |w|V|r| is output using |i|put|r|; * 0 53495. |pi|otherwise, if the mode of |w|V|r| is specified by * 0 53496. |u|L|i|#INT|r| or |u|L|i|#REAL|r|, * 0 53497. |pi|then * 0 53498. |et|if |w|Q|r| contains one (two, three) parameter(s), * 0 53499. |w|V|r| is converted to a string using * 0 53500. |i|whole|r| (|i|fixed|r|, |i|float|r|); * 0 53501. |et|the string is written using |i|put|r|; * 0 53502. |pi|otherwise, * 0 53503. |et|the event routine corresponding to |i|on value error|r| * 0 53504. is called; * 0 53505. |et|if this returns |w|false|r|, * 0 53506. |w|V|r| is output using |i|put|r|, and |i|undefined|r| is called; * 0 53507. |p||bt|the insertion of |w|P|r| is performed. * 0 53508. |pb2|bb)|tp2|A value is input to a name |w|N|r| using a picture * 0 53509. |w|P|r| whose pattern is a |b||ap|general|ap||r| pattern * 0 53510. as follows: * 0 53511. |et||w|P|r| is staticized; * 0 53512. |et|(any parameters are ignored and) the value is input to * 0 53513. |w|N|r| using |i|get|r|.|cc| * 0 53514. * 0 53515. |h|10.3.4.10.2. Semantics * 0 53516. * 0 53517. |pa||j|The yield, in an environ |w|E|r|, of a |b|NEST-general-pattern|b| |w|P|r| is a * 0 53518. structured value whose mode is |b||ap|GPATTERN|ap||r| and whose fields, taken in order, are * 0 53519. |xi||bt||co||i|i|r||cc| the yield of the |b|insertion|r| of |w|P|r|; * 0 53520. |xi||bt||co||i|spec|r||cc| a multiple value |w|W|r| whose mode * 0 53521. is |b||ap|row of procedure yielding integral|ap||r|, having a descriptor |w|((1,#n))|r|, * 0 53522. where |w|n|r| is the number of constituent |b|meek-integral-units|r| of the * 0 53523. |b|width-specification-option|r| of |w|P|r|, and |w|n|r| elements determined as follows: * 0 53524. |ph|For |w|i#|uqe|#1,#...#,#n|r|, * 0 53525. |et|the |w|i|r||hy|th element of |w|W|r| is a routine, * 0 53526. whose mode is |b||ap|procedure yielding integral|ap||r|, * 0 53527. composed of a |b|procedure-yielding-integral-NEST-routine-text|r| * 0 53528. whose |b|unit|r| |w|U|r| is a new |b|unit|r| akin |co|1.1.3.2.k|cc| to the * 0 53529. |w|i|r||hy|th of those |b|meek-integral-units|r|, * 0 53530. together with the environ necessary for |w|U|r| in |w|E|r|. * 0 53531. * 0 53532. |h|10.3.5. Formatted transput * 0 53533. * 0 53534. |pb1|a)|ts1||i|MODE FORMAT |uqe| STRUCT (FLEX |so|1 : 0|sc| PIECE |u|f|i|) ;|r| * 0 53535. |p||ps||i|MODE |ra| PIECE |uqe| STRUCT |ro|INT cp ~J pointer to current collection ~J, * 0 53536. |e|count ~J number of times piece is to be repeated ~J, * 0 53537. |e|bp ~J back pointer ~J, * 0 53538. |e|FLEX |so|1 : 0|sc| COLLECTION c|rc| ;|r| * 0 53539. |p||ps||i|MODE |ra| COLLECTION |uqe| UNION (PICTURE, COLLITEM) ;|r| * 0 53540. |p||ps||i|MODE |ra| COLLITEM |uqe| STRUCT |ro|INSERTION i1, |e|PROC#INT#rep#~J#replicator ~J, * 0 53541. |e|INT#p#~J#pointer#to#another#piece#~J, INSERTION i2|rc| ;|r|? 0 53542. |p||ps||i|MODE |ra| INSERTION |uqe| FLEX |so|1 : 0|sc| STRUCT (PROC INT rep ~J replicator ~J, * 0 53543. |e|UNION (STRING, CHAR) sa) ;|r| * 0 53544. |p||ps||i|MODE |ra| PICTURE |uqe| * 0 53545. |g||pc|STRUCT |ro|UNION (PATTERN, CPATTERN, FPATTERN, GPATTERN, VOID) p, INSERTION i|rc| ;|r| * 0 53546. |p||ps||i|MODE |ra| PATTERN |uqe| * 0 53547. STRUCT (INT#type#~J#of#pattern#~J, |e|FLEX |so|1 : 0|sc| FRAME frames) ;|r| * 0 53548. |p||ps||i|MODE |ra| FRAME |uqe| STRUCT (INSERTION i, |e|PROC INT rep ~J replicator ~J, * 0 53549. |e|BOOL#supp#~J#true#if#suppressed#~J, |e|CHAR marker) ;|r| * 0 53550. |p||ps||i|MODE |ra| CPATTERN |uqe| STRUCT (INSERTION i, |e|INT type ~J boolean or integral ~J, * 0 53551. |e|FLEX |so|1 : 0|sc| INSERTION c) ;|r| * 0 53552. |p||ps||i|MODE |ra| FPATTERN |uqe| STRUCT (INSERTION i, PROC FORMAT pf) ;|r| * 0 53553. |p||ps||i|MODE |ra| GPATTERN |uqe| |g|STRUCT (INSERTION i, FLEX |so|1 : 0|sc| PROC INT spec) ;|r| * 0 53554. |pb1|b)|ts1||i|PROC |ra| get next picture |uqe|$#(REF FILE f, BOOL read, REF PICTURE picture) VOID : * 0 53555. |pc|BEGIN * 0 53556. |pc|BOOL picture found |bec| FALSE, format ended |bec| FALSE; * 0 53557. |pc|WHILE |not| picture found * 0 53558. |pc|DO IF forp OF f |uqe| 0 THEN * 0 53559. |pd|IF format ended * 0 53560. |pd|THEN undefined * 0 53561. |pd|ELIF |not| (format mended OF f) (f) * 0 53562. |g||pd|THEN REF INT (forp OF f) |bec| 1; * 0 53563. |pe|cp OF (|u|f|i| OF format OF f) |so|1|sc| |bec| 1;? 0 53564. |pe|count OF (|u|f|i| OF format OF f) |so|1|sc| |bec| 1? 0 53565. |pd|ELSE format ended |bec| TRUE * 0 53566. |pd|FI|g| * 0 53567. |pc|ELSE|g| * 0 53568. |pd|REF INT forp |uqe| forp OF f; * 0 53569. |pd|REF FLEX |so||thin||sc| PIECE aleph |uqe| |u|f|i| OF format OF f;? 0 53570. |pd|CASE (c OF aleph |so|forp|sc|) |so|cp OF aleph |so|forp|sc||sc| IN|g| * 0 53571. |pe|(COLLITEM cl):|g| * 0 53572. |pf|(|so|1 : UPB (i1 OF cl)|sc| SINSERT si;|g| * 0 53573. |pf|bp OF aleph |so|p OF cl|sc| |bec| forp; forp |bec| SKIP; * 0 53574. |pf|(staticize insertion (i1 OF cl, si),|g| * 0 53575. |e|count OF aleph |so|p OF cl|sc| |bec| rep OF cl);|g| * 0 53576. |pf|(aleph :|ne|: |u|f|i| OF format OF f | undefined); * 0 53577. |pf|(read | get insertion (f, si) | put insertion (f, si)); * 0 53578. |pf|cp OF aleph |so|p OF cl|sc| |bec| 0; * 0 53579. |pf|forp |bec| p OF cl) , * 0 53580. |pe|(PICTURE pict): (picture found |bec| TRUE; picture |bec| pict) * 0 53581. |xc|ESAC; * 0 53582. |pd|WHILE * 0 53583. |e|(forp |ne| 0 |g|| cp OF aleph |so|forp|sc| |uqe| UPB c OF aleph |so|forp|sc| * 0 53584. |g|| FALSE) * 0 53585. |pd|DO IF (count OF aleph |so|forp|sc| |mi||bec| 1) |le| 0 * 0 53586. |pd|THEN * 0 53587. |pe|IF (forp |bec| bp OF aleph |so|forp|sc|) |ne| 0 * 0 53588. |pe|THEN * 0 53589. |pf|INSERTION extra |uqe| |g| * 0 53590. |pj|CASE (c OF aleph |so|forp|sc|) |so|cp OF aleph |so|forp|sc||sc| IN * 0 53591. |pj|(COLLITEM cl): * 0 53592. |e||ro|bp OF aleph |so|p OF cl|sc| |bec| 0; i2 OF cl|rc| , * 0 53593. |pj|(PICTURE pict): * 0 53594. |pk|CASE p OF pict IN * 0 53595. |pk|(FPATTERN fpatt): * 0 53596. |e|(INT k |bec| forp; * 0 53597. |e|WHILE bp OF aleph |so|k|sc| |ne| forp DO k +|bec| 1 OD; * 0 53598. |e|aleph |bec| aleph |so| : k |mi| 1|sc|; * 0 53599. |e|i OF pict) * 0 53600. |pk|ESAC * 0 53601. |xf|ESAC; * 0 53602. |xe|INT m |uqe| UPB i OF picture, n |uqe| UPB extra; * 0 53603. |pf||so|1 : m + n|sc| STRUCT |g|(PROC INT rep, UNION (STRING, CHAR) sa) c; * 0 53604. |xe|c |so|1 : m|sc| |bec| i OF picture; c |so|m + 1 : m + n|sc| |bec| extra; * 0 53605. i OF picture |bec| c * 0 53606. |pe|FI * 0 53607. |pd|ELSE cp OF aleph |so|forp|sc| |bec| 0 * 0 53608. |xc|FI OD; * 0 53609. |e|(forp |ne| 0 | cp OF aleph |so|forp|sc| +|bec| 1) * 0 53610. |xs|FI OD? 0 53611. |xs|END ;|r| * 0 53612. |pb1|c)|ts1||i|MODE |ra| SINSERT |uqe| STRUCT (INT rep, UNION (STRING, CHAR) sa) ;|r| * 0 53613. |pb1|d)|ts1||i|PROC |ra| staticize insertion |uqe||g|#(INSERTION ins, REF |so||thin||sc| SINSERT sins) VOID : * 0 53614. |xc| ~J calls collaterally all the replicators in |ap|ins|ap| ~J * 0 53615. |pc|IF UPB ins |uqe| 1 * 0 53616. |pc|THEN * 0 53617. |pd|rep OF sins |so|1|sc| |bec| rep OF ins |so|1|sc|; * 0 53618. |pd|sa OF sins |so|1|sc| |bec| sa OF ins |so|1|sc| * 0 53619. |pc|ELIF UPB ins |sgt| 1 * 0 53620. |pc|THEN (staticize insertion (ins |so|1|sc|, sins |so|1|sc|), * 0 53621. |pe|staticize insertion (ins |so|2 : |sc|, sins |so|2 : |sc|)) * 0 53622. |xs|FI ;|r| * 0 53623. |pb1|e)|ts1||i|MODE |ra| SFRAME |uqe| STRUCT |ro|FLEX |so|1 : 0|sc| SINSERT si, INT rep, * 0 53624. BOOL supp, CHAR marker|rc| ;|r| * 0 53625. |pb1|f)|ts1||i|PROC |ra| staticize frames |uqe||g|#? 0 53626. (|so||thin||sc| FRAME frames, REF |so||thin||sc| SFRAME sframes) VOID : * 0 53627. |xc| ~J calls collaterally all the replicators in |ap|frames|ap| ~J * 0 53628. |pc|IF UPB frames |uqe| 1 * 0 53629. |xs|THEN * 0 53630. |pd||so|1 : UPB (i OF frames |so|1|sc|)|sc| SINSERT si; * 0 53631. |pd|(staticize insertion (i OF frames |so|1|sc|, si), * 0 53632. |g||pe|rep OF sframes |so|1|sc| |bec| rep OF frames |so|1|sc|); * 0 53633. |g||pd|si OF sframes |so|1|sc| |bec| si; * 0 53634. |g||pd|supp OF sframes |so|1|sc| |bec| supp OF frames |so|1|sc|; * 0 53635. |g||pd|marker OF sframes |so|1|sc| |bec| marker OF frames |so|1|sc| * 0 53636. |xs|ELIF UPB frames |sgt| 1 * 0 53637. |pc|THEN (staticize frames (frames |so|1|sc|, sframes |so|1|sc|), * 0 53638. |xd|staticize frames (frames |so|2 : |sc|, sframes |so|2 : |sc|)) * 0 53639. |xs|FI ;|r| * 0 53640. |pb1|g)|ts1||i|PROC |ra| put insertion |uqe| (REF FILE f, |so||thin||sc| SINSERT si) VOID : * 0 53641. |pc|BEGIN set write mood (f); * 0 53642. |pd|FOR k TO UPB si * 0 53643. |pd|DO * 0 53644. |pe|CASE sa OF si |so|k|sc| IN * 0 53645. |pf|(CHAR a): alignment (f, rep OF si |so|k|sc|, a, FALSE) , * 0 53646. |pf|(STRING s): * 0 53647. |pj|TO rep OF si |so|k|sc| * 0 53648. |pj|DO * 0 53649. |xj|FOR i TO UPB s * 0 53650. |e|DO check pos (f); put char (f, s |so|i|sc|) OD * 0 53651. |pj|OD * 0 53652. |xd|ESAC * 0 53653. |xc|OD * 0 53654. |pc|END ;|r| * 0 53655. |pb1|h)|ts1||i|PROC |ra| get insertion |uqe| (REF FILE f, |so||thin||sc| SINSERT si) VOID : * 0 53656. |pc|BEGIN set read mood (f); * 0 53657. |pd|FOR k TO UPB si * 0 53658. |pd|DO * 0 53659. |pe|CASE sa OF si |so|k|sc| IN * 0 53660. |pf|(CHAR a): alignment (f, rep OF si |so|k|sc|, a, TRUE) , * 0 53661. |pf|(STRING s): * 0 53662. |pj|(CHAR c; * 0 53663. |pj|TO rep OF si |so|k|sc| * 0 53664. |pj|DO * 0 53665. |pk|FOR i TO UPB s * 0 53666. |pk|DO check pos (f); get char (f, c); * 0 53667. |e|(c |ne| s |so|i|sc| |g|| (|not| (char error mended OF f) (f, c |bec| s |so|i|sc|) |g|#? 0 53668. | undefined); * 0 53669. |e|set read mood (f)); * 0 53670. |xj|OD * 0 53671. |pj|OD) * 0 53672. |xd|ESAC * 0 53673. |pd|OD * 0 53674. |pc|END ;|r| * 0 53675. |pb1|i)|ts1||i|PROC |ra| alignment |uqe||g|#(REF FILE f, INT r, CHAR a, BOOL read) VOID : * 0 53676. |pc|IF a |uqe| "x" THEN TO r DO space (f) OD * 0 53677. |pc|ELIF a |uqe| "y" THEN TO r DO backspace (f) OD * 0 53678. |pc|ELIF a |uqe| "l" THEN TO r DO newline (f) OD * 0 53679. |pc|ELIF a |uqe| "p" THEN TO r DO newpage (f) OD * 0 53680. |pc|ELIF a |uqe| "k" THEN set char number (f, r) * 0 53681. |pc|ELIF a |uqe| "q" * 0 53682. |pc|THEN TO r? 0 53683. |pd|DO * 0 53684. |pe|IF read * 0 53685. |pe|THEN CHAR c; check pos (f); get char (f, c); * 0 53686. |pf|(c |ne| blank * 0 53687. |pf|#| (|not| (char error mended OF f) (f, c |bec| blank) * 0 53688. |pf|##| undefined); set read mood (f)) * 0 53689. |pe|ELSE check pos (f); put char (f, blank) * 0 53690. |xd|FI * 0 53691. |pd|OD * 0 53692. |xs|FI ;|r| * 0 53693. |pb1|j)|ts1||i|PROC |ra| do fpattern |uqe|$#(REF FILE f, FPATTERN fpattern, BOOL read) VOID : * 0 53694. |pc|BEGIN FORMAT pf; * 0 53695. |pd||so|1 : UPB (i OF fpattern)|sc| SINSERT si;? 0 53696. |pd|(staticize insertion (i OF fpattern, si), * 0 53697. |pe|pf |bec| pf OF fpattern); * 0 53698. |pd|(read | get insertion (f, si) | put insertion (f, si)); * 0 53699. |pd|REF INT forp |uqe| forp OF f; * 0 53700. |pd|REF FLEX |so||thin||sc| PIECE aleph |uqe| |u|f|i| OF format OF f; * 0 53701. |pd|INT m |uqe| UPB aleph, n |uqe| UPB (|u|f|i| OF pf); * 0 53702. |pd||so|1 : m + n|sc| PIECE c; c |so|1 : m|sc| |bec| aleph; * 0 53703. |pd|c |so|m + 1 : m + n|sc| |bec| |u|f|i| OF pf; * 0 53704. |pd|aleph |bec| c; bp OF aleph |so|m + 1|sc| |bec| forp; * 0 53705. |pd|forp |bec| m + 1; cp OF aleph |so|forp|sc| |bec| 0; * 0 53706. |pd|count OF aleph |so|forp|sc| |bec| 1; * 0 53707. |pd|FOR i FROM m + 1 TO m + n * 0 53708. |pd|DO * 0 53709. |pe|FOR j TO UPB c OF aleph |so|i|sc| * 0 53710. |pe|DO * 0 53711. |pf|CASE (c OF aleph |so|i|sc|) |so|j|sc| IN * 0 53712. |pj|(COLLITEM cl): * 0 53713. |pk|(c OF aleph |so|i|sc|) |so|j|sc| |bec|? 0 53714. |e|COLLITEM |ro|i1 OF cl, rep OF cl, p OF cl + m, i2 OF cl|rc|? 0 53715. |pf|ESAC * 0 53716. |pe|OD * 0 53717. |pd|OD * 0 53718. |xs|END ;|r| * 0 53719. |pb1|k)|ts1||i|PROC |ra| associate format |uqe| * 0 53720. (REF FILE f, FORMAT format) VOID : * 0 53721. |pc|BEGIN * 0 53722. |pd|format OF f |bec| * 0 53723. |xd|~J~J a newly created name which is made to refer to the * 0 53724. yield of an actual|r|-|i|format|r|-|i|declarer and whose * 0 53725. scope is equal to the scope of the value yielded by * 0 53726. |ap|format|ap| ~J~J * 0 53727. |xe||bec| format; * 0 53728. |xc|forp OF f |bec| HEAP INT |bec| 1; * 0 53729. |pd|cp OF (|u|f|i| OF format OF f) |so|1|sc| |bec| 1; * 0 53730. |pd|count OF (|u|f|i| OF format OF f) |so|1|sc| |bec| 1; * 0 53731. |pd|bp OF (|u|f|i| OF format OF f) |so|1|sc| |bec| 0 * 0 53732. |pc|END ;|r| * 0 53733. * 0 53734. |h|10.3.5.1. Formatted output * 0 53735. * 0 53736. |pb1|a)|ts1||i|PROC putf |uqe| (REF FILE f, |so||thin||sc| UNION (OUTTYPE, FORMAT) x) VOID : * 0 53737. |g||pc|IF opened OF f THEN * 0 53738. |pc|FOR k TO UPB x * 0 53739. |pc|DO CASE * 0 53740. |g|set write mood (f); set char mood (f); * 0 53741. |g|x#|so|k|sc| * 0 53742. |g|IN * 0 53743. |g||pd|(FORMAT format): associate format (f, format) , * 0 53744. |g||pd|(OUTTYPE ot): * 0 53745. |g||pd|BEGIN INT j |bec| 0; * 0 53746. |g||xd|PICTURE picture, |so||thin||sc| SIMPLOUT y |uqe| STRAIGHTOUT ot; * 0 53747. |g||pe|WHILE (j +|bec| 1) |le| UPB y * 0 53748. |g||pe|DO BOOL incomp |bec| FALSE; * 0 53749. |pf|get next picture (f, FALSE, picture); * 0 53750. |pf|set write mood (f); * 0 53751. |pf||so|1 : UPB (i OF picture)|sc| SINSERT sinsert; * 0 53752. |g||pf|CASE p OF picture IN * 0 53753. |phalf||pf|(PATTERN pattern): * 0 53754. |g||xe|BEGIN INT rep, sfp |bec| 1; * 0 53755. |g||xf||so|1 : UPB (frames OF pattern)|sc| SFRAME sframes; * 0 53756. |g||pj|(staticize frames (frames OF pattern, sframes), * 0 53757. |g||pk|staticize insertion (i OF picture, sinsert)); * 0 53758. |pj|STRING s; * 0 53759. |phalf||pj|OP |qe| |uqe| (STRING s) BOOL : * 0 53760. |pk|~J true if the next marker is one of the elements of |ap|s|ap| * 0 53761. and false otherwise ~J * 0 53762. |g||pk|IF sfp |sgt| UPB sframes * 0 53763. |pk|THEN FALSE * 0 53764. |pk|ELSE SFRAME sf |uqe| sframes |so|sfp|sc|; * 0 53765. |e|rep |bec| rep OF sf; * 0 53766. |e|IF char in string (marker OF sf, LOC INT, s) * 0 53767. |e|THEN sfp +|bec| 1; TRUE * 0 53768. |e|ELSE FALSE * 0 53769. |e|FI * 0 53770. |pk|FI; * 0 53771. |phalf||pj|OP |qe| |uqe| (CHAR c) BOOL : |qe| STRING (c); * 0 53772. |phalf||pj|PROC int pattern |uqe| (REF BOOL sign mould) INT : * 0 53773. |xj|(INT l |bec| 0;#|g| * 0 53774. |xj|#WHILE |qe| "zuv" DO (rep |sge| 0 | l +|bec| rep) OD; * 0 53775. |xj|#sign mould |bec| |qe| "+|mi|"; * 0 53776. |pk|#WHILE |qe| "zd" DO (rep |sge| 0 | l +|bec| rep) OD; l); * 0 53777. |phalf||pj||nl|PROC edit |u|l|i|#int |uqe| (|u|L|i|#INT i) VOID : * 0 53778. |pk||ro|BOOL sign mould; INT l |bec| int pattern (sign mould); * 0 53779. |pk|STRING t |uqe| subwhole (ABS i, l); * 0 53780. |pk|IF char in string (errorchar, LOC INT, t) |g||or| l |uqe| 0 |g||or| |not| sign mould |and| i |lt| |u|L|i| 0 * 0 53781. |pk|THEN incomp |bec| TRUE * 0 53782. |pk|ELSE t PLUSTO s; * 0 53783. |e|(l |mi| UPB t) |sx| "0" PLUSTO s; * 0 53784. |e|(sign mould | (i |lt| |u|L|i| 0 | "|mi|" | "+") PLUSTO s) * 0 53785. |xj|FI|rc||ng|; * 0 53786. |phalf||pj||nl|PROC edit |u|l|i|#real |uqe| (|u|L|i|#REAL r) VOID : * 0 53787. |xj||ro|INT b |bec| 0, a |bec| 0, e |bec| 0, exp |bec| 0,#|g||u|L|i|#REAL y |bec| ABS r, * 0 53788. BOOL sign1, STRING point |bec| ""; * 0 53789. |e|b |bec| int pattern (sign1); * 0 53790. |e|(|qe| "." | a |bec| int pattern (LOC BOOL); point |bec| "."); * 0 53791. |pk|IF |qe| "e" * 0 53792. |pkk|THEN |u|l|i| standardize (y, b, a, exp); * 0 53793. |xkk|edit int (exp); * 0 53794. |xj|FI; * 0 53795. |pk|STRING t |uqe| subfixed (y, b + a + (a |ne| 0 | 1 | 0), a); * 0 53796. |pk|IF char in string (errorchar, LOC INT, t) |g||or|#a#+#b#|uqe|#0? 0 53797. #|g||or| |not| sign1 |and| r |lt| |u|L|i| 0 |g||or| |not| sign2 |and| exp |lt| 0? 0 53798. |xj|THEN incomp |bec| TRUE * 0 53799. |pk|ELSE t |so| : b|sc| + point + t |so|b + 2: |sc| PLUSTO s; * 0 53800. |e|(b + a + (a |ne| 0 | 1 | 0 ) |mi| UPB t) |sx| "0" |g|#PLUSTO s;? 0 53801. |e|(sign1 | (r |lt| |u|L|i| 0 | "|mi|" | "+") PLUSTO s) * 0 53802. |xj|FI|rc||ng|; * 0 53803. |phalf||pj||nl|PROC edit |u|l|i|#compl |uqe| (|u|L|i|#COMPL z) VOID : * 0 53804. |xj||ro|WHILE |not| |qe| "i" DO sfp +|bec| 1 OD; * 0 53805. edit |u|l|i| real (IM z); * 0 53806. "|tip|" PLUSTO s; sfp |bec| 1; * 0 53807. edit |u|l|i| real (RE z)|rc||ng|; * 0 53808. |phalf||pj||nl|PROC edit |u|l|i|#bits |uqe| (|u|L|i|#BITS lb, INT radix) VOID : * 0 53809. |xj|(|u|L|i|#INT n |bec| ABS lb; |qe| "r"; INT l |bec| int pattern (LOC BOOL); * 0 53810. |pk|WHILE dig char (|u|S|i| (n MOD |u|K|i|#radix)) PLUSTO s; * 0 53811. n |sq||bec| |u|K|i|#radix; n |ne| |u|L|i| 0 * 0 53812. |xj|DO SKIP OD; * 0 53813. |xj|IF UPB s |le| l * 0 53814. |pk|THEN * 0 53815. (l |mi| UPB s) |sx| "0" PLUSTO s * 0 53816. |xj|ELSE incomp |bec| TRUE * 0 53817. |xj|FI)|ng|; * 0 53818. |phalf||pj|PROC charcount |uqe| INT : * 0 53819. (INT l |bec| 0; WHILE |qe| "a"#DO (rep |sge| 0 | l +|bec| rep) OD; l);? 0 53820. |phalf||pj|CASE type OF pattern IN * 0 53821. |g||pf|~J integral ~J * 0 53822. |xj|(y |so|j|sc| | * 0 53823. |pk||nl|(|u|L|i|#INT i): * 0 53824. edit |u|l|i|#int (i)|ng| * 0 53825. |g||pk|| incomp |bec| TRUE) , * 0 53826. |pf|~J real ~J * 0 53827. |xj|(y |so|j|sc| | * 0 53828. |pk||nl|(|u|L|i|#REAL r): * 0 53829. edit |u|l|i|#real (r)|ng| , * 0 53830. |g||pk||nl|(|u|L|i|#INT i): * 0 53831. edit |u|l|i|#real (i)|ng| * 0 53832. |g||pk|| incomp |bec| TRUE) , * 0 53833. |g||pf|~J boolean ~J * 0 53834. |xj|(y |so|j|sc| | * 0 53835. |pk|(BOOL b): * 0 53836. s |bec| (b | flip | flop) * 0 53837. |g||pk|| incomp |bec| TRUE) , * 0 53838. |g||pf|~J complex ~J * 0 53839. |xj|(y |so|j|sc| | * 0 53840. |pk||nl|(|u|L|i|#COMPL z): * 0 53841. edit |u|l|i|#compl (z)|ng| , * 0 53842. |g||pk||nl|(|u|L|i|#REAL r): * 0 53843. edit |u|l|i|#compl (r)|ng| , * 0 53844. |pk||nl|(|u|L|i|#INT i): * 0 53845. edit |u|l|i|#compl (i)|ng| * 0 53846. |pk|| incomp |bec| TRUE) , * 0 53847. |g||pf|~J string ~J * 0 53848. |xj|(y |so|j|sc| | * 0 53849. |pk|(CHAR c): |g|(charcount |uqe| 1 | s |bec| c | incomp |bec| TRUE) , * 0 53850. |g||pk|(|so||thin||sc| CHAR t): * 0 53851. |e|(charcount |uqe| UPB t |mi| LWB t + 1 * 0 53852. |e|| s |bec| t |so||at| 1|sc| * 0 53853. |g||e|| incomp |bec| TRUE) * 0 53854. |g||pk|| incomp |bec| TRUE) * 0 53855. |g||pj|OUT * 0 53856. |g||pf|~J bits ~J * 0 53857. |xj|(y |so|j|sc| | * 0 53858. |pk||nl|(|u|L|i|#BITS lb): * 0 53859. |g|edit |u|l|i|#bits (lb, type OF pattern |mi| 4)|ng| * 0 53860. |g||pk|| incomp |bec| TRUE) * 0 53861. |g||pj|ESAC; * 0 53862. |pj|IF |not| incomp * 0 53863. |pj|THEN edit string (f, s, sframes) * 0 53864. |pj|FI * 0 53865. |g||xe|END , * 0 53866. |phalf||pf|(CPATTERN choice): * 0 53867. |xe|BEGIN * 0 53868. |pj||so|1 : UPB (i OF choice)|sc| SINSERT si; * 0 53869. |pj|staticize insertion (i OF choice, si); * 0 53870. |pj|put insertion (f, si); * 0 53871. |pj|INT l |uqe| * 0 53872. |pk|CASE type OF choice IN * 0 53873. |pj|~J boolean ~J * 0 53874. |xk|(y |so|j|sc| | * 0 53875. |xk|(BOOL b): (b | 1 | 2) * 0 53876. |xk|| incomp |bec| TRUE; SKIP) , * 0 53877. |pj|~J integral ~J * 0 53878. |xk|(y |so|j|sc| | * 0 53879. |xk|(INT i): i * 0 53880. |xk|| incomp |bec| TRUE; SKIP) * 0 53881. |pk|ESAC; * 0 53882. |pj|IF |not| incomp * 0 53883. |pj|THEN * 0 53884. |pk|IF l |sgt| UPB (c OF choice) |or| l |le| 0 * 0 53885. |pk|THEN incomp |bec| TRUE * 0 53886. |pk|ELSE * 0 53887. |e||so|1 : UPB ((c OF choice) |so|l|sc|)|sc| SINSERT ci; * 0 53888. |e|staticize insertion ((c OF choice) |so|l|sc|, ci); * 0 53889. |g||e|put insertion (f, ci) * 0 53890. |g||pk|FI |g| * 0 53891. |pj|FI; * 0 53892. |g||pj|staticize insertion (i OF picture, sinsert) * 0 53893. |g||xe|END , * 0 53894. |phalf||pf|(FPATTERN fpattern): * 0 53895. |g||pf|BEGIN * 0 53896. |g||e|do fpattern (f, fpattern, FALSE); * 0 53897. |e|FOR i TO UPB sinsert DO sinsert |so|i|sc| |bec| (0, "") OD; * 0 53898. |e|j |mi||bec| 1 * 0 53899. |g||xe|END , * 0 53900. |phalf||pf|(GPATTERN gpattern): * 0 53901. |g||xe|BEGIN * 0 53902. |pj||so|1 : UPB (i OF gpattern)|sc| SINSERT si; * 0 53903. |pj||so||thin||sc| PROC INT spec |uqe| spec OF gpattern; INT n |uqe| UPB spec; * 0 53904. |pj||so|1 : n|sc| INT s; * 0 53905. |pj||ro|staticize insertion (i OF gpattern, si), * 0 53906. |pk|staticize insertion (i OF picture, sinsert), * 0 53907. |pk|s |bec| |ro|n | spec |so|1|sc|, (spec |so|1|sc|, spec |so|2|sc|), |g| * 0 53908. (spec |so|1|sc|, spec |so|2|sc|, spec |so|3|sc|) | () |rc||rc|; * 0 53909. |pj|put insertion (f, si); * 0 53910. |pj|IF n |uqe| 0 THEN put (f, y |so|j|sc|) * 0 53911. |pj|ELSE * 0 53912. |pk|NUMBER yj |uqe| * 0 53913. |e|(y |so|j|sc| | |nl|(|u|L|i|#INT i): i|ng|, |nl|(|u|L|i|#REAL r): r|ng| * 0 53914. |g|| incomp |bec| TRUE; SKIP); * 0 53915. |g||pk|IF |not| incomp * 0 53916. |pk|THEN * 0 53917. CASE n IN * 0 53918. |e|put (f, whole (yj, s |so|1|sc|)) , * 0 53919. |e|put (f, fixed (yj, s |so|1|sc|, s |so|2|sc|)) , * 0 53920. |e|put (f, float (yj, s |so|1|sc|, s |so|2|sc|, s |so|3|sc|)) * 0 53921. |xk|ESAC * 0 53922. |xj|FI * 0 53923. |g||xf|FI * 0 53924. |g||xe|END , * 0 53925. r binary transput; * 0 53926. |xf|(j |mi||bec| 1; staticize insertion (i OF picture, sinsert)) * 0 53927. |phalf||xe|ESAC; * 0 53928. |pf|IF incomp * 0 53929. |pf|THEN set write mood (f); * 0 53930. |pj|(|not| (value error mended OF f) (f)|g|#|#put (f, y |so|j|sc|); undefined) * 0 53931. |g||pf|FI; * 0 53932. |g||pf|put insertion (f, sinsert) * 0 53933. |g||xd|OD * 0 53934. |g||xc|END * 0 53935. |g||xs|ESAC * 0 53936. OD * 0 53937. |g||xs|ELSE undefined * 0 53938. |xs|FI ;|r| * 0 53939. |pb1|b)|ts1||i|PROC |ra| edit string |uqe||g|#(REF FILE f, STRING s, |so||thin||sc| SFRAME sf) VOID : * 0 53940. |pc|BEGIN * 0 53941. BOOL supp, zs |bec| TRUE, signput |bec| FALSE, again, INT j |bec| 0, sign; * 0 53942. |pd|PROC copy |uqe| (CHAR c) VOID : * 0 53943. |pe|(|not| supp | check pos (f); put char (f, c)); * 0 53944. |pd|FOR k TO UPB sf * 0 53945. |pd|DO SFRAME sfk |uqe| sf |so|k|sc|; supp |bec| supp OF sfk; * 0 53946. |pe|put insertion (f, si OF sfk); * 0 53947. |pe|TO rep OF sfk * 0 53948. |pe|DO again |bec| TRUE; * 0 53949. |pf|WHILE again * 0 53950. |pf|DO j +|bec| 1; again |bec| FALSE; * 0 53951. |pj|CHAR sj |uqe| s |so|j|sc|, marker |uqe| marker OF sfk; * 0 53952. |pj|IF marker |uqe| "d" * 0 53953. |pj|THEN copy (sj); zs |bec| TRUE? 0 53954. |pj|ELIF marker |uqe| "z" THEN * 0 53955. |xj|(sj |uqe| "0" | copy ((zs | "|vs|" | sj))? 0 53956. |e||: sj |uqe| "+" | again |bec| TRUE * 0 53957. |e|| zs |bec| FALSE; copy (sj)) * 0 53958. |pj|ELIF marker |uqe| "u" |or| marker |uqe| "v" THEN * 0 53959. |xj|(sj |uqe| "+" | sign |bec| 1; again |bec| TRUE? 0 53960. |e||: sj |uqe| "|mi|" | sign |bec| 2; again |bec| TRUE * 0 53961. |e||: sj |uqe| "0" | copy ((zs | "|vs|" | sj)) * 0 53962. |pk|| (|not| signput | * 0 53963. |pkk|copy ((sign | (marker |uqe| "u" | "+" | "|vs|"), "|mi|")); * 0 53964. |pkk|signput |bec| TRUE); * 0 53965. |pkk|copy (sj); zs |bec| FALSE) * 0 53966. |pj|ELIF marker |uqe| "+" THEN * 0 53967. |xj|(sj |uqe| "+" |or| sj |uqe| "|mi|" | copy (sj) * 0 53968. |pk|| (|not| signput | copy ((sign | "+", "|mi|"))); * 0 53969. |pkk|j |mi||bec| 1) * 0 53970. |pj|ELIF marker |uqe| "|mi|" THEN * 0 53971. |xj|(sj |uqe| "+" | copy ("|vs|")? 0 53972. |e||: sj |uqe| "|mi|" | copy (sj) * 0 53973. |pk|| (|not| signput | copy ((sign | "|vs|", "|mi|"))); * 0 53974. |pkk|j |mi||bec| 1) * 0 53975. |pj|ELIF marker |uqe| "." THEN * 0 53976. |xj|copy (".")? 0 53977. |pj|ELIF marker |uqe| "e" |or| marker |uqe| "i" * 0 53978. |g||or| marker |uqe| "a" |or| marker |uqe| "b" * 0 53979. |pj|THEN * 0 53980. copy (sj); zs |bec| TRUE; signput |bec| FALSE * 0 53981. |pj|ELIF marker |uqe| "r" * 0 53982. |pj|THEN j |mi||bec| 1 * 0 53983. |pj|FI * 0 53984. |pf|OD * 0 53985. |pe|OD * 0 53986. |pd|OD * 0 53987. |xs|END ;|r| * 0 53988. * 0 53989. |h|10.3.5.2. Formatted input * 0 53990. * 0 53991. |pb1|a)|ts1||i|PROC getf |uqe| (REF FILE f, |so||thin||sc| UNION (INTYPE, FORMAT) x) VOID : * 0 53992. |pc|IF opened OF f THEN * 0 53993. |pc|FOR k TO UPB x * 0 53994. |pc|DO CASE * 0 53995. set read mood (f); set char mood (f); * 0 53996. x#|so|k|sc| IN * 0 53997. |pd|(FORMAT format): associate format (f, format) , * 0 53998. |pd|(INTYPE it): * 0 53999. |pd|BEGIN INT j |bec| 0; * 0 54000. |pe|PICTURE picture, |so||thin||sc| SIMPLIN y |uqe| STRAIGHTIN it; * 0 54001. |pe|WHILE (j +|bec| 1) |le| UPB y * 0 54002. |pe|DO BOOL incomp |bec| FALSE; * 0 54003. |pf|get next picture (f, TRUE, picture); set read mood (f); * 0 54004. |pf||so|1 : UPB (i OF picture)|sc| SINSERT sinsert; * 0 54005. |pf|CASE p OF picture IN * 0 54006. |phalf||pf|(PATTERN pattern): * 0 54007. |pf|BEGIN * 0 54008. |pj||so|1 : UPB (frames OF pattern)|sc| SFRAME sframes; * 0 54009. |pj|(staticize frames (frames OF pattern, sframes), * 0 54010. |e|staticize insertion (i OF picture, sinsert));? 0 54011. |pj|STRING s; * 0 54012. |pj|INT radix |uqe| * 0 54013. |e|(type OF pattern |sge| 6 |#type#OF#pattern#|mi|#4 |#10); * 0 54014. |pj|indit string (f, s, sframes, radix); * 0 54015. |g||pj|CASE type OF pattern IN * 0 54016. |g||pf|~J integral ~J * 0 54017. |xj|(y |so|j|sc| | * 0 54018. |pk||nl|(REF |u|L|i|#INT ii): * 0 54019. |e|incomp |bec| |not| string to |u|l|i|#int (s, 10, ii)|ng|? 0 54020. |g||pk|| incomp |bec| TRUE) , * 0 54021. |g||pf|~J real ~J * 0 54022. |xj|(y |so|j|sc| | * 0 54023. |pk||nl|(REF |u|L|i|#REAL rr): * 0 54024. |g||e|incomp |bec| |not| string to |u|l|i|#real (s, rr)|ng|? 0 54025. |g||pk|| incomp |bec| TRUE) , * 0 54026. |g||pf|~J boolean ~J * 0 54027. |xj|(y |so|j|sc| | * 0 54028. |pk|(REF BOOL bb): * 0 54029. |g|bb |bec| s |uqe| flip? 0 54030. |pk|| incomp |bec| TRUE) , * 0 54031. |pf|~J complex ~J * 0 54032. |xj|(y |so|j|sc| | * 0 54033. |pk||nl|(REF |u|L|i|#COMPL zz): * 0 54034. |e|(INT i, BOOL b1, b2; char in string ("|tip|", i, s); * 0 54035. |e|b1 |bec||g| string to |u|l|i| real (s |so| : i |mi| 1|sc|, re OF zz);? 0 54036. |e|b2 |bec||g| string to |u|l|i| real (s |so|i + 1 : |sc|, im OF zz); * 0 54037. |e|incomp |bec| |not| (b1 |and| b2))|ng| * 0 54038. |pk|| incomp |bec| TRUE) , * 0 54039. |pf|~J string ~J * 0 54040. |xj|(y |so|j|sc| | * 0 54041. |pk|(REF CHAR cc): * 0 54042. |e|(UPB s |uqe| 1 | cc |bec| s |so|1|sc| | incomp |bec| TRUE) , * 0 54043. |g||pk|(REF |so||thin||sc| CHAR ss): * 0 54044. |g||e|(UPB ss |mi| LWB ss + 1 |uqe| UPB s | ss |so||at| 1|sc| |bec| s * 0 54045. |g||e|| incomp |bec| TRUE) , * 0 54046. |g||pk|(REF STRING ss): ss |bec| s * 0 54047. |g||pk|| incomp |bec| TRUE) * 0 54048. |g||pj|OUT * 0 54049. |g||pf|~J bits ~J * 0 54050. |xj|(y |so|j|sc| | * 0 54051. |pk||nl|(REF |u|L|i|#BITS lb): * 0 54052. |g||e|IF |u|L|i|#INT i; string to |u|l|i|#int (s, radix, i)? 0 54053. |g||e|THEN lb |bec| BIN i * 0 54054. |e|ELSE incomp |bec| TRUE * 0 54055. |e|FI|ng| * 0 54056. |pk|| incomp |bec| TRUE) * 0 54057. |pj|ESAC * 0 54058. |pf|END , * 0 54059. |phalf||pf|(CPATTERN choice): * 0 54060. |g||pf|BEGIN * 0 54061. |g||pj||so|1 : UPB (i OF choice)|sc| SINSERT si; * 0 54062. |g||pj|staticize insertion (i OF choice, si); * 0 54063. |g||pj|get insertion (f, si); * 0 54064. |g||pj|INT c |uqe| c OF cpos OF f, CHAR kk; * 0 54065. |g||pj|INT k |bec| 0, BOOL found |bec| FALSE; * 0 54066. |g||pj|WHILE k |lt| UPB (c OF choice) |and| |not| found? 0 54067. |g||pj|DO k +|bec| 1; * 0 54068. |g||pk||so|1 : UPB ((c OF choice) |so|k|sc|)|sc| SINSERT si; * 0 54069. |g||pk|BOOL bool |bec| TRUE; * 0 54070. |g||pk|staticize insertion ((c OF choice) |so|k|sc|, si); * 0 54071. |pk|STRING s; * 0 54072. |pk|FOR i TO UPB si? 0 54073. |g||pk|DO s PLUSAB * 0 54074. |e|(sa OF si |so|i|sc| | (STRING ss): ss)|g| |sx| rep OF si |so|i|sc|? 0 54075. |xj|OD; * 0 54076. |e|FOR jj TO UPB s * 0 54077. |pk|WHILE bool |bec| bool|g| |and| |not| line ended (f)|g| |and| |not| logical file ended (f) * 0 54078. |xi||bt|#|i|write#mood|r| which is |w|true|r| if the file is bein? 0 54079. |e|(|not| (found |bec| bool) | set char number (f, c)) * 0 54080. |g||pj|OD; * 0 54081. |g||pj|IF |not| found THEN incomp |bec| TRUE|g| * 0 54082. |pj|ELSE * 0 54083. |g||pk|CASE type OF choice IN * 0 54084. |pj|~J boolean ~J * 0 54085. |xk|(y |so|j|sc| | * 0 54086. |xk|(REF BOOL b): b |bec| k |uqe| 1 * 0 54087. |xk|| incomp |bec| TRUE) , * 0 54088. |g||pj|~J integral ~J * 0 54089. |xk|(y |so|j|sc| | * 0 54090. |xk|(REF INT i): i |bec| k * 0 54091. |xk|| incomp |bec| TRUE)? 0 54092. |g||pk|ESAC * 0 54093. |g||pj|FI;? 0 54094. |g||pj|staticize insertion (i OF picture, sinsert) * 0 54095. |g||pf|END , * 0 54096. |phalf||pf|(FPATTERN fpattern): * 0 54097. |g||pf|BEGIN do fpattern (f, fpattern, TRUE); * 0 54098. |e|FOR i TO UPB sinsert DO sinsert |so|i|sc| |bec| (0, "") OD; * 0 54099. |e|j |mi||bec| 1 * 0 54100. |xe|END , * 0 54101. |phalf||pf|(GPATTERN gpattern): * 0 54102. |g||pj||ro||so|1 : UPB (i OF gpattern)|sc| SINSERT si; * 0 54103. |pj||ro|staticize insertion (i OF gpattern, si), * 0 54104. |e|staticize insertion (i OF picture, sinsert)|rc|; * 0 54105. |xf|get insertion (f, si); * 0 54106. |e|get (f, y |so|j|sc|)|rc| , * 0 54107. |phalf||pf|(VOID): * 0 54108. |xf|(j |mi||bec| 1; staticize insertion (i OF picture, sinsert)) * 0 54109. |phalf||pf|ESAC; * 0 54110. |pf|IF incomp * 0 54111. |pf|THEN set read mood (f); * 0 54112. |pj|(|not| (value error mended OF f) (f) | undefined) * 0 54113. |pf|FI; * 0 54114. |pf|get insertion (f, sinsert) * 0 54115. |pe|OD * 0 54116. |pd|END * 0 54117. |xs|ESAC * 0 54118. OD * 0 54119. |xs|ELSE undefined * 0 54120. |xs|FI ;|r| * 0 54121. |pb1|b)|ts1||i|PROC |ra| indit string |uqe|$#? 0 54122. (REF FILE f, REF STRING s, |so||thin||sc| SFRAME sf, INT radix) VOID :? 0 54123. |xs|BEGIN * 0 54124. |pd|BOOL supp, zs |bec| TRUE, sign found |bec| FALSE, * 0 54125. space found |bec| FALSE, * 0 54126. no sign |bec| FALSE, INT sp |bec| 1, rep; * 0 54127. |pd|PRIO ! |uqe| 8; * 0 54128. |pd|OP ! |uqe| (STRING s, CHAR c) CHAR : * 0 54129. |xe|~J expects a character contained in |ap|s|ap|; if the character read is * 0 54130. not in |ap|s|ap|, the event routine corresponding to |ap|on char error|ap| is * 0 54131. called with the suggestion |ap|c|ap| ~J * 0 54132. |pe|IF CHAR k; check pos (f); get char (f, k); |g|char in string (k, LOC INT, s) * 0 54133. |pe|THEN k * 0 54134. |pe|ELSE CHAR sugg |bec| c; * 0 54135. |pf|IF (char error mended OF f) (f, sugg) THEN * 0 54136. |xf|(char in string (sugg, LOC INT, s) | sugg |g|| undefined;#c) * 0 54137. |pf|ELSE undefined; c * 0 54138. |pf|FI; * 0 54139. |pf|set read mood (f) * 0 54140. |pe|FI; * 0 54141. |pd|OP ! |uqe| (CHAR s, c) CHAR : STRING (s) ! c; * 0 54142. |pd||so||thin||sc| CHAR good digits |uqe| "0123456789abcdef" |so| : radix|sc|; * 0 54143. |pd|s |bec| "+";? 0 54144. |pd|FOR k TO UPB sf * 0 54145. |pd|DO SFRAME sfk |uqe| sf |so|k|sc|; supp |bec| supp OF sfk; * 0 54146. |pe|get insertion (f, si OF sfk); * 0 54147. |pe|TO rep OF sfk * 0 54148. |pe|DO * 0 54149. CHAR marker |uqe| marker OF sfk; * 0 54150. |pf|IF marker |uqe| "d" THEN * 0 54151. |xf|s PLUSAB (supp | "0" | good digits ! "0"); zs |bec| TRUE? 0 54152. |pf|ELIF marker |uqe| "z" THEN * 0 54153. |xf|s PLUSAB |g|(supp | "0"? 0 54154. |pk|| CHAR c |uqe| ((zs | "|vs|" | "") + good digits) ! "0"; * 0 54155. |e|(c |ne| "|vs|" | zs |bec| FALSE); c) * 0 54156. |pf|ELIF marker |uqe| "u" |or| marker |uqe| "+" THEN * 0 54157. |xf|IF sign found * 0 54158. |pj|THEN zs |bec| FALSE; s PLUSAB ("0123456789" ! "0") * 0 54159. |pj|ELSE CHAR c |uqe| ("+|mi|" + (marker |uqe| "u" | "|vs|" | "")) ! "+"; * 0 54160. |e|(c |uqe| "+" |or| c |uqe| "|mi|" |g|| sign found |bec| TRUE;#s |so|sp|sc| |bec| c) * 0 54161. |pj|FI * 0 54162. |pf|ELIF marker |uqe| "v" |or| marker |uqe| "|mi|" THEN * 0 54163. |g||pj|IF sign found * 0 54164. |pj|THEN zs |bec| FALSE; s PLUSAB ("0123456789" ! "0") * 0 54165. |g||pj|ELIF CHAR c; space found * 0 54166. |g||pj|THEN c |bec| "+|mi||vs|0123456789" ! "+"; * 0 54167. |g||e|(c |uqe| "+" |or| c |uqe| "|mi|" |g|| sign found |bec| TRUE;#s |so|sp|sc| |bec| c * 0 54168. |g||e||: c |ne| "|vs|" |g|| zs |bec| FALSE;#sign found |bec| TRUE;#s PLUSAB c) * 0 54169. |g||pj|ELSE c |bec| "+|mi||vs|" ! "+"; * 0 54170. |g||e|(c |uqe| "+" |or| c |uqe| "|mi|" |g|| sign found |bec| TRUE;#s |so|sp|sc| |bec| c * 0 54171. |g||e|| space found |bec| TRUE) * 0 54172. |pj|FI? 0 54173. |pf|ELIF marker |uqe| "." THEN * 0 54174. |pj|s PLUSAB (supp | "." | "." ! ".")? 0 54175. |pf|ELIF marker |uqe| "e" THEN * 0 54176. |g||xf|s PLUSAB (supp | "|ttp|" | "|ttp||ttp2|e" ! "|ttp|"; "|ttp|");? 0 54177. sign found |bec| FALSE; zs |bec| TRUE; * 0 54178. s PLUSAB "+"; sp |bec| UPB s * 0 54179. |pf|ELIF marker |uqe| "i" THEN * 0 54180. |g||xf|s PLUSAB (supp | "|tip|" | "i|tip|" ! "|tip|"; "|tip|"); * 0 54181. sign found |bec| FALSE; zs |bec| TRUE; * 0 54182. s PLUSAB "+"; sp |bec| UPB s * 0 54183. |pf|ELIF marker |uqe| "b" THEN * 0 54184. |g||xf|s PLUSAB (flip + flop) ! flop; * 0 54185. no sign |bec| TRUE * 0 54186. |pf|ELIF marker |uqe| "a" THEN * 0 54187. |xf|s PLUSAB (supp | "|vs|" | CHAR c; check pos (f); get char (f, c); c);? 0 54188. |pj|no sign |bec| TRUE? 0 54189. |pf|ELIF marker |uqe| "r"? 0 54190. |pf|THEN SKIP? 0 54191. |xe|FI * 0 54192. |xd|OD * 0 54193. |xc|OD; * 0 54194. |xc|IF no sign THEN s |bec| s |so|2 : |sc| FI * 0 54195. |xs|END ;|r| * 0 54196. * 0 54197. |h|10.3.6. Binary transput * 0 54198. * 0 54199. |pa||j||co|In binary transput, the values obtained by straightening the * 0 54200. elements of a data list (cf.#10.3.3) are transput, via the specified file, * 0 54201. one after the other. The manner in which such a value is stored in * 0 54202. the book is defined only to the extent that a value of mode |w|M|r| * 0 54203. (being some mode from which that specified by |i|SIMPLOUT|r| is * 0 54204. united) output at a given position may subsequently be re-input from * 0 54205. that same position to a name of mode |b||ap|reference to |w|M|b||ap||r|. * 0 54206. Note that, during input to the name referring to a multiple value, * 0 54207. the number of elements read will be the existing number of elements * 0 54208. referred to by that name. * 0 54209. |pa|The current position is advanced after each value by a suitable * 0 54210. amount and, at the end of each line or page, the appropriate event * 0 54211. routine is called, and next, if this returns |w|false|r|, the next * 0 54212. good character position of the book is found (cf.#10.3.3). * 0 54213. |pa|For binary output, |i|put bin|r| (10.3.6.1.a) and |i|write bin|r| * 0 54214. (10.5.1.h) may be used and, for binary input, |i|get bin|r| (10.3.6.2.a) * 0 54215. and |i|read bin|r| (10.5.1.i).|cc| * 0 54216. |n||pb1|a)|ts1||i|PROC |ra| to bin |uqe| (REF FILE f, SIMPLOUT x) |so||thin||sc| CHAR : * 0 54217. |g||pc|~J~J a value of mode |ap|row of character|ap| whose lower bound is one * 0 54218. and whose upper bound depends on the value of |ap|book OF f|ap| and on * 0 54219. the mode and the value of |ap|x|ap|; * 0 54220. furthermore, x#|uqe|#from#bin#(f,#x,#to#bin#(f,#x)) ~J~J ;|r| * 0 54221. |pb1|b)|ts1||i|PROC |ra| from bin |uqe| (REF FILE f, SIMPLOUT y, |so||thin||sc| CHAR c) SIMPLOUT : * 0 54222. |g||pc|~J~J a value, if one exists, of the mode of the value yielded by |ap|y|ap|, * 0 54223. such that c#|uqe|#to#bin#(f,#from#bin#(f,#y,#c)) ~J~J ;|r| * 0 54224. * 0 54225. |h|10.3.6.1. Binary output * 0 54226. * 0 54227. |pb1|a)|ts1||i|PROC put bin |uqe| (REF FILE f, |so||thin||sc| OUTTYPE ot) VOID : * 0 54228. |pc|IF opened OF f THEN * 0 54229. |pd|set bin mood (f); set write mood (f); * 0 54230. |g||pd|FOR k TO UPB ot * 0 54231. |pd|DO |so||thin||sc| SIMPLOUT y |uqe| STRAIGHTOUT ot |so|k|sc|;? 0 54232. |g||pe|FOR j TO UPB y * 0 54233. |pe|DO |so||thin||sc| CHAR bin |uqe| to bin (f, y |so|j|sc|); * 0 54234. |g||pf|FOR i TO UPB bin * 0 54235. |pf|DO next pos (f); * 0 54236. |pj|set bin mood (f); * 0 54237. |pj|REF POS cpos |uqe| cpos OF f, lpos |uqe| lpos OF book OF f; * 0 54238. |g||pj|CASE text OF f IN|g| * 0 54239. |pj|(FLEXTEXT t2):#|g|t2 |so|p OF cpos|sc| |so|l OF cpos|sc| |so|c OF cpos|sc| * 0 54240. |bec| bin |so|i|sc||g| * 0 54241. |pj|ESAC; * 0 54242. |pj|c OF cpos +|bec| 1; * 0 54243. |pj|IF cpos BEYOND lpos THEN lpos |bec| cpos * 0 54244. |pj|ELIF |not| set possible (f) |g||and| POS (p OF lpos, l OF lpos, 1) * 0 54245. BEYOND cpos |pj|THEN lpos |bec| cpos; * 0 54246. |pk||ro|compressible (f) | * 0 54247. |pkk|~J~J the size of the line and page containing the logical end of the * 0 54248. book and of all subsequent lines and pages may be increased ~J~J|rc| * 0 54249. |xf|FI * 0 54250. |pf|OD * 0 54251. |g||xd|OD * 0 54252. |xc|OD * 0 54253. |xs|ELSE undefined * 0 54254. |xs|FI ;|r| * 0 54255. * 0 54256. |h|10.3.6.2. Binary input * 0 54257. * 0 54258. |pb1|a)|ts1||i|PROC get bin |uqe| (REF FILE f, |so||thin||sc| INTYPE it) VOID : * 0 54259. |pc|IF opened OF f THEN * 0 54260. |pd|set bin mood (f); set read mood (f);? 0 54261. |pd|FOR k TO UPB it * 0 54262. |pd|DO * 0 54263. |so||thin||sc| SIMPLIN y |uqe| STRAIGHTIN it |so|k|sc|; * 0 54264. |g||pe|FOR j TO UPB y * 0 54265. |g||pe|DO * 0 54266. |g||pf|SIMPLOUT yj |uqe| CASE y |so|j|sc| IN * 0 54267. |e||nl|(REF |u|L#|i|INT i): i|ng| , |nl|(REF |u|L#|i|REAL r): r|ng| , * 0 54268. |e||nl|(REF |u|L#|i|COMPL z): z|ng| , * 0 54269. (REF BOOL b): b , |nl|(REF |u|L#|i|BITS lb): lb|ng| , (REF CHAR c): c ,|g| * 0 54270. |g|(REF |so||thin||sc| CHAR s): s , (REF STRING ss): ss ESAC; * 0 54271. |g||pf||so|1 : UPB (to bin (f, yj))|sc| CHAR bin; * 0 54272. |g||pf|FOR i TO UPB bin * 0 54273. |pf|DO next pos (f); * 0 54274. set bin mood (f); * 0 54275. |pj|REF POS cpos |uqe| cpos OF f; * 0 54276. |g||pj|bin |so|i|sc| |bec| * 0 54277. |g||pk|CASE text OF f IN * 0 54278. |pk|(FLEXTEXT t2): * 0 54279. |e|t2 |so|p OF cpos|sc| |so|l OF cpos|sc| |so|c OF cpos|sc| * 0 54280. |g||pk|ESAC; * 0 54281. |pj|c OF cpos +|bec| 1 * 0 54282. |pf|OD; * 0 54283. |g||pf|CASE y |so|j|sc| IN * 0 54284. |g||pj||nl|(REF |u|L#|i|INT ii): * 0 54285. |g|(from bin (f, ii, bin) | (|u|L#|i|INT i): ii |bec| i)|ng| , * 0 54286. |g||pj||nl|(REF |u|L#|i|REAL rr): * 0 54287. |g|(from bin (f, rr, bin) | (|u|L#|i|REAL r): rr |bec| r)|ng| , * 0 54288. |g||pj||nl|(REF |u|L#|i|COMPL zz): * 0 54289. |g|(from bin (f, zz, bin) | (|u|L#|i|COMPL z): zz |bec| z)|ng| , * 0 54290. |g||pj|(REF BOOL bb): * 0 54291. |g|(from bin (f, bb, bin) | (BOOL b): bb |bec| b) , * 0 54292. |g||pj||nl|(REF |u|L#|i|BITS lb): * 0 54293. |g|(from bin (f, lb, bin) | (|u|L#|i|BITS b): lb |bec| b)|ng| , * 0 54294. |g||pj|(REF CHAR cc): * 0 54295. |g|(from bin (f, cc, bin) | (CHAR c): cc |bec| c) , * 0 54296. |g||pj|(REF |so||thin||sc| CHAR ss): * 0 54297. |g|(from bin (f, ss, bin) | (|so||thin||sc| CHAR s): ss |bec| s) , * 0 54298. |g||pj|(REF STRING ssss): * 0 54299. |g|(from bin (f, ssss, bin) | (|so||thin||sc| CHAR s): ssss |bec| s) * 0 54300. |xe|ESAC * 0 54301. |xd|OD * 0 54302. |xc|OD * 0 54303. |xs|ELSE undefined * 0 54304. |xs|FI ;|r| * 0 54305. * 0 54306. |pq||co||w|But Eeyore wasn|ap|t listening. He was taking the balloon out, and putting it back again, * 0 54307. as happy as could be.#... * 0 54308. |ppp|Winnie|r|-|w|the|r|-|w|Pooh, |pr|A.A.Milne.|r||cc||qq|? 0 54309. |w10||pq||co| * 0 54310. |pp| * 0 54311. |pp|#####|co||co|POOH * 0 54312. |pp|########AND * 0 54313. |pp|########PIGLET * 0 54314. |pp|########PICTURE |cc||cc| * 0 54315. |pp| * 0 54316. |pp| * 0 54317. |ppp||pr||cc||qq|? 0 54318. * 0 54319. |h|10.4. The system prelude and task list * 0 54320. * 0 54321. |h|10.4.1. The system prelude * 0 54322. * 0 54323. |pa||j|The representation of the |b|system-prelude|r| is obtained * 0 54324. from the following form, to which may be added further forms * 0 54325. not defined in this Report. * 0 54326. |co|The syntax of |b|program-texts|r| ensures that a * 0 54327. |b|declaration|r| contained in the |b|system-prelude|r| may not * 0 54328. contradict any |b|declaration|r| contained in the |b|standard-? 0 54329. prelude|r|. It is intended that the further forms should * 0 54330. contain declarations that are needed for the correct operation * 0 54331. of any |b|system-tasks|r| that may be added (by the implementer, * 0 54332. as provided in 10.1.2.d).|cc| * 0 54333. |pb1||n|a)|ts1||i|SEMA |ra| gremlins |uqe| * 0 54334. (SEMA s; |u|f|i| OF s |bec| |u|PRIM|i| INT |bec| 0; s)#;|r| * 0 54335. * 0 54336. |h|10.4.2. The system task list * 0 54337. * 0 54338. |pa||j| The representation of the |co|first|cc| constituent |b|system-task|r| * 0 54339. of the |b|system-task-list|r| is obtained from the following form. * 0 54340. The other |b|system-tasks|r|, if any, are not defined by this * 0 54341. Report |co|but may be defined by the implementer in order to account * 0 54342. for the particular features of his operating environment, * 0 54343. especially in so far as they interact with the running of * 0 54344. |b|particular-programs|r| (see, e.g., 10.3.1.1.dd)|cc|. * 0 54345. |pb1||n|a) |ts1||i|DO#DOWN gremlins; undefined; UP bfileprotect#OD |r| * 0 54346. |pa||j||co|The intention is that this call of |i|undefined|r|, which * 0 54347. is released by an |i|UP gremlins|r| whenever a book is closed, * 0 54348. may reorganize the chain of backfiles and the chain of locked backfiles, * 0 54349. such as by removing the book if it is not to be available for * 0 54350. further opening, or by inserting it into the chain of backfiles * 0 54351. several times over if it is to be permitted for several * 0 54352. |b|particular-programs|r| to read it simultaneously. Note that, when an * 0 54353. |i|UP gremlins|r| is given, |i|bfileprotect|r| is always down and * 0 54354. remains so until such reorganization has taken place.|cc| * 0 54355. |pq||co||w|From ghoulies and ghosties and long-leggety beasties * 0 54356. and things that go bump in the night, * 0 54357. |pp|Good Lord, deliver us! * 0 54358. |p||pr|Ancient Cornish litany|r||cc||qq|? 0 54359. * 0 54360. |h|10.5. The particular preludes and postludes * 0 54361. * 0 54362. |h|10.5.1. The particular preludes * 0 54363. * 0 54364. |pa||j|The representation of the |b|particular-prelude|r| of each * 0 54365. |b|user-task|r| is obtained from the following forms, to which may * 0 54366. be added such other forms as may be needed for the proper functioning * 0 54367. of the facilities defined in the constituent |b|library-prelude|r| * 0 54368. of the |b|program-text|r| |co|,#e.g., |b|declarations|r| and * 0 54369. calls of |i|open|r| for additional standard files|cc|. * 0 54370. However, for each * 0 54371. |b|QUALITY-new-new-PROPS1-LAYER2-defining-indicator-with-TAX|r| * 0 54372. contained in such an additional form, the predicate * 0 54373. |b||ap|where QUALITY TAX independent PROPS1|ap||r| |co|7.1.1.a,c|cc| * 0 54374. must hold * 0 54375. |co|i.e., no |b|declaration|r| contained in the |b|standard-prelude|r| * 0 54376. may be contradicted|cc|. * 0 54377. |n||pb1|a)|ts1||i||u|L#|i|INT |u|l#|i|last#random |bec| * 0 54378. ROUND (|u|l#|i|max#int / |u|L#|i|2) ;|r| * 0 54379. |pb1|b)|ts1||i|PROC |u|l#|i|random |uqe| |u|L#|i|REAL : * 0 54380. |g|#|u|l#|i|next#random (|u|l#|i|last#random) ;|r|? 0 54381. |pb1|c)|ts1||i|FILE stand#in, stand#out, stand#back ; * 0 54382. |p||ps|open (stand#in, "", stand#in#channel) ; * 0 54383. |p||ps|open (stand#out, "", stand#out#channel) ; * 0 54384. |p||ps|open (stand#back, "", stand#back#channel) ;|r| * 0 54385. |pb1|d)|ts1||i|PROC print |uqe| * 0 54386. |g| (|so||thin||sc|#UNION (OUTTYPE,#PROC#(REF#FILE)#VOID)#x)#VOID#:? 0 54387. |g|put (stand out, x), * 0 54388. |p||ps|PROC write |uqe| * 0 54389. |g| (|so||thin||sc|#UNION#(OUTTYPE,#PROC#(REF#FILE)#VOID)#x)#VOID#:? 0 54390. |g|put (stand out, x) ;|r| * 0 54391. |pb1|e)|ts1||i|PROC read |uqe| * 0 54392. |g|(|so||thin||sc| UNION (INTYPE, PROC (REF FILE) VOID) x) VOID : * 0 54393. |g|get (stand in, x) ;|r| * 0 54394. |pb1|f)|ts1||i|PROC printf |uqe| * 0 54395. |g|(|so||thin||sc| UNION (OUTTYPE, FORMAT) x) VOID : * 0 54396. |g|putf (stand out, x), * 0 54397. |p||ts1|PROC writef |uqe| * 0 54398. |g|(|so||thin||sc| UNION (OUTTYPE, FORMAT) x) VOID : * 0 54399. |g|putf (stand out, x) ;|r| * 0 54400. |pb1|g)|ts1||i|PROC readf |uqe| * 0 54401. |g|(|so||thin||sc| UNION (INTYPE, FORMAT) x) VOID : * 0 54402. |g|getf (stand in, x) ;|r| * 0 54403. |pb1|h)|ts1||i|PROC write bin |uqe| * 0 54404. |g|(|so||thin||sc| OUTTYPE x) VOID : * 0 54405. |g|put bin (stand back, x) ;|r| * 0 54406. |pb1|i)|ts1||i|PROC read bin |uqe| * 0 54407. |g|(|so||thin||sc| INTYPE x) VOID : * 0 54408. |g|get bin (stand back, x) ;|r| * 0 54409. * 0 54410. |h|10.5.2. The particular postludes * 0 54411. * 0 54412. |pa||j|The representation of the |b|particular-postlude|r| of each * 0 54413. |b|user-task|r| is obtained from the following form, to which may * 0 54414. be added such other forms as may be needed for the proper functioning * 0 54415. of the facilities defined in the constituent |b|library-prelude|r| * 0 54416. g used for output; |xi||bt|#|i|char#mood|r| which is |w|true|r| if * 0 54417. additional standard files|cc|. * 0 54418. |pb1||n|a)|ts1||i|stop|lbl|#lock (stand#in); lock (stand#out); * 0 54419. lock (stand#back) |r| * 0 54420. * 0 54421. |np||h|11. |bs|Examples|rs| * 0 54422. * 0 54423. |h|11.1. Complex square root * 0 54424. * 0 54425. |phalf||ph||i|PROC compsqrt |uqe| (COMPL z) COMPL : * 0 54426. |xs|~J the square root whose real part is * 0 54427. nonnegative of the complex number |ap|z|ap| ~J * 0 54428. |p||ps| BEGIN REAL x |uqe| RE z, y |uqe| IM z; * 0 54429. REAL rp |uqe| sqrt ((ABS x + sqrt (x |up| 2 + y |up| 2)) / 2); * 0 54430. |e|REAL ip |uqe| (rp |uqe| 0 | 0 | y / (2 |sx| rp)); * 0 54431. |pc|IF x |sge| 0 THEN rp |tip| ip ELSE ABS ip |tip| (y |sge| 0 | rp | |mi| rp) FI * 0 54432. |p||ps|END * 0 54433. |pa||b|Calls|r| |co|5.4.3|cc| using |i|compsqrt|r|: * 0 54434. |ph||i|compsqrt (w) * 0 54435. |ph|compsqrt (|mi|3.14) * 0 54436. |ph|compsqrt (|mi|1) |r| * 0 54437. * 0 54438. |h|11.2. Innerproduct 1 * 0 54439. * 0 54440. |phalf||ph||i|PROC innerproduct 1 |uqe| (INT n, PROC (INT) REAL x, y) REAL : * 0 54441. |xs|~J the innerproduct of two vectors, each with |ap|n|ap| components, * 0 54442. x#(i), y#(i), i#|uqe|#1, ...#,#n, where |ap|x|ap| and |ap|y|ap| are arbitrary * 0 54443. mappings from integer to real number ~J * 0 54444. |p||ps|BEGIN LONG REAL s |bec| LONG 0; * 0 54445. |e|FOR i TO n DO s +|bec| LENG x (i) |sx| LENG y (i) OD; * 0 54446. |e|SHORTEN s * 0 54447. |p||ps|END * 0 54448. |pa||b|Real-calls|r| using |i|innerproduct 1|r|: * 0 54449. |ph||i|innerproduct 1 (m, (INT j) REAL : x1 |so|j|sc|, (INT j) REAL : y1 |so|j|sc|) * 0 54450. |ph|innerproduct 1 (n, nsin, ncos) |r| * 0 54451. * 0 54452. |h|11.3. Innerproduct 2 * 0 54453. * 0 54454. |phalf||ph||i|PROC innerproduct 2 |uqe| (REF |so||thin||sc| REAL a, b) REAL : * 0 54455. |p||ps|IF UPB a |mi| LWB a |uqe| UPB b |mi| LWB b * 0 54456. |p||ps|THEN ~J the innerproduct of two vectors |ap|a|ap| and |ap|b|ap| with equal * 0 54457. numbers of elements ~J * 0 54458. |e|LONG REAL s |bec| LONG 0; * 0 54459. |e|REF |so||thin||sc| REAL a1 |uqe| a |so||at| 1|sc|, b1 |uqe| b |so||at| 1|sc|; * 0 54460. |xc|~J note that the bounds of |ap|a#|so||at|#1|sc||ap| are#|g||so|1 : UPB#a#|mi|#LWB#a#+#1|sc| ~J * 0 54461. |pc|FOR i TO UPB a1 DO * 0 54462. s +|bec| LENG a1 |so|i|sc| |sx| LENG b1 |so|i|sc| OD; * 0 54463. |xs|SHORTEN s * 0 54464. |p||ps|FI * 0 54465. |pa||b|Real-calls|r| using |i|innerproduct 2|r|: * 0 54466. |ph||i|innerproduct 2 (x1, y1) * 0 54467. |ph|innerproduct 2 (y2 |so|2,#|sc|, y2 |so| ,3|sc|)|r| * 0 54468. * 0 54469. |h|11.4. Largest element * 0 54470. * 0 54471. |phalf||ph||i|PROC absmax |uqe| (REF |so|,|sc| REAL a, ~J#result#~J#REF REAL y, * 0 54472. ~J#subscripts#~J#REF INT i, k) VOID : * 0 54473. |xs|~J the absolute value of the element of greatest absolute value * 0 54474. of the matrix |ap|a|ap| is assigned to |ap|y|ap|, and the subscripts of * 0 54475. this element to |ap|i|ap| and |ap|k|ap| ~J * 0 54476. |p||ps|BEGIN y |bec| |mi| 1; * 0 54477. |pc|FOR p FROM 1 LWB a TO 1 UPB a * 0 54478. |pc|DO * 0 54479. |pd|FOR q FROM 2 LWB a TO 2 UPB a * 0 54480. |pd|DO * 0 54481. |pe|IF ABS a |so|p, q|sc| |sgt| y THEN y |bec| ABS a |so|i |bec| p, k |bec| q|sc| FI * 0 54482. |pd|OD * 0 54483. |pc|OD * 0 54484. |p||ps|END * 0 54485. |pa||b|Calls|r| using |i|absmax|r|: * 0 54486. |ph||i|absmax (x2, x, i, j) * 0 54487. |ph|absmax (x2, x, LOC INT, LOC INT)|r| * 0 54488. * 0 54489. |h|11.5. Euler summation * 0 54490. * 0 54491. |phalf||ph||i|PROC euler |uqe| (PROC (INT) REAL f, REAL eps, INT tim) REAL : * 0 54492. |g||xs|~J the sum for |ap|i|ap| from 1 to infinity of |ap|f#(i)|ap|, computed * 0 54493. by means of a suitably refined |u|e|i|uler transformation.#|g||u|t|i|he * 0 54494. summation is terminated when the absolute values of the terms#|g| * 0 54495. of the transformed series are found to be less than |ap|eps|ap| |ap|tim|ap| * 0 54496. times in succession.#|g| |u|t|i|his transformation is particularly * 0 54497. efficient in the case of a slowly convergent or divergent * 0 54498. alternating series ~J|g| * 0 54499. |p||ps|BEGIN INT n |bec| 1, t; REAL mn, ds |bec| eps; |so|1 : 16|sc| REAL m; * 0 54500. REAL sum |bec| (m |so|1|sc| |bec| f (1)) / 2; * 0 54501. |g||e|FOR i FROM 2 WHILE (t |bec| (ABS ds |lt| eps | t + 1 | 1)) |le| tim * 0 54502. |g||pc|DO mn |bec| f (i); * 0 54503. |pd|FOR k TO n * 0 54504. |pd|DO mn |bec| ((ds |bec| mn) + m |so|k|sc|) / 2; * 0 54505. m |so|k|sc| |bec| ds OD; * 0 54506. |pd|sum +|bec| (ds |bec| (ABS mn |lt| ABS m |so|n|sc| |and| n |lt| 16 | * 0 54507. n +|bec| 1; m |so|n|sc| |bec| mn; mn / 2 | mn)) * 0 54508. |pc|OD; * 0 54509. |xs|sum * 0 54510. |p||ps|END * 0 54511. * 0 54512. |pa||r|A |b|call|r| using |i|euler|r|: * 0 54513. * 0 54514. |ph||i|euler ((INT i) REAL : (ODD i | |mi| 1 / i | 1 / i), 1|ttp||mi|5, 2)|r| * 0 54515. * 0 54516. |h|11.6. The norm of a vector * 0 54517. * 0 54518. |phalf||ph||i|PROC norm |uqe| (REF |so||thin||sc| REAL a) REAL : * 0 54519. |xs|~J the euclidean norm of the vector |ap|a|ap| ~J * 0 54520. |p||ps|(LONG REAL s |bec| LONG 0; * 0 54521. |pc|FOR k FROM LWB a TO UPB a DO s +|bec| LENG a |so|k|sc| |up| 2 OD; * 0 54522. |xs|SHORTEN long sqrt (s)) * 0 54523. |pa||r|For a use of |i|norm|r| in a |b|call|r|, see 11.7. * 0 54524. * 0 54525. |h|11.7. Determinant of a matrix * 0 54526. * 0 54527. |phalf||ph||i|PROC det |uqe| (REF |so|,|sc| REAL x, REF |so||thin||sc| INT p) REAL : * 0 54528. |p||ps|IF REF |so|,|sc| REAL a |uqe| x |so||at| 1, |at| 1|sc|; * 0 54529. |e|1 UPB a |uqe| 2 UPB a |and| 1 UPB a |uqe| UPB p |mi| LWB p + 1 * 0 54530. |p||ps|THEN INT n |uqe| 1 UPB a; * 0 54531. |xc|~J the determinant of the square matrix |ap|a|ap| of order |ap|n|ap| by * 0 54532. the method of |u|c|i|rout with row interchanges:#|g||ap|a|ap| is replaced by its * 0 54533. triangular decomposition, l#|sx|#u, with all u#|so|k,#k|sc|#|uqe|#1.#? 0 54534. |g||u|t|i|he vector |ap|p|ap| gives as output the pivotal row indices;#? 0 54535. |g|the k|hy|th pivot is chosen in the k|hy|th column of |ap|l|ap| such that#? 0 54536. |g|ABS#l#|so|i,#k|sc|#/#row#norm is maximal ~J * 0 54537. |g||xs||so|1 : n|sc| REAL v; REAL d |bec| 1, s, pivot; * 0 54538. |g||pc|FOR i TO n DO v |so|i|sc| |bec| norm (a |so|i, |sc|) OD; * 0 54539. |g||pc|FOR k TO n * 0 54540. |pc|DO INT k1 |uqe| k |mi| 1; REF INT pk |uqe| p |so||at| 1|sc| |so|k|sc|; REAL r |bec| |mi|1; * 0 54541. |pd|REF |so|,|sc| REAL al |uqe| a |so|#,#1 : k1|sc|, au |uqe| a |so|1 : k1,#|sc|; * 0 54542. |pd|REF |so||thin||sc| REAL ak |uqe| a |so|k,#|sc|, ka |uqe| a |so|#,#k|sc|, * 0 54543. alk |uqe| al |so|k,#|sc|, kau |uqe| au |so|#,#k|sc|; * 0 54544. |pd|FOR i FROM k TO n * 0 54545. |pd|DO REF REAL aik |uqe| ka |so|i|sc|; * 0 54546. |pe|IF (s |bec| ABS (aik |mi||bec| innerproduct 2 (al |so|i, |sc|, kau)) / * 0 54547. v |so|i|sc|) |sgt| r * 0 54548. |pe|THEN r |bec| s; pk |bec| i * 0 54549. |pe|FI * 0 54550. |xc|OD; * 0 54551. |xc|v |so|pk|sc| |bec| v |so|k|sc|; pivot |bec| ka |so|pk|sc|; REF |so||thin||sc| REAL apk |uqe| a |so|pk, |sc|; * 0 54552. |pd|FOR j TO n * 0 54553. |pd|DO REF REAL akj |uqe| ak |so|j|sc|, apkj |uqe| apk |so|j|sc|; * 0 54554. |pe|r |bec| akj; * 0 54555. |pe|akj |bec| IF j |le| k THEN apkj * 0 54556. |e|ELSE (apkj |mi| innerproduct 2 (alk, au |so|#,#j|sc|)) / pivot FI; * 0 54557. |pe|IF pk |ne| k THEN apkj |bec| |mi| r FI * 0 54558. |xc|OD; * 0 54559. |xc|d |sx||bec| pivot * 0 54560. |pc|OD; * 0 54561. |xs|d * 0 54562. |p||ps|FI * 0 54563. |pa||r|A |b|call|r| using |i|det|r|: * 0 54564. |ph||i|det (y2, i1)|r| * 0 54565. * 0 54566. |h|11.8. Greatest common divisor * 0 54567. * 0 54568. |phalf||ph||i|PROC gcd |uqe| (INT a, b) INT : * 0 54569. |xs|~J the greatest common divisor of two integers ~J * 0 54570. |p||ps|(b |uqe| 0 | ABS a | gcd (b, a MOD b)) * 0 54571. |pa||r|A |b|call|r| using |i|gcd|r|: * 0 54572. |ph||i|gcd (n, 124)|r| * 0 54573. * 0 54574. |h|11.9. Continued fraction * 0 54575. * 0 54576. |phalf||ph||i|OP / |uqe| (|so||thin||sc| REAL a, |so||thin||sc| REAL b) REAL : * 0 54577. |g||xs|~J the value of a / b is that of the continued fraction * 0 54578. a1#/#(b1#+#a2#/#(b2#+#...#an#/#bn)#...#) ~J * 0 54579. |p||ps|IF LWB a |uqe| 1 |and| LWB b |uqe| 1 |and| UPB a |uqe| UPB b * 0 54580. |p||ps|THEN (UPB a |uqe| 0 | 0 | a |so|1|sc| / (b |so|1|sc| + a |so|2 : |sc| / b |so|2 : |sc|)) * 0 54581. |p||ps|FI * 0 54582. |g||pa||r|A |b|formula|r| using |i|/|r|: * 0 54583. |ph||i|x1 / y1 #|r| * 0 54584. |pa||j||co|The use of recursion may often be elegant rather than efficient as in * 0 54585. the recursive procedure 11.8 and the recursive operation 11.9. See, * 0 54586. however, 11.10 and 11.13 for examples in which recursion is of the * 0 54587. essence.|cc| * 0 54588. * 0 54589. |h|11.10. Formula manipulation * 0 54590. * 0 54591. |phalf||ph||i|BEGIN * 0 54592. |p||ps|MODE FORM |uqe| UNION |ro|REF CONST, REF VAR, REF TRIPLE, REF CALL|rc|; * 0 54593. |p||ps|MODE CONST |uqe| STRUCT (REAL value); * 0 54594. |p||ps|MODE VAR |uqe| STRUCT (STRING name, REAL value); * 0 54595. |p||ps|MODE TRIPLE |uqe| STRUCT |ro|FORM left operand,|g|#INT operator,|g|#FORM right operand|rc|; * 0 54596. |p||ps|MODE FUNCTION |uqe| STRUCT (REF VAR bound var, FORM body); * 0 54597. |p||ps|MODE CALL |uqe| STRUCT (REF FUNCTION function name, FORM parameter); * 0 54598. |p||ps|INT plus |uqe| 1, minus |uqe| 2, times |uqe| 3, by |uqe| 4, to |uqe| 5; * 0 54599. |p||ps|HEAP#CONST zero, one; value OF zero |bec| 0; value OF one |bec| 1; * 0 54600. |p||ps|OP |uqe| |uqe| (FORM a, REF#CONST b) BOOL : * 0 54601. (a | (REF#CONST ec): ec |bec|: b | FALSE); * 0 54602. |p||ps|OP + |uqe| (FORM a, b) FORM : * 0 54603. (a |uqe| zero | b |: b |uqe| zero | a | HEAP TRIPLE |bec| * 0 54604. (a, plus, b)); * 0 54605. |p||ps|OP |mi| |uqe| (FORM a, b) FORM : * 0 54606. #|g|(b#|uqe|#zero | a | HEAP TRIPLE |bec| (a, minus, b)); * 0 54607. |p||ps|OP |sx| |uqe| (FORM a, b) FORM : * 0 54608. (a |uqe| zero |or| b |uqe| zero | zero |: a |uqe| one | b * 0 54609. |: b |uqe| one | a ||g| HEAP TRIPLE |bec| (a, times, b)); * 0 54610. |p||ps|OP / |uqe| (FORM a, b) FORM : * 0 54611. (a |uqe| zero |and| |not| (b |uqe| zero) | zero * 0 54612. |: b |uqe| one | a ||g| HEAP TRIPLE |bec| (a, by, b)); * 0 54613. |p||ps|OP |up| |uqe| (FORM a, REF#CONST b) FORM : * 0 54614. (a |uqe| one |or| (b |bec|: zero) | one * 0 54615. |: b |bec|: one | a ||g| HEAP TRIPLE |bec| (a, to, b)); * 0 54616. |p||ps|PROC derivative of |uqe| (FORM e,#~J#with#respect#to#~J#REF VAR x) FORM : * 0 54617. |pc|CASE e IN * 0 54618. |pd|(REF#CONST): zero , * 0 54619. |pd|(REF VAR ev): (ev |bec|: x | one | zero) , * 0 54620. |pd|(REF TRIPLE et): * 0 54621. |pe|CASE FORM u |uqe| left operand OF et, * 0 54622. v |uqe| right operand OF et; * 0 54623. |pf|FORM udash |uqe| |g|derivative of (u, ~J with#respect#to ~J x), * 0 54624. vdash |uqe| |g|derivative of (v, ~J with#respect#to ~J x); * 0 54625. |pf|operator OF et * 0 54626. |pe|IN * 0 54627. |pf|udash + vdash, * 0 54628. |pf|udash |mi| vdash, * 0 54629. |pf|u |sx| vdash + udash |sx| v, * 0 54630. |pf|(udash |mi| et |sx| vdash) / v, * 0 54631. |pf|(v | (REF#CONST ec): v |sx| u |up| * 0 54632. (HEAP#CONST c; * 0 54633. |g|value OF c |bec| value OF ec |mi| 1; c) |sx| udash) * 0 54634. |pe|ESAC , * 0 54635. |pd|(REF CALL ef): * 0 54636. |pe|BEGIN REF FUNCTION f |uqe| function name OF ef; * 0 54637. |xe|FORM g |uqe| parameter OF ef; * 0 54638. REF VAR y |uqe| bound var OF f; * 0 54639. |pf|HEAP FUNCTION fdash |bec| (y, derivative of (body OF f, y)); * 0 54640. |xe|(HEAP CALL |bec| (fdash, g)) |sx| derivative of (g, x)? 0 54641. |pe|END * 0 54642. |pc|ESAC; * 0 54643. |p||ps|PROC value of |uqe| (FORM e) REAL : * 0 54644. |pc|CASE e IN * 0 54645. |pd|(REF#CONST ec): value OF ec , * 0 54646. |pd|(REF VAR ev): value OF ev , * 0 54647. |pd|(REF TRIPLE et): * 0 54648. |pe|CASE REAL u |uqe| value of (left operand OF et), * 0 54649. v |uqe| value of (right operand OF et); * 0 54650. |pf|operator OF et * 0 54651. |pe|IN u + v, u |mi| v, u |sx| v, u / v, exp (v |sx| ln (u)) * 0 54652. |pe|ESAC , * 0 54653. |pd|(REF CALL ef): * 0 54654. |pe|BEGIN REF FUNCTION f |uqe| function name OF ef; * 0 54655. |pf|value OF bound var OF f |bec| value of (parameter OF ef); * 0 54656. |pf|value of (body OF f) * 0 54657. |xd|END * 0 54658. |pc|ESAC; * 0 54659. |p||ps|HEAP FORM f, g; * 0 54660. |p||ps|HEAP VAR a |bec| ("a", SKIP), b |bec| ("b", SKIP), x |bec| ("x", SKIP); * 0 54661. |p|~J start here ~J * 0 54662. |p||ps|read ((value OF a, value OF b, value OF x)); * 0 54663. |p||ps|f |bec| a + x / (b + x); * 0 54664. |p||ps|g |bec| (f + one) / (f |mi| one);? 0 54665. |p||ps|print ((value OF a, value OF b, value OF x, * 0 54666. |e|value of (derivative of (g, ~J with respect to ~J x)))) * 0 54667. |ph|END ~J example of formula manipulation ~J |r| * 0 54668. * 0 54669. |h|11.11. Information retrieval * 0 54670. * 0 54671. |phalf||ph||i|BEGIN * 0 54672. |xh|MODE RA |uqe| REF AUTH, RB |uqe| REF BOOK; * 0 54673. |xh|MODE AUTH |uqe| STRUCT (STRING name, RA next, RB book), * 0 54674. |g|#BOOK#|uqe|#STRUCT#(STRING title, RB next); * 0 54675. |xh|RA auth, first auth |bec| NIL, last auth; * 0 54676. |xh|RB book; STRING name,#title; INT i; FILE input,#output; * 0 54677. |e|open (input, "", remote in); open (output, "", remote out); * 0 54678. |xh|putf (output, (|do|p * 0 54679. |xs|to|ivs|enter|ivs|a|ivs|new|ivs|author,|ivs|type|ivs|""author"",|ivs| * 0 54680. a|ivs|space,|ivs|and|ivs|his"x? 0 54681. |xs|"name."l * 0 54682. |e|to|ivs|enter|ivs|a|ivs|new|ivs|book,|ivs| * 0 54683. type|ivs|""book"",|g||ivs|a|ivs|space,"x * 0 54684. |xs|"the|ivs|name|ivs|of"x * 0 54685. |xs|"the|ivs|author,|g||ivs|a|ivs|new|ivs|line,|g||ivs|and|ivs|the|ivs|title."l * 0 54686. |xs|"for|ivs|a|ivs|listing|ivs|of|ivs|the|ivs|books|ivs|? 0 54687. by|ivs|an|ivs|author,|g||ivs|type|ivs|""list"","x * 0 54688. |xs|"a|ivs|space,|g||ivs|and|ivs|his|ivs|name."l * 0 54689. |xs|"to|ivs|find|ivs|the|ivs|author|ivs|of|ivs|a|ivs|book,|g|? 0 54690. |ivs|type|ivs|""find"",|g||ivs|a|ivs|new|ivs|line,"x * 0 54691. |xs|"and|ivs|the|ivs|title."l * 0 54692. |xs|"to|ivs|end,|g||ivs|type|ivs|""end"""al|do|, ".")); * 0 54693. |ptwo||ps|PROC update |uqe| VOID : * 0 54694. |pc|IF RA (first auth) |bec|: NIL * 0 54695. |pc|THEN auth |bec| first auth |bec| last auth |bec||g|#HEAP AUTH |bec| * 0 54696. (name, NIL, NIL) * 0 54697. |pc|ELSE auth |bec| first auth; * 0 54698. |pd|WHILE RA (auth) :|ne|: NIL * 0 54699. |pd|DO * 0 54700. |e|(name |uqe| name OF auth | GO TO known |g|| auth |bec| next OF auth) * 0 54701. |pd|OD; * 0 54702. |pd|last auth |bec||g|#next OF last auth |bec||g|#auth |bec||g|#HEAP AUTH |bec|#? 0 54703. (name, NIL, NIL); * 0 54704. |xh|known|lbl| SKIP * 0 54705. |pc|FI; * 0 54706. |ptwo||ps|DO * 0 54707. |xh|try again|lbl| * 0 54708. |pc|getf (input, (|do|c("author","book","list","find","end",""),#? 0 54709. |g|x30al,#|g|80al|do|,#i)); * 0 54710. |phalf||pc|CASE i IN * 0 54711. |phalf||pd|~J author ~J * 0 54712. |pd|(getf (input, name); update) , * 0 54713. |phalf||pd|~J book ~J * 0 54714. |pd|BEGIN getf (input, (name, title)); update; * 0 54715. |pe|IF RB (book OF auth) |bec|: NIL * 0 54716. |pe|THEN book OF auth |bec| HEAP BOOK |bec| (title, NIL) * 0 54717. |pe|ELSE book |bec| book OF auth; * 0 54718. |pf|WHILE RB (next OF book) :|ne|: NIL * 0 54719. |pf|DO * 0 54720. |xf|(title |uqe| title OF book |e|| GO TO try again |g|| book |bec| next OF book) * 0 54721. |pf|OD; * 0 54722. |xe|(title |ne| title OF book * 0 54723. |e|| next OF book |bec| |g|HEAP BOOK |bec| (title, NIL)) * 0 54724. |pe|FI * 0 54725. |pd|END , * 0 54726. |phalf||pd|~J list ~J * 0 54727. |pd|BEGIN getf (input, name); update; * 0 54728. putf (output, (|do|p"author:|vs|"30all|do|, name)); * 0 54729. |pe|IF RB (book |bec| book OF auth) |bec|: NIL * 0 54730. |pe|THEN put (output, ("no|vs|publications", newline)) * 0 54731. |pe|ELSE on page end (output, * 0 54732. |pf|(REF FILE f) BOOL : (putf (f, (|do|p"author:|vs|"30a41k"continued"ll|do|,|g| name)); TRUE)); * 0 54733. |pf|WHILE RB (book) :|ne|: NIL * 0 54734. |pf|DO * 0 54735. putf (output, (|do|l80a|do|, title OF book)); * 0 54736. book |bec| next OF book * 0 54737. |pf|OD; * 0 54738. |pf|on page end (output, (REF FILE f) BOOL : FALSE) * 0 54739. |pe|FI * 0 54740. |pd|END , * 0 54741. |phalf||pd|~J find ~J * 0 54742. |pd|BEGIN getf (input, (LOC STRING, title)); auth |bec| first auth; * 0 54743. |pe|WHILE RA (auth) :|ne|: NIL * 0 54744. |pe|DO book |bec| book OF auth; * 0 54745. |pf|WHILE RB (book) :|ne|: NIL * 0 54746. |pf|DO * 0 54747. |pj|IF title |uqe| title OF book * 0 54748. |pj|THEN putf (output, |g|(|do|l"author:|vs|"30a|do|, name OF auth)); * 0 54749. |pk| GO TO try again * 0 54750. |pj|ELSE book |bec| next OF book * 0 54751. |pj|FI * 0 54752. |xe|OD; * 0 54753. |e|auth |bec| next OF auth * 0 54754. |xd|OD; * 0 54755. |xd|put (output, (newline, "unknown", newline)) * 0 54756. |xc|END , * 0 54757. |phalf||pd|~J end ~J * 0 54758. |pd|(put (output, (new page, "signed|vs|off", close)); * 0 54759. close (input); GOTO stop) , * 0 54760. |phalf||pd|~J error ~J * 0 54761. |pd|(put (output, (newline, "mistake,|vs|try|vs|again")); * 0 54762. newline (input)) * 0 54763. |pc|ESAC * 0 54764. |p||ps|OD * 0 54765. |ph|END|r| * 0 54766. * 0 54767. |h|11.12. Cooperating sequential processes * 0 54768. * 0 54769. |phalf||ph||i|BEGIN INT nmb magazine slots, nmb producers, nmb consumers; * 0 54770. |pc|read ((nmb magazine slots, nmb producers, nmb consumers)); * 0 54771. |pc||so|1 : nmb producers|sc| FILE infile, |so|1 : nmb consumers|sc| FILE outfile; * 0 54772. |pc|FOR i TO nmb producers * 0 54773. DO open (infile |so|i|sc|, "", inchannel |so|i|sc|) OD; * 0 54774. |xs|~J |ap|inchannel|ap| and |ap|outchannel|ap| are defined in a surrounding range ~J * 0 54775. |pc|FOR i TO nmb consumers|g| * 0 54776. |pc|DO open (outfile |so|i|sc|, "", outchannel |so|i|sc|) OD; * 0 54777. |pc|MODE PAGE |uqe| |so|1 : 60, 1 : 132|sc| CHAR; * 0 54778. |pc||so|1 : nmb magazine slots|sc| REF PAGE magazine; * 0 54779. |pc|INT ~J pointers of a cyclic magazine ~J index |bec| 1, exdex |bec| 1; * 0 54780. |pc|SEMA full slots |uqe| LEVEL 0, free slots |uqe| LEVEL nmb magazine slots, * 0 54781. in buffer busy |uqe| LEVEL 1, out buffer busy |uqe| LEVEL 1; * 0 54782. |pc|PROC par call |uqe| (PROC (INT) VOID p, INT n) VOID : * 0 54783. |xc|~J call |ap|n|ap| incarnations of |ap|p|ap| in parallel ~J * 0 54784. |p||ps|PAR |ro|par call (producer, nmb producers),? 0 54785. |pc|PROC producer |uqe| (INT i) VOID : * 0 54786. |pd|DO HEAP PAGE page; * 0 54787. |pe|get (infile |so|i|sc|, page); * 0 54788. |pe|DOWN free slots; DOWN in buffer busy; * 0 54789. |pe|magazine |so|index|sc| |bec| page; index MODAB nmb magazine slots PLUSAB 1; * 0 54790. |pe|UP full slots; UP in buffer busy * 0 54791. |pd|OD; * 0 54792. |pc|PROC consumer |uqe| (INT i) VOID : * 0 54793. |pd|DO PAGE page; * 0 54794. |pe|DOWN full slots; DOWN out buffer busy; * 0 54795. |e|page |bec| magazine |so|exdex|sc|; exdex MODAB nmb magazine slots PLUSAB 1; * 0 54796. |xd|UP free slots; UP out buffer busy; * 0 54797. |e|put (outfile |so|i|sc|, page) * 0 54798. |pd|OD; * 0 54799. |pc|PAR |ro|par call (producer, nmb producers),? 0 54800. par call (consumer, nmb consumers)|rc| * 0 54801. |ph|END|r| * 0 54802. * 0 54803. |h|11.13. Towers of Hanoi * 0 54804. * 0 54805. |phalf||ph||i|FOR k TO 8 * 0 54806. |ph|DO FILE f |bec| stand out; * 0 54807. |ps|PROC p |uqe| (INT me, de, ma) VOID : * 0 54808. |pc|IF ma |sgt| 0 THEN * 0 54809. |e|p (me, 6 |mi| me |mi| de, ma |mi| 1); * 0 54810. |e|putf (f, (me, de, ma)); * 0 54811. |e|~J move from peg |ap|me|ap| to peg |ap|de|ap| piece |ap|ma|ap| ~J * 0 54812. |e|p (6 |mi| me |mi| de, de, ma |mi| 1) |xs|FI; * 0 54813. |p||ps|putf (f, (|do|l"k|vs||uqe||vs|"dl,|g| * 0 54814. n((2|up|k+15)|sq|16)(2(2(4(3(d)x)x)x)l)|do|,|g| k)); * 0 54815. |p||ps|p (1, 2, k) * 0 54816. |ph|OD |r| * 0 60000. |np||h|12. |bs|Glossaries|rs| * 0 60001. * 0 60002. |h|12.1. Technical terms * 0 60003. * 0 60004. |pa||j|Given below are the locations of the defining occurrences of a number * 0 60005. of words which, in this Report, have a specific technical meaning. * 0 60006. A word appearing in different grammatical forms is given once, usually * 0 60007. as the infinitive. * 0 60008. Terms which are used only within pragmatic remarks are enclosed * 0 60009. within braces. * 0 60010. |e||n||pi|abstraction (a protonotion of a protonotion) 1.1.4.2.b? 0 60011. |pi|acceptable to (a value acceptable to a mode) 2.1.3.6.d? 0 60012. |pi|access (inside a locale) 2.1.2.c? 0 60013. |pi|action 2.1.4.1.a? 0 60014. |pi|active (action) 2.1.4.3.a? 0 60015. |pi|after (in the textual order) 1.1.3.2.i? 0 60016. |pi|akin (a production tree to a production tree) 1.1.3.2.k? 0 60017. |pi||co|alignment|cc| 10.3.4.1.1.ff? 0 60018. |pi|alternative 1.1.3.2.c? 0 60019. |pi|apostrophe 1.1.3.1.a? 0 60020. |pi|arithmetic value 2.1.3.1.a? 0 60021. |pi|ascribe (a value or scene to an |b|indicator|r|) 4.8.2.a? 0 60022. |pi|assign (a value to a name) 5.2.1.2.b? 0 60023. |pi|asterisk 1.1.3.1.a? 0 60024. |pi||co|balancing|cc| 3.4.1? 0 60025. |pi|before (in the textual order) 1.1.3.2.i? 0 60026. |pi|blind alley 1.1.3.2.d? 0 60027. |pi||co|book|cc| 10.3.1.1? 0 60028. |pi|bound 2.1.3.4.b? 0 60029. |pi|bound pair 2.1.3.4.b? 0 60030. |pi|built (the name built from a name) 6.6.2.c? 0 60031. |pi|built (the multiple value built from a value) 6.6.2.b? 0 60032. |pi|calling (of a routine) 5.4.3.2.b? 0 60033. |pi||co|channel|cc| 10.3.1.2? 0 60034. |pi|character 2.1.3.1.g? 0 60035. |pi|chosen (scene of a |b|chooser-clause|r|) 3.4.2.b? 0 60036. |pi||co|close (a file)|cc| 10.3.1.4.ff? 0 60037. |pi|collateral action 2.1.4.2.a? 0 60038. |pi|collateral elaboration 2.1.4.2.f? 0 60039. |pi||co|collection|cc| 10.3.4.1.1.gg * 0 60040. |pi|colon 1.1.3.1.a? 0 60041. |pi|comma 1.1.3.1.a? 0 60042. |pi|complete (an action) 2.1.4.3.c? 0 60043. , d? 0 60044. |pi||co|compressible|cc| 10.3.1.3.ff? 0 60045. |pi|consistent substitute 1.1.3.4.e? 0 60046. |pi|constituent 1.1.4.2.d? 0 60047. |pi|construct 1.1.3.2.e? 0 60048. |pi|construct in a representation language 9.3.b? 0 60049. |pi|contain (by a hypernotion) 1.1.4.1.b? 0 60050. |pi|contain (by a production tree) 1.1.3.2.g? 0 60051. |pi|contain (by a protonotion) 1.1.4.1.b? 0 60052. |pi||co|control (a string by a pattern)|cc| 10.3.4.1.1.dd? 0 60053. |pi||co|conversion key|cc| 10.3.1.2? 0 60054. |pi||co|create (a file on a channel)|cc| 10.3.1.4.cc? 0 60055. |pi||co|cross-reference (in the syntax)|cc| 1.1.3.4.f? 0 60056. |pi||co|data list|cc| 10.3.3 * 0 60057. |pi|defining |b|range|r| (of an |b|indicator|r|) 7.2.2.a? 0 60058. |pi|deflex (a mode to a mode) 2.1.3.6.b? 0 60059. |pi||co|deproceduring|cc| 6 * 0 60060. |pi||co|dereferencing|cc| 6 * 0 60061. |pi|descendent 1.1.3.2.g? 0 60062. |pi|descendent action 2.1.4.2.b? 0 60063. |pi|descriptor 2.1.3.4.b? 0 60064. |pi|designate (a hypernotion designating a protonotion) 1.1.4.1.a? 0 60065. |pi|designate (a paranotion designating a construct) 1.1.4.2.a? 0 60066. |pi|develop (a scene from a |b|declarer|r|) 4.6.2.c? 0 60067. |pi|direct action 2.1.4.2.a? 0 60068. |pi|direct descendent 1.1.3.2.f? 0 60069. |pi|direct parent 2.1.4.2.c? 0 60070. |pi|divided by (of arithmetic values) 2.1.3.1.e? 0 60071. |pi||co|dynamic (|b|replicator|r|)|cc| 10.3.4.1.1.dd * 0 60072. |pi||co|edit (a string)|cc| 10.3.4.1.1.jj * 0 60073. |pi|elaborate collaterally 2.1.4.2.f? 0 60074. |pi|elaboration 2.1.4.1.a? 0 60075. |pi|element (of a multiple value) 2.1.3.4.a? 0 60076. |pi|elidible hypernotion 1.1.4.2.c? 0 60077. |pi|endow with subnames 2.1.3.3.e? 0 60078. , 2.1.3.4.g? 0 60079. |pi|envelop (a protonotion enveloping a hypernotion) 1.1.4.1.c? 0 60080. |pi|environ 2.1.1.1.c? 0 60081. |pi||co|environment enquiry|cc| 10.2? 0 60082. |pi|equivalence (of a character and an integer) 2.1.2.d? 0 60083. , 2.1.3.1.g? 0 60084. |pi|equivalence (of modes) 2.1.1.2.a? 0 60085. |pi|equivalence (of protonotions) 2.1.1.2.a? 0 60086. |pi|establish (an environ around an environ) 3.2.2.b? 0 60087. |pi||co|establish (a file on a channel)|cc| 10.3.1.4.cc? 0 60088. |pi||co|event routine|cc| 10.3.1.3? 0 60089. |pi||co|expect|cc| 10.3.4.1.1.ll? 0 60090. |pi||co|external object|cc| 2.1.1 * 0 60091. |pi|field 2.1.3.3.a? 0 60092. |pi||co|file|cc| 10.3.1.3? 0 60093. |pi||co|firm (position)|cc| 6.1.1? 0 60094. |pi||co|firmly related|cc| 7.1.1? 0 60095. |pi|fixed name (referring to a multiple value) 2.1.3.4.f? 0 60096. |pi|flat descriptor 2.1.3.4.c? 0 60097. |pi|flexible name (referring to a multiple value) 2.1.3.4.f? 0 60098. |pi|follow (in the textual order) 1.1.3.2.j? 0 60099. |pi||co|format|cc| 10.3.4 * 0 60100. |pi||co|frame|cc| 10.3.5.1.bb? 0 60101. |pi|generate (a |b||ap|TAG|ap||r| generating a name) 2.1.3.4.l? 0 60102. |pi|generate (a trim generating a name) 2.1.3.4.j? 0 60103. |pi|ghost element 2.1.3.4.c? 0 60104. |pi|halt (an action) 2.1.4.3.f? 0 60105. |pi|hardware language 9.3.a? 0 60106. |pi||co|heap|cc| 5.2.3? 0 60107. |pi|hold (of a predicate) 1.3.2? 0 60108. |pi|hold (of a relationship) 2.1.2.a? 0 60109. |pi|hyper-rule 1.1.3.4.b? 0 60110. |pi|hyperalternative 1.1.3.4.c? 0 60111. |pi|hypernotion 1.1.3.1.e? 0 60112. |pi|hyphen 1.1.3.1.a? 0 60113. |pi|identify (an |b|indicator|r| identifying an |b|indicator|r|) 7.2.2.b? 0 60114. |pi|implementation (of ALGOL 68) 2.2.2.c? 0 60115. |pi|implementation of the reference language 9.3.c? 0 60116. |pi|in (a construct in an environ) 2.1.5.b? 0 60117. |pi|in place of 3.2.2.a, 5.4.4.2? 0 60118. |pi|inactive (action) 2.1.4.3.a? 0 60119. |pi|incompatible actions 2.1.4.2.e? 0 60120. |pi||co|independence (of properties)|cc| 7.1.1? 0 60121. |pi|index (to select an element) 2.1.3.4.a? 0 60122. |pi||co|indit (a string)|cc| 10.3.4.1.1.kk? 0 60123. |pi|initiate (an action) 2.1.4.3.b? 0 60124. , c? 0 60125. |pi||co|input compatible|cc| 10.3.4.1.1.ii? 0 60126. |pi|inseparable action 2.1.4.2.a? 0 60127. |pi||co|insertion|cc| 10.3.4.1.1.ee? 0 60128. |pi|integer 2.1.3.1.a? 0 60129. |pi|integral equivalent (of a character) 2.1.3.1.g? 0 60130. |pi||co|internal object|cc| 2.1.1? 0 60131. |pi|interrupt (an action) 2.1.4.3.h? 0 60132. |pi|intrinsic value 8.1.1.2? 0 60133. , 8.1.2.2.a? 0 60134. , b? 0 60135. , 8.1.4.2.b? 0 60136. , 8.2.2.b? 0 60137. , c? 0 60138. |pi|invisible 1.1.3.2.h? 0 60139. |pi|is (of hypernotions) 2.1.5.e? 0 60140. |pi|large syntactic mark 1.1.3.1.a? 0 60141. |pi|largest integral equivalent (of a character) 2.1.3.1.g? 0 60142. |pi|lengthening (of arithmetic values) 2.1.2.d? 0 60143. , 2.1.3.1.e? 0 60144. |pi||co|link (a book with a file)|cc| 10.3.1.4.bb? 0 60145. |pi||co|literal|cc| 10.3.4.1.1.ee? 0 60146. |pi|local environ 5.2.3.2.b? 0 60147. |pi|locale 2.1.1.1.b? 0 60148. |pi||co|lock (a file)|cc| 10.3.1.4.gg? 0 60149. |pi||co|logical end|cc| 10.3.1.1.aa? 0 60150. |pi||co|logical file|cc| 10.3.1.5.dd? 0 60151. |pi|lower bound 2.1.3.4.b? 0 60152. |pi|make to access (a value inside a locale) 2.1.2.c? 0 60153. |pi|make to refer to (of a name) 2.1.3.2.a? 0 60154. |pi||co|marker|cc| 10.3.4.1.1.cc? 0 60155. |pi|meaning 1.1.4? 0 60156. , 2.1.4.1.a? 0 60157. |pi|meaningful program 1.1.4.3.c? 0 60158. |pi||co|meek (position)|cc| 6.1.1? 0 60159. |pi|member 1.1.3.2.d? 0 60160. |pi|metanotion 1.1.3.1.d? 0 60161. |pi|metaproduction rule 1.1.3.3.b? 0 60162. |pi|minus (of arithmetic values) 2.1.3.1.e? 0 60163. |pi|mode 2.1.1.2.b, 2.1.5.f * 0 60164. |pi||co|multiple selection|cc| 5.3.1 * 0 60165. |pi|multiple value 2.1.3.4.a? 0 60166. |pi|name 2.1.3.2.a? 0 60167. |pi|necessary for (an environ for a scene) 7.2.2.c? 0 60168. |pi|nest 3.0.2? 0 60169. |pi|newer (of scopes) 2.1.2.f? 0 60170. |pi|newly created (name) 2.1.3.2.a? 0 60171. |pi|nil 2.1.3.2.a * 0 60172. |pi|nonlocal 3.2.2.b * 0 60173. |pi|notion 1.1.3.1.c? 0 60174. |pi|number of extra lengths 2.1.3.1.d? 0 60175. |pi|number of extra shorths 10.2.1.j? 0 60176. , l? 0 60177. , 2.1.3.1.d? 0 60178. |pi|number of extra widths 10.2.1.j? 0 60179. , l? 0 60180. |pi|numerical analysis, in the sense of 2.1.3.1.e? 0 60181. |pi|object 2.1.1? 0 60182. |pi|of (construct of a construct) 2.1.5.a? 0 60183. |pi|of (construct of a scene) 2.1.1.1.d? 0 60184. |pi|of (environ of a scene) 2.1.1.1.d? 0 60185. |pi|of (nest of a construct) 3.0.2? 0 60186. |pi|older (of scopes) 2.1.2.f? 0 60187. |pi||co|on routine|cc| 10.3.1.3? 0 60188. |pi||co|open (a file)|cc| 10.3.1.4.dd? 0 60189. |pi|original 1.1.3.2.f? 0 60190. |pi|other syntactic mark 1.1.3.1.a? 0 60191. |pi||co|output compatible|cc| 10.3.4.1.1.hh? 0 60192. |pi||co|overflow|cc| 2.1.4.3.h? 0 60193. |pi||co|overload|cc| 4.5? 0 60194. |pi|parallel action 10.2.4? 0 60195. |pi|paranotion 1.1.4.2.a? 0 60196. |pi||co|perform (an alignment)|cc| 10.3.4.1.1.ff * 0 60197. |pi||co|perform (an insertion)|cc| 10.3.4.1.1.ee * 0 60198. |pi||co|pattern|cc| 10.3.4.1.1.cc * 0 60199. |pi|permanent relationship 2.1.2.a? 0 60200. |pi||co|physical file|cc| 10.3.1.5.cc? 0 60201. |pi||co|picture|cc| 10.3.4.1.1.cc * 0 60202. |pi|plain value 2.1.3.1.a? 0 60203. |pi|point 1.1.3.1.a? 0 60204. |pi|pragmatic remark 1.1.2? 0 60205. |pi||co|pre-elaboration|cc| 2.1.4.1.c? 0 60206. |pi|precede (in the textual order) 1.1.3.2.j? 0 60207. |pi|predicate 1.3.2? 0 60208. |pi|primal environ 2.2.2.a? 0 60209. |pi|process 10.2.4? 0 60210. |pi|produce 1.1.3.2.f? 0 60211. |pi|production rule 1.1.3.2.b? 0 60212. |pi|production tree 1.1.3.2.f? 0 60213. |pi|program in the strict language 1.1.1.b? 0 60214. , 10.1.2? 0 60215. |pi||co|property|cc| 2.1.1.1.b? 0 60216. , 3.0.2? 0 60217. |pi|protonotion 1.1.3.1.b? 0 60218. |pi|pseudo-comment 10.1.3.Step#7? 0 60219. |pi|publication language 9.3.a? 0 60220. |pi||co|random access|cc| 10.3.1.3.ff? 0 60221. |pi||co|reach|cc| 3.0.2? 0 60222. |pi|real number 2.1.3.1.a? 0 60223. |pi|refer to 2.1.2.e? 0 60224. , 2.1.3.2.a? 0 60225. |pi|reference language 9.3.a? 0 60226. |pi|relationship 2.1.2.a? 0 60227. |pi||co|replicator|cc| 10.3.4.1.1.dd * 0 60228. |pi|representation language 9.3.a? 0 60229. |pi|required 1.1.4.3.b? 0 60230. |pi|resume (an action) 2.1.4.3.g? 0 60231. |pi|routine 2.1.3.5.a? 0 60232. |pi||co|rowing|cc| 6? 0 60233. |pi|same as (of scopes) 2.1.2.f? 0 60234. |pi|scene 2.1.1.1.d? 0 60235. |pi|scope (of a value) 2.1.1.3.a? 0 60236. |pi|scope (of an environ) 2.1.1.3.b? 0 60237. |pi||co|scratch (a file)|cc| 10.3.1.4.hh? 0 60238. |pi|select (a |b||ap|TAG|ap||r| selecting a field) 2.1.3.3.a? 0 60239. |pi|select (a |b||ap|TAG|ap||r| selecting a multiple value) 2.1.3.4.k? 0 60240. |pi|select (a |b||ap|TAG|ap||r| selecting a subname) 2.1.3.3.e? 0 60241. |pi|select (a |b|field-selector|r| selecting a field) 2.1.5.g? 0 60242. |pi|select (an index selecting a subname) 2.1.3.4.g? 0 60243. |pi|select (an index selecting an element) 2.1.3.4.a? 0 60244. |pi|select (a trim selecting a multiple value) 2.1.3.4.i? 0 60245. |pi|semantics 1.1.1? 0 60246. |pi|semicolon 1.1.3.1.a? 0 60247. |pi|sense of numerical analysis 2.1.3.1.e? 0 60248. |pi||co|sequential access|cc| 10.3.1.3.ff? 0 60249. |pi|serial action 2.1.4.2.a? 0 60250. |pi|simple substitute 1.1.3.3.d? 0 60251. |pi|size (of an arithmetic value) 2.1.3.1.b? 0 60252. |pi|small syntactic mark 1.1.3.1.a? 0 60253. |pi|smaller (descendent smaller than a production tree) 1.1.3.2.g? 0 60254. |pi|smaller than (of arithmetic values) 2.1.2.d, 2.1.3.1.e? 0 60255. |pi||co|soft (position)|cc| 6.1.1? 0 60256. |pi||co|sort|cc| 6? 0 60257. |pi|specify (a |b|declarer|r| specifying a mode) 4.6.2.d? 0 60258. |pi||co|spelling (of a mode)|cc| 2.1.1.2? 0 60259. |pi|standard environment 1.1.1, 10? 0 60260. |pi||co|standard function|cc| 10.2? 0 60261. |pi||co|standard mode|cc| 10.2? 0 60262. |pi||co|standard operator|cc| 10.2? 0 60263. |pi||co|state|cc| 10.3.1.3? 0 60264. |pi||co|staticize (a picture)|cc| 10.3.4.1.1.dd? 0 60265. |pi|stowed name 2.1.3.2.b? 0 60266. |pi|stowed value 2.1.1.1.a? 0 60267. |pi|straightening 10.3.2.3.c? 0 60268. |pi|strict language 1.1.1.b? 0 60269. , 1.1.3.2.e? 0 60270. , 10.1.2? 0 60271. |pi||co|string|cc| 8.3? 0 60272. |pi||co|strong (position)|cc| 6.1.1? 0 60273. |pi|structured value 2.1.3.3.a? 0 60274. |pi|sublanguage 2.2.2.c? 0 60275. |pi|subname 2.1.2.g? 0 60276. |pi|substitute consistently 1.1.3.4.e? 0 60277. |pi|substitute simply 1.1.3.3.d? 0 60278. |pi|superlanguage 2.2.2.c? 0 60279. |pi||co|suppressed frame|cc| 10.3.4.1.1.cc? 0 60280. |pi|symbol 1.1.3.1.f? 0 60281. |pi||co|synchronization operation|cc| 10.2.? 0 60282. |pi|syntax 1.1.1? 0 60283. |pi|terminal metaproduction (of a metanotion) 1.1.3.3.c? 0 60284. |pi|terminal production (of a notion) 1.1.3.2.f? 0 60285. |pi|terminal production (of a production tree) 1.1.3.2.f? 0 60286. |pi|terminate (an action) 2.1.4.3.e? 0 60287. |pi|textual order 1.1.3.2.i? 0 60288. |pi|times (of arithmetic values) 2.1.3.1.e? 0 60289. |pi|transform 10.3.4.1.2.b? 0 60290. |pi||co|transient name|cc| 2.1.3.6.c? 0 60291. |pi|transitive relationship 2.1.2.a? 0 60292. |pi||co|transput declaration|cc| 10.2.? 0 60293. |pi||co|transput|cc| 10.3? 0 60294. |pi|traverse 10.3.2.3.d? 0 60295. |pi|trim 2.1.3.4.h? 0 60296. |pi|truth value 2.1.3.1.f? 0 60297. |pi|typographical display feature 9.4.d? 0 60298. |pi|undefined 1.1.4.3.a? 0 60299. |pi|united from (of modes) 2.1.3.6.a? 0 60300. |pi||co|uniting|cc| 6? 0 60301. |pi|upper bound 2.1.3.4.b? 0 60302. |pi|vacant locale 2.1.1.1.b? 0 60303. |pi|value 2.1.1.1.a? 0 60304. |pi|variant (of a value) 4.4.2.c? 0 60305. |pi|variant of ALGOL 68 1.1.5.b * 0 60306. |pi|version (of an operator) 10.1.3.Step3? 0 60307. |pi|visible 1.1.3.2.h? 0 60308. |pi|void value 2.1.3.1.h? 0 60309. |pi||co|voiding|cc| 6? 0 60310. |pi||co|weak (position)|cc| 6.1.1? 0 60311. |pi||co|well formed|cc| 7.4 * 0 60312. |pi|widenable to (an integer to a real number) 2.1.2.d? 0 60313. , 2.1.3.1.e? 0 60314. |pi||co|widening|cc| 6? 0 60315. |pi|yield (of a scene) 2.1.2.b? 0 60316. , 2.1.4.1.b? 0 60317. , 2.1.5.c? 0 60318. , d? 0 60319. |pq||co||w|Denn eben, wo Begriffe fehlen, * 0 60320. |g||pp|Da stellt ein Wort zur rechten Zeit sich ein. * 0 60321. |ppp|Faust, |pr|J.W. von Goethe.|r||cc||qq|? 0 60322. * 0 60323. |h|12.2. Paranotions * 0 60324. * 0 60325. |pa||j|Given below are short paranotions representing the notions * 0 60326. defined in this Report, with references to their hyper-rules. * 0 60327. |e||n||pi||b|after-specification|r| 10.3.4.10.1.c? 0 60328. |pi||b|alignment|r| 10.3.4.1.1.e? 0 60329. |pi||b|alignment-code|r| 10.3.4.1.1.f? 0 60330. |pi||b|alternate-CHOICE-clause|r| 3.4.1.d? 0 60331. |pi||b|assignation|r| 5.2.1.1.a? 0 60332. |pi||b|bits-denotation|r| 8.2.1.l? 0 60333. |pi||b|bits-pattern|r| 10.3.4.7.1.a? 0 60334. |pi||b|boolean-choice-pattern|r| 10.3.4.8.1.b? 0 60335. |pi||b|boolean-marker|r| 10.3.4.4.1.b? 0 60336. |pi||b|boolean-pattern|r| 10.3.4.4.1.a? 0 60337. |pi||b|boundscript|r| 5.3.2.1.j? 0 60338. |pi||b|call|r| 5.4.3.1.a? 0 60339. |pi||b|case-clause|r| 3.4.1.p? 0 60340. |pi||b|case-part-of-CHOICE|r| 3.4.1.i? 0 60341. |pi||b|cast|r| 5.5.1.1.a? 0 60342. |pi||b|character-glyph|r| 8.1.4.1.c? 0 60343. |pi||b|character-marker|r| 10.3.4.6.1.b? 0 60344. |pi||b|choice-clause|r| 3.4.1.n? 0 60345. |pi||b|chooser-CHOICE-clause|r| 3.4.1.b? 0 60346. |pi||b|closed-clause|r| 3.1.1.a? 0 60347. |pi||b|coercee|r| 6.1.1.g? 0 60348. |pi||b|coercend|r| 6.1.1.h? 0 60349. |pi||b|collateral-clause|r| 3.3.1.a? 0 60350. , d? 0 60351. , e? 0 60352. |pi||b|collection|r| 10.3.4.1.1.b? 0 60353. |pi||b|complex-marker|r| 10.3.4.5.1.b? 0 60354. |pi||b|complex-pattern|r| 10.3.4.5.1.a? 0 60355. |pi||b|conditional-clause|r| 3.4.1.o? 0 60356. |pi||b|conformity-clause|r| 3.4.1.q? 0 60357. |pi||b|constant|r| 3.0.1.d? 0 60358. |pi||b|declaration|r| 4.1.1.a? 0 60359. |pi||b|declarative|r| 5.4.1.1.e? 0 60360. |pi||b|declarator|r| 4.6.1.c? 0 60361. , d? 0 60362. , g? 0 60363. , h? 0 60364. , o? 0 60365. , s? 0 60366. |pi||b|declarer|r| 4.2.1.c? 0 60367. , 4.4.1.b? 0 60368. , 4.6.1.a? 0 60369. , b? 0 60370. |pi||b|definition|r| 4.1.1.d? 0 60371. |pi||b|denotation|r| 8.1.0.1.a? 0 60372. , 8.1.1.1.a? 0 60373. , 8.1.2.1.a? 0 60374. , 8.1.3.1.a? 0 60375. , 8.1.4.1.a? 0 60376. , 8.1.5.1.a? 0 60377. , 8.2.1.a? 0 60378. , b? 0 60379. , c? 0 60380. , 8.3.1.a? 0 60381. |pi||b|denoter|r| 8.0.1.a? 0 60382. |pi||b|deprocedured-to-FORM|r| 6.3.1.a? 0 60383. |pi||b|dereferenced-to-FORM|r| 6.2.1.a? 0 60384. |pi||b|destination|r| 5.2.1.1.b? 0 60385. |pi||b|digit-cypher|r| 8.1.1.1.c? 0 60386. |pi||b|digit-marker|r| 10.3.4.2.1.f? 0 60387. |pi||b|display|r| 3.3.1.j? 0 60388. |pi||b|do-part|r| 3.5.1.h? 0 60389. |pi||b|dyadic-operator|r| 5.4.2.1.e? 0 60390. |pi||b|enquiry-clause|r| 3.4.1.c? 0 60391. |pi||b|establishing-clause|r| 3.2.1.i? 0 60392. |pi||b|exponent-marker|r| 10.3.4.3.1.e? 0 60393. |pi||b|exponent-part|r| 8.1.2.1.g? 0 60394. |pi||b|exponent-specification|r| 10.3.4.10.1.d? 0 60395. |pi||b|expression|r| 3.0.1.b? 0 60396. |pi||b|field-selector|r| 4.8.1.f? 0 60397. |pi||b|fixed-point-numeral|r| 8.1.1.1.b? 0 60398. |pi||b|floating-point-mould|r| 10.3.4.3.1.c? 0 60399. |pi||b|floating-point-numeral|r| 8.1.2.1.e? 0 60400. |pi||b|for-part|r| 3.5.1.b? 0 60401. |pi||b|format-pattern|r| 10.3.4.9.1.a? 0 60402. |pi||b|format-text|r| 10.3.4.1.1.a? 0 60403. |pi||b|formula|r| 5.4.2.1.d? 0 60404. |pi||b|fractional-part|r| 8.1.2.1.d? 0 60405. |pi||b|frame|r| 10.3.4.1.1.m? 0 60406. |pi||b|general-pattern|r| 10.3.4.10.1.a? 0 60407. |pi||b|generator|r| 5.2.3.1.a? 0 60408. |pi||b|go-to|r| 5.4.4.1.b? 0 60409. |pi||b|hip|r| 5.1.a? 0 60410. |pi||b|identifier-declaration|r| 4.4.1.g? 0 60411. |pi||b|identity-declaration|r| 4.4.1.a? 0 60412. |pi||b|identity-definition|r| 4.4.1.c? 0 60413. |pi||b|identity-relation|r| 5.2.2.1.a? 0 60414. |pi||b|identity-relator|r| 5.2.2.1.b? 0 60415. |pi||b|in-part-of-CHOICE|r| 3.4.1.f? 0 60416. , g? 0 60417. , h? 0 60418. |pi||b|in-CHOICE-clause|r| 3.4.1.e? 0 60419. |pi||b|indexer|r| 5.3.2.1.i? 0 60420. |pi||b|indicator|r| 4.8.1.e? 0 60421. |pi||b|insertion|r| 10.3.4.1.1.d? 0 60422. |pi||b|integral-choice-pattern|r| 10.3.4.8.1.a? 0 60423. |pi||b|integral-mould|r| 10.3.4.2.1.b? 0 60424. |pi||b|integral-part|r| 8.1.2.1.c? 0 60425. |pi||b|integral-pattern|r| 10.3.4.2.1.a? 0 60426. |pi||b|intervals|r| 3.5.1.c? 0 60427. |pi||b|joined-label-definition|r| 10.1.1.h? 0 60428. |pi||b|joined-portrait|r| 3.3.1.b? 0 60429. |pi||b|jump|r| 5.4.4.1.a? 0 60430. |pi||b|label-definition|r| 3.2.1.c? 0 60431. |pi||b|literal|r| 10.3.4.1.1.i? 0 60432. |pi||b|loop-clause|r| 3.5.1.a? 0 60433. |pi||b|lower-bound|r| 4.6.1.m? 0 60434. |pi||b|marker|r| 10.3.4.1.1.n? 0 60435. |pi||b|mode-declaration|r| 4.2.1.a? 0 60436. |pi||b|mode-definition|r| 4.2.1.b? 0 60437. |pi||b|monadic-operator|r| 5.4.2.1.f? 0 60438. |pi||b|nihil|r| 5.2.4.1.a? 0 60439. |pi||b|operand|r| 5.4.2.1.g? 0 60440. |pi||b|operation-declaration|r| 4.5.1.a? 0 60441. |pi||b|operation-definition|r| 4.5.1.c? 0 60442. |pi||b|other-string-item|r| 8.1.4.1.d? 0 60443. |pi||b|other-PRAGMENT-item|r| 9.2.1.d? 0 60444. |pi||b|parallel-clause|r| 3.3.1.c? 0 60445. |pi||b|parameter|r| 5.4.1.1.g? 0 60446. , 5.4.3.1.c? 0 60447. |pi||b|parameter-definition|r| 5.4.1.1.f? 0 60448. |pi||b|particular-postlude|r| 10.1.1.i? 0 60449. |pi||b|particular-program|r| 10.1.1.g? 0 60450. |pi||b|pattern|r| 10.3.4.1.1.o? 0 60451. |pi||b|phrase|r| 3.0.1.a? 0 60452. |pi||b|picture|r| 10.3.4.1.1.c? 0 60453. |pi||b|plain-denotation|r| 8.1.0.1.b? 0 60454. |pi||b|plan|r| 4.5.1.b? 0 60455. , 4.6.1.p? 0 60456. |pi||b|plusminus|r| 8.1.2.1.j? 0 60457. |pi||b|point-marker|r| 10.3.4.3.1.d? 0 60458. |pi||b|power-of-ten|r| 8.1.2.1.i? 0 60459. |pi||b|praglit|r| 10.3.4.8.1.c * 0 60460. |pi||b|pragment|r| 9.2.1.a? 0 60461. |pi||b|preludes|r| 10.1.1.b? 0 60462. |pi||b|priority-declaration|r| 4.3.1.a? 0 60463. |pi||b|priority-definition|r| 4.3.1.b? 0 60464. |pi||b|program|r| 2.2.1.a? 0 60465. |pi||b|program-text|r| 10.1.1.a? 0 60466. |pi||b|radix-digit|r| 8.2.1.m? 0 60467. |pi||b|radix-marker|r| 10.3.4.7.1.c? 0 60468. |pi||b|range|r| 3.0.1.f? 0 60469. |pi||b|real-pattern|r| 10.3.4.3.1.a? 0 60470. |pi||b|repeating-part|r| 3.5.1.e? 0 60471. |pi||b|replicator|r| 10.3.4.1.1.g? 0 60472. |pi||b|revised-lower-bound|r| 5.3.2.1.g? 0 60473. |pi||b|routine-declarer|r| 4.4.1.b? 0 60474. |pi||b|routine-plan|r| 4.5.1.b? 0 60475. |pi||b|routine-text|r| 5.4.1.1.a? 0 60476. , b? 0 60477. |pi||b|row-display|r| 3.3.1.i? 0 60478. |pi||b|row-rower|r| 4.6.1.j? 0 60479. , k? 0 60480. , l? 0 60481. |pi||b|row-ROWS-rower|r| 4.6.1.i? 0 60482. |pi||b|rowed-to-FORM|r| 6.6.1.a? 0 60483. |pi||b|sample-generator|r| 5.2.3.1.b? 0 60484. |pi||b|selection|r| 5.3.1.1.a? 0 60485. |pi||b|serial-clause|r| 3.2.1.a? 0 60486. |pi||b|series|r| 3.2.1.b? 0 60487. |pi||b|sign-marker|r| 10.3.4.2.1.e? 0 60488. |pi||b|sign-mould|r| 10.3.4.2.1.c? 0 60489. |pi||b|skip|r| 5.5.2.1.a? 0 60490. |pi||b|slice|r| 5.3.2.1.a? 0 60491. |pi||b|softly-deprocedured-to-FORM|r| 6.3.1.b? 0 60492. |pi||b|source|r| 5.2.1.1.c? 0 60493. |pi||b|source-for-MODINE|r| 4.4.1.d? 0 60494. |pi||b|specification|r| 3.4.1.j? 0 60495. , k? 0 60496. |pi||b|stagnant-part|r| 8.1.2.1.f? 0 60497. |pi||b|statement|r| 3.0.1.c? 0 60498. |pi||b|string|r| 8.3.1.b? 0 60499. |pi||b|string-denotation|r| 8.3.1.c? 0 60500. |pi||b|string-item|r| 8.1.4.1.b? 0 60501. |pi||b|string-pattern|r| 10.3.4.6.1.a? 0 60502. |pi||b|structure-display|r| 3.3.1.h? 0 60503. |pi||b|subscript|r| 5.3.2.1.e? 0 60504. |pi||b|suppression|r| 10.3.4.1.1.l? 0 60505. |pi||b|symbol|r| 9.1.1.h? 0 60506. |pi||b|system-task|r| 10.1.1.e? 0 60507. |pi||b|tasks|r| 10.1.1.d? 0 60508. |pi||b|times-ten-to-the-power-choice|r| 8.1.2.1.h? 0 60509. |pi||b|token|r| 9.1.1.g? 0 60510. |pi||b|trimmer|r| 5.3.2.1.f? 0 60511. |pi||b|trimscript|r| 5.3.2.1.h? 0 60512. |pi||b|unchanged-from-FORM|r| 6.1.1.f? 0 60513. |pi||b|unit|r| 3.2.1.d? 0 60514. |pi||b|unitary-clause|r| 3.2.1.h? 0 60515. |pi||b|united-to-FORM|r| 6.4.1.a? 0 60516. |pi||b|unsuppressible-literal|r| 10.3.4.1.1.i? 0 60517. |pi||b|unsuppressible-replicator|r| 10.3.4.1.1.h? 0 60518. |pi||b|unsuppressible-suppression|r| 10.3.4.1.1.l? 0 60519. |pi||b|upper-bound|r| 4.6.1.n? 0 60520. |pi||b|user-task|r| 10.1.1.f? 0 60521. |pi||b|vacuum|r| 3.3.1.k? 0 60522. |pi||b|variable|r| 3.0.1.e? 0 60523. |pi||b|variable-declaration|r| 4.4.1.e? 0 60524. |pi||b|variable-definition|r| 4.4.1.f? 0 60525. |pi||b|variable-point-mould|r| 10.3.4.3.1.b? 0 60526. |pi||b|variable-point-numeral|r| 8.1.2.1.b? 0 60527. |pi||b|voided-to-FORM|r| 6.7.1.a, b? 0 60528. |pi||b|while-do-part|r| 3.5.1.f? 0 60529. |pi||b|while-part|r| 3.5.1.g? 0 60530. |pi||b|widened-to-FORM|r| 6.5.1.a? 0 60531. , b? 0 60532. , c? 0 60533. , d? 0 60534. |pi||b|width-specification|r| 10.3.4.10.1.b? 0 60535. |pi||b|zero-marker|r| 10.3.4.2.1.d? 0 60536. |pi||b|ADIC-operand|r| 5.4.2.1.c? 0 60537. |p||b|CHOICE-again|r| 9.1.1.c * 0 60538. |p||b|CHOICE-finish|r| 9.1.1.e * 0 60539. |p||b|CHOICE-in|r| 9.1.1.b * 0 60540. |p||b|CHOICE-out|r| 9.1.1.d * 0 60541. |p||b|CHOICE-start|r| 9.1.1.a * 0 60542. |pi||b|CHOICE-clause|r| 3.4.1.a? 0 60543. |pi||b|COMMON-joined-definition|r| 4.1.1.b? 0 60544. , c? 0 60545. |pi||b|DYADIC-formula|r| 5.4.2.1.a? 0 60546. |pi||b|EXTERNAL-prelude|r| 10.1.1.c? 0 60547. |pi||b|FIELDS-definition-of-FIELD|r| 4.6.1.f? 0 60548. |pi||b|FIELDS-portrait|r| 3.3.1.f? 0 60549. , g? 0 60550. |pi||b|FIELDS-portrayer-of-FIELDS1|r| 4.6.1.e? 0 60551. |pi||b|FORM-coercee|r| 6.1.1.a? 0 60552. , b? 0 60553. , c? 0 60554. , d? 0 60555. , e? 0 60556. |pi||b|FROBYT-part|r| 3.5.1.d? 0 60557. |pi||b|INDICATOR|r| 4.8.1.a? 0 60558. , b? 0 60559. |pi||b|MOIDS-joined-declarer|r| 4.6.1.t? 0 60560. , u? 0 60561. |pi||b|MONADIC-formula|r| 5.4.2.1.b? 0 60562. |pi||b|NOTETY-pack|r| 1.3.3.d? 0 60563. |pi||b|NOTION-bracket|r| 1.3.3.e? 0 60564. |pi||b|NOTION-list|r| 1.3.3.c? 0 60565. |pi||b|NOTION-option|r| 1.3.3.a? 0 60566. |pi||b|NOTION-sequence|r| 1.3.3.b? 0 60567. |pi||b|NOTION-token|r| 9.1.1.f? 0 60568. |pi||b|PARAMETERS|r| 5.4.3.1.b? 0 60569. |pi||b|PARAMETERS-joined-declarer|r| 4.6.1.q? 0 60570. , r? 0 60571. |pi||b|PRAGMENT|r| 9.2.1.b? 0 60572. |pi||b|PRAGMENT-item|r| 9.2.1.c? 0 60573. |pi||b|QUALITY-FIELDS-field-selector|r| 4.8.1.c? 0 60574. , d? 0 60575. |pi||b|RADIX|r| 8.2.1.d? 0 60576. , e? 0 60577. , f? 0 60578. , g? 0 60579. |pi||b|RADIX-digit|r| 8.2.1.h? 0 60580. , i? 0 60581. , j? 0 60582. , k? 0 60583. |pi||b|RADIX-frame|r| 10.3.4.7.1.b? 0 60584. |pi||b|ROWS-leaving-ROWSETY-indexer|r| 5.3.2.1.b? 0 60585. , c? 0 60586. , d? 0 60587. |pi||b|TALLY-declarer|r| 4.2.1.c? 0 60588. |pi||b|THING1-or-alternatively-THING2|r| 1.3.3.f? 0 60589. |pi||b|UNSUPPRESSETY-literal|r| 10.3.4.1.1.i? 0 60590. |pi||b|UNSUPPRESSETY-suppression|r| 10.3.4.1.1.l? 0 60591. |pi||b|UNSUPPRESSETY-COMARK-frame|r| 10.3.4.1.1.k? 0 60592. |pi||b|UNSUPPRESSETY-MARK-frame|r| 10.3.4.1.1.j? 0 60593. * 0 60594. |h|12.3. Predicates * 0 60595. * 0 60596. |pa||j|Given below are abbreviated forms of the predicates defined * 0 60597. in this Report. * 0 60598. |e||n||pi||b||ap|and|ap||r| 1.3.1.c? 0 60599. , e? 0 60600. |pi||b||ap|balances|ap||r| 3.2.1.f, g * 0 60601. |pi||b||ap|begins with|ap||r| 1.3.1.h, i, j * 0 60602. |pi||b||ap|coincides with|ap||r| 1.3.1.k? 0 60603. , l? 0 60604. |pi||b||ap|contains|ap||r| 1.3.1.m, n * 0 60605. |pi||b||ap|counts|ap||r| 4.3.1.c? 0 60606. , d? 0 60607. |pi||b||ap|deflexes to|ap||r| 4.7.1.a? 0 60608. , b? 0 60609. , c? 0 60610. , d? 0 60611. , e? 0 60612. |pi||b||ap|deprefs to firm|ap||r| 7.1.1.n? 0 60613. |pi||b||ap|develops from|ap||r| 7.3.1.c? 0 60614. |pi||b||ap|equivalent|ap||r| 7.3.1.a? 0 60615. , b? 0 60616. , d? 0 60617. , e? 0 60618. , f? 0 60619. , g? 0 60620. , h? 0 60621. , i? 0 60622. , j? 0 60623. , k? 0 60624. , q? 0 60625. |pi||b||ap|false|ap||r| 1.3.1.b? 0 60626. |pi||b||ap|firmly related|ap||r| 7.1.1.k? 0 60627. |pi||b||ap|identified in|ap||r| 7.2.1.a? 0 60628. |pi||b||ap|incestuous|ap||r| 4.7.1.f? 0 60629. |pi||b||ap|independent|ap||r| 7.1.1.a? 0 60630. , b? 0 60631. , c? 0 60632. , d? 0 60633. |pi||b||ap|is|ap||r| 1.3.1.g? 0 60634. |pi||b||ap|is derived from|ap||r| 5.3.1.1.b? 0 60635. , c? 0 60636. |pi||b||ap|is firm|ap||r| 7.1.1.l, m? 0 60637. |pi||b||ap|like|ap||r| 5.4.1.1.c? 0 60638. , d? 0 60639. |pi||b||ap|may follow|ap||r| 3.4.1.m? 0 60640. |pi||b||ap|number equals|ap||r| 7.3.1.o, p * 0 60641. |pi||b||ap|or|ap||r| 1.3.1.d? 0 60642. , f? 0 60643. |pi||b||ap|ravels to|ap||r| 4.7.1.g? 0 60644. |pi||b||ap|related|ap||r| 7.1.1.e? 0 60645. , f? 0 60646. , g? 0 60647. , h? 0 60648. , i? 0 60649. , j? 0 60650. |pi||b||ap|resides in|ap||r| 7.2.1.b? 0 60651. , c? 0 60652. |pi||b||ap|shields|ap||r| 7.4.1.a? 0 60653. , b? 0 60654. , c? 0 60655. , d? 0 60656. |pi||b||ap|subset of|ap||r| 7.3.1.l? 0 60657. , m? 0 60658. , n? 0 60659. |pi||b||ap|true|ap||r| 1.3.1.a * 0 60660. |pi||b||ap|unites to|ap||r| 6.4.1.b? 0 60661. * 0 60662. |h|12.4. Index to the standard prelude * 0 60663. * 0 60664. |e||pi||i|<|r| 10.2.3.0.a? 0 60665. , 10.2.3.3.a? 0 60666. , 10.2.3.5.c? 0 60667. , 10.2.3.5.c? 0 60668. , d? 0 60669. , 10.2.3.6.a? 0 60670. , 10.2.3.9.a? 0 60671. , 10.2.3.10.a? 0 60672. , g? 0 60673. , h? 0 60674. |pi||i|<|uqe||r| 10.2.3.0.a? 0 60675. , 10.2.3.3.b? 0 60676. , 10.2.3.4.b? 0 60677. , 10.2.3.5.c? 0 60678. , d? 0 60679. , 10.2.3.6.a? 0 60680. , 10.2.3.8.e? 0 60681. , 10.2.3.9.a? 0 60682. , 10.2.3.10.b? 0 60683. , g? 0 60684. , h? 0 60685. |pi||i|+|r| 10.2.3.0.a? 0 60686. , 10.2.3.3.i? 0 60687. , j? 0 60688. , 10.2.3.4.i? 0 60689. , j? 0 60690. , 10.2.3.5.a? 0 60691. , b? 0 60692. , 10.2.3.6.b? 0 60693. , 10.2.3.7.j? 0 60694. , k? 0 60695. , p? 0 60696. , q? 0 60697. , r? 0 60698. , s? 0 60699. , 10.2.3.10.i? 0 60700. , j? 0 60701. , k? 0 60702. |pi||i|+|bec||r| 10.2.3.0.a? 0 60703. , 10.2.3.11.d? 0 60704. , e? 0 60705. , f? 0 60706. , o? 0 60707. , p? 0 60708. , q? 0 60709. , s? 0 60710. |pi||i|+|uqe|:|r| 10.2.3.0.a? 0 60711. , 10.2.3.11.r? 0 60712. , t? 0 60713. |pi||i|+|sx||r| 10.2.3.0.a? 0 60714. , 10.2.3.3.u? 0 60715. , 10.2.3.4.s? 0 60716. , 10.2.3.5.e, f * 0 60717. |pi||i|+*|r| 10.2.3.0.a? 0 60718. , 10.2.3.3.u? 0 60719. , 10.2.3.4.s? 0 60720. , 10.2.3.5.e, f? 0 60721. |pi||i|&|r| 10.2.3.0.a? 0 60722. , 10.2.3.2.b? 0 60723. , 10.2.3.8.d * 0 60724. |pi||i||and||r| 10.2.3.0.a? 0 60725. , 10.2.3.2.b? 0 60726. , 10.2.3.8.d? 0 60727. |pi||i||box||r| 10.2.3.0.a? 0 60728. , 10.2.3.8.k? 0 60729. , 10.2.3.9.b? 0 60730. |pi||i||clg||r| 10.2.3.0.a? 0 60731. , 10.2.3.1.c? 0 60732. , e? 0 60733. |pi||i||dwn||r| 10.2.3.0.a? 0 60734. , 10.2.3.8.h? 0 60735. |pi||i||flr||r| 10.2.3.0.a? 0 60736. , 10.2.3.1.b? 0 60737. , d? 0 60738. , 10.2.3.4.r? 0 60739. |pi||i||sge||r| 10.2.3.0.a? 0 60740. , 10.2.3.3.e? 0 60741. , 10.2.3.4.e? 0 60742. , 10.2.3.5.c? 0 60743. , d? 0 60744. , 10.2.3.6.a? 0 60745. , 10.2.3.8.f? 0 60746. , 10.2.3.9.a? 0 60747. , 10.2.3.10.e? 0 60748. , g? 0 60749. , h? 0 60750. |pi||i||le||r| 10.2.3.0.a? 0 60751. , 10.2.3.3.b? 0 60752. , 10.2.3.4.b? 0 60753. , 10.2.3.5.c? 0 60754. , d? 0 60755. , 10.2.3.6.a? 0 60756. , 10.2.3.8.e? 0 60757. , 10.2.3.9.a? 0 60758. , 10.2.3.10.b? 0 60759. , g? 0 60760. , h? 0 60761. |pi||i||ne||r| 10.2.3.0.a? 0 60762. , 10.2.3.2.e? 0 60763. , 10.2.3.3.d? 0 60764. , 10.2.3.4.d? 0 60765. , 10.2.3.5.c? 0 60766. , d? 0 60767. , 10.2.3.6.a? 0 60768. , 10.2.3.7.g? 0 60769. , u? 0 60770. , v? 0 60771. , w? 0 60772. , x? 0 60773. , 10.2.3.8.b? 0 60774. , 10.2.3.9.a? 0 60775. , 10.2.3.10.d? 0 60776. , g? 0 60777. , h? 0 60778. |pi||i||or||r| 10.2.3.0.a? 0 60779. , 10.2.3.2.a? 0 60780. , 10.2.3.8.c? 0 60781. |pi||i||tip||r| 10.2.3.0.a? 0 60782. , 10.2.3.3.u? 0 60783. , 10.2.3.4.s? 0 60784. , 10.2.3.5.e? 0 60785. , f? 0 60786. |pi||i||sq||r| 10.2.3.0.a? 0 60787. , 10.2.3.3.m? 0 60788. |pi||i||sq||sx||r| 10.2.3.0.a? 0 60789. , 10.2.3.3.n? 0 60790. |pi||i||sq||sx||bec||r| 10.2.3.0.a? 0 60791. , 10.2.3.11.k? 0 60792. |pi||i||sq|*|r| 10.2.3.0.a? 0 60793. , 10.2.3.3.n? 0 60794. |pi||i||sq|*|bec||r| 10.2.3.0.a? 0 60795. , 10.2.3.11.k? 0 60796. |pi||i||sq||bec||r| 10.2.3.0.a? 0 60797. , 10.2.3.11.j? 0 60798. |pi||i||sx||r| 10.2.3.0.a? 0 60799. , 10.2.3.3.l? 0 60800. , 10.2.3.4.l? 0 60801. , 10.2.3.5.a? 0 60802. , b? 0 60803. , 10.2.3.7.l? 0 60804. , p? 0 60805. , q? 0 60806. , r? 0 60807. , s? 0 60808. , 10.2.3.10.l? 0 60809. , m? 0 60810. , n? 0 60811. , o? 0 60812. |pi||i||sx||bec||r| 10.2.3.0.a? 0 60813. , 10.2.3.11.g? 0 60814. , h? 0 60815. , i? 0 60816. , n? 0 60817. , o? 0 60818. , p? 0 60819. , u? 0 60820. |pi||i||til||r| 10.2.3.2.c? 0 60821. , 10.2.3.8.m? 0 60822. |pi||i||up||r| 10.2.3.0.a? 0 60823. , 10.2.3.3.p? 0 60824. , 10.2.3.5.g? 0 60825. , 10.2.3.7.t? 0 60826. , 10.2.3.8.g? 0 60827. |pi||i|*|r| 10.2.3.0.a? 0 60828. , 10.2.3.3.l? 0 60829. , 10.2.3.4.l? 0 60830. , 10.2.3.5.a? 0 60831. , b? 0 60832. , 10.2.3.7.l? 0 60833. , p? 0 60834. , q? 0 60835. , r? 0 60836. , s? 0 60837. , 10.2.3.10.l? 0 60838. , m? 0 60839. , n? 0 60840. , o? 0 60841. |pi||i|**|r| 10.2.3.0.a? 0 60842. , 10.2.3.3.p? 0 60843. , 10.2.3.5.g? 0 60844. , 10.2.3.7.t? 0 60845. |pi||i|*|bec||r| 10.2.3.0.a? 0 60846. , 10.2.3.11.g? 0 60847. , h? 0 60848. , i? 0 60849. , n? 0 60850. , o? 0 60851. , p? 0 60852. , u? 0 60853. |pi||i|~_|r| 10.2.3.2.c? 0 60854. , 10.2.3.8.m? 0 60855. |pi||i||mi||r| 10.2.3.0.a? 0 60856. , 10.2.3.3.g? 0 60857. , h? 0 60858. , 10.2.3.4.g? 0 60859. , h? 0 60860. , 10.2.3.5.a? 0 60861. , b? 0 60862. , 10.2.3.7.h? 0 60863. , i? 0 60864. , p? 0 60865. , q? 0 60866. , r? 0 60867. , s? 0 60868. |pi||i||mi||bec||r| 10.2.3.0.a? 0 60869. , 10.2.3.11.a? 0 60870. , b? 0 60871. , c? 0 60872. , n? 0 60873. , o? 0 60874. , p? 0 60875. |pi||i|/|r| 10.2.3.0.a? 0 60876. , 10.2.3.3.o? 0 60877. , 10.2.3.4.m? 0 60878. , 10.2.3.5.a? 0 60879. , b? 0 60880. , 10.2.3.7.m? 0 60881. , p? 0 60882. , q? 0 60883. , r? 0 60884. , s? 0 60885. |pi||i|/|bec||r| 10.2.3.0.a? 0 60886. , 10.2.3.11.l? 0 60887. , m? 0 60888. , n? 0 60889. , o? 0 60890. , p? 0 60891. |pi||i|/|uqe||r| 10.2.3.0.a? 0 60892. , 10.2.3.2.e? 0 60893. , 10.2.3.3.d? 0 60894. , 10.2.3.4.d? 0 60895. , 10.2.3.5.c? 0 60896. , d? 0 60897. , 10.2.3.6.a? 0 60898. , 10.2.3.7.g? 0 60899. , u? 0 60900. , v? 0 60901. , w? 0 60902. , x? 0 60903. , 10.2.3.8.b? 0 60904. , 10.2.3.9.a? 0 60905. , 10.2.3.10.d? 0 60906. , g? 0 60907. , h? 0 60908. |pi||i|%|r| 10.2.3.0.a? 0 60909. , 10.2.3.3.m? 0 60910. |pi||i|%|sx||r| 10.2.3.0.a? 0 60911. , 10.2.3.3.n? 0 60912. |pi||i|%|sx||bec||r| 10.2.3.0.a, 10.2.3.11.k * 0 60913. |pi||i|%*|r| 10.2.3.0.a? 0 60914. , 10.2.3.3.n? 0 60915. |pi||i|%*|bec||r| 10.2.3.0.a? 0 60916. , 10.2.3.11.k? 0 60917. |pi||i|%|bec||r| 10.2.3.0.a? 0 60918. , 10.2.3.11.j? 0 60919. |pi||i|>|r| 10.2.3.0.a? 0 60920. , 10.2.3.3.f? 0 60921. , 10.2.3.4.f? 0 60922. , 10.2.3.5.c? 0 60923. , d? 0 60924. , 10.2.3.6.a? 0 60925. , 10.2.3.9.a? 0 60926. , 10.2.3.10.f? 0 60927. , g? 0 60928. , h? 0 60929. |pi||i|>|uqe||r| 10.2.3.0.a? 0 60930. , 10.2.3.3.e? 0 60931. , 10.2.3.4.e? 0 60932. , 10.2.3.5.c? 0 60933. , d? 0 60934. , 10.2.3.6.a? 0 60935. , 10.2.3.8.f? 0 60936. , 10.2.3.9.a? 0 60937. , 10.2.3.10.e? 0 60938. , g? 0 60939. , h? 0 60940. |pi||i||uqe||r| 10.2.3.0.a? 0 60941. , 10.2.3.2.d? 0 60942. , 10.2.3.3.c? 0 60943. , 10.2.3.4.c? 0 60944. , 10.2.3.5.c? 0 60945. , d? 0 60946. , 10.2.3.6.a? 0 60947. , 10.2.3.7.f? 0 60948. , u? 0 60949. , v? 0 60950. , w? 0 60951. , x? 0 60952. , 10.2.3.8.a? 0 60953. , 10.2.3.9.a? 0 60954. , 10.2.3.10.c? 0 60955. , g? 0 60956. , h? 0 60957. |pi||i|ABS|r| 10.2.1.n? 0 60958. , 10.2.3.2.f? 0 60959. , 10.2.3.3.k? 0 60960. , 10.2.3.4.k? 0 60961. , 10.2.3.7.c? 0 60962. , 10.2.3.8.i? 0 60963. |pi||i|AND|r| 10.2.3.0.a? 0 60964. , 10.2.3.2.b? 0 60965. , 10.2.3.8.d? 0 60966. |pi||i|ARG|r| 10.2.3.7.d? 0 60967. |pi||i|BIN|r| 10.2.3.8.j? 0 60968. |pi||i|BITS|r| 10.2.2.g? 0 60969. |pi||i|BOOL|r| 10.2.2.b? 0 60970. |pi||i|BYTES|r| 10.2.2.h? 0 60971. |pi||i|CHANNEL|r| 10.3.1.2.a? 0 60972. |pi||i|CHAR|r| 10.2.2.e? 0 60973. |pi||i|COMPL|r| 10.2.2.f? 0 60974. |pi||i|CONJ|r| 10.2.3.7.e? 0 60975. |pi||i|DIVAB|r| 10.2.3.0.a? 0 60976. , 10.2.3.11.l? 0 60977. , m? 0 60978. , n? 0 60979. , o? 0 60980. , p? 0 60981. |pi||i|DOWN|r| 10.2.3.0.a? 0 60982. , 10.2.3.8.h? 0 60983. , 10.2.4.d? 0 60984. |pi||i|ELEM|r| 10.2.3.0.a? 0 60985. , 10.2.3.8.k? 0 60986. , 10.2.3.9.b? 0 60987. |pi||i|ENTIER|r| 10.2.3.4.r? 0 60988. |pi||i|EQ|r| 10.2.3.0.a? 0 60989. , 10.2.3.2.d? 0 60990. , 10.2.3.3.c? 0 60991. , 10.2.3.4.c? 0 60992. , 10.2.3.5.c? 0 60993. , d? 0 60994. , 10.2.3.6.a? 0 60995. , 10.2.3.7.f? 0 60996. , u? 0 60997. , v? 0 60998. , w? 0 60999. , x? 0 61000. , 10.2.3.8.a? 0 61001. , 10.2.3.9.a? 0 61002. , 10.2.3.10.c? 0 61003. , g? 0 61004. , h? 0 61005. |pi||i|FILE|r| 10.3.1.3.a? 0 61006. |pi||i|FORMAT|r| 10.3.5.a? 0 61007. |pi||i|GE|r| 10.2.3.0.a? 0 61008. , 10.2.3.3.e? 0 61009. , 10.2.3.4.e? 0 61010. , 10.2.3.5.c? 0 61011. , d? 0 61012. , 10.2.3.6.a? 0 61013. , 10.2.3.8.f? 0 61014. , 10.2.3.9.a? 0 61015. , 10.2.3.10.e? 0 61016. , g? 0 61017. , h? 0 61018. |pi||i|GT|r| 10.2.3.0.a? 0 61019. , 10.2.3.3.f? 0 61020. , 10.2.3.4.f? 0 61021. , 10.2.3.5.c? 0 61022. , d? 0 61023. , 10.2.3.6.a? 0 61024. , 10.2.3.9.a? 0 61025. , 10.2.3.10.f? 0 61026. , g? 0 61027. , h? 0 61028. |pi||i|I|r| 10.2.3.0.a? 0 61029. , 10.2.3.3.u? 0 61030. , 10.2.3.4.s? 0 61031. , 10.2.3.5.e? 0 61032. , f? 0 61033. |pi||i|IM|r| 10.2.3.7.b? 0 61034. |pi||i|INT|r| 10.2.2.c? 0 61035. |pi||i|LE|r| 10.2.3.0.a? 0 61036. , 10.2.3.3.b? 0 61037. , 10.2.3.4.b? 0 61038. , 10.2.3.5.c? 0 61039. , d? 0 61040. , 10.2.3.6.a? 0 61041. , 10.2.3.8.e? 0 61042. , 10.2.3.9.a? 0 61043. , 10.2.3.10.b? 0 61044. , g? 0 61045. , h? 0 61046. |pi||i|LENG|r| 10.2.3.3.q? 0 61047. , 10.2.3.4.n? 0 61048. , 10.2.3.7.n? 0 61049. , 10.2.3.8.n? 0 61050. , 10.2.3.9.d? 0 61051. |pi||i|LEVEL|r| 10.2.4.b? 0 61052. , c? 0 61053. |pi||i|LT|r| 10.2.3.0.a? 0 61054. , 10.2.3.3.a? 0 61055. , 10.2.3.4.a? 0 61056. , 10.2.3.5.c? 0 61057. , d? 0 61058. , 10.2.3.6.a? 0 61059. , 10.2.3.9.a? 0 61060. , 10.2.3.10.a? 0 61061. , g? 0 61062. , h? 0 61063. |pi||i|LWB|r| 10.2.3.0.a? 0 61064. , 10.2.3.1.b? 0 61065. , d? 0 61066. |pi||i|MINUSAB|r| 10.2.3.0.a? 0 61067. , 10.2.3.11.a? 0 61068. , b? 0 61069. , c? 0 61070. , n? 0 61071. , o? 0 61072. , p? 0 61073. |pi||i|MOD|r| 10.2.3.0.a? 0 61074. , 10.2.3.3.n? 0 61075. |pi||i|MODAB|r| 10.2.3.0.a? 0 61076. , 10.2.3.11.k? 0 61077. |pi||i|NE|r| 10.2.3.0.a? 0 61078. , 10.2.3.2.e? 0 61079. , 10.2.3.3.d? 0 61080. , 10.2.3.4.d? 0 61081. , 10.2.3.5.c? 0 61082. , d? 0 61083. , 10.2.3.6.a? 0 61084. , 10.2.3.7.g? 0 61085. , u? 0 61086. , v? 0 61087. , w? 0 61088. , x? 0 61089. , 10.2.3.8.b? 0 61090. , 10.2.3.9.a? 0 61091. , 10.2.3.10.d? 0 61092. , g? 0 61093. , h? 0 61094. |pi||i|NOT|r| 10.2.3.2.c? 0 61095. , 10.2.3.8.m? 0 61096. |pi||i|ODD|r| 10.2.3.3.s? 0 61097. |pi||i|OR|r| 10.2.3.0.a? 0 61098. , 10.2.3.2.a? 0 61099. , 10.2.3.8.c? 0 61100. |pi||i|OVER|r| 10.2.3.0.a? 0 61101. , 10.2.3.3.m? 0 61102. |pi||i|OVERAB|r| 10.2.3.0.a? 0 61103. , 10.2.3.11.j? 0 61104. |pi||i|PLUSAB|r| 10.2.3.0.a? 0 61105. , 10.2.3.11.d? 0 61106. , e? 0 61107. , f? 0 61108. , n? 0 61109. , o? 0 61110. , p? 0 61111. , q? 0 61112. , s? 0 61113. |pi||i|PLUSTO|r| 10.2.3.0.a? 0 61114. , 10.2.3.11.r? 0 61115. , t? 0 61116. |pi||i|RE|r| 10.2.3.7.a? 0 61117. |pi||i|REAL|r| 10.2.2.d? 0 61118. |pi||i|REPR|r| 10.2.1.o? 0 61119. |pi||i|ROUND|r| 10.2.3.4.p? 0 61120. |pi||i|SEMA|r| 10.2.4.a? 0 61121. |pi||i|SHL|r| 10.2.3.0.a? 0 61122. , 10.2.3.8.g? 0 61123. |pi||i|SHORTEN|r| 10.2.3.3.r? 0 61124. , 10.2.3.4.o? 0 61125. , 10.2.3.7.o? 0 61126. , 10.2.3.8.o? 0 61127. , 10.2.3.9.e? 0 61128. |pi||i|SHR|r| 10.2.3.0.a? 0 61129. , 10.2.3.8.h? 0 61130. |pi||i|SIGN|r| 10.2.3.3.t? 0 61131. , 10.2.3.4.q? 0 61132. |pi||i|STRING|r| 10.2.2.i? 0 61133. |pi||i|TIMESAB|r| 10.2.3.0.a? 0 61134. , 10.2.3.11.g? 0 61135. , h? 0 61136. , i? 0 61137. , n? 0 61138. , o? 0 61139. , p? 0 61140. , u? 0 61141. |pi||i|UP|r| 10.2.3.0.a? 0 61142. , 10.2.3.3.p? 0 61143. , 10.2.3.5.g? 0 61144. , 10.2.3.7.t? 0 61145. , 10.2.3.8.g? 0 61146. , 10.2.4.e? 0 61147. |pi||i|UPB|r| 10.2.3.0.a? 0 61148. , 10.2.3.1.c? 0 61149. , e? 0 61150. |pi||i|VOID|r| 10.2.2.a? 0 61151. |pi||i|arccos|r| 10.2.3.12.f? 0 61152. |pi||i|arcsin|r| 10.2.3.12.h? 0 61153. |pi||i|arctan|r| 10.2.3.12.j? 0 61154. |pi||i|associate|r| 10.3.1.4.e? 0 61155. |pi||i|backspace|r| 10.3.1.6.b? 0 61156. |pi||i|bin possible|r| 10.3.1.3.d? 0 61157. |pi||i|bits lengths|r| 10.2.1.h? 0 61158. |pi||i|bits pack|r| 10.2.3.8.l? 0 61159. |pi||i|bits shorths|r| 10.2.1.i? 0 61160. |pi||i|bits width|r| 10.2.1.j? 0 61161. |pi||i|blank|r| 10.2.1.u? 0 61162. |pi||i|bytes lengths|r| 10.2.1.k? 0 61163. |pi||i|bytes pack|r| 10.2.3.9.c? 0 61164. |pi||i|bytes shorths|r| 10.2.1.l? 0 61165. |pi||i|bytes width|r| 10.2.1.m? 0 61166. |pi||i|chan|r| 10.3.1.3.i? 0 61167. |pi||i|char in string|r| 10.3.2.1.l? 0 61168. |pi||i|char number|r| 10.3.1.5.a? 0 61169. |pi||i|close|r| 10.3.1.4.n? 0 61170. |pi||i|compressible|r| 10.3.1.3.e? 0 61171. |pi||i|cos|r| 10.2.3.12.e? 0 61172. |pi||i|create|r| 10.3.1.4.c? 0 61173. |pi||i|errorchar|r| 10.2.1.t? 0 61174. |pi||i|estab possible|r| 10.3.1.2.c? 0 61175. |pi||i|establish|r| 10.3.1.4.b? 0 61176. |pi||i|exp|r| 10.2.3.12.c? 0 61177. |pi||i|exp width|r| 10.3.2.1.o? 0 61178. |pi||i|fixed|r| 10.3.2.1.c? 0 61179. |pi||i|flip|r| 10.2.1.r? 0 61180. |pi||i|float|r| 10.3.2.1.d? 0 61181. |pi||i|flop|r| 10.2.1.s? 0 61182. |pi||i|get|r| 10.3.3.2.a? 0 61183. |pi||i|get bin|r| 10.3.6.2.a? 0 61184. |pi||i|get possible|r| 10.3.1.3.b? 0 61185. |pi||i|getf|r| 10.3.5.2.a? 0 61186. |pi||i|int shorths|r| 10.2.1.b? 0 61187. |pi||i|int width|r| 10.3.2.1.m? 0 61188. |pi||i|last random|r| 10.5.1.a? 0 61189. |pi||i|line number|r| 10.3.1.5.b? 0 61190. |pi||i|ln|r| 10.2.3.12.d? 0 61191. |pi||i|lock|r| 10.3.1.4.o? 0 61192. |pi||i|make conv|r| 10.3.1.3.j? 0 61193. |pi||i|make term|r| 10.3.1.3.k? 0 61194. |pi||i|max abs char|r| 10.2.1.p? 0 61195. |pi||i|max int|r| 10.2.1.c? 0 61196. |pi||i|max real|r| 10.2.1.f? 0 61197. |pi||i|newline|r| 10.3.1.6.c? 0 61198. |pi||i|newpage|r| 10.3.1.6.d? 0 61199. |pi||i|next random|r| 10.2.3.12.k? 0 61200. |pi||i|null character|r| 10.2.1.q? 0 61201. |pi||i|on char error|r| 10.3.1.3.r? 0 61202. |pi||i|on format end|r| 10.3.1.3.p? 0 61203. |pi||i|on line end|r| 10.3.1.3.o? 0 61204. |pi||i|on logical file end|r| 10.3.1.3.l? 0 61205. |pi||i|on page end|r| 10.3.1.3.n? 0 61206. |pi||i|on physical file end|r| 10.3.1.3.m? 0 61207. |pi||i|on value error|r| 10.3.1.3.q? 0 61208. |pi||i|open|r| 10.3.1.4.d? 0 61209. |pi||i|page number|r| 10.3.1.5.c? 0 61210. |pi||i|pi|r| 10.2.3.12.a? 0 61211. |pi||i|print|r| 10.5.1.d? 0 61212. |pi||i|printf|r| 10.5.1.f? 0 61213. |pi||i|put|r| 10.3.3.1.a? 0 61214. |pi||i|put bin|r| 10.3.6.1.a? 0 61215. |pi||i|put possible|r| 10.3.1.3.c? 0 61216. |pi||i|putf|r| 10.3.5.1.a? 0 61217. |pi||i|random|r| 10.5.1.b? 0 61218. |pi||i|read|r| 10.5.1.e? 0 61219. |pi||i|read bin|r| 10.5.1.i? 0 61220. |pi||i|readf|r| 10.5.1.g? 0 61221. |pi||i|real lengths|r| 10.2.1.d? 0 61222. |pi||i|real shorths|r| 10.2.1.e? 0 61223. |pi||i|real width|r| 10.3.2.1.n? 0 61224. |pi||i|reidf|r| 10.3.1.3.s? 0 61225. |pi||i|reidf possible|r| 10.3.1.3.h? 0 61226. |pi||i|reset|r| 10.3.1.6.j? 0 61227. |pi||i|reset possible|r| 10.3.1.3.f? 0 61228. |pi||i|scratch|r| 10.3.1.4.p? 0 61229. |pi||i|set|r| 10.3.1.6.i? 0 61230. |pi||i|set char number|r| 10.3.1.6.k? 0 61231. |pi||i|set possible|r| 10.3.1.3.g? 0 61232. |pi||i|sin|r| 10.2.3.12.g? 0 61233. |pi||i|small real|r| 10.2.1.g? 0 61234. |pi||i|space|r| 10.3.1.6.a? 0 61235. |pi||i|sqrt|r| 10.2.3.12.b? 0 61236. |pi||i|stand back|r| 10.5.1.c? 0 61237. |pi||i|stand back channel|r| 10.3.1.2.g? 0 61238. |pi||i|stand in|r| 10.5.1.c? 0 61239. |pi||i|stand in channel|r| 10.3.1.2.e? 0 61240. |pi||i|stand out|r| 10.5.1.c? 0 61241. |pi||i|stand out channel|r| 10.3.1.2.f? 0 61242. |pi||i|standconv|r| 10.3.1.2.d? 0 61243. |pi||i|stop|r| 10.5.2.a * 0 61244. |pi||i|tan|r| 10.2.3.12.i? 0 61245. |pi||i|whole|r| 10.3.2.1.b? 0 61246. |pi||i|write|r| 10.5.1.d? 0 61247. |pi||i|write bin|r| 10.5.1.h? 0 61248. |pi||i|writef|r| 10.5.1.f? 0 61249. |pi||i||u|L |i|BITS|r| 10.2.2.g? 0 61250. |pi||i||u|L |i|BYTES|r| 10.2.2.h? 0 61251. |pi||i||u|L |i|COMPL|r| 10.2.2.f? 0 61252. |pi||i||u|L |i|INT|r| 10.2.2.c? 0 61253. |pi||i||u|L |i|REAL|r| 10.2.2.d? 0 61254. |pi||i||u|l |i|arccos|r| 10.2.3.12.f? 0 61255. |pi||i||u|l |i|arcsin|r| 10.2.3.12.h? 0 61256. |pi||i||u|l |i|arctan|r| 10.2.3.12.j? 0 61257. |pi||i||u|l |i|bits pack|r| 10.2.3.8.l? 0 61258. |pi||i||u|l |i|bits width|r| 10.2.1.j? 0 61259. |pi||i||u|l |i|bytes pack|r| 10.2.3.9.c? 0 61260. |pi||i||u|l |i|bytes width|r| 10.2.1.m? 0 61261. |pi||i||u|l |i|cos|r| 10.2.3.12.e? 0 61262. |pi||i||u|l |i|exp|r| 10.2.3.12.c? 0 61263. |pi||i||u|l |i|exp width|r| 10.3.2.1.o? 0 61264. |pi||i||u|l |i|int width|r| 10.3.2.1.m? 0 61265. |pi||i||u|l |i|last random|r| 10.5.1.a? 0 61266. |pi||i||u|l |i|ln|r| 10.2.3.12.d? 0 61267. |pi||i||u|l |i|max int|r| 10.2.1.c? 0 61268. |pi||i||u|l |i|max real|r| 10.2.1.f? 0 61269. |pi||i||u|l |i|next random|r| 10.2.3.12.k? 0 61270. |pi||i||u|l |i|pi|r| 10.2.3.12.a? 0 61271. |pi||i||u|l |i|random|r| 10.5.1.b? 0 61272. |pi||i||u|l |i|real width|r| 10.3.2.1.n? 0 61273. |pi||i||u|l |i|sin|r| 10.2.3.12.g? 0 61274. |pi||i||u|l |i|small real|r| 10.2.1.g? 0 61275. |pi||i||u|l |i|sqrt|r| 10.2.3.12.b? 0 61276. |pi||i||u|l |i|tan|r| 10.2.3.12.i? 0 61277. |pi||i||ra| BEYOND|r| 10.3.1.1.d? 0 61278. |pi||i||ra| BFILE|r| 10.3.1.1.e? 0 61279. |pi||i||ra| BOOK|r| 10.3.1.1.a? 0 61280. |pi||i||ra| COLLECTION|r| 10.3.5.a? 0 61281. |pi||i||ra| COLLITEM|r| 10.3.5.a? 0 61282. |pi||i||ra| CONV|r| 10.3.1.2.b? 0 61283. |pi||i||ra| CPATTERN|r| 10.3.5.a? 0 61284. |pi||i||ra| FLEXTEXT|r| 10.3.1.1.b? 0 61285. |pi||i||ra| FPATTERN|r| 10.3.5.a? 0 61286. |pi||i||ra| FRAME|r| 10.3.5.a? 0 61287. |pi||i||ra| GPATTERN|r| 10.3.5.a? 0 61288. |pi||i||ra| INSERTION|r| 10.3.5.a? 0 61289. |pi||i||ra| INTYPE|r| 10.3.2.2.d? 0 61290. |pi||i||ra| NUMBER|r| 10.3.2.1.a? 0 61291. |pi||i||ra| OUTTYPE|r| 10.3.2.2.b? 0 61292. |pi||i||ra| PATTERN|r| 10.3.5.a? 0 61293. |pi||i||ra| PICTURE|r| 10.3.5.a? 0 61294. |pi||i||ra| PIECE|r| 10.3.5.a? 0 61295. |pi||i||ra| POS|r| 10.3.1.1.c? 0 61296. |pi||i||ra| ROWS|r| 10.2.3.1.a? 0 61297. |pi||i||ra| SFRAME|r| 10.3.5.e? 0 61298. |pi||i||ra| SIMPLIN|r| 10.3.2.2.c? 0 61299. |pi||i||ra| SIMPLOUT|r| 10.3.2.2.a? 0 61300. |pi||i||ra| SINSERT|r| 10.3.5.c? 0 61301. |pi||i||ra| STRAIGHTIN|r| 10.3.2.3.b? 0 61302. |pi||i||ra| STRAIGHTOUT|r| 10.3.2.3.a? 0 61303. |pi||i||ra| TEXT|r| 10.3.1.1.b? 0 61304. |pi||i||ra| alignment|r| 10.3.5.i? 0 61305. |pi||i||ra| associate format|r| 10.3.5.k? 0 61306. |pi||i||ra| bfileprotect|r| 10.3.1.1.h? 0 61307. |pi||i||ra| book bounds|r| 10.3.1.5.e? 0 61308. |pi||i||ra| chainbfile|r| 10.3.1.1.f? 0 61309. |pi||i||ra| char dig|r| 10.3.2.1.k? 0 61310. |pi||i||ra| check pos|r| 10.3.3.2.c? 0 61311. |pi||i||ra| current pos|r| 10.3.1.5.d? 0 61312. |pi||i||ra| dig char|r| 10.3.2.1.h? 0 61313. |pi||i||ra| do fpattern|r| 10.3.5.j? 0 61314. |pi||i||ra| edit string|r| 10.3.5.1.b? 0 61315. |pi||i||ra| false|r| 10.3.1.4.i? 0 61316. |pi||i||ra| file available|r| 10.3.1.4.f? 0 61317. |pi||i||ra| from bin|r| 10.3.6.b? 0 61318. |pi||i||ra| get char|r| 10.3.3.2.b? 0 61319. |pi||i||ra| get good file|r| 10.3.1.6.g * 0 61320. |pi||i||ra| get good line|r| 10.3.1.6.e * 0 61321. |pi||i||ra| get good page|r| 10.3.1.6.f * 0 61322. |pi||i||ra| get insertion|r| 10.3.5.h? 0 61323. |pi||i||ra| get next picture|r| 10.3.5.b? 0 61324. |pi||i||ra| gremlins|r| 10.4.1.a? 0 61325. |pi||i||ra| idf ok|r| 10.3.1.4.g? 0 61326. |pi||i||ra| indit string|r| 10.3.5.2.b? 0 61327. |pi||i||ra| line ended|r| 10.3.1.5.f? 0 61328. |pi||i||ra| lockedbfile|r| 10.3.1.1.g? 0 61329. |pi||i||ra| logical file ended|r| 10.3.1.5.i? 0 61330. |pi||i||ra| match|r| 10.3.1.4.h? 0 61331. |pi||i||ra| next pos|r| 10.3.3.1.c? 0 61332. |pi||i||ra| page ended|r| 10.3.1.5.g? 0 61333. |pi||i||ra| physical file ended|r| 10.3.1.5.h? 0 61334. |pi||i||ra| put char|r| 10.3.3.1.b? 0 61335. |pi||i||ra| put insertion|r| 10.3.5.g? 0 61336. |pi||i||ra| set bin mood|r| 10.3.1.4.m? 0 61337. |pi||i||ra| set char mood|r| 10.3.1.4.l? 0 61338. |pi||i||ra| set mood|r| 10.3.1.6.h * 0 61339. |pi||i||ra| set read mood|r| 10.3.1.4.k? 0 61340. |pi||i||ra| set write mood|r| 10.3.1.4.j? 0 61341. |pi||i||ra| standardize|r| 10.3.2.1.g? 0 61342. |pi||i||ra| staticize frames|r| 10.3.5.f? 0 61343. |pi||i||ra| staticize insertion|r| 10.3.5.d? 0 61344. |pi||i||ra| string to |u|l |i|int|r| 10.3.2.1.i? 0 61345. |pi||i||ra| string to |u|l |i|real|r| 10.3.2.1.j? 0 61346. |pi||i||ra| subfixed|r| 10.3.2.1.f? 0 61347. |pi||i||ra| subwhole|r| 10.3.2.1.e? 0 61348. |pi||i||ra| to bin|r| 10.3.6.a? 0 61349. |pi||i||ra| undefined|r| 10.3.1.4.a? 0 61350. |pi||i||ra| |u|l |i|standardize|r| 10.3.2.1.g? 0 61351. * 0 61352. |np||h|12.5. Alphabetic listing of metaproduction rules|b|? 0 61353. * 0 61354. |e||pb|ABC|co||r|942L|b||cc| :: a ; b ; c ; d ; e ; f ; g ; h ; i ; j ; * 0 61355. * 0 61356. k ; l ; m ; n ; o ; p ; q ; r ; s ; t ; u ; v ; w ; x ; y ; z. * 0 61357. |p|ADIC|co||r|542C|b||cc| :: DYADIC ; MONADIC. * 0 61358. |p|ALPHA|co||r|13B|b||cc| :: a ; b ; c ; d ; e ; f ; g ; h ; i ; j ; k ; l ; m ; n ; o ; p ; * 0 61359. q ; r ; s ; t ; u ; v ; w ; x ; y ; z. * 0 61360. |p|BECOMESETY|co||r|942J|b||cc| :: cum becomes ; cum assigns to ; EMPTY. * 0 61361. |p|BITS|co||r|65A|b||cc| :: structured with$#row of boolean field SITHETY letter aleph mode. * 0 61362. |p|BYTES|co||r|65B|b||cc| :: structured with$#row of character field SITHETY letter aleph mode. * 0 61363. |p|CASE|co||r|34B|b||cc| :: choice using integral ; choice using UNITED. * 0 61364. |p|CHOICE|co||r|34A|b||cc| :: choice using boolean ; CASE. * 0 61365. |p|COLLECTION|co||r|A341C|b||cc| :: union of PICTURE COLLITEM mode. * 0 61366. |p|COLLITEM|co||r|A341D|b||cc| :: structured with INSERTION field letter i digit one$#? 0 61367. procedure yielding integral field letter r letter e letter p$#integral field * 0 61368. letter p$#INSERTION field letter i digit two mode.? 0 61369. |p|COMARK|co||r|A341N|b||cc| :: zero ; digit ; character. * 0 61370. |p|COMMON|co||r|41A|b||cc| :: mode ; priority ; MODINE identity ; * 0 61371. reference to MODINE variable ; MODINE operation ; PARAMETER ; MODE FIELDS. * 0 61372. |p|COMORF|co||r|61G|b||cc| :: NEST assignation ; NEST identity relation ; * 0 61373. NEST LEAP generator ; NEST cast ; NEST denoter ; NEST format text. * 0 61374. |p|CPATTERN|co||r|A341I|b||cc| :: structured with INSERTION field letter i$#? 0 61375. integral field letter t letter y letter p letter e$#row of INSERTION field letter c mode. * 0 61376. |p|DEC|co||r|123E|b||cc| :: MODE TAG ; priority PRIO TAD ; MOID TALLY TAB ; DUO TAD ; MONO TAM. * 0 61377. |p|DECS|co||r|123D|b||cc| :: DEC ; DECS DEC. * 0 61378. |p|DECSETY|co||r|123C|b||cc| :: DECS ; EMPTY. * 0 61379. |p|DEFIED|co||r|48B|b||cc| :: defining ; applied. * 0 61380. |p|DIGIT|co||r|942C|b||cc| :: digit zero ; digit one ; digit two ; digit three ; * 0 61381. digit four ; digit five ; digit six ; digit seven ; digit eight ; digit nine. * 0 61382. |p|DOP|co||r|942M*|b||cc| :: DYAD ; DYAD cum NOMAD. * 0 61383. |p|DUO|co||r|123H|b||cc| :: procedure with PARAMETER1 PARAMETER2 yielding MOID. * 0 61384. |p|DYAD|co||r|942G|b||cc| :: MONAD ; NOMAD. * 0 61385. |p|DYADIC|co||r|542A|b||cc| :: priority PRIO. * 0 61386. |p|EMPTY|co||r|12G|b||cc| :: . * 0 61387. |p|ENCLOSED|co||r|122A|b||cc| :: closed ; collateral ; parallel ; CHOICE ; loop. * 0 61388. |p|EXTERNAL|co||r|A1A|b||cc| :: standard ; library ; system ; particular. * 0 61389. |p|FIELD|co||r|12J|b||cc| :: MODE field TAG. * 0 61390. |p|FIELDS|co||r|12I|b||cc| :: FIELD ; FIELDS FIELD. * 0 61391. |p|FIRM|co||r|61B|b||cc| :: MEEK ; united to. * 0 61392. |p|FIVMAT|co||r|A341L|b||cc| :: mui definition of structured with row of$#? 0 61393. structured with integral field letter c letter p$#? 0 61394. integral field letter c letter o letter u letter n letter t$#? 0 61395. integral field letter b letter p row of union of structured$#? 0 61396. with union of PATTERN CPATTERN$#? 0 61397. structured with INSERTION field letter i$#procedure yielding mui application field$#? 0 61398. letter p letter f mode GPATTERN void mode field letter p$#? 0 61399. INSERTION field letter i mode COLLITEM mode field$#? 0 61400. letter c mode field letter aleph mode. * 0 61401. |p|FLEXETY|co||r|12K|b||cc| :: flexible ; EMPTY. * 0 61402. |p|FORM|co||r|61E|b||cc| :: MORF ; COMORF. * 0 61403. |p|FORMAT|co||r|A341A|b||cc| :: structured with row of PIECE field letter aleph mode. * 0 61404. |p|FPATTERN|co||r|A341J|b||cc| :: structured with INSERTION field letter i$#? 0 61405. procedure yielding FIVMAT field letter p letter f mode. * 0 61406. |p|FRAME|co||r|A341H|b||cc| :: structured with INSERTION field letter i$#? 0 61407. procedure yielding integral field letter r letter e letter p$#boolean field letter s letter u * 0 61408. letter p letter p$#character field letter m letter a letter r letter k$#letter e letter r mode. * 0 61409. |p|FROBYT|co||r|35A|b||cc| :: from ; by ; to. * 0 61410. |p|GPATTERN|co||r|A341K|b||cc| :: * 0 61411. structured with INSERTION field letter i$#row of procedure yielding integral field$#? 0 61412. letter s letter p letter e letter c mode. * 0 61413. |p|HEAD|co||r|73B|b||cc| :: * 0 61414. PLAIN ; PREF ; structured with ; FLEXETY ROWS of ; procedure with ; union of ; void. * 0 61415. |p|INDICATOR|co||r|48A|b||cc| :: identifier ; mode indication ; operator. * 0 61416. |p|INSERTION|co||r|A341E|b||cc| ::|g|#row of structured with procedure yielding integral field$#? 0 61417. letter r letter e letter p$#? 0 61418. union of row of character character mode field$#letter s letter a mode. * 0 61419. |p|INTREAL|co||r|12C|b||cc| :: SIZETY integral ; SIZETY real. * 0 61420. |p|LAB|co||r|123K|b||cc| :: label TAG. * 0 61421. |p|LABS|co||r|123J|b||cc| :: LAB ; LABS LAB. * 0 61422. |p|LABSETY|co||r|123I|b||cc| :: LABS ; EMPTY. * 0 61423. |p|LAYER|co||r|123B|b||cc| :: new DECSETY LABSETY. * 0 61424. |p|LEAP|co||r|44B|b||cc| :: local ; heap ; primal. * 0 61425. |p|LENGTH|co||r|65D|b||cc| :: letter l letter o letter n letter g. * 0 61426. |p|LENGTHETY|co||r|65F|b||cc| :: LENGTH LENGTHETY ; EMPTY. * 0 61427. |p|LETTER|co||r|942B|b||cc| :: * 0 61428. letter ABC ; letter aleph ; style TALLY letter ABC. * 0 61429. |p|LONGSETY|co||r|12E|b||cc| :: long LONGSETY ; EMPTY. * 0 61430. |p|MARK|co||r|A341M|b||cc| :: sign ; point ; exponent ; complex ; boolean. * 0 61431. |p|MEEK|co||r|61C|b||cc| :: unchanged from ; dereferenced to ; deprocedured to. * 0 61432. |p|MODE|co||r|12A|b||cc| :: PLAIN ; STOWED ; REF to MODE ; PROCEDURE ; UNITED ; * 0 61433. MU definition of MODE ; MU application. * 0 61434. |p|MODINE|co||r|44A|b||cc| :: MODE ; routine. * 0 61435. |p|MOID|co||r|12R|b||cc| :: MODE ; void. * 0 61436. |p|MOIDS|co||r|46C|b||cc| :: MOID ; MOIDS MOID. * 0 61437. |p|MOIDSETY|co||r|47C|b||cc| :: MOIDS ; EMPTY. * 0 61438. |p|MONADIC|co||r|542B|b||cc| :: priority iii iii iii i. * 0 61439. |p|MONAD|co||r|942H|b||cc| :: or ; and ; ampersand ; differs from ; * 0 61440. is at most ; is at least ; over ; percent ; window ; * 0 61441. floor ; ceiling ; plus i times ; not ; tilde ; down ; up ; plus ; minus ; style TALLY monad. * 0 61442. |p|MONO|co||r|123G|b||cc| :: procedure with PARAMETER yielding MOID. * 0 61443. |p|MOOD|co||r|12U|b||cc| :: * 0 61444. |e|PLAIN ; STOWED ; reference to MODE ; PROCEDURE ; void. * 0 61445. |p|MOODS|co||r|12T|b||cc| :: MOOD ; MOODS MOOD. * 0 61446. |p|MOODSETY|co||r|47B|b||cc| :: MOODS ; EMPTY. * 0 61447. |p|MORF|co||r|61F|b||cc| :: NEST selection ; NEST slice ; NEST routine text ; * 0 61448. NEST ADIC formula ; NEST call ; NEST applied identifier with TAG. * 0 61449. |p|MU|co||r|12V|b||cc| :: muTALLY. * 0 61450. |p|NEST|co||r|123A|b||cc| :: LAYER ; NEST LAYER. * 0 61451. |p|NOMAD|co||r|942I|b||cc| :: * 0 61452. is less than ; is greater than ; divided by ; equals ; times ; asterisk. * 0 61453. |p|NONPREF|co||r|71B|b||cc| :: PLAIN ; STOWED ; procedure with PARAMETERS yielding MOID ; UNITED ; void. * 0 61454. |p|NONPROC|co||r|67A|b||cc| :: PLAIN ; STOWED ; * 0 61455. REF to NONPROC ; procedure with PARAMETERS yielding MOID ; UNITED. * 0 61456. |p|NONSTOWED|co||r|47A|b||cc| :: PLAIN ; REF to MODE ; PROCEDURE ; UNITED ; void. * 0 61457. |p|NOTETY|co||r|13C|b||cc| :: NOTION ; EMPTY. * 0 61458. |p|NOTION|co||r|13A|b||cc| :: ALPHA ; NOTION ALPHA. * 0 61459. |p|NUMERAL|co||r|810B*|b||cc| :: * 0 61460. fixed point numeral ; variable point numeral ; floating point numeral. * 0 61461. |p|PACK|co||r|31B|b||cc| :: STYLE pack. * 0 61462. |p|PARAMETER|co||r|12Q|b||cc| :: MODE parameter. * 0 61463. |p|PARAMETERS|co||r|12P|b||cc| :: PARAMETER ; PARAMETERS PARAMETER. * 0 61464. |p|PARAMETY|co||r|12O|b||cc| :: with PARAMETERS ; EMPTY. * 0 61465. |p|PART|co||r|73E|b||cc| :: FIELD ; PARAMETER. * 0 61466. |p|PARTS|co||r|73D|b||cc| :: PART ; PARTS PART. * 0 61467. |p|PATTERN|co||r|A341G|b||cc| :: structured with$#integral field * 0 61468. letter t letter y letter p letter e$#row of FRAME field$#? 0 61469. letter f letter r letter a letter m letter e letter s mode. * 0 61470. |p|PICTURE|co||r|A341F|b||cc| :: structured with union of PATTERN CPATTERN$#? 0 61471. FPATTERN$#GPATTERN void mode field letter p$#INSERTION field letter i mode. * 0 61472. |p|PIECE|co||r|A341B|b||cc| :: structured with integral field letter c letter p$#? 0 61473. integral field letter c letter o letter u letter n letter t$#? 0 61474. integral field letter b letter p$#row of COLLECTION field letter c mode. * 0 61475. |p|PLAIN|co||r|12B|b||cc| :: INTREAL ; boolean ; character. * 0 61476. |p|PRAGMENT|co||r|92A|b||cc| :: pragmat ; comment. * 0 61477. |p|PRAM|co||r|45A|b||cc| :: DUO ; MONO. * 0 61478. |p|PREF|co||r|71A|b||cc| :: procedure yielding ; REF to. * 0 61479. |p|PREFSETY|co||r|71C*|b||cc| :: PREF PREFSETY ; EMPTY. * 0 61480. |p|PRIMARY|co||r|5D|b||cc| :: slice coercee ; call coercee ; cast coercee ; denoter coercee ; * 0 61481. format text coercee ; applied identifier with TAG coercee ; ENCLOSED clause. * 0 61482. |p|PRIO|co||r|123F|b||cc| :: * 0 61483. i ; ii ; iii ; iii i ; iii ii ; iii iii ; iii iii i ; iii iii ii ; iii iii iii. * 0 61484. |p|PROCEDURE|co||r|12N|b||cc| :: procedure PARAMETY yielding MOID. * 0 61485. |p|PROP|co||r|48E|b||cc| :: DEC ; LAB ; FIELD. * 0 61486. |p|PROPS|co||r|48D|b||cc| :: PROP ; PROPS PROP. * 0 61487. |p|PROPSETY|co||r|48C|b||cc| :: PROPS ; EMPTY. * 0 61488. |p|QUALITY|co||r|48F|b||cc| :: MODE ; MOID TALLY ; DYADIC ; label ; MODE field. * 0 61489. |p|RADIX|co||r|82A|b||cc| :: * 0 61490. radix two ; radix four ; radix eight ; radix sixteen. * 0 61491. |p|REF|co||r|12M|b||cc| :: reference ; transient reference. * 0 61492. |p|REFETY|co||r|531A|b||cc| :: REF to ; EMPTY. * 0 61493. |p|REFLEXETY|co||r|531B|b||cc| :: REF to ; REF to flexible ; EMPTY. * 0 61494. |p|ROWS|co||r|12L|b||cc| :: row ; ROWS row. * 0 61495. |p|ROWSETY|co||r|532A|b||cc| :: ROWS ; EMPTY. * 0 61496. |p|SAFE|co||r|73A|b||cc| :: * 0 61497. safe ; MU has MODE SAFE ; yin SAFE ; yang SAFE ; remember MOID1 MOID2 SAFE. * 0 61498. |p|SECONDARY|co||r|5C|b||cc| :: * 0 61499. |e|LEAP generator coercee ; selection coercee ; PRIMARY. * 0 61500. |p|SHORTH|co||r|65E|b||cc| :: letter s letter h letter o letter r letter t. * 0 61501. |p|SHORTHETY|co||r|65G|b||cc| :: SHORTH SHORTHETY ; EMPTY. * 0 61502. |p|SHORTSETY|co||r|12F|b||cc| :: short SHORTSETY ; EMPTY. * 0 61503. |p|SITHETY|co||r|65C|b||cc| :: LENGTH LENGTHETY ; SHORTH SHORTHETY ; EMPTY. * 0 61504. |p|SIZE|co||r|810A|b||cc| :: long ; short. * 0 61505. |p|SIZETY|co||r|12D|b||cc| :: long LONGSETY ; short SHORTSETY ; EMPTY. * 0 61506. |p|SOFT|co||r|61D|b||cc| :: unchanged from ; softly deprocedured to. * 0 61507. |p|SOID|co||r|31A|b||cc| :: SORT MOID. * 0 61508. |p|SOME|co||r|122B|b||cc| :: SORT MOID NEST. * 0 61509. |p|SORT|co||r|122C|b||cc| :: strong ; firm ; meek ; weak ; soft. * 0 61510. |p|STANDARD|co||r|942E|b||cc| :: integral ; real ; boolean ; character ; format ; * 0 61511. void ; complex ; bits ; bytes ; string ; sema ; file ; channel. * 0 61512. |p|STOP|co||r|A1B|b||cc| :: label letter s letter t letter o letter p. * 0 61513. |p|STOWED|co||r|12H|b||cc| :: structured with FIELDS mode ; FLEXETY ROWS of MODE. * 0 61514. |p|STRONG|co||r|61A|b||cc| :: FIRM ; widened to ; rowed to ; voided to. * 0 61515. |p|STYLE|co||r|133A|b||cc| :: brief ; bold ; style TALLY. * 0 61516. |p|TAB|co||r|942D|b||cc| :: bold TAG ; SIZETY STANDARD. * 0 61517. |p|TAD|co||r|942F|b||cc| :: * 0 61518. bold TAG ; DYAD BECOMESETY ; DYAD cum NOMAD BECOMESETY. * 0 61519. |p|TAG|co||r|942A|b||cc| :: LETTER ; TAG LETTER ; TAG DIGIT. * 0 61520. |p|TAILETY|co||r|73C|b||cc| :: MOID ; FIELDS mode ; PARAMETERS yielding MOID ; MOODS mode ; EMPTY. * 0 61521. |p|TALLETY|co||r|542D|b||cc| :: TALLY ; EMPTY. * 0 61522. |p|TALLY|co||r|12W|b||cc| :: i ; TALLY i. * 0 61523. |p|TAM|co||r|942K|b||cc| :: bold TAG ; MONAD BECOMESETY ; MONAD cum NOMAD BECOMESETY. * 0 61524. |p|TAO|co||r|45B|b||cc| :: TAD ; TAM. * 0 61525. |p|TAX|co||r|48G|b||cc| :: TAG ; TAB ; TAD ; TAM. * 0 61526. |p|TERTIARY|co||r|5B|b||cc| :: ADIC formula coercee ; nihil ; SECONDARY. * 0 61527. |p|THING|co||r|13D|b||cc| :: * 0 61528. NOTION ; (NOTETY1) NOTETY2 ; THING (NOTETY1) NOTETY2. * 0 61529. |p|TYPE|co||r|A341P|b||cc| :: integral ; real ; boolean ; complex ; * 0 61530. string ; bits ; integral choice ; boolean choice ; format ; general. * 0 61531. |p|UNIT|co||r|5A|b||cc| :: assignation coercee ; identity relation coercee ; * 0 61532. routine text coercee ; jump ; skip ; TERTIARY. * 0 61533. |p|UNITED|co||r|12S|b||cc| :: union of MOODS mode. * 0 61534. |p|UNSUPPRESSETY|co||r|A341O|b||cc| :: unsuppressible ; EMPTY. * 0 61535. |p|VICTAL|co||r|46A|b||cc| :: VIRACT ; formal. * 0 61536. |p|VIRACT|co||r|46B|b||cc| :: virtual ; actual. * 0 61537. |p|WHETHER|co||r|13E|b||cc| :: where ; unless.|r| * 0 61538. |e| *