From 12c1f2fc1f23739357df2489ce675ca7bb38de2f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 9 Feb 2004 09:01:13 +0000 Subject: [PATCH] Work with CSS. --- doc/mad-manual.xml | 271 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 244 insertions(+), 27 deletions(-) diff --git a/doc/mad-manual.xml b/doc/mad-manual.xml index 873fd34..f03218a 100644 --- a/doc/mad-manual.xml +++ b/doc/mad-manual.xml @@ -16,7 +16,6 @@ L"> M"> S"> - ]> Notes from the 21st century @@ -117,7 +116,7 @@ is not enforced. computed-transfer statement are not implemented. Neither are ERROR RETURN, multiple ENTRY points, or TAPE and DRUM statements. -All external function definition must precede +All external function definitions must precede the program main line. The generated C is self-contained and does not require any @@ -156,7 +155,7 @@ in Chapter 1 include small hand-drawn geometrical shapes after each of the items A, B, and the words "diamonds" and "rectangles" in item D were corresponding shapes. -The pic diagrams preserve the logic of the original hand-drawn +The PIC diagrams preserve the logic of the original hand-drawn ones, but are not exact geometrical duplicates. The proportions of the flowchart elements are slightly different. @@ -785,10 +784,10 @@ c). We shall specify quantities ε1 and ε2, and stop the iteration when the following condition is satisfied: -
+
(|xi+1 - xi| < ε1 and -|f(xi| < ε2) +|f(xi)| < ε2) or i ≤ n0
@@ -1118,20 +1117,19 @@ otherwise indicated by parentheses, is:
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). - + +.ABS.(B - C) means |B - C|, while .ABS.B - C means |B| - C. +-B + C means (-B) + (C), while -(B + C) means the negation of the sum. +B.P. - X + Y means B-X + Y, while B.P.(-X + Y) means B-X+Y. +K2/Z - 3 (K2/Z) - 3, while K2/(Z - 3) implies that Z - +3 is denominator. +A * B + C means (A * B) + C. +A.P.3/J means (A3)/J +X.L. Y + 3 means (X) .L. (Y + 3). +P.AND..NOT.P .EQV.Q means (P.AND.(.NOT.P)).EQV.Q. +Z = X + Y /QA means Z = (X + Y/QA)) +A = -B.P.X means A = -(BX). + (B) Within an expression operations appearing on the same line of the list in (A) are to be performed from left to right, unless @@ -1140,10 +1138,10 @@ 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. - + +A + B - C + D - E means (((A + B) - C) + D) - E. +X/Z * Y/R * S means (((X/Z) * Y/R) * S. + Mode of Expressions @@ -1902,10 +1900,10 @@ specification vector (see section 2.15) which must be an integer variable name. &scriptN; is an expression whose value is to be either a tape number or a drum number. &scriptL; is an input-output list. Elements of &scriptL; may be: 1) single variable names or array names -with subscripts;, 2) blocks of the form A(i;i;, -..., i;n;) ... A(j;i;, -...j;n;) where the i's and j's may be any -subscript ;expression and n # 1. In addition, when &scriptL; +with subscripts;, 2) blocks of the form A(ii, +..., in) ... A(ji, +...jn) where the i's and j's may be any +subscript expression and n ≥ 1. In addition, when &scriptL; designates an output list, the elements of &scriptL; may be: 3) constants or 4) expressions. Elements of a list are separated by commas. Example of an output list: AB, D, 2.5, MTX(1) ... MTX(N), @@ -2111,6 +2109,225 @@ columns. The effect of a "blank" character on carriage control is to 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. + + + + +Blank Single space +0 Double space ++ No space +1 Skip to next page +2 Skip to next half-page +4 Skip to next quarter page + + + + +As another example, the specification + + +6H1PHI = F6.3^* + + +would cause a skip to the next page (because the first character is a +"1"), and cause "PHI =" to be printed, followed by a fixed point +number. As will be explained below, the "6H" that appears in the +specification indicates that 6 Hollerith (or BCD) characters follow, +e.g., "1PHI =". Note that blanks are counted as characters here. It +should be understood that this special behavior with regard to column +1 pertains to lines that are to be printed (either on-line or +off-line), and not at all to cards. + + +The Basic Field Description + +Each specification describes successive fields across the available +columns, starting fromthe left. If the specification describes fewer +than the total number of available columns, the line (or card) will +automatically be filled in with blanks. But, as indicated above, if +more than the total number of available columns is included in the +specification, an error return (see section 2.14.1) will result. + +The basic field description consists of a letter followed by an +integer. The letter indicates the form of the information in the +external medium as follows: + + + + +S Skip (or blank information) +I Integer +F Fixed point number (Internally floating point) +E Floating point number +K Octal number +C Characters + + + + +(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, +andf S31 indicates a blank field of 31 columns. + +For F and E fields, i.e., fixed and floating point numbers, there is +always the question of the placement of the decimal point, the form of +the numbers, etc. in addition to the field size. + +For this reason, the basic field description for E and F fields +requires an additional integer giving the number of places after the +decimal point that are to be rounded and printed (or read, or +punched). This integer is always taken mod 10 . +For example, the specificaiton (F20.3) and the specification (F20.13) +both describe a twenty column fixed point field in which a number will +occur with three digits to the right of the decimal point. The +decimal point in the specification itself must +always be present for E and F fields. + +Within the numeric type fields, E, F, I, and K, +"+" signs are not printed or punched, nor are they necessary on input +cards. However, "-" signs may not be omitted on input, and are always +printed and punched. If the field description gives a field size +larger than the number requires, the number is pushed as far right as +possible. If the field size given in a specification is too small, +information is printed, punched, or read from the right + end of the field until the field is exhausted, and the +left end of the number is truncated, including sign. It is important, +therefore, to be sure to provide a large enough field to handle the +information required. In fact, some spacing can be achieved by giving +large field sizes, since blanks automatically occur to the left of a +number pushed to the right end of an over-sized field. + + +The Form of the Number + +Integers (I fields) and octal numbers (K fields) are printed, punched, +etc., directly, without any decimal point. Numbers printed + or punched in E fields have the +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 +must have an exponent of the form + + +E±n1n2 + + +although if the sign is punched, the "E" may be omitted. Similarly, +if the "E" is punched, a "+" may be omitted, as well as a leading zero +in the exponent. The exponent must be counted in the field size. + +Numbers to be printed or punched in + F fields have the form (if 5 decimals digits +are requested, for example): + + +±x1x2x3x4x5x6x7x8 + + +although "+" signs are not printed. On input cards + "+" signs may be omitted, but not "-". + +On both E and F input data on cards, blanks are regarded as +zeros, and any number of digits may be used, but only 8 digits of +accuracy are retained. Moreover, E and F input data need not have the +decimal point punched. If the decimal point is not punched, the field +specification determines its position. For example, the punched +number +9032 described by the specification F10.2 would be understood +to be the number +90.32 because the 2 in the specification indicates 2 +decimal places to the right of the point. Similarly, the punched +number +9032E3 described by the specification E10.4 would be +understood to be the number +.9032E3. If the decimal point is +punched, however, it completely overrides the setting of the point by +the specification. The entire specification must be present, +however. + + +Permissible Conversion + +It should be understood that there must be a relationship +between the form of a number inside the computer and its external +form. In other words, a number described by an I field specification +is assumed to be an integer in storage. A number described by E or F +specification is assumed to be in floating point form in storage. +Similarly a number govern by a K specification will be handled by +direct binary-octal conversion. Information decribed by a C +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 +specification, reptition may be avoided by prefixing the basic +specification by its multiplicity. For example, the +specification + + +3F10.3, E18.4, 2E9.1, 3I2* + + +is a short way of writing: + + +F10.3, F10.3, F10.3, E18.4, E9.1, E9.1, I2, I2, I2*. + + +Either specification may be used, of course. A group of basic +specifications may be repeated by enclosing the group in parentheses +and preceding the left parenthesis by the multiplicity. Thus + + +3E10.3, 2(I2,3F10.1), 2C5* + + +would be equivalent to the following: + + +E10.3, E10.3, E10.3, I2, F10.1, F10.1, F10.1, I2, F10.1, F10.1, F10.1, C5, C5* + + +Such grouping parentheses may not be nested. + + +Scale Factors + +One extra feature is allowed when reading or printing E and F +fields. A "scale factor" may be applied to an F number + according to the formula + +Printed number = Internal number x +10Scale factor + +(where the scaling is accomplished before the conversion is +done). The "scale factor", followed by the letter "P" is prefixed to +the basic field specification, as in the example + + +-2P2F7.3, F7.3* + + +Thus, three numbers which would print 0.522 -1.567 93.671 +according to the specification 3F7.3* would print instead 0.005 -0.16 +93.671 if the specification -2P2F7.3, F7.3* were used. It must be +noted that for F fields this scale factor +actually changes the values of the numberse to which it applies. It +affects only those numbers to which it is directly applied, however. +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 +case. -- 2.43.0