From 3df023b1be8fc1e841547a31777d21304e0556b8 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 5 Feb 2004 22:43:50 +0000 Subject: [PATCH] Stop trying to use fancy characters. --- doc/mad-manual.xml | 260 ++++++++++++++++++++++----------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/doc/mad-manual.xml b/doc/mad-manual.xml index 7f14057..73548fe 100644 --- a/doc/mad-manual.xml +++ b/doc/mad-manual.xml @@ -11,11 +11,11 @@ - - - - - +A"> +B"> +L"> +M"> +S"> ]> @@ -342,9 +342,9 @@ aj; otherwise, go on. Z is the answer. - + This may be illustrated by following "flow diagram": - + @@ -419,7 +419,7 @@ increasing it by the amount 3 after each time until either α > We shall abbreviate this by the form: - + THROUGH BACK, FOR ALPHA = 12, 3 ALPHA .G. 90 .OR. .ABS. (X+Y) .LE. EPSLON @@ -486,7 +486,7 @@ such as the loop, etc. The input form of our example would be: &min; - + The DIMENSION statement assigns a block of storage in the computer large enough to handle a0, a1, a2, @@ -519,9 +519,9 @@ shorter expressions involving <, ≤, =, ≠, >, and ≥. For example, the following is a Boolean expression: - ((x - 3)3 < y and i ≤ j) or x ≥ 3 +((x - 3)3 < y and i ≤ j) or x ≥ 3 - + This will be "true" for some values of x and y, and "false" for others. It might then occur in statements such as: @@ -529,7 +529,7 @@ others. It might then occur in statements such as: WHENEVER ((X - 3) .P. 3 .L. Y .AND. I .LE. J) .OR. X .GE. 3, TRANSFER TO AGAIN - + or in the iteration statement @@ -570,7 +570,7 @@ the function now need only call upon it by name, as in the statement: LARGEQ = 1. + MAX. (6,Q)/3. - + Note that the set (in this use of MAX.) hose largest element is desired is called Q, and N has the value 6. No DIMENSION statement is needed for A is the EXTERNAL FUNCTION definition program above, since @@ -749,7 +749,7 @@ using the iterative formula: - + which is obtained from the standard Newton's Method formula @@ -758,7 +758,7 @@ using the iterative formula: - + for the problem f(x) = 0. (Here f(x) = x3 + ax2 + bx + @@ -958,7 +958,7 @@ are values of functions. Addition, written as "+", e.g., Z5 + D. - + Subtraction, written as "-", e.g., Z5 - D. (Note, both the minus sign and the dash are accepted.) @@ -989,7 +989,7 @@ means-(X-.5). Arithmetic Expressions Arithmetic expressions are defined inductively as follows: - + All integer, floating point, and alphabetic constants, integer and floating point individual variables, subscripted integer @@ -1077,37 +1077,37 @@ otherwise indicated by parentheses, is: - .ABS., + (as unary operations) - .P. - - (as a unary operator) - *, / - +, - (as binary operations, i.e., addition and subtraction) - - .E., .NE., .G., .GE., .L., .LE. - .NOT. - .AND. - .OR. - .THEN. - .EQV. - , (as used to separate function arguments) - = +.ABS., + (as unary operations) +.P. +- (as a unary operator) +*, / ++, - (as binary operations, i.e., addition and subtraction) + +.E., .NE., .G., .GE., .L., .LE. +.NOT. +.AND. +.OR. +.THEN. +.EQV. +, (as used to separate function arguments) += Examples: - (1) .ABS.(B - C) means |B - C|, while .ABS.B - C means |B| - C. - (2) -B + C means (-B) + (C), while -(B + C) means the negation of - the sum. - (3) B.P. - X + Y means B-X + Y, while B.P.(-X + Y) means B-X+Y. - (4) K2/Z - 3 (K2/Z) - 3, while K2/(Z - 3) implies that Z - 3 is - the denominator. - (5) A * B + C means (A * B) + C. - (6) A.P.3/J means (A3)/J - (7) X.L. Y + 3 means (X) .L. (Y + 3). - (8) P.AND..NOT.P .EQV.Q means (P.AND.(.NOT.P)).EQV.Q. - (9) Z = X + Y /QA means Z = (X + Y/QA)) - (10) A = -B.P.X means A = -(BX). +(1) .ABS.(B - C) means |B - C|, while .ABS.B - C means |B| - C. +(2) -B + C means (-B) + (C), while -(B + C) means the negation of +the sum. +(3) B.P. - X + Y means B-X + Y, while B.P.(-X + Y) means B-X+Y. +(4) K2/Z - 3 (K2/Z) - 3, while K2/(Z - 3) implies that Z - 3 is +the denominator. +(5) A * B + C means (A * B) + C. +(6) A.P.3/J means (A3)/J +(7) X.L. Y + 3 means (X) .L. (Y + 3). +(8) P.AND..NOT.P .EQV.Q means (P.AND.(.NOT.P)).EQV.Q. +(9) Z = X + Y /QA means Z = (X + Y/QA)) +(10) A = -B.P.X means A = -(BX). (B) Within an expression operations appearing on the same line @@ -1118,8 +1118,8 @@ otherwise indicated by parentheses. Examples: - (1) A + B - C + D - E means (((A + B) - C) + D) - E. - (2) X/Z * Y/R * S means (((X/Z) * Y/R) * S. +(1) A + B - C + D - E means (((A + B) - C) + D) - E. +(2) X/Z * Y/R * S means (((X/Z) * Y/R) * S. @@ -1153,19 +1153,19 @@ function GCD. and the variables I and J are in the integer mode, then the expressions - Y = GCD.(I, J) - Y + Z - I - I + 1. - GCD. (I, J)/Z +Y = GCD.(I, J) +Y + Z - I +I + 1. +GCD. (I, J)/Z are all floating point expressions while the expressions - I + GCD.(I, J) - (I + J)/3 - I + 1 - GCD.(I, J)/I +I + GCD.(I, J) +(I + J)/3 +I + 1 +GCD.(I, J)/I are all integer expressions. @@ -1175,7 +1175,7 @@ may be necessary before some of the operations can be performed. Thus, in the expression - Y + 3 +Y + 3 if Y is in the floating point mode it cannot be added directly @@ -1191,7 +1191,7 @@ improper conversion will take place. which the conversions will be made. Consider the expression - ( Y + 7/3) + (I * J/K) +( Y + 7/3) + (I * J/K) where Y is in the floating point mode, and I, J, and K are in the @@ -1200,13 +1200,13 @@ computation will proceed in the following order (where the T's are temporary locations): - T1 = I * J - T2 = T1/K - T3 = 7/3 - T4 = Y + T3 - T5 = T4 + T2 +T1 = I * J +T2 = T1/K +T3 = 7/3 +T4 = Y + T3 +T5 = T4 + T2 - + and T5 will be the value of the expression. @@ -1234,9 +1234,9 @@ different from the value one might expect from a different analysis. floating point mode if the expression were written: - (Y + 7./3) + (I * J)/(K + 0.) +(Y + 7./3) + (I * J)/(K + 0.) - + Of course, many times the expression will be written as originally stated just to achieve the "truncation" effect. @@ -1278,7 +1278,7 @@ MP(A, B + 6 * J, I * 6/TDX), MA(K(Z + 5) + T(1) + 6). This statement has the form illustrated by - ALPHA = Y + Z + F.(X, Y, Z) +ALPHA = Y + Z + F.(X, Y, Z) That is, the left side of the "=" sign consists of the name of a @@ -1298,19 +1298,19 @@ variable on the left the value which results from steps (1) and (2)." (See for mode of expressions.) Thus, if Y is a floating point variable, then the statement - + - Y = 1 +Y = 1 - + will cause the integer 1 to be converted to floating point and then stored in the location called "Y"; i.e., Y will now have the value 1. (as a floating point number). If the statement were written - Y = 1. +Y = 1. - + then the floating point number 1. would be stored in the location "Y"; i.e., Y would again have the floating point value 1., but in this case the conversation of the integer is unnecessary, thus @@ -1322,20 +1322,20 @@ fractional part, and then the fractional part is truncated. Thus, the following floating point numbers: - 3E5, .3E0, .34568127E2, - .345681E10 +3E5, .3E0, .34568127E2, - .345681E10 would convert to the following integers, respectively: - 300000, 0, 34, -3456810000. +300000, 0, 34, -3456810000. Transfer Statement This statement has the form: TRANSFER TO &scriptS; - + Here &scriptS; may be any statement label or any expression in statement label mode which labels an executable statement. Execution @@ -1349,11 +1349,11 @@ is SWTCH(6)). Conditional Statements There are two types of conditional statements. - + (a) Simple Conditional - WHENEVER B,Q +WHENEVER B,Q Here B is a Boolean expression and Q any executable statement @@ -1367,46 +1367,46 @@ statements containing punctuation, must be written. Examples: - WHENEVER XM.LE.1, TRANSFER TO END - WHENEVER I.GE.N.AND.J.NE.I-1, I=0 +WHENEVER XM.LE.1, TRANSFER TO END +WHENEVER I.GE.N.AND.J.NE.I-1, I=0 - + (b) Compound Conditional - &scriptS;1 WHENEVER B1 - - ... - ... &THgr;1 - - &scriptS;2 OR WHENEVER B2 - ... - ... &THgr;2 - ... - ... - &scriptS;k OR WHENEVER Bk - ... - ... &THgr;k - &scriptS;k+1 END OF CONDITIONAL + &scriptS;1 WHENEVER B1 + + ... + ... &THgr;1 + + &scriptS;2 OR WHENEVER B2 + ... + ... &THgr;2 + ... + ... + &scriptS;k OR WHENEVER Bk + ... + ... &THgr;k + &scriptS;k+1 END OF CONDITIONAL - + Often the last condition Bk is always true. This may be expressed by the statement - OR WHENEVER 1B +OR WHENEVER 1B or alternately the statement - OTHERWISE +OTHERWISE - + The &scriptS;i are statement labels which need not be used unless desired. k may equal one (if no "OR WHENEVER..." statements are used). Here B1, @@ -1441,26 +1441,26 @@ is performed. might be given by the section of the program: - WHENEVER X .LE. 0. .OR. 1. .LE. X .AND. X .L. 2. .OR. X .GE.3 - Y = 0. - OR WHENEVER 0 .LE. X .AND. X. .L. 3. - Y = 1. - END OF CONDITIONAL +WHENEVER X .LE. 0. .OR. 1. .LE. X .AND. X .L. 2. .OR. X .GE.3 + Y = 0. +OR WHENEVER 0 .LE. X .AND. X. .L. 3. + Y = 1. +END OF CONDITIONAL - + This section of program could be rewritten in another way. - + - WHENEVER 0. .LE. X .AND. X .L. 1. - Y = X - OR WHENEVER 2. .LE. X .AND. X .L. 3. - Y = 1. - OTHERWISE - Y = 0. - END OF CONDITIONAL +WHENEVER 0. .LE. X .AND. X .L. 1. +Y = X +OR WHENEVER 2. .LE. X .AND. X .L. 3. +Y = 1. +OTHERWISE +Y = 0. +END OF CONDITIONAL - + The indentation of the statements between the conditional statements is not required but contributes to the readability. @@ -1468,11 +1468,11 @@ is not required but contributes to the readability. CONTINUE Statement This statement has the simple form: - + - CONTINUE +CONTINUE - + It serves as an entry point in the program, and causes no computation to be performed by its presence or absence. @@ -1481,21 +1481,21 @@ to be performed by its presence or absence. The following program segment illustrates the use of this statement. - + - . - . - . - A = D(1, 1) - THROUGH ST1, FOR I = 1, I .G. 10 - THROUGH ST1, FOR J = 1, J .G. 10 - WHENEVER A .LE. D(I, J), TRANSFER TO ST1 - K = I - L = J + . + . + . +A = D(1, 1) +THROUGH ST1, FOR I = 1, I .G. 10 +THROUGH ST1, FOR J = 1, J .G. 10 +WHENEVER A .LE. D(I, J), TRANSFER TO ST1 +K = I +L = J ST1 CONTINUE - . - . - . + . + . + . This statement casues the block of statements which follows @@ -1727,10 +1727,10 @@ at which the stop occurred. Normally, the value of a function will occur as part of an expression, as in the statement: - + Z = COS.(X)/SIN.(X + 2.) - + Certain functions, however, may stand alone as separate statements, as a statement calling for the sorting of a list, etc. This would appear as: @@ -1791,7 +1791,7 @@ exhausted. FUNCTION RETURN ℳ - + This statement is used in a function definition to indicate a return to the calling program. ℳ is an expression whose value is to be the output of this function considered as a single valued function. @@ -1986,7 +1986,7 @@ TRANSFER TO &scriptS;" (including the comma) is omitted no transfer is made even if at load point. - + End of File and End of Tape -- 2.43.0