From: Eric S. Raymond Date: Mon, 28 Jun 2004 21:12:31 +0000 (+0000) Subject: Index up to "Regional Notation". X-Git-Tag: 1.0~9 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=19cea5bb99db664123cf28ef32afedf46cc75a1e;p=mad.git Index up to "Regional Notation". --- diff --git a/doc/mad-manual.xml b/doc/mad-manual.xml index 102542d..98015c7 100644 --- a/doc/mad-manual.xml +++ b/doc/mad-manual.xml @@ -547,7 +547,9 @@ provided the algorithm is stated unambiguously and completely. the largest number in a collection of n + 1 numbers A = { a0, a1, a2, ... an } with n ≥ -1. A verbal description of the procedure (algorithm) might be: +1. A verbal description of the +procedureProcedure +(algorithm) might be: @@ -1446,7 +1448,8 @@ conventions are used to allow deletion of parentheses. Deletion of Parentheses The conventions used here are the same as in ordinary algebra and logic, namely: Parentheses may be omitted, subject to the rules (A) and (B) -below, but redundant parentheses are allowed. +below, but redundant parentheses are allowed. +Redyndant Parentheses (A) Within any expression the sequence of computation, unless otherwise indicated by parentheses, is: @@ -2392,7 +2395,8 @@ produced, allowing the operator to read the comment. (d) READ FORMAT &scriptF;, &scriptL; -Reads cards into &scriptL; according to format &scriptF;. +Reads cards into &scriptL; according to format &scriptF;. +READ FORMAT Statement @@ -2401,6 +2405,8 @@ produced, allowing the operator to read the comment. Transmits &scriptL; to or from tape &scriptN; in BCD form according to format &scriptF;. +READ BCD TAPE +READ BINARY TAPE @@ -2424,6 +2430,7 @@ record. Transmits &scriptL; to or from drum &scriptN; starting with drum address &scriptA; (where &scriptA; is an integer expression). +READ DRUM @@ -3244,7 +3251,8 @@ computation) to the values . -The lower bound of each subscript is assumed to be unity. +The lower bound of each subscript is assumed to be unity. +Range of Scubscripts Thus, in the statement: DIMENSION XA(400, V), YT(300, K(3)) where V(0) = 2,V(1) = 6, v(2) = 13, K(3) = 3, K(4) = 4, K(5) = 8, and K(6) = 9, the @@ -3366,6 +3374,8 @@ it. PROGRAM COMMON Declaration +PROGRAM COMMON + This declaration has the form @@ -3476,8 +3486,9 @@ PROGRAM COMMON section of storage (see section 3.6) can be preset with numerical or alphabetical information only (not statement labels or function names) and then only if it is a single section program (i.e., storage is loaded with instructions only once) -or, if it is a multiple section program, the PROGRAM COMMON region is -identical in all sections of the program. +or, if it is a multiple section program, the PROGRAM +COMMONPROGRAM COMMON region +is identical in all sections of the program. Function Definitions @@ -3501,14 +3512,16 @@ 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 +"procedure".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 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 namesName, instead of values, are used as function arguments. The problem is considered in more detail in the examples in Chapter III. @@ -3711,7 +3724,9 @@ EXECUTE STATEMENT (generally such functions have multiple outputs) the FUNCTION RETURN statement may appear without an accompanying expression.Function Call -An example of a definition for procedures is as follows: +An example of a definition for +proceduresProcedure is as +follows: EXTERNAL FUNCTION @@ -3824,6 +3839,7 @@ will never be executed, but must be present in the definition. Variable names appearing as dummy arguments in any function declaration may not appear in a PROGRAM COMMON, +PROGRAM COMMON, ERASABLEERASABLE, or EQUIVALENCE declaration.Dummy ArgumentsEQUIVALENCE @@ -3847,6 +3863,8 @@ in Chapter 4). COMMNT Subroutine ERROR Subroutine PRINT Subroutine +PUNCH Subroutine +READ Subroutine If a block designation @@ -4856,6 +4874,7 @@ compile this example. The problem is the array I/O. Exammples, Recursive Functions Examples, Symbol Manipulation +Rrcursive Functions Problem: Find the first occurrence of an arbitrary word in a given text. @@ -5236,21 +5255,28 @@ subroutine.PRINT Subroutine read from tape. The arguments are: (1) location of the format specification, (2) tape number, and (3) a list of variable to be read. The READ BCD TAPE . . . statement produces a call for this -routine. +routine. +READ BCD TAPE +READ BINARY TAPE + READ -Similar to TAPERD above except that the use of tape 7 (the input tape) is implied. The READ FORMAT . . . statement -produces a call for this subroutine. +Similar to TAPERD above except that the use of tape 7 +(the input tape) is implied. The READ FORMAT . . . statement produces +a call for this subroutine. READ +Subroutine -PUNCH -Entry to this subroutine causes BCD information to be -written on tape 5 (punch output type). -The arguments are the same as PRINT and the PUNCH FORMAT -. . . statement produces the call. +PUNCH Entry to this subroutine causes BCD +information to be written on tape 5 (punch output type). The +arguments are the same as PRINT and the PUNCH FORMAT . . . statement +produces the call. PUNCH +Subroutine +READ FORMAT Statement + @@ -6273,7 +6299,8 @@ example, if A is a 4 x 3 matrix (m = 4, n = 3) and b = 1, then V(1) = OR WHENEVER StatementConditional Statement Parameters, SubroutineSubroutine Parameters Precedence HierarchyParentheses - +R (Column 11)Remark Declaration +Regional NotationBlocks, Input-Output