The Oak Ridge ALGOL Compiler for the Control Data Corporation 1604 Preliminary Programmer's Manual
Part 3
A few features of the language have been subject to more than one interpretation. Fortunately, the vast majority of programs will not involve these ambiguities, but for the few that do it will be necessary to know what decisions the compiler makes. This appendix indicates these decisions for the more controversial areas.
1. Side effects in function designators. The evaluation of primaries in expressions is not strictly left to right allowing for precedence rules. In particular, the value of a variable in an expression is never stored in a temporary simply to preserve its value from change by the evaluation of a function designator in the expression. Otherwise, the evaluation does proceed from left to right and according to precedence rules, including the referencing of formal parameters and the calculation of the address of subscripted variables. All function designators are evaluated in Boolean expressions.
2. Own variables and arrays in procedures. The own quantities local to the body of a procedure which is called from more than one point in a program record the history of the procedure as opposed to a history of each point of reference. In other words, only one copy of the own quantities is preserved.
APPENDIX G Fortran Subprograms in an Algol Program
The standard procedures FORTRAN, FORTRANF, FTN, and FTNF are used to call compiled Fortran subroutines and functions from within an Algol program. Each procedure has one parameter which is a call of the desired Fortran subprogram. The Fortran subprogram must be declared external as described in Section V.
The use of these procedures simply causes a Fortran calling sequence to be generated by the compiler. Of course the subprogram could be written in CODAP as well as Fortran, provided it is designed to link through a Fortran-type calling sequence.
The procedures are used as follows:
FORTRAN—generates a Fortran 62 calling sequence for a subroutine FORTRANF—generates a Fortran 62 calling sequence for a function FTN—generates a Fortran 63 calling sequence for a subroutine FTNF—generates a Fortran 63 calling sequence for a function
Each of these procedures is standard, i.e., available without declaration. FORTRANF and FTNF are used in expressions.
Examples:
x := FTNF (ALPHA(T,A[0,0]))
FORTRAN (SUB(I + J)) .
The following restrictions must be observed: labels, procedures with no parameters, standard procedure names, and array names cannot be used as arguments of a call of a Fortran subprogram. However, in the case of an array, the subscripted variable which is the first element of the array will satisfy a Fortran subroutine which has an array name as a formal parameter. The name of the Fortran subprogram cannot be a formal parameter. Literals must be enclosed in string quotes.
Footnotes
[1]See Appendix A for syntactical definition.
[2]For definition of Fortran format, see Control Data Fortran-62 Reference Manual.
Acknowledgment
The author was greatly assisted in the preparation of this document by several persons who have contributed labors or advice to the construction of the compiler. These include N. B. Alexander and A. A. Grau, also K. A. Wolf of Control Data Corporation, and especially R. G. Stueland of Control Data Corporation.
ORNL-3460 UC-32—Mathematics and Computers TID-4500 (23rd ed.)
INTERNAL DISTRIBUTION
1. Biology Library 2-4. Central Research Library 5. Reactor Division Library 6-7. ORNL--Y-12 Technical Library Document Reference Section 8-27. Laboratory Records Department 28. Laboratory Records, ORNL R.C. 29. R. K. Adams 30. Nancy Alexander 31. E. D. Arnold 32. Don Arnurius 33. George J. Atta 34. Susie E. Atta 35. S. J. Ball 36. J. E. Bigelow 37. R. E. Biggers 38. Craig Brandon 39. J. C. Bresee 40-41. L. L. Bumgarner 42. W. R. Burrus 43. H. P. Carter 44. D. K. Cavin 45. Arline Culkowski 46. W. Davis, Jr. 47. H. J. de Bruin 48. P. B. DeNee 49. A. C. Downing 50. L. C. Emerson 51. Margaret Emmett 52. R. L. Ferguson 53. B. R. Fish 54. P. A. Haas 55. M. Feliciano 56. Barbara Ann Flores 57. T. B. Fowler 58. R. E. Funderlic (K-25) 59. D. A. Gardiner 60. C. D. Griffies 61. D. A. Griffin 62. D. G. Gosslee 63. M. T. Harkrider 64. M. C. Hill 65. A. S. Householder 66. W. H. Jordan 67. H. W. Joy 68. F. B. K. Kam 69. George Kidd 70. L. J. King 71. Ann Klein 72. K. A. Kraus 73. C. E. Larson 74. M. E. LaVerne 75. Elmon Leach 76. R. P. Leinius 77-78. M. P. Lietzke 79. Erlie McDaniel 80. C. D. Martin 81. K. O. Martin 82. Betty F. Maskewitz 83. R. P. Milford 84. F. L. Miller, Jr. 85. R. V. Miskell 86. S. E. Moore 87. J. F. Murdock 88. C. W. Nestor, Jr. 89. V. K. Pare 90. Carl E. Parker 91. S. K. Penny 92. A. M. Perry 93. D. C. Ramsey 94. M. T. Robinson 95. R. M. Rush 96. Y. Shima 97. J. E. Simpkins 98. M. J. Skinner 99. C. D. Scott 100. C. D. Susano 101. J. A. Swartout 102. M. E. Tsagaris 103. D. K. Trubey 104. J. S. Watson 105. A. M. Weinberg 106. M. E. Whatley 107. C. S. Williams 108. H. A. Wright 109. Y-12 Central Files 110. J. H. Zeigler (K-25) 111. H. Zeldes
EXTERNAL DISTRIBUTION
112. T. H. Elrod, Control Data Corporation, Computer Division, 3330 Hillview Avenue, Palo Alto, California 113. A. A. Grau, Department of Mathematics, Northwestern University, Evanston, Illinois 114. R. G. Stueland, Control Data Corporation, Computer Division, 3330 Hillview Avenue, Palo Alto, California 115. K. A. Wolf, Control Data Corporation, Programing Systems, 501 Park Avenue, Minneapolis 15, Minnesota 116. R. A. Zemlin, Control Data Corporation, Computer Division, 3330 Hillview Avenue, Palo Alto, California 117. Research and Development Division, AEC, ORO 118-728. Given distribution as shown in TID-4500 (23rd ed.) under Mathematics and Computers category (75 copies--OTS)
Transcriber’s Notes
In the HTML version, represented code in a monospaced font, with keywords in boldface as in the Revised Report. Corrected a few palpable typos. Created an original cover image, using elements from the printed book, for free and unrestricted use with this eBook.