From: Eric S. Raymond Date: Thu, 11 Mar 2004 06:54:20 +0000 (+0000) Subject: Page marks fixed. X-Git-Tag: 1.0~40 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=11c22da7819246dce7e4f91946d16adc7e148548;p=mad.git Page marks fixed. --- diff --git a/doc/mad-manual.xml b/doc/mad-manual.xml index c376187..e3576d6 100644 --- a/doc/mad-manual.xml +++ b/doc/mad-manual.xml @@ -2053,9 +2053,10 @@ Museum implementation ignores it. Even though an error return has been provided in the definition of a function, in the use of the function the last argument may be omitted. If it is omitted, execution of the ERROR RETURN statement -will cause control to be transferred to the -operating system in which the translated program is imbedded, with an -error indication. +will cause control + +to be transferred to the operating system in which the translated +program is imbedded, with an error indication. The Retrocomputing Museum implementation generates code that prints ERROR RETURN and terminates the program. @@ -2120,7 +2121,7 @@ and action transfer instructions. (i.e. function returns). location to be used for temporary storage. Consecutive elements will be used as required by the following statements. - + SAVE DATA &scriptL; @@ -2167,7 +2168,7 @@ available for use by successive SAVE statements. - + Input-Output Statements The Retrocomputing Museum implementation does not @@ -2240,7 +2241,7 @@ according to format &scriptF;. WRITE BINARY TAPE &scriptN;, &scriptL; - + Transmits &scriptL; to tape &scriptN; in binary form as one record. @@ -2303,11 +2304,12 @@ READ BCD TAPE, or READ BINARY TAPE statement the subroutine SYSTEM. (a subroutine which returns control to the system in which the translated program is imbedded) is automatically entered. This action can be changed by executing the statement EXECUTE SETEOF. (&scriptS;). The -subroutine SETEOF. sets the read routines to transfer to the -executable statement labelled &scriptS; when an end-of-file is -encountered. If the statement EXECUTED SETEOF. (0) is executed the -read routines will be reset to enter SYSTEM. when an end-of-file is -encountered. +subroutine SETEOF. + +sets the read routines to transfer to the executable statement +labelled &scriptS; when an end-of-file is encountered. If the +statement EXECUTED SETEOF. (0) is executed the read routines will be +reset to enter SYSTEM. when an end-of-file is encountered. Normally, if an end-of-tape is encountered while executing a WRITE BCD TAPE or WRITE BINARY TAPE statement, the tape is rewound, a @@ -2344,8 +2346,9 @@ always, such a specification is accompanied by a list of variables whose values are to be printed or punched or whose values are to be read. (Occasionally, the information is contined entirely in the format specification, so the list may be empty.) A format -specification is a string of alphabetic characters (as described below) terminated by an "*". This string is stored six +specification is a string of alphabetic characters (as + +described below) terminated by an "*". This string is stored six characters per computer word in a vector with integer mode. This vector may be preset (see ), computed, or read in as data. @@ -2393,7 +2396,7 @@ move to the next line before printing, as will be seen from the following table. In each case the carriage control character is effective before the rest of the specification is carried out. - + @@ -2475,7 +2478,7 @@ external medium as follows: (For the purposes of input-output the Boolean values 0B, 1B are considered as integers and will be punched in cards and appear in print as 0, 1.) - + The integer indicates the size of the field; i.e., the number of available columns to be used. For example, K3 indicates a 3-column octal field, C23 indicates a 23-column character field, @@ -2520,7 +2523,7 @@ form (if 5 decimal places are requested, for example): +0.x1x2x3x4x5E±n1 n2 - + where n1n2 is the exponent. On input cards numbers in E fields @@ -2573,7 +2576,7 @@ specification is assumed to be in alphabetic (BCD) form both inside the computer and outside. - + Repetition of Basic Field Specifications If several consecutive fields can be described by the same basic @@ -2635,7 +2638,7 @@ For E fields , the "scale factor" causes the number itself to be modified, but the exponent is correspondingly modified so the true value of the number remains unchanged . Thus the number 0.9321E-3 would print as 0.9321E-03 - + according to the specification E18.4*, but it would print as 93.2100E-05 according to the specification 2PE18.4*. Unlike an F number, the value is the same in either @@ -2685,7 +2688,7 @@ ignored throughout all format specifications except when they occur as characters in a Hollerith string. Note also, that while every field specification of types S, I, E, F, K, and C must be followed by commas, the comma may be omitted after a - + Hollerith string of the type described here. The comma may be used, however, if desired. @@ -2741,7 +2744,7 @@ A(8).) During the transmission of information, the input or output subroutine scans both the list and the specification simultaneously, correlating corresponding entries, and associating a field size, a type of conversion, etc. to each variable. - + If a Hollerith string is encountered in the specification, it is immediately transmitted, and it is not associated with any item on the "list." @@ -2792,7 +2795,7 @@ similar statement may be made for printed or punched output. 3F10.3 /4(F10.3, 6HBETA = I2)* - + the first line printed (or read) would have three fixed point numbers, subsequent lines would all be printed (or read) according to the @@ -2850,7 +2853,7 @@ read and stored until needed. - + Declarations (Non-executable statements) @@ -2901,7 +2904,7 @@ different modes. All constants are automatically assigned modes by the translator (see ). Other automatic assignments of modes are: - + A name appearing in the statement label field is @@ -2956,7 +2959,7 @@ A(1,1), A(I,J), B(I+6,J/3+3). program, as many variables as desired may be "declared" in any dimension declaration. The declaration consists of the word DIMENSION, followed by - + the variables to be declared. Each variable is immediately followed by one or two arguments (separated by a comma) enclosed in parentheses, as follows: @@ -3005,7 +3008,7 @@ respectively. The matrix will be located at various places in the XA region depending on the value of V(1) at the time a reference is made ot a matrix element during execution of the program. Observe that this ability to vary the location of the initial array element (i.e., - + the array element with unit indices) within the linear array allows the effective use of negative subscripts - in spite of the fact that the defined ranges of the subscripts are positive. @@ -3055,7 +3058,7 @@ EQUIVALENCE (A,B), (MATRIX, XARRAY), (C, D(3)) storage location throughout the program, that MATRIX and XARRAY are to represent the same storage location through the program, etc. (Two variables which - + represent the same location always have the same value at any given time.) Thus, any number of equivalences may be established by one EQUIVALENCE declaration, and any number of such declarations may occur @@ -3092,7 +3095,7 @@ word ERASABLE (which need not have the same number of dimensions) are disjoint (i.e., non-overlapping in storage), but are assigned to a special section of storage which is separate from the usual storage of variables and - + arrays. Each ERASABLE declaration eliminates the effect of previous assignments to this special section of storage, thus allowing several arrays to occupy the same storage at different times. It should be @@ -3165,6 +3168,7 @@ implement COMMON. Any vector or portion of a vector (or array when considered as a vector, i.e., using linear subscripts) may be preset by a declaration + of the following form: (a) VECTOR VALUES &scriptV; = c0, @@ -3219,19 +3223,20 @@ program. There are two main types of functions: The internal function and the external function. Since these are quite similar in many ways, that part of the -description which is specific to external functions -will be given in , that which is -specific to internal functions in , and that which is common to both types -will follow in subsection . -Throughout this section a single-valued function will be called a -"function", and a function with multiple outputs and/or multiple exits -will be called a "procedure". For the purposes of this manual a -recursive function is one whose definition contains calls for the -function being defined -- or calls for functions which ultimately call -the one being defined. Recursive functions have the same structure as -other functions although, in general, they will include statements of -the type described in , and certain +description which is specific to external functions will be + +given in , that which is specific +to internal functions in , and +that which is common to both types will follow in subsection . Throughout this section a +single-valued function will be called a "function", and a function +with multiple outputs and/or multiple exits will be called a +"procedure". For the purposes of this manual a recursive function is +one whose definition contains calls for the function being defined -- +or calls for functions which ultimately call the one being defined. +Recursive functions have the same structure as other functions +although, in general, they will include statements of the type +described in , and certain considerations should be borne in mind when constructing such functions. These considerations arise from the fact that names , instead of values, are used as function arguments. @@ -3265,7 +3270,7 @@ as standard package programs ("subroutines"). The designation translated as part of the main program. The word "INTERNAL" also implies that any variables or functions not listed as arguments in the definition of the - + function (but used in its evaluation), are understood to be the same as elsewhere in the main program, and the current values of these variables and functions will be used. Names of variables and @@ -3285,7 +3290,7 @@ INTERNAL FUNCTION SUMSQ.(X,Y,Z) = X * X + Y + Z * Z - T * T As indicated above, X, Y, and Z, as they occur here, are dummy - + variables, and (X, Y, Z) is the dummy variable list. The current value of T, however, will be obtained and used each time the value of the function is needed. An example of theuse of the function so defined @@ -3331,7 +3336,6 @@ ZQ = SIN.(J * Y).P.(M + 1) - Y/XBAR + COS.(J*Z).P.(M-1)-Z/XBAR. Internal and External Functions - Each function definition (except single statement definitions described in ) may define any number of functions and/or any number of procedures. Within one @@ -3340,7 +3344,7 @@ exactly the same set of arguments. In other words, the functions CPADD.(X,Y,A,B)and CPMPY.(X,Y,A,B) may be defined, if desired, by one definition, but the functions SIN.(X) and ARCTAN.(X.Y) would require separate definitions. - + Similarly, the procedures RXSUB. and ADAMS. could be defined by the same definition if they have the same outputs, say Z and W, and the same input parameters, say X, Y, T, and N. However, if they did not @@ -3385,7 +3389,7 @@ function, the declaration would be EXTERNAL FUNCTION (X). Following the words INTERNAL (or EXTERNAL) FUNCTION is the dummy variable list ((X) in this example). The END OF FUNCTION declaration is the last statement in the function definition program. (In an external - + function definition this is also the last statement in the program.) An entry must provided for each function being defined, but several functions may share any number of FUNCTION RETURN statements. An