|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 126080 (0x1ec80) Types: TextFile Names: »D59«
└─⟦6966c2393⟧ Bits:30005867/disk08.imd Dokumenter (RCSL m.m.) └─⟦this⟧ »D59«
F_ 6. PROGRAM STRUCTURE A FORTRAN source text may contain any number of program units. A program unit may be a main program, a subroutine or a function. The source text may contain one subroutine or function, or it may contain one main program together with any number of subroutines or functions. The mutual order of the program units is free. 6.1 PROGRAM UNITS AND THEIR MUTUAL COMMUNICATION 6.1.1 S_t_r_u_c_t_u_r_e_ _o_f_ _a_ _P_r_o_g_r_a_m_ _U_n_i_t_ All program units must contain the following parts in the shown order. 1. Heading 2. Declarations except equivalences 3. Equivalences 4. Executable statements 5. END statement. Any of the parts may be omitted, except the END statement. If the heading is omitted, a PROGRAM heading is assumed. A program unit may be a main program, a subroutine or a function. The headings for each of the three kinds of program unit have the following forms: PROGRAM <program name> 1 SUBROUTINE <subroutine name> (<formal list>) 0 1 <type> 0 FUNCTION <function name> (<formal list>) where * <formal list> ::= <parameter name> 1 The names listed in the formal list are called the formal para- meters. Parameters must either be explicitly or implicitly spe- cified with both type and dimensionality. Formal parameters may not be equivalenced and they may not be in COMMON. \f 6.1.2 C_a_l_l_i_n_g_ _F_u_n_c_t_i_o_n_s_ _a_n_d_ _S_u_b_r_o_u_t_i_n_e_s_ A subroutine or function may be activated by a CALL statement of the following form: 1 CALL <program unit name> (<actual parameter list>) 0 <actual parameter list> ::= <expression> * <array> <zone> <external> <zone array> 1 A function may further be called in an expression by using an operand of form: <function name> ( <actual parameter list> ) The number and types of the actual arguments must correspond to the number and types of parameters in the declaration of the called program unit. The name of a subroutine or function may be used as an actual parameter. If the name does not occur in a call situation it must be declared in an EXTERNAL statement (see Sec- tion 6.1.4). The legality of the possible actual/formal correspondances are shown in the table below. Formal Legal actual parameters simple variable constant, variable, expression array array, zone, array element, zone record ele- ment zone zone external external zone array zone array If the actual parameter is an expression or a constant, the ac- tual value is stored in an anonymous working variable, and this working variable is transferred to the program unit called. 6.1.3 P_a_r_a_m_e_t_e_r_ _C_h_e_c_k_i_n_g_ When a program unit is compiled, the compiler searches a descrip- tion of the referenced externals. The description may be found in the compiler>s catalog of program units processed in the current compilation, or it may secondly be looked up in the catalog main-\f tained by the operating system. The description contains informa- tion about the kind and type of the external and its possible pa- rameters, and this information is used by the compiler to check the calls of each external. When a single subroutine or function is compiled separately the descriptions of all its externals may not be available at compile time. An assumed description is then deducted from the actual use of the external but only consistency of the use can be checked. When the separately compiled program unit is included in an executable program the unknown external must be available. If the description of the external is still missing or if the description does not match the assumption an alarm occurs. Notice: The compiler checks at most the first seven parameters of a procedure call. 6.1.4 E_X_T_E_R_N_A_L_ _S_t_a_t_e_m_e_n_t_ To be recognized as the name of an external a name must be called within the program or it must be declared in an EXTERNAL statement of the form. * EXTERNAL <name> 1 An external may be 1. A subroutine or function described in the catalog or found in the source text of current compilation. 2. A variable in the permanent core area of the FORTRAN running system, named and described in the catalog. 3. A standard zone, supplied by the operating system and described in the catalog. 6.1.5 F_o_r_m_a_l_ _a_n_d_ _A_d_j_u_s_t_a_b_l_e_ _A_r_r_a_y_s_ For formal arrays the forms of the DIMENSION statement and of type declarations are slightly modified to <type> <parameter name> * <array name> ( ) DIMENSION <integer constant> 1 Only integer parameter names may occur in the list of bounds. If the parameters occur in the list, the array is called an adjust- able array. A formal array is defined at entry in the program unit as follows: The dimensions of the array are determined by the bounds given in the declaration of the formal array. The\f first element of the array will depend on the actual parameter as shown below: actual parameter first element array first element of array zone first element of zone record array element given array element zone record element given zone record element The resulting adjustable array must not exceed the array given as actual parameter. If this happens an index alarm will occur at run time when the called program unit is entered (unless the program unit is translated with the compiler-option "index.no", see appendix B). T_ E_x_a_m_p_l_e_ _6_._1_._1_ _-_ _A_d_j_u_s_t_a_b_l_e_ _A_r_r_a_y_s_ Assume the following declarations: subroutine pip(ar,dim) real ar(dim,3); integer dim - end program pop real tab(10,20) - 10 call pip(tab,7) 20 call pip(tab(3,4), 3) 20 call pip(tab(5,20),8) &_ end T_ The resulting adjustable array will be: statement 10: first element: ar(1,1) same as tab(1,1) last element: ar(7,3) - - tab(1,3) statement 20: first element: ar(1,1) same as tab(3,4) last element: ar(3,3) - - tab(1,5) statement 30: &_ first element: ar(1,1) same as tab(5,20) but as only 6 elements remain from tab(5,20) until the end of the\f array tab, an index alarm will occur at entry into subroutine pip, when called from statement 30. 6.1.6 F_o_r_m_a_l_ _a_n_d_ _A_d_j_u_s_t_a_b_l_e_ _Z_o_n_e_s_ A formal zone is declared by writing the name of the zone in a ZONE statement without specifying buffer size, number of shares and block procedure (see Section 5.1.5). An adjustable zone array is declared as a formal zone with an additional <parameter name> DIMENSION <zone array name> ( ) <integer constant> for which the rules given in section 6.1.5 apply. The resulting adjustable zone array is established at entry into the program unit according to the rules for other adjustable arrays (see section 6.1.5). The first element of the formal zone array will match the first element of the actual zone array. 6.1.7 E_N_D_ _S_t_a_t_e_m_e_n_t_ Program units are terminated by the statement END 6.1.8 R_E_T_U_R_N_ _S_t_a_t_e_m_e_n_t_ Return of control from a subroutine or a function is performed by passing a statement of the form: RETURN When control passes the END statement an implicit RETURN is executed. 6.1.9 E_N_T_R_Y_ _S_t_a_t_e_m_e_n_t_ A program unit may have several different entries with separate names. An entry is located in the program unit by a statement of the form: ENTRY <entry name> All entries must have the same type and are assumed to have the\f same set of formal parameters as the main entry declared in the SUBROUTINE or FUNCTION statement. 6.2 COMMON and DATA 6.2.1 C_O_M_M_O_N_ Program units may share data areas by means of the COMMON facility. The COMMON statement has the form 1 * COMMON / <common name> 0 / <common list> 1 <common list> ::= <variable name> * * 1 <array name> ( <constant bound> 1 ) 0 1 The COMMON statement declares one or more COMMON blocks identi- fied by a common name and containing the variables listed in the common list. Within a program the COMMON block is accessible to all program units which contain a declaration of that specific COMMON block. The declaration of a COMMON block within different program units must agree with respect to the length of the COMMON block but the name and type of the variables in the common list may vary from one program unit to another. If the name of the COMMON block is omitted the variables are stored in a COMMON block called BLANK COMMON. The treatment of this COMMON block is exactly as for other COMMON blocks. Note, that in RC FORTRAN an integer occupies one word but a real occupies two words. This may affect the COMMON correspondance as shown in the following example. E_x_a_m_p_l_e_ _6_._2_._1_ A COMMON block, c1, is declared in two different ways in the program units A and B as follows: Program unit A common/c1/p,q,r(2) integer p,r; real q Program unit B common/c1/dummy(3),r(2) integer dummy, r The two different declarations will result in storage allocations\f as shown below: word boundaries 1 2 3 4 5 unit A p q r unit B dummy r The array r corresponds to the same storage locations in program unit A and B. However, if dummy is not declared as integer this will not happen. 6.2.2 L_o_c_a_l_ _V_a_r_i_a_b_l_e_s_ _v_e_r_s_u_s_ _C_O_M_M_O_N_ _V_a_r_i_a_b_l_e_s_ The variables not declared in COMMON are called local variables. There are some important differences in the treatment of these two classes of variables. COMMON areas are static and thus all COMMON variables permanently occupy core store during the run. COMMON variables may be initi- ated by DATA statements in any program unit. The storage alloca- tion for COMMON variables reflect the order of declaration, i.e. variables are allocated contiguously in the order in which they occur in the COMMON declarations. Local variables are dynamic. Core area is reserved and allocated to local variables and arrays at entry into a proram unit, and the variables are deleted by releasing the core at exit from the program unit. Thus local variables occupy core only as long as they are active, that is during execution of the program unit in which they are declared. As a consequence local variables may not be initiated by DATA statement, and the values of local variables are always undefined at entry into the program unit in which they are declared. 6.2.3 Z_o_n_e_s_ _i_n_ _C_O_M_M_O_N_ A zone may be declared in COMMON, but a COMMON block may only contain one zone or one zone array. Zones and other kinds may not be in the same COMMON block. Only the name of the zone may be written in the common list while the remaining declaration should be given in the normal ZONE statement. The zone declaration for a zone in COMMON must be identical in all program units having declared the zone. 6.2.4 D_A_T_A_ _S_t_a_t_e_m_e_n_t_ Form: M_m_m_ * DATA <variable list>/<value list>/ P_p_p_ 1 \f <variable list> ::= <variable name> * <array name> * <array name>( <integer> 1 ) 1 <value list> ::= <constant> * <extended text> <repeating integer>*<constant> 1 R_u_l_e_s_ 1. Single variables or whole arrays may be initiated by DATA statements. 2. A sequence of identical values may be specified by writing a repeating integer and a * before the value to be repeated. The repetition integer must be a positive constant. 3. The number of values in the value list (including repeti- tions) must match the number of variables in the variable list. 4. If the type of a variable and its corresponding value differ the constant is converted according to the rules for assign- ments (see Section 4.1). 5. Only variables in COMMON may be initiateed. B_L_O_C_K_ _D_A_T_A_ As DATA initiation may be specified within any program unit, the special program unit BLOCK DATA is not implemented in RC FORTRAN. Existing programs may be modified for RC FORTRAN by (1) replacing the BLOCK DATA statement by a subroutine heading, and (2) declaring the subroutine name as EXTERNAL in the main program. E_x_t_e_n_d_e_d_ _T_e_x_t_ _C_o_n_s_t_a_n_t_s_ _i_n_ _D_A_T_A_ _S_t_a_t_e_m_e_n_t_s_ In DATA statements it is allowed to write text constants of more than six characters. The extended text string is broken down into short text constants by the compiler, and the last short constant is filled up with NULs if necessary. E_x_a_m_p_l_e_ _6_._2_._2_ long errtxt(4) common/c/errtxt data errtxt/>key missing in record>/ The text is stored six characters per word in the array errtxt,\f as the number of characters is not a multiple of six, NUL charac- ters are added to fill the last element. T_ 6.3 Program units from the catalog A catalog is maintained by the RC operating system. Compilers and assemblers may insert catalog entries describing program units, &_ which are compiled seperately for later use within a main pro- gram. An RC FORTRAN program may include catalog externals pro- grammed in FORTRAN, Algol, or in assembly language. Non-FORTRAN program units must obey certain rules as described below. T_ 6.3.1 A_l_g_o_l_ _E_x_t_e_r_n_a_l_s_ An Algol program unit must be programmed according to Ref. 2, and it must be compiled separately by the Algol compiler to be estab- &_ lished as an external described in the catalog. It may then be included in a FORTRAN program nearly as a FORTRAN program unit. The following special rules apply: 1. Parameters of Algol types string, long and label must not be used. 2. In FORTRAN arrays are stored column after column, according to ISO. In Algol arrays are stored row after row. 3. FORTRAN routines will not treat name parameters correctly. This may cause unpredictable reactions, if a FORTRAN routine is given as actual parameter for an Algol external. 4. The Algol procedure may not use field-variables or longs, nor may it use any features from ALGOL 7. The library procedures of the Algol library may also be used within the FORTRAN system. However, the Algol procedures read and write may not be referenced from a FORTRAN program as these names are reserved for FORTRAN READ/WRITE. Descriptions of the Algol library procedures are found in Ref. 2. T_ 6.3.2 P_r_o_g_r_a_m_ _U_n_i_t_s_ _i_n_ _M_a_c_h_i_n_e_ _L_a_n_g_u_a_g_e_ Program units programmed in machine language may be included in a FORTRAN program. The program units must be assembled by the Slang &_ assembler for RC 4000, RC 6000 or RC 8000, and described as cata- log externals. Detailed conventions for a machine coded procedure are given in Ref. 4. However, the use of this possibility should be limited as far as possible to maintain the high reliability given by the Algol and FORTRAN systems. \f F_ App. A RC FORTRAN Syntax Description A.1 Explanation RC FORTRAN is described using the Backus-Naur Form expanded with a choice bracket and a list bracket. Both brackets can be supplied with repetition numbers. The definition is: <construction 1> ... ::= <construction 1> ... <construction N> <construction N> M_m_m_ b b-1 <construction> ::= <construction> <construction> P_p_p_ a a-1 M_m_m_ b b-1 <construction> ::= <construction> ,<construction> P_p_p_ a a-1 where a is the minimum number of repetitions and b is the maximum number of repetitions. a = 0 means empty, b = * means any number of repetitions, and if a and b are not given a = b = 1 is understood. The following abbreviations are used: arith for arithmetic decl for declaration expr for expression mask for masking Limitations in the use of names are given by supplying the kind. Limitations in expressions are given by adding the type, and here arith(metic) includes integer, long, real, double precision, and complex; type long includes integer, and type mask is an auxili- ary type used in connection with masking operations but the in- ternal treatment is as integer, long, or real (further explained in Section 3.3 Arithmetical and Masking Expressions). \f A.2 Symbols and Primitives <symbol> ::= <letter> <digit> <separator> <terminator> <graphic> <arithmetical operator> <blind> <in text> <blind> ::= NUL DEL <in text> ::= SP _ <letter> ::= a b c ... z æ ø å A B C ... Z Æ Ø Å <digit> ::= 0 1 2 3 4 5 6 7 8 9 <separator> ::= ( ) , . = > <terminator> ::= ; S NL FF <graphic> ::= ! " % & : < > ? @ M_ <arithmetical P_ operator> ::= + - * / ** M_ <relational P_ operator> ::= .LT. .LE. .EQ. .NE. .GE. .GT. <logical operator> ::= .NOT. .AND. .OR. <masking operator> ::= <logical operator> .SHIFT <type> ::= INTEGER LONG REAL DOUBLE PRECISION COMPLEX LOGICAL <name> ::= <letter> <letter> * <digit> 0 <sign> ::= + 1 - 0 M_m_m_ * <digits> ::= <digit> P_p_p_ 1 <integer> ::= <digits> <long> ::= <digits> <basic real> ::= <digits>.<digits> <digits>. .<digits> <real> ::= <basic real> <basic real> E<sign><integer> <integer> <double> ::= <basic real> D<sign><integer> <integer> \f <complex> ::= (<sign><real>,<sign><real>) <number> ::= <integer> <real> <double> <complex> <logical> ::= .TRUE. .FALSE. M_m_m_ n <text> ::= <integer n> H <symbol> P_p_p_ n M_m_m_ * > <symbol> > P_p_p_ 0 M_m_m_ 48 <bitpattern> ::= 1B 0 1 P_p_p_ 1 M_m_m_ 24 2B 0 1 2 3 P_p_p_ 1 M_m_m_ 16 3B 0 1 2 3 4 5 6 7 P_p_p_ 1 M_m_m_ 12 4B <digit> A B C D E F P_p_p_ 1 <constant> ::= <sign><number> <logical> <text> <bitpattern> M_m_m_ 5 <label> ::= <digit> P_p_p_ 1 <variable name> <array name> <formal> ::= <zone name> <zone array name> <procedure name> <expr> <array name> <parameter> ::= <zone parameter> <zone array name> <procedure name> <zone parameter> ::= <zone name> <zone array name>(<arith expr>) M_m_m_ * <array element> ::= <array name> ( <arith expr> ) P_p_p_ 1 <zone element> ::= <zone name>(<arith expr>) <zone array name>(<arith expr>,<arith expr>) \f A.3 Declarations <program decl> ::= PROGRAM <name> M_m_m_ * 1 <procedure decl> ::= SUBROUTINE <name> ( <formal> ) P_p_p_ 1 0 M_m_m_ 1 * <type> FUNCTION <name>(<formal> ) P_p_p_ 0 1 <common decl> ::= M_m_m_ COMMON /<name>/ <variable name> * * * 1 // <array name> (<integer> ) 1 0 P_p_p_ 1 M_m_m_ /<name>/ <zone name> * 1 // <zone array name> (<integer>) 0 P_p_p_ 1 1 <type decl> ::= <type> <name> * <array name>( <integer> *) M_m_m_ <integer name> 1 P_p_p_ 1 <dimension decl> ::= DIMENSION <array name>( <integer> * ) * <integer name> 1 <zone array name>( <integer> ) <integer name> 1 <zone decl> ::= M_m_m_ 1 * ZONE <name> (<integer>,<integer>,<procedure name>) P_p_p_ 0 1 \f <external decl> ::= EXTERNAL <procedure name> * <variable name> <zone name> 1 <equivalence decl> ::= EQUIVALENCE ( <variable name> *) * * <array name> ( <integer> 1) <zone name> ( <integer> ) <zone array name>(<integer>,<integer>) 2 1 <initiation> ::= 1 * * DATA <variable name> */ <integer>* 0<constant>1/ <array name> * 1 <array name>( <integer> 1) 1 1 A.4 Expressions <arith operand> ::= <number> <arith variable name> <arith array element> <zone element> * <arith function name>( <parameter> 1) <mask operand> (<arith expr>) <arith expr> ::= * <sign><arith operand> <arith operator><arith operand> 0 <mask operand> ::= <integer operand> .SHIFT.<integer operand> <long operand> <real operand> <mask operand> (<mask expr>) \f <mask expr> ::= 1 1 .NOT. 0 <integer expr> .AND. .NOT. 0 <integer expr> <long expr> .OR. <long expr> <real expr> <real expr> <mask operand> <mask operand> <logical operand> ::= <logical> <logical variable name> <logical array element> * <logical function name> ( <parameter> 1 ) <arith expr><relational operator><arith expr> (<logical expr>) <logical expr> ::= 1 1 * .NOT. 0 <logical operand> .AND. .NOT. 0 <logical operand> .OR. 0 A.5 Executable Statements <simple statement> ::= <variable assignment> <label assignment> <jump statement> <conditional statement> <empty statement> <procedure statement> <transfer statement> <inout statement> <statement> ::= <simple statement> <loop statement> <variable assignment> ::= <variable name> = * <expr> <array element> <zone element> <function name> 1 <label assignment> ::= ASSIGN <statement label> TO <label name> \f <jump statement> ::= GOTO <statement label> * 1 <label name> ,( <statement label> 1) 0 * ( <statement label> 1),<arith expr> 1 <empty statement> ::= CONTINUE 0 <procedure statement> ::= * 1 CALL <procedure name> ( <parameter> 1) 0 <transfer statement> ::= RETURN 1 STOP <integer> 0 <conditional statement> ::= 3 IF ( <arith expr> ) <statement label> 3 IF ( <logical expr> ) <simple statement> <loop statement> ::= 3 DO <statement label> <integer name> = <arith expr> 2 * <end statement> ::= END <symbol> 0 A.6 Input/Output Statements <inout statement> ::= READ 1 * (<logical unit> ,<format label> ) <put> WRITE 0 0 <logical unit> ::= <zone parameter> <arith expr> \f <put> ::= <expr> but in READ limited to <variable name> <array element> <zone element> <array name> <zone parameter> * ( <put> 1 ) * 3 ( <put> 1 , <integer name> = <arith expr> 2) 1 <format decl> ::= FORMAT ( <format field> 0 ) FORMATO <format field> ::= 1 1 1 - 0 <integer>P 0 <integer> 0 F<integer>.<integer> E<integer>.<integer> D<integer>.<integer> 1 <integer> 0 I <integer> I <integer>.<integer> L <integer> A <integer> B <integer>.<integer> X <text> / * * * * / 0 <format field> 1 / 0 1 1 <integer> 0 (<format field>) \f T_ A.7 Program Structure <program unit> ::= M_m_m_ 1 <program decl> P_p_p_ 0 <procedure decl> M_m_m_ * P_p_p_ <common decl> <type decl> <dimension decl> <zone decl> <external decl> <format decl> M_m_m_ <initiation P_p_p_ 0 M_m_m_ * <equivalence decl> P_p_p_ 0 M_p_p_ * P_p_p_ <statement> <format decl> M_m_m_ ENTRY <name> P_p_p_ 0 &_ <end statement> \f F_ App. B Call of Compiler The compiler is activated by an fp-command of the following form: <bs file> = fortran <text file> * <modifier> 0 <modifier> ::= index . yes spill no trunc list names message survey testin cond cardmode stop . yes no <last pass> details . yes no 1 <first pass>.<last pass> .<first line>.<last line> 0 1 test <letter> 0 . yes no <bs file> A file descriptor describing a backing stor- age area. The area is used as working area for the compilation, and for the object code. The file descriptor is then changed to de- scribe a program unit. The RC FORTRAN compiler will work in two different modes: 1. A source text containing a single subrou- tine or function may be compiled into a bina-\f ry program unit. The object file is changed to describe an algol/fortran subroutine. For each entry point in the compiled subroutine/ function a shared entry is created describing the entry point and referring to the name of the object file. The name given in the sub- routine/function statement is lost and thus irrelevant. 2. A source text containing a number of sub- routines and/or functions and one main pro- gram may be compiled into an executable pro- gram. The object file is changed to describe an executable program. The name of the pro- gram is lost and thus irrelevant. <text file> A text file is an fp text file or a text en- ding with the EM or HT-character. The list of text files specifies the wanted order of in- put files to the compiler. If no source is specified, the compiler reads the source from current input. N_o_t_i_c_e_:_ Input of sourcetext is terminated when a line, starting with a slash in posi- tion 1, is encountered. The line is listed as a message line. <modifier> The list of modifiers is scanned from left to right. Each modifier changes the variables controlling the compilation. When the scan starts, the variables are initialized to the value explained below. index.no Code for dynamic check of subscripts against bounds is omitted. Initial setting: index.yes. trunc.no Conversion from real (and double precision) to integer (and long) yields a rounded re- sult. Otherwise a truncation will be per- formed (see section 4.1). Initial setting: trunc.yes. \f spill.yes Dynamic check of integer overflow is per- formed. Even if the external procedures referenced were translated with spill.no, a partial check of integer overflow is per- formed when they are executed. Initial set- ting: spill.no. list.yes The entire source text is listed on current output with line numbers in front of each line. Initial setting: list.no. names.yes A primitive crossreference listing is printed giving for each program unit: list of entry point names list of external names list of common names and the size (in half- words) of each common list of zone common names and the size (in halfwords) of each common the number of halfwords used for local variables. Initial setting: names.no. message.no Normally all message lines in the source text (i.e. lines starting with an M as first sym- bol, see section 1.2) are listed with line numbers. With 'message.no' this listing is omitted. Initial setting: message.yes. survey.yes A summary is printed on current output after the completion of each pass of the transla- tion. The meaning of the summary is explained in ref. 4. Initial setting: survey.no. stop.<last pass> The translation is terminated after the pass specified. stop.yes terminates the transla- tion after the last pass. The translation is regarded as unsuccessful. Initial setting: stop.no details.yes Intermediate output from all passes of the compiler is printed on current output. The output may be restricted to an interval of pass numbers and to an interval of line num- bers. Initial setting: details.no. \f testin.yes Works as details.yes, but prints the inter- mediate compiler data as it is input by the passes. The option is blind in case of de- tails.no. Initial setting: testin.no. cond.yes A listing is performed, starting with a line with the letter L in the first position and continuing to the first end statement. Initital setting: cond.no. cardmode.yes Only the first 72 characters of a source line are treated as fortran text. Exceeding characters are skipped. Initial setting: cardmode.no. test.yes Lines with one of the possible <letter>-va- lues in the first position are procecssed as program lines instead of being comment lines. Initial setting: test.no. test<letter>.yes Lines with <letter> in the first position are processed as program lines instead of being comment lines. Initial setting: test<letter>.no. T_ R_e_q_u_i_r_e_m_e_n_t_s_ _o_f_ _t_h_e_ _c_o_m_p_i_l_e_r_ The compiler occupies about 80 segments on the backing store. A process size of 11000 halfwords is necessary to run a compila- tion. The compilation of large programs usually requires a pro- cess size, which is one or a few thousand halfwords larger. If the available core area is too small the compilation will termi- nate with an error message. \f F_ App. C Messages from the Compiler The messages from the compiler may concern the call of the com- piler or it may be diagnostics produced during processing of the source text. The first kind of messages have the form *** fortran <text> and are followed by termination of the compilation. Other messages may have one of three forms: Form 1: <pass no> line <line no>.<operand no><text><aux1><aux2> Form 2: <pass no> line <line no><text> Form 3: <pass no> <name> <text> pass no is the number of the current compiler pass. line no is the number of the relevant line of the source text. The first line has number 1; only lines containing visible symbols are counted. operand no indicates the position within the line, where the error is found. An operand is a name or a constant. Operands are counted from the left starting with 1. text is a short description of the error. aux1, aux2 are auxiliary values helping to describe the error as specified in the list below. name with form 3: the name given is the name of a program unit or common block connected with the error. The pass no is only given with the first error line. The operand number may be irrelevant with some of the messages which are marked by (NB) in the list. Aux1 and aux2 are often omitted. In the following list the messages are sorted according to <text> and they are classified as: (alarm) The translation is terminated as an unsuc- cessful execution. The program cannot be executed. (warning) The message has no effect. \f Otherwise the translation continues and the program may be executed until the erroneous construction is met. ftn. end <i> This is not an error message. The fortran program has been translated. The ok-bit is set to yes. The warning-bit is set to no if no error messages have occured, otherwise it is set to yes. The object code occupies <i> segments. fortran sorry <i> An alarm has occured. The ok-bit is set to no. The integer <i> shows the number of seg- ments the compiler has attempted to make. *** fortran <text> The compilation is stopped and the ok-bit is set to no. adjustable bound Declarator subscript should be integer con- stant. bitpattern Three types of error may occur. The type is given in aux1 and further information in aux2 as follows: aux 1 description aux2 1 illegal bit group bit group size size 2 illegal digit illegal digit 3 overflow digit in process call A procedure call has a wrong number of parameters. <name> catalog Trouble with catalog lookup, for instance <result> because a standard identifier is missing in the catalog. The name of the identifier and the lookup result is printed (alarm). <name> commo Inconsistent common declaration, for instance a common declared with different length in different program units. The name of the com- mon is printed (alarm). \f common error (NB) Mixing of zones and other variables in common, two zones in the same common, or a variable is two times in common. constant index During compilation a subscript is outside the declared range. constant outside The value of a real constant, a double preci- allowed range sion constant or the real or imaginary part of a complex constant is outside the allowed range, i.e., 1.547174*10**(-617) <_ abs (value) <_ 1.615850*10**(616) continuation mark on a labelled line <char in A label and a continuation mark is not al- position 6> lowed on the same line +declaration Identifier declared twice or more times. dimension equi- valenced common Start of dimension outside lower bound of variable common area, equivalence illegal. dimension equi- Start of dimension outside zone record, equi- valenced zone valence illegal. do after if A conditional statement must not be a do statement. do construction Illegal number of control parameters in do or implied do. entry name Entry name should be simple local. equivalence Two variables cannot be equivalenced because impossible they are placed in common areas, maybe by previous equivalence statements. equivalence index Subscription missing for array or zone iden- trouble tifier, or subscription on a simple variable in an equivalence statement. \f equivalence Index error for array or zone in an equiva- subscript lence statement. erroneous termi- The terminating statement is not situated nated do range after the do statement and before the end statement or before the terminating statement of an outer do statement. exponent too big A preliminary conversion has shown that the <converted value> exponent value is outside the range: -1000 <exponent <_ 1000 external zone not (NB) One of the zone identifiers, declared as in catalog external, is not present in the catalog. It can be any of the external zones if more than one is declared. formal in common A parameter is declared as a common variable. format error be- (NB) Illegal structure or illegal field spe- fore comma no. cification values has been detected in a for- <comma no.> mat statement. graphic The character with decimal value <char value> <char value> is illegal in this context. <name> kind This alarm may occur for two different reasons: 1. If the use of a name from the catalog does not match the catalog description of the name. Such error may occur when a subroutine or function is compiled without its externals being present in the catalog (see Section 6.3), or if the catalog description is changed after being used in the compilation. 2. If a common declaration from a catalog external differs from the common declaration in the program unit under compilation (alarm). \f illegal <char The character is of class illegal, see Table value><line no.> 1 in the manual. It is marked with a question mark in a listing and does not count on the line. illegal number A complete source text must be either one of main programs single program unit or a number of program units with one main program (alarm). label A label is not declared or multiple de- clared. labelling error Missing or misplaced label. label not referred A declared but not referred label (warning). label syntax The character pointed out is not allowed in a <error char value> label field. list structure Illegal element type or illegal separator in a list. missing ) One or more right parenthesis are missing. missing end An EM-char is read within a program unit. An end statement is generated and the compiler goes on. more actions More actions in action stack at statement end (compiler error). <name> The object area is not renamed because the name trouble program name already exists in the catalog. non-common element, (NB) A simple variable or an array of the rightmost group data group in the data statement is not in no. <group no.> common. no. of subscripts Number of subscripts in an array declaration illegal must be < 32. no. of zones illegal Number of zones in a zone array must be < 32. not implemented Action not implemented (compiler error). \f operand stack Operands in stack at statement end (compiler error, may occur after a fault in a state- ment). overflow During compilation an expression holding constants causes arithmetical overflow. param Illegal parameter in the FP-command, calling the compiler. The parameter is ignored (Warning). pass trouble The job area is too small to load the next pass of the compiler or the next pass has been destroyed. (Alarm). program too big The backing storage area specified cannot hold the object code. (Alarm). run stack full A program unit has too many variables and/or uses too many working variables. short text<no. of For hollerith constants the following condi- chars processed> tion is not satisfied: 1 <_ no. of characters <_ 6 statement The statement sequence is wrong within a pro- sequence gram unit, e.g., declarative statement after executable statement. Note: equivalences must be placed after all other declarations. statement structure The main structure of a statement is wrong. subscripts A subscripted variable has a wrong number of subscripts. syntax error Syntactical error within a subconstruction of a statement. too many signifi- Leading zeroes do not count, and one of the cant digits conditions below is not satisfied: <no. of digits long constant: abs(value)<2**47 converted> double precision constant: no. digits<20 \f Note that a floating point number with no. digits > 11 is always a double precision constant. top not in w1 The operand stack pointer is wrong (compiler error, but the program will run anyway). type The declaration or type of an operand is not in accordance with its use. unassigned ele- ments, rightmost (NB) The number of constants does not equal group no. the number of elements in the data group of <group no.> the data statement. <name> unkn. The external with the specified name did not exist in the main catalog. (Alarm). wrong standard Error in the action tables of pass 7 (com- &_ action piler error). zone Wrong number of subscripts after zone or zone array. zone specification The zone declaration must specify buffersize, number of shares and block procedure except for formal zones. \f F_ App. D Program Execution D.1 Execution of an RC FORTRAN Program A compiled RC FORTRAN program may be executed by a file processor command of the form <bs file> <empty> <source><anything> <integer> <param><anything> <param> ::= <integer> . <integer> <name> <name> <bs file> A file descriptor describing a backing sto- rage area which contains the compiled FOR- TRAN program. <empty> The program is called with the current input file of the file processor connected to IN. <source> A file descriptor. The program is called with the described file connected to IN. The current input file of the file processor is untouched. <integer> The program cannot use IN and OUT and it can- not print error messages. When the program terminates, it sends a parent message corre- sponding to a ,break, and specifying the cause of the termination. On the other hand, 3000 - 4000 halfwords more are available in this way. The possibility is mainly intended for operating systems, which "never" are terminated, never use IN and OUT, and work satisfactorily in a very short core area. <param> Works as <empty>. The commmand parameters <param> may be accessed from the running program by means of the procedure >system> (see Ref. 2). \f <anything> As <param>. Example: progxx = set 50 progxx = fortran progtxt list.yes message.no progxx dataxx The program text found in the file >progtxt> is compiled into the object file >progxx>. The program is then executed with the file >dataxx> connected to the zone IN. Example (corresponding to ref. 7, introduction): progyy = fortran ; read from current input program test zone in, out external in, out read (in, 1) a, b 1 format (f1.0, x, f2.0) write (out, 2) a**b 2 format (x, f6.0) end /this is the last line progyy ; call program 2 10 ; with this line as data The output from these call will look like: 9/this is the last line ftn. end 22 1024 end 15 D.2 Run time Alarms D.2.1 I_n_i_t_i_a_l_ _A_l_a_r_m_ Before the program is entered, the alarm *** <program name> call may appear. It is due to either: the program is not on backing store, the source is not a text, or the job process is too short. \f D.2.2 N_o_r_m_a_l_ _F_o_r_m_ When the program is called with <program><integer>, a run time alarm appears as a parent message (see Ref. 2). In normal case, a run time alarm terminates the program with a message of the form: <cause> <alarm address> called from <alarm address> called from ... A list of the possible alarm causes is given in D.2.4. The pro- gram is terminated unsuccessfully, except after the message >end>. An alarm address shows where the error occurred. If this is a procedure or a name parameter, a line specifying the call address or the point where the name parameter was referenced is also printed. The process is repeated if several calls or refe- rences were active at the time of the alarm. If more than 10 calls or references are active, the process stops after having printed the last >called from> but before the last alarm address is printed. An alarm address may take 3 forms: 1. name of a standard procedure or a set of standard procedures 2. line <first line> - <last line> 3. ext <first line - <last line> Form 2 specifies a line interval in the source text of the main program. Form 3 specifies a line interval in an external procedure. The accuracy of a line interval corresponds to about 16 instructions of generated code. The first line number may sometimes be 1 too large. The line number of a procedure call points to the end of the parenthesis. The following alarm addresses from library procedures are used: char input (read, readall, readchar, readstring, repeatchar, intable), (see Ref. 2) check (all high level zone procedures use the procedure check) complex op (complex or long arithmetic) fortranfct. (iabs, abs, amod, mod, min0, max0, amin0, amax0, min1, max1, amin1, amax1) \f ftn io (fortran read/write) open (open) position (getposition, setposition, close) readon (fortran read) recprocs (inrec, outrec, swoprec) rl convert (conversion between real and long, DATA initiation) stand.fct. 1 (exp, alog, sinh) stand.fct. 2 (atan, arg, sin, cos) stand.fct. 3 (arcsin, sqrt) writeon (fortran write) zone declar (the code that declares zones and zone arrays) zone share (getzone, getshare, setzone, setshare), (see Ref. 2) D.2.3 U_n_d_e_t_e_c_t_e_d_ _E_r_r_o_r_s_ If all parts of a program have been translated with both index.yes and spill.yes, the following errors may still pass undetected: 1. Parameters in the call of a procedure which is a formal pa- rameter do not match the declaration of the corresponding actual procedure. Any reaction may result. 2. A subscript may exceed the bounds in an array declaration with more dimensions as long as the lexicographical index is inside its bounds. The control of the program remains intact. 3. The program may write into the backing storage area occupied by the program itself. Any reaction may result. 4. Undebugged standard procedures in machine language may cause any reaction. 5. Parameters, beyond the seventh parameter, in the call of a procedure do not match the declaration of the procedure. Any reaction may result. The monitor and the operating system will usually limit the con- sequences of errors in such a way that no other job or process in the computer can be harmed. \f D.2.4 A_l_p_h_a_b_e_t_i_c_ _L_i_s_t_ _o_f_ _A_l_a_r_m_ _C_a_u_s_e_s_ The error messages below cover only the standard procedures de- scribed in this manual. The set of messages is expected to grow with the standard procedure library. arcsin 0 Illegal argument to arcsin. block <i> Too long record or record with a negative length in call of inrec, outrec, or swoprec. The block length is shown. break <i> An internal interrupt is detected. <i> is the cause of interrupt, usually meaning: 0 illegal long text string as parameter, 6 too many message buffers used (see Ref. 1), 8 program broken by the parent, often because it is looping endlessly. In this case, the alarm address should be taken with some re- servation. The break alarm will often be called as a result of the undetected errors described in D.2.3. end <i> The program has passed the final end. The integer printed after end shows the value of the standard integer BLOCKSREAD as the program terminated (see appendix D.3). This is not an error message. entry <i> Illegal function code or entry conditions in a call of monitor, system, or systime (see Ref. 2). The function code attempted is shown. exp 0 Illegal argument to exp. giveup <i> Printed by stderror. The number of halfwords transferred is shown. The file processor prints the name of the document and the logical status word. index <i> Subscript outside bounds. The lexicographical index is shown. This message occurs also for subscripted zones or record variables. The index alarm is called if a block procedure specifies a too long block. In this case, the value of the block length is shown. \f integer Integer overflow. label Attempt to goto an unassigned label variable. length <i> Illegal record length in call of inrec, out- rec, or swoprec. The attempted length is shown. ln 0 Argument to alog <= 0. not unit <i> An unassigned unitnumber is used. The attemp- ted unitnumber is shown. modekind <i> Illegal modekind in call of open. The kind is shown. param Wrong type or kind of a parameter. real Floating point overflow or underflow. share <i> An illegal share number is specified. The number attempted is shown. sh.state <i> A share in an illegal state is specified. The share state is shown. sinh 0 Illegal argument to sinh. sqrt 0 Argument to sqrt is < 0. stack <i> The number of variables exceeds the capacity of the job area, or an array or a zone is declared with a nonpositive number of ele- ments. The number of halfwords attempted in the reservation of storage is shown. syntax The program is terminated at a point where an error was detected during the translation. uncoded <i> Format in array is not implemented. (The num- ber shown is irrelevant). \f value <i> The contents of ia(i) in setzone(z,ia) or setshare(z,ia,sh) is illegal. The value of i is shown (see Ref. 2). z.kind Swoprec is not used on a backing storage area. z.length <i> The buffer length is too short. The actual buffer length is shown. z.state <i> A high level zone procedure is called in an illegal zone state. The actual state is shown. The value of the zone state is determined by the latest call of the standard procedures using the zone. The most important values are given below. Other values may be defined to- gether with other zone based procedures and are then given in the procedure descriptions. zone state situation 0 For magnetic tapes: after setposition; for other documents: after open or setposition. 1 After reading on character level. 2 After repeat char (algol, see Ref. 2). 3 After writing on character level. 4 Just after declaration of the zone. 5 After inrec, unformatted read. 6 After outrec, unformatted write. 7 After swoprec. 8 After open on magnetic tape. z.units Too many zones are assigned units numbers at one time. The maximum number is shown. D.3 The Object Code The object code is partitioned in segments of 128 double words each. If a single subroutine or function is compiled, the object code consists of a number of segments corresponding to the source text. If a main program is compiled, the compiler will add a few\f segments called the running system. The running system contains routines for segment transfer, core reservation, alarm admini- stration, basic input/output, etc. Further the compiler will add to the program all segments corre- sponding to external subroutines or functions referenced by the program. The running program will require a minimum process size of about 4500 halfwords to be executed. The available core area will be shared dynamically among the variables and the program. The necessary core area for local zones, arrays and variables are reserved at entry into a program unit and released at exit from the program unit. Further the program segments are transferred to the core gradually as required by the execution. If no unused core area is available, the segment transfer will overwrite one of the segments already in core. The transfer of a segment to core store requires 8-100 millise- conds (depending on kind of backing storage, position of read/ write heads etc.), while the transfer of control to a segment already present in the core store takes about 0.01 millisecond. Therefore the program execution time may be highly dependent on whether the most frequently used loops of the program may be held entirely in the core store or not. The number of segment trans- fers is available as the value of an external integer variable BLOCKSREAD, which is initiated to zero at the beginning of pro- gram execution and increased by one at every transfer of a pro- gram segment. \f F_ App. E Survey of Standard Names This appendix contains a survey of names which are reserved for special use in the RC FORTRAN. The first group of names consists of names of standard externals available to the user. The second group contains names of routines belonging to the running system of RC FORTRAN. \f F_ Table E.1 L_i_s_t_ _o_f_ _S_t_a_n_d_a_r_d_ _E_x_t_e_r_n_a_l_s_ m_ Definition No. of Name of Type of Type of para- function para- function p_ meters m_ Absolute value of p1 1 abs real real iabs integer integer cabs complex real p_ dabs double double m_ p1 modulo p2 2 amod real real p_ mod integer integer m_ max(p1,p2,...) >2 amax0 integer real amax1 real real max0 integer integer p_ max1 real integer m_ min(p1,p2,...) >2 amin0 integer real amin1 real real min0 integer integer p_ min1 real integer m_ real part of complex p_ number 1 real complex real m_ imaginary part of com- p_ plex number 1 aimag complex real p1 + p2 * -1 2 cmplx real complex m_ exponential, e**p1 1 exp real/in- real teger p_ cexp complex complex m_ natural logarithm, 1 alog real/in- real ln p1 teger p_ clog complex complex m_ sine p1 1 sin real real p_ csin complex complex m_ cosine p1 1 cos real real p_ ccos complex complex m_ the square root of p1 1 sqrt real/in- real teger p_ csqrt complex complex m_ arctangent of p1 radians 1 atan real/in- real p_ teger conjugate of p1 1 conjg complex complex argument of p1 1 cang complex real sign of p1 2 dsign double double truncated value of p1 1 ifix real integer floated value of p1 1 float integer real \f F_ The names listed below are reserved for special purposes in RC FORTRAN and should not be used for other purposes by the pro- grammer. Name Connected to inwrcrcrcrc WRITE wrircrcrcrc WRITE inrrcrcrcrc READ rearcrcrcrc READ lmlrcrcrcrc long multiplication ldlrcrcrcrc long divison cacrcrcrcrc complex addition cscrcrcrcrc complex subtraction cmcrcrcrcrc complex multiplication cdcrcrcrcrc complex division dadrcrcrcrc double precision addition dsdrcrcrcrc double precision subtraction dmdrcrcrcrc double precision multiplication dddrcrcrcrc double precision division icdrcrcrcrc convert integer to double precision lcdrcrcrcrc convert long to double precision rcdrcrcrcrc convert real to double precision dcircrcrcrc convert double precision to integer dclrcrcrcrc convert double precision to long dcrrcrcrcrc convert double precision to real \f F_ App. F Deviations from ISO FORTRAN F.1 Limitations - Local variables cannot be initiated by DATA statements. - Logical variables may not appear in EQUIVALENCE statements. - PAUSE, REWIND, BACKSPACE and ENDFILE are not implemented. - G-format not implemented, H-code for output only. - Format in array not implemented. - Statement function not implemented. - Exponentiation of entities declared double precision is not included. - Integers, logicals, and reals do no occupy the same amount of storage. - Texts cannot easily be handled in integer or real variables, and not at all in logical variables. - DATA statements may only occur among declarations. - BLOCK DATA is not implemented. - Recognition of compound symbols is defined as terminated by an <in text> symbol and not from the context. It is thus not pos- sible to have a variable with the name WRITE etc. - DO loops (and implied DO loops) are not always executed at least one time. F.2 Extensions - Extended character set. - Names of more than 6 characters. - 48-bit integers. - Bit pattern constants, apostrophed text constants. - B-format allowing binary, ternary, octal and hexadecimal input/ output. - Masking operations and shifting operation. - Mixing of types in arithmetical expressions. - General expressions allowed as subscripts, in DO statements, and in computed GOTO statements. - Multiple entries in procedures. - DATA initiation in any program unit. - Open formats. - Zones and record handling procedures. - The parameters in a DO statement (and in implied DO) may be ne- gative and the loop may be totally skipped. \f F_ App. G Execution times in micro seconds The time given are based on a RC 8000/45. The times given below represent the total physical times for exe- cution of algorithmic constituents. The total time to execute a program part is the sum of the times for the constituents. The times are only valid under the following assumptions: 1) The time for transfer of program segments from the backing storage negligible (see appendix D.3). 2) The program is not waiting for peripheral devices (see 5.2). 3) The time slice interval is 25.6 milliseconds or more (see ref. 10). 4) The program is the only internal process running in the computer. When the computer is time shared, assumption 4 is not fulfilled, but then the times represent the CPU time used by the program. G.1 Operand References Reference to local identifiers and constants 0 Reference to common variable 0-4 G.2 Constant Subexpressions Operations are performed during the translation and thus do not contribute to the execution time in the following cases: +-*/.shift. working on constant operands conversion of an integer constant to a real constant, or vice versa The result of an operation performed during translation is again treated as a constant. \f Examples: A(-2+6/5) is reduced to A(-1) 1+0.5-0.25 is reduced to 1.25 p+3*2-4/4 is only reduced to p+6-1 because p+6 must be evaluated first. G.3 Saving Intermediate Results By the term "composite expression" we mean any expression invol- ving operations to be executed at run time. Examples: A(i) B+1 a .shift. 8 pr(i,i, >ab>) are composite A(2) >ab> 5 .shift. 20 11.5 are not composite (see G.2) During evaluation of expressions one intermediate result is saved in the following cases: +, *, .and., .or.,all relations,.shift. when working on 2 composite expressions. -,/ when the right hand expression is composite. Saving of an intermediate result takes the same time as an as- signment. G.4 List of execution times for a selection of FORTRAN constructs (unit is microseconds) GOTO = 2.6 Assigned GOTO = 23.3 Computed GOTO = 16.3 Logical if (true) = 5.7 Logical if (false) = 2.9 Arith. if = 6.4 Continue = 0.0 DO (1 cycle) = 22.7 Call subroutine = 91.7 For each param. add = 6.3 Integer = integer = 5.0 Real = real = 7.9 Long = long = 7.9 Double = double = 39.7 \f compl. = compl. = 39.7 Integer = real = 14.4 Real = integer = 18.3 Logical = logical = 7.0 1 subscript = 15.0 Integer + integer = 2.9 Real + real = 11.8 Long + long = 4.2 Double + double = 279.1 Compl. + compl. = 125.5 Real - real = 11.8 Integer * integer = 8.4 Real * real = 34.2 Long * long = 144.3 Compl. * compl. = 286.8 Double * double = 387.8 Integer/integer = 11.9 Real/real = 25.8 Long/long = 145.0 Compl./compl. = 411.9 Double/double = 530.5 Real ** Integer = 236.7 Real ** Real = 383.4 And , or = 5.5 Integer.rel.integer. = 6.2 Real.rel.real = 12.7 I-I * I = 16.5 R-R * R = 50.4 Ref. to real param. = 2.0 \f INDEX ABS ........................................ E AIMAG ...................................... E alarm ...................................... D ALOG ....................................... E alphabet ................................... 1.1 AMAX0 ...................................... E AMAX1 ...................................... E AMIN0 ...................................... E AMIN1 ...................................... E AMOD ....................................... E .and. ...................................... 3.3 arithmetical assignment .................... 4.1 arithmetical evaluation rules .............. 3.2 arithmetical expression .................... 3.3 arithmetical, mixing of types .............. 3.3 arrays ..................................... 1.4 assembly of programs ....................... B ASSIGN ..................................... 4.2 assigned GOTO .............................. 4.2 ATAN ....................................... E A-conversion (FORMAT) ...................... 5.4.4.4 backing storage ............................ 5.2.1.1 BACKSPACE .................................. 5.2.6 bit pattern ................................ 1.3 block ...................................... 5.2.1.7 BLOCK DATA ................................. 6.2.4 block gap .................................. 5.2.1.7 block length ............................... 5.2.1.7 block number ............................... 5.2.1.7 block procedure ............................ 5.1.5, 5.3.3 buffer ..................................... 5.1.4 byte ....................................... 5.2.1.7 B-conversion ............................... 5.4.4.6 CABS ....................................... E cacrcrcrcrc ................................ E CALL ....................................... 6.1.2 calling functions/subroutines .............. 6.1.2 calling parameter check and transfer ....... 6.1.2, 6.1.3 CANG ....................................... E card reader ................................ 5.2.1.6 catalog .................................... 6.3 CCOS ....................................... E \f cdcrcrcrcrc ................................ E CEXP ....................................... E character handling, masking ................ 3.3 character READ/WRITE ....................... 5.4.2 character set .............................. 1.1 CLOG ....................................... E CLOSE ...................................... 5.2.4 cmcrcrcrcrc ................................ E CMPLX ...................................... E code procedures ............................ 6.3 comments ................................... 1.2 COMMON ..................................... 6.2.1 compiler call .............................. B compiler messages from ..................... C compiler requirements ...................... B COMPLEX .................................... 2.1 complex, representation and range .......... 1.3 compound symbols ........................... 1.1 computed GOTO .............................. 4.2.4 CONJG ...................................... E constants .................................. 1.3 continuation of statement .................. 1.2 CONTINUE ................................... 4.5 control characters ......................... 5.4.5.1 controlled variable (DO) ................... 4.4 conversion codes ........................... 5.4.4 COS ........................................ E cscrcrcrcrc ................................ E CSIN ....................................... E CSQRT ...................................... E DABS ....................................... E dadrcrcrcrc ................................ E DATA ....................................... 6.2.4 DATA, BLOCK DATA ........................... 6.2.4 DATA, long texts ........................... 6.2.4 dcircrcrcrc ................................ E dclrcrcrcrc ................................ E dcrrcrcrcrc ................................ E dddrcrcrcrc ................................ E diagnostics during compilation ............. C diagnostics during program execution ....... D.2.1 DIMENSION .................................. 2.2 DIMENSION, variable (adjustable array) ..... 6.1.5 DIMENSION, variable (adjustable zone) ...... 6.1.6 \f disc file .................................. 5.2.1.1 disconnected ............................... 5.3.1 dmdrcrcrcrc ................................ E document ................................... 5.2.1 DOUBLE PRECISION ........................... 2.1 double precision, representation and range . 1.3 DO-loop .................................... 4.4 dpdrcrcrcrc ................................ E drum ....................................... 5.2.1.1 dsdrcrcrcrc ................................ E DSIGN ...................................... E D-conversion ............................... 5.4.4.3 EM-character ............................... 1.1, ref. 6 END ........................................ 6.1.7 end of document ............................ 5.3.1 end of file ................................ see tape mark ENDFILE .................................... 5.2.6 ENTRY ...................................... 6.1.9 errors during compilation .................. C errors during program execution ............ D.2 errors, treatment of input/output .......... 5.3 error, READ/WRITE .......................... 5.4.5 EQUIVALENCE ................................ 2.3 EQUIVALENCE with zone record ............... 5.5.7 evaluation, mixing of types ................ 3.3 evaluation of expressions .................. 3.2 execution of object program ................ D.1 execution time alarms ...................... D.2 EXP ........................................ E exponentiation ............................. 3.3 expressions ................................ 3.3 EXTERNAL ................................... 6.1.4 external algol procedure ................... 6.3.1 external code procedure .................... 6.3.2 external fortran subroutine/function ....... 6.1.1, B external library procedure ................. 6.3, E external variables ......................... 6.1.4 E-conversion ............................... 5.4.4.1 .false. .................................... 1.3 file mark .................................. 5.2.1.7 file name .................................. ref. 1 file number ................................ 5.2.1.7 file processor ............................. ref. 1 FORMAT ..................................... 5.4.3 format controlled READ/WRITE ............... 5.4.2 FORMAT conversion codes .................... 5.4.4 \f format errors .............................. 5.4.5 format, rules for execution ................ 5.4.5 FUNCTION ................................... 6.1.1 FUNCTION call .............................. 6.1.2 function, intrinsic ........................ E function, library .......................... E FUNCTION, parameter check and transfer ..... 6.1.3 F-conversion ............................... 5.4.4.2 GETPOSITION ................................ 5.5.5 giveup bits of logical status word ......... 5.3.1 giveup mask ................................ 5.3.3 GOTO ....................................... 4.2.1 GOTO, assigned ............................. 4.2.2 GOTO, computed ............................. 4.2.3 hard error during input/output ............. 5.3.2, 5.3.3 heading of program unit .................... 6.1.1 H-conversion ............................... 5.4.4.9 IABS ....................................... E icdrcrcrcrc ................................ E identifiers ................................ 1.4.1 IF, arithmetical ........................... 4.3.2 IF, logical ................................ 4.3.1 implied DO ................................. 5.4.2 IN ......................................... 5.1.6 index check ................................ 1.4.3, 5.5.7, B initial values ............................. 6.2.2 initiation of variables (DATA) ............. 6.2.4 input/output ............................... 5 input/output documents, basic principles ... 5.2 INREC ...................................... 5.5.2 inrrcrcrcrc ................................ E INTEGER .................................... 2.1 integer, long integers (LONG) .............. 1.3 integer, representation and range .......... 1.3 intervention ............................... 5.3.1 \f inwrcrcrcrc ................................ E I-conversion ............................... 5.4.4.5 label ...................................... 1.2 label, format .............................. 5.4.3 lcdrcrcrcrc ................................ E ldlrcrcrcrc ................................ E library functions .......................... 6.3, E line change ................................ 5.4.5 line format of program ..................... 1.2 line printer ............................... 5.2.1.5 listing, conditional ....................... 1.2, B listing of program ......................... 1.2, B lmlrcrcrcrc ................................ E load point ................................. 5.2.1.7 LOGICAL .................................... 2.1 logical expression and assignment .......... 4.1 logical position ........................... 5.2.1 logical record ............................. 5.5 logical, representation .................... 1.3 logical status word ........................ 5.3 LONG ....................................... 2.1 long, representation and range ............. 1.3 L-conversion ............................... 5.4.4.7 machine coded program units ................ 6.3.2 magnetic tape .............................. 5.2.1.7 main program ............................... 6.1.1 masking operations ......................... 3.3 MAX0 ....................................... E MAX1 ....................................... E MIN0 ....................................... E MIN1 ....................................... E mixed mode arithmetic ...................... 3.3 MOD ........................................ E mode and kind of documents ................. 5.2.3 multiple assignment ........................ 4.1 names ...................................... 1.4.1 nesting of DO loops ........................ 4.4.3 new line, change of line ................... 5.4.5 new line, character ........................ 1.1 NUL character .............................. 1.1, 5.4.4.4 \f object program, alarms from ................ D.2 object program, execution of ............... D.1 object program, structure of ............... D.3 octal constants ............................ see bitpattern OPEN ....................................... 5.2.3 .or. ....................................... 3.3 OUT ........................................ 5.1.6 output ..................................... see input/output OUTREC ..................................... 5.5.3 overflow ................................... 3.3 OVERFLOWS, external variable ............... 3.3 overrun, data .............................. 5.3.1 paper tape ................................. 5.2.1.3, 5.2.1.4 paper tape reader .......................... 5.2.1.3 parameter, check and transfer .............. 6.1.3 PAUSE ...................................... F.1 position error ............................. 5.3.1 position, logical .......................... 5.2.1 positioning of magnetic tapes .............. 5.2.5, 5.5.6 precision .................................. 1.3 PROGRAM .................................... 6.1.1 program execution .......................... D program, function .......................... 6.1.1 program, subroutine ........................ 6.1.1 program unit ............................... 6.1.1 program, arrangement of total program ...... 6 program, main program ...................... 6.1.1 program, structure of program unit ......... 6.1.1 P, scaling factor .......................... 5.4.4.8 range of DO loop ........................... 4.4 range of values ............................ 1.3 rcdrcrcrcrc ................................ E READ errors, treatment of .................. 5.3, 5.4.5 READ, formatted ............................ 5.4.2 READERR .................................... 5.4.5 READ, unformatted .......................... 5.4.6 REAL ....................................... 2.1 REAL, library function ..................... E real, range and representation ............. 1.3 rearcrcrcrc ................................ E record input/output ........................ 5.5 record, INREC .............................. 5.5.2 record, OUTREC ............................. 5.5.3 record, SWOPREC ............................ 5.5.4 \f record, zone record ........................ 5.5.1 relational operations ...................... 3.2, 4.1 release .................................... 5.2.4 requirements of compiler ................... B requirements of running program ............ D.3 RETURN ..................................... 6.1.8 REWIND ..................................... 5.2.6 run time alarm ............................. D.2 scaling factor ............................. 5.4.4.8 segmentation of object program ............. D.3 SETPOSITION ................................ 5.2.5, 5.5.6 shares ..................................... 5.1.3, 5.5.1.5 .shift. .................................... 3.3 side effects ............................... 3.2 SIN ........................................ E source text line format .................... 1.2 space in program text ...................... 1.1 space in READ/WRITE ........................ 5.4.4 spill ...................................... B SQRT ....................................... E standard error actions for input/output .... 5.3.2 standard variables, external variables ..... 6.1.4 statement continuation ..................... 1.2 statement function ......................... F statement label ............................ 1.2 statement separation ....................... 1.2 status word ................................ 5.3.1 STDERROR ................................... 5.3.4 STOP ....................................... 4.6 stopped .................................... 5.3.1 storage considerations ..................... 6.2.2 storage requirement of compiler ............ B storage requirements of running program .... D.3 SUBROUTINE ................................. 6.1.1 SUBROUTINE call ............................ 6.1.2 SUBROUTINE, parameter check and transfer ... 6.1.3 subscript .................................. 1.4.3 subscript check ............................ 1.4.3 subscripted variable ....................... 1.4.3 SWOPREC .................................... 5.5.4 syntax ..................................... A syntax error ............................... C syntax stop ................................ D.2.4 \f tape mark .................................. 5.2.1.7 tape reader ................................ 5.2.1.3 tape, magnetic ............................. 5.2.1.7 tape, paper ................................ 5.2.1.3 text constant .............................. 1.3 text constant extended in DATA ............. 6.2.4 timer ...................................... 5.3.1 .true. ..................................... 1.3 truncation ................................. 4.1 type declaration ........................... 2.1 types of variables ......................... 1.3, 2.1 typewriter ................................. 5.2.1.2 underflow .................................. 3.3 UNDERFLOWS, external variable .............. 3.3 unit, logical .............................. 5.1.1, 5.2.7 variable dimension ......................... 6.1.5, 6.1.6 variables, names of ........................ 1.4.1 variables, subscripted ..................... 1.4.3 variables, types of ........................ 1.3, 2.1 word ....................................... 1.3 word defect ................................ 5.3.1 wrircrcrcrc ................................ E write enable ............................... 5.3.1 WRITE execution of ......................... 5.4.5 WRITE statement ............................ 5.4.2, 5.4.6 ZONE ....................................... 5.1.2, 5.1.5.1 ZONE, equivalence .......................... 5.5.7 zones, preopened ........................... 5.1.3 zone array ................................. 5.1.5.2, 6.1.6 \f \f i I_N_D_H_O_L_D_S_F_O_R_T_E_G_N_E_L_S_E_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _S_I_D_E_ 1. INTRODUKTION .......................................... 1 2. GENEREL BESKRIVELSE ................................... 2 3. OPSTILLING OG NETTILSLUTNING .......................... 3 4. KONFIGURATIONSEKSEMPLER ............................... 4 4.1 Lineselectoren>s indgange ........................ 4 4.2 Lineselectoren>s udgange ......................... 4 A_P_P_E_N_D_I_X_: A. KABLER ANVENDT I FORBINDELSE MED RC791 ................ 6 \f ii \f 1_._ _ _ _ _ _ _ _ _I_N_T_R_O_D_U_K_T_I_O_N_ 1. Lineselectoren, RC791, benyttes, hvis flere RC702-systemer (piccoloer) skal benytte den samme linieskriver eller den samme kommunikationslinie. I denne manual gives en kort generel beskrivelse af lineselecto- ren og dens anvendelse, og der er givet en række konfigurations- eksempler. \f 2_._ _ _ _ _ _ _ _ _G_E_N_E_R_E_L_ _B_E_S_K_R_I_V_E_L_S_E_ 2. Lineselectoren har 8 indgange, benævnt "LINE IN 1-8" samt 2 udgange, benævnt "LINE OUT A,B". De to udgange på lineselectoren kan forbindes til en kommunika- tionslinie eller et RC702-system (LINE OUT A) og en linieskriver (LINE OUT B). Svarende til de 2 udgange er der på forsiden af lineselectoren 2 lystal, som til hver en tid angiver, om udgangene er i brug og i givet fald hvem (angivet ved nummeret på den pågældende indang), der benytter dem. Delingen af linieskriver eller kommunikationslinie foregår således, at hvis et RC702-system har fået adgang til at benytte f.eks. linieskriveren gennem lineselectoren, vil anmodning om tilgang til linieskriveren fra andre systemer blive afvist - og man må prøve igen. \f 3_._ _ _ _ _ _ _ _ _O_P_S_T_I_L_L_I_N_G_ _O_G_ _N_E_T_T_I_L_S_L_U_T_N_I_N_G_ 3. Lineselectoren opstilles hvor det er mest praktisk, dog ikke ovenpå en varmekilde. Den kan stables med microcomputeren eller den store diskettesta- tion hvis dette er formålstjenligt. Den forbindes til nettet med det medleverede kabel med jordben, og er dermed forskriftsmæssigt jordforbundet. Hvis der er mangel på vægstik med jord, leverer RC en fordelerkas- se med 5 stik (bestilligsnr. MF002). \f 4_._ _ _ _ _ _ _ _ _K_O_N_F_I_G_U_R_A_T_I_O_N_S_E_K_S_E_M_P_L_E_R_ 4. 4_._1_ _ _ _ _ _ _ _L_i_n_e_s_e_l_e_c_t_o_r_e_n_>_s_ _i_n_d_g_a_n_g_e_ 4.1 Et RC702-system kan forbindes til en lineselector på 3 forskel- lige måder, afhængig af, hvilke af lineselectorens udgange der skal kunne benyttes, dvs. deles med andre systemer. a) Deling af linieskriver. Hvis en RC702 skal kunne benytte en linieskriver, skal port 2 på RC702 (benævnt "PRINTER") forbindes med en indgang på lineselectoren. b) Deling af kommunikationslinie. Hvis en RC702 skal kunne benytte en kommunikationslinie (dvs. hvis den skal benyttes som terminal eller i for- bindelse med en filtransport), skal port 1 på RC702 (benævnt "TERMINAL") forbindes med en indgang på line- selectoren. c) Deling af linieskriver og kommunikationslinie. Hvis en RC702 skal kunne benytte både en linieskriver og en kommunikationslinie, skal både port 1 og port 2 på RC702 forbindes med en indgang på lineselectoren. Det fremgår af appendix A, hvilket kabel der skal benyttes til at etablere de nævnte forbindelser. 4_._2_ _ _ _ _ _ _ _L_i_n_e_s_e_l_e_c_t_o_r_e_n_s_ _u_d_g_a_n_g_e_ 4.2 Lineselectorens 2 udgange kan benyttes således: LINE OUT A: Denne udgang kan forbindes til en multiplexer på et RC3600/RC7000 eller RC8000 system, enten direkte eller via modem. Endvidere kan den forbindes til port 1 ("TERMINAL") på et RC702-system. Hermed er det muligt at udveksle data mellem flere RC702-systemer. \f LINE OUT B: Denne udgang anvendes ved tilslutning af en linieskriver, som f.eks. RC861. \f A_._ _ _ _ _ _ _ _ _K_A_B_L_E_R_ _A_N_V_E_N_D_T_ _I_ _F_O_R_B_I_N_D_E_L_S_E_ _M_E_D_ _R_C_7_9_1_._ A. \f «eof»