User Tools

Site Tools


cdc:nos2.source:opl.opl871:deck:sympcod

Deck SYMPCOD

1 Modification

Source

Seq #  *Modification Id* Act 
----------------------------+
00001  M01S00001.sympcod +++|*NOSEQ
00002  M01S00002.sympcod +++|*WIDTH 132
00003  M01S00003.sympcod +++|1
00004  M01S00004.sympcod +++|
00005  M01S00005.sympcod +++|
00006  M01S00006.sympcod +++|
00007  M01S00007.sympcod +++|
00008  M01S00008.sympcod +++|
00009  M01S00009.sympcod +++|
00010  M01S00010.sympcod +++|
00011  M01S00011.sympcod +++|
00012  M01S00012.sympcod +++|
00013  M01S00013.sympcod +++|
00014  M01S00014.sympcod +++|
00015  M01S00015.sympcod +++|
00016  M01S00016.sympcod +++|
00017  M01S00017.sympcod +++|
00018  M01S00018.sympcod +++|
00019  M01S00019.sympcod +++|             ------------------------------------------------
00020  M01S00020.sympcod +++|             !                                              !
00021  M01S00021.sympcod +++|             !          NOS SYMPL CODING STANDARD           !
00022  M01S00022.sympcod +++|             !                                              !
00023  M01S00023.sympcod +++|             ------------------------------------------------
00024  M01S00024.sympcod +++|
00025  M01S00025.sympcod +++|1                                                                    1
00026  M01S00026.sympcod +++|                                                              06/01/83
00027  M01S00027.sympcod +++|
00028  M01S00028.sympcod +++|                           TABLE OF CONTENTS
00029  M01S00029.sympcod +++|
00030  M01S00030.sympcod +++|
00031  M01S00031.sympcod +++|
00032  M01S00032.sympcod +++|
00033  M01S00033.sympcod +++|     1.0 Introduction . . . . . . . . . . . . . . . . . . . . .    1-1
00034  M01S00034.sympcod +++|
00035  M01S00035.sympcod +++|     2.0 Coding Standards . . . . . . . . . . . . . . . . . . .    2-1
00036  M01S00036.sympcod +++|     2.1 General  . . . . . . . . . . . . . . . . . . . . . . .    2-1
00037  M01S00037.sympcod +++|     2.2 Parameters . . . . . . . . . . . . . . . . . . . . . .    2-2
00038  M01S00038.sympcod +++|     2.3 XREF . . . . . . . . . . . . . . . . . . . . . . . . .    2-2
00039  M01S00039.sympcod +++|     2.4 DEF  . . . . . . . . . . . . . . . . . . . . . . . . .    2-3
00040  M01S00040.sympcod +++|     2.5 STATUS . . . . . . . . . . . . . . . . . . . . . . . .    2-3
00041  M01S00041.sympcod +++|     2.6 COMDECK  . . . . . . . . . . . . . . . . . . . . . . .    2-3
00042  M01S00042.sympcod +++|     2.7 Non-array Items  . . . . . . . . . . . . . . . . . . .    2-4
00043  M01S00043.sympcod +++|     2.8 Arrays . . . . . . . . . . . . . . . . . . . . . . . .    2-4
00044  M01S00044.sympcod +++|     2.9 FOR Loops (Fast or Slow) . . . . . . . . . . . . . . .    2-5
00045  M01S00045.sympcod +++|     2.10 GOTOs and SWITCHes (Case Statement) . . . . . . . . .    2-5
00046  M01S00046.sympcod +++|     2.11 IF  . . . . . . . . . . . . . . . . . . . . . . . . .    2-6
00047  M01S00047.sympcod +++|     2.12 Bead  . . . . . . . . . . . . . . . . . . . . . . . .    2-6
00048  M01S00048.sympcod +++|     2.13 PROCs, FUNCs, and PRGMs . . . . . . . . . . . . . . .    2-6
00049  M01S00049.sympcod +++|
00050  M01S00050.sympcod +++|     3.0  Naming Conventions  . . . . . . . . . . . . . . . . .    3-1
00051  M01S00051.sympcod +++|
00052  M01S00052.sympcod +++|     4.0 Code Readability . . . . . . . . . . . . . . . . . . .    4-1
00053  M01S00053.sympcod +++|     4.1 Format of Statements . . . . . . . . . . . . . . . . .    4-1
00054  M01S00054.sympcod +++|     4.2 Column 1 . . . . . . . . . . . . . . . . . . . . . . .    4-2
00055  M01S00055.sympcod +++|     4.3 Blank Lines  . . . . . . . . . . . . . . . . . . . . .    4-2
00056  M01S00056.sympcod +++|     4.4 Page Ejects  . . . . . . . . . . . . . . . . . . . . .    4-2
00057  M01S00057.sympcod +++|
00058  M01S00058.sympcod +++|     5.0 Documentation Standards  . . . . . . . . . . . . . . .    5-1
00059  M01S00059.sympcod +++|     5.1 Comment Formats and Types  . . . . . . . . . . . . . .    5-1
00060  M01S00060.sympcod +++|       5.1.1 Embedded Comments  . . . . . . . . . . . . . . . .    5-1
00061  M01S00061.sympcod +++|       5.1.2 Single Line Comments . . . . . . . . . . . . . . .    5-1
00062  M01S00062.sympcod +++|       5.1.3 Stand Alone Comments . . . . . . . . . . . . . . .    5-2
00063  M01S00063.sympcod +++|         5.1.3.1 Brackets (****)  . . . . . . . . . . . . . . .    5-2
00064  M01S00064.sympcod +++|         5.1.3.2 External Comments (***)  . . . . . . . . . . .    5-2
00065  M01S00065.sympcod +++|         5.1.3.3 Internal Comments (**) . . . . . . . . . . . .    5-2
00066  M01S00066.sympcod +++|         5.1.3.4 Module Comments (*)  . . . . . . . . . . . . .    5-3
00067  M01S00067.sympcod +++|     5.2 Program Level Documentation  . . . . . . . . . . . . .    5-3
00068  M01S00068.sympcod +++|     5.3 Documentation of PROCs and FUNCs . . . . . . . . . . .    5-4
00069  M01S00069.sympcod +++|     5.4 Documentation with Embedded Comments . . . . . . . . .    5-4
00070  M01S00070.sympcod +++|       5.4.1 Data Declaration Embedded Comments . . . . . . . .    5-4
00071  M01S00071.sympcod +++|       5.4.2 Action Code Embedded Comments  . . . . . . . . . .    5-5
00072  M01S00072.sympcod +++|     5.5 General Documentation for PROCs, PRGMs or FUNCs  . . .    5-5
00073  M01S00073.sympcod +++|
00074  M01S00074.sympcod +++|     6.0 Examples . . . . . . . . . . . . . . . . . . . . . . .    6-1
00075  M01S00075.sympcod +++|     6.1 COMDECK Examples . . . . . . . . . . . . . . . . . . .    6-1
00076  M01S00076.sympcod +++|     6.2 PROC Example . . . . . . . . . . . . . . . . . . . . .    6-2
00077  M01S00077.sympcod +++|     6.3 Status List/Status Switch Example  . . . . . . . . . .    6-4
00078  M01S00078.sympcod +++|
00079  M01S00079.sympcod +++|
00080  M01S00080.sympcod +++|
00081  M01S00081.sympcod +++|     A1.0 Addendum for SMF Project  . . . . . . . . . . . . . .   A1-1
00082  M01S00082.sympcod +++|
00083  M01S00083.sympcod +++|1
00084  M01S00084.sympcod +++|                                                                   1-1
00085  M01S00085.sympcod +++|     NOS SYMPL CODING STANDARD
00086  M01S00086.sympcod +++|                                                              06/01/83
00087  M01S00087.sympcod +++|     -----------------------------------------------------------------
00088  M01S00088.sympcod +++|     1.0 Introduction
00089  M01S00089.sympcod +++|     -----------------------------------------------------------------
00090  M01S00090.sympcod +++|
00091  M01S00091.sympcod +++|
00092  M01S00092.sympcod +++|     1.0 Introduction
00093  M01S00093.sympcod +++|
00094  M01S00094.sympcod +++|
00095  M01S00095.sympcod +++|
00096  M01S00096.sympcod +++|
00097  M01S00097.sympcod +++|
00098  M01S00098.sympcod +++|        The purpose of this standard is to provide a meaningful set of
00099  M01S00099.sympcod +++|     practices which will lead to  "good",  consistent,  maintainable,
00100  M01S00100.sympcod +++|     organized and optimized SYMPL code.  This document used the SYMPL
00101  M01S00101.sympcod +++|     Coding Standards DAP (DCS S1831), the  NOS  COMPASS   Programming
00102  M01S00102.sympcod +++|     Standard, and the SYMPL Coding Standards for the SYMPL project in
00103  M01S00103.sympcod +++|     SVL as guidelines.
00104  M01S00104.sympcod +++|
00105  M01S00105.sympcod +++|        This standard is in addition  to the  NOS COMPASS  Programming
00106  M01S00106.sympcod +++|     Standard.  The  procedures  established  in the  COMPASS standard
00107  M01S00107.sympcod +++|     which  are  not unique  to the  COMPASS  language  (i.e.  General
00108  M01S00108.sympcod +++|     Requirements, Code Transmittal  Rules, and  Dayfile Messages) are
00109  M01S00109.sympcod +++|     to be adhered to for SYMPL programming also.
00110  M01S00110.sympcod +++|
00111  M01S00111.sympcod +++|        Where  the  word  "must"  appears in this standard, deviations
00112  M01S00112.sympcod +++|     will not be approved.  Where the word "should" appears, reviewers
00113  M01S00113.sympcod +++|     may  allow  a  deviation  if  the  analyst can present convincing
00114  M01S00114.sympcod +++|     reasons for the deviation.
00115  M01S00115.sympcod +++|
00116  M01S00116.sympcod +++|1
00117  M01S00117.sympcod +++|                                                                  2-1
00118  M01S00118.sympcod +++|     NOS SYMPL CODING STANDARD
00119  M01S00119.sympcod +++|                                                              06/01/83
00120  M01S00120.sympcod +++|     -----------------------------------------------------------------
00121  M01S00121.sympcod +++|     2.0 Coding Standards
00122  M01S00122.sympcod +++|     -----------------------------------------------------------------
00123  M01S00123.sympcod +++|
00124  M01S00124.sympcod +++|
00125  M01S00125.sympcod +++|     2.0 Coding Standards
00126  M01S00126.sympcod +++|
00127  M01S00127.sympcod +++|
00128  M01S00128.sympcod +++|
00129  M01S00129.sympcod +++|
00130  M01S00130.sympcod +++|
00131  M01S00131.sympcod +++|     2.1 General
00132  M01S00132.sympcod +++|
00133  M01S00133.sympcod +++|
00134  M01S00134.sympcod +++|        All declarations pertaining to a PROC or FUNC should  use the
00135  M01S00135.sympcod +++|     following grouping
00136  M01S00136.sympcod +++|
00137  M01S00137.sympcod +++|     Formal Parameters
00138  M01S00138.sympcod +++|     XREFs
00139  M01S00139.sympcod +++|     DEFs
00140  M01S00140.sympcod +++|     STATUS names
00141  M01S00141.sympcod +++|     COMDECKs
00142  M01S00142.sympcod +++|     ITEMs
00143  M01S00143.sympcod +++|     BASED ARRAYs
00144  M01S00144.sympcod +++|     ARRAYs
00145  M01S00145.sympcod +++|     SWITCHes
00146  M01S00146.sympcod +++|     Other
00147  M01S00147.sympcod +++|
00148  M01S00148.sympcod +++|        All  declarations or calls to COMDECKs should be in alphabetic
00149  M01S00149.sympcod +++|     order.
00150  M01S00150.sympcod +++|
00151  M01S00151.sympcod +++|        Each declaration must start on a separate  line  and  must  be
00152  M01S00152.sympcod +++|     accompanied by a comment describing its function.
00153  M01S00153.sympcod +++|
00154  M01S00154.sympcod +++|        Each executable statement must start on a separate line.
00155  M01S00155.sympcod +++|
00156  M01S00156.sympcod +++|        Each BEGIN and END must be on a separate line.
00157  M01S00157.sympcod +++|
00158  M01S00158.sympcod +++|        A declaration which is a one-bit field should be Boolean.
00159  M01S00159.sympcod +++|
00160  M01S00160.sympcod +++|        Self modifying code must not be used.
00161  M01S00161.sympcod +++|
00162  M01S00162.sympcod +++|        All  labels  begin in column one.  Labels must appear on lines
00163  M01S00163.sympcod +++|     by themselves except for embedded comments.  All label names must
00164  M01S00164.sympcod +++|     be unique within a PROC/FUNC.
00165  M01S00165.sympcod +++|
00166  M01S00166.sympcod +++|        TEST  must  never  be  used  without  explicitly  stating  the
00167  M01S00167.sympcod +++|     induction variable it is testing.
00168  M01S00168.sympcod +++|
00169  M01S00169.sympcod +++|        Define CONTROL DISJOINT and CONTROL INERT in a  COMDECK.   Use
00170  M01S00170.sympcod +++|     CONTROL OVERLAP and CONTROL REACTIVE to define the exceptions.
00171  M01S00171.sympcod +++|
00172  M01S00172.sympcod +++|        Where numeric constants are established  via  DEFs  or  STATUS
00173  M01S00173.sympcod +++|     lists, the  assumed  numeric values  should  not  appear  in  the
00174  M01S00174.sympcod +++|     coding documentation.
00175  M01S00175.sympcod +++|
00176  M01S00176.sympcod +++|        Items  I, J and K should be reserved as simple loop or control
00177  M01S00177.sympcod +++|     variables.
00178  M01S00178.sympcod +++|1
00179  M01S00179.sympcod +++|                                                                   2-2
00180  M01S00180.sympcod +++|     NOS SYMPL CODING STANDARD
00181  M01S00181.sympcod +++|                                                              06/01/83
00182  M01S00182.sympcod +++|     -----------------------------------------------------------------
00183  M01S00183.sympcod +++|     2.0 Coding Standards
00184  M01S00184.sympcod +++|     2.1 General
00185  M01S00185.sympcod +++|     -----------------------------------------------------------------
00186  M01S00186.sympcod +++|
00187  M01S00187.sympcod +++|        The code must not make assumptions about the octal representa-
00188  M01S00188.sympcod +++|     tion  of  characters.  This  representation  varies  between  the
00189  M01S00189.sympcod +++|     various NOS character sets.
00190  M01S00190.sympcod +++|
00191  M01S00191.sympcod +++|        Machine independent instructions when available should be used
00192  M01S00192.sympcod +++|     in preference to dependent structures.
00193  M01S00193.sympcod +++|
00194  M01S00194.sympcod +++|
00195  M01S00195.sympcod +++|     2.2 Parameters
00196  M01S00196.sympcod +++|
00197  M01S00197.sympcod +++|
00198  M01S00198.sympcod +++|        Use  call-by-value  parameters  whenever  possible.   Only use
00199  M01S00199.sympcod +++|     call-by-address  when  the  parameter  is  modified  within   the
00200  M01S00200.sympcod +++|     procedure  and the new value of the parameters is returned to the
00201  M01S00201.sympcod +++|     calling program.
00202  M01S00202.sympcod +++|
00203  M01S00203.sympcod +++|        Reuse  actual  parameter  lists  whenever  possible.   If  the
00204  M01S00204.sympcod +++|     parameters  are used for a number of calls, use the same order of
00205  M01S00205.sympcod +++|     parameters for more efficient coding.
00206  M01S00206.sympcod +++|
00207  M01S00207.sympcod +++|        Formal parameters must be declared within the PROC/FUNC rather
00208  M01S00208.sympcod +++|     than in  a common  deck.  They can  be ordered alphabetically  or
00209  M01S00209.sympcod +++|     according to the calling sequence.
00210  M01S00210.sympcod +++|
00211  M01S00211.sympcod +++|        An array item  must not be  used as a  parameter  where  a new
00212  M01S00212.sympcod +++|     value  of the  parameter is returned, since  this  feature is not
00213  M01S00213.sympcod +++|     supported in SYMPL.
00214  M01S00214.sympcod +++|
00215  M01S00215.sympcod +++|
00216  M01S00216.sympcod +++|     2.3 XREF
00217  M01S00217.sympcod +++|
00218  M01S00218.sympcod +++|
00219  M01S00219.sympcod +++|        Declaration of external procedure names are to be done in  the
00220  M01S00220.sympcod +++|     following  format.   The  referenced PROC/FUNC names are to be in
00221  M01S00221.sympcod +++|     alphabetic sequence.
00222  M01S00222.sympcod +++|
00223  M01S00223.sympcod +++|     Example:
00224  M01S00224.sympcod +++|
00225  M01S00225.sympcod +++|     #
00226  M01S00226.sympcod +++|     ****  PROC Y - XREF LIST BEGIN.
00227  M01S00227.sympcod +++|     #
00228  M01S00228.sympcod +++|
00229  M01S00229.sympcod +++|           XREF
00230  M01S00230.sympcod +++|             BEGIN
00231  M01S00231.sympcod +++|             PROC APPLE;                  # PARES APPLE #
00232  M01S00232.sympcod +++|             PROC BANANA;                 # PEELS BANANA #
00233  M01S00233.sympcod +++|             PROC ORANGE;                 # SQUEEZES ORANGE #
00234  M01S00234.sympcod +++|             END
00235  M01S00235.sympcod +++|
00236  M01S00236.sympcod +++|     #
00237  M01S00237.sympcod +++|     ****  PROC Y - XREF LIST END.
00238  M01S00238.sympcod +++|     #
00239  M01S00239.sympcod +++|
00240  M01S00240.sympcod +++|1
00241  M01S00241.sympcod +++|                                                                   2-3
00242  M01S00242.sympcod +++|     NOS SYMPL CODING STANDARD
00243  M01S00243.sympcod +++|                                                              06/01/83
00244  M01S00244.sympcod +++|     -----------------------------------------------------------------
00245  M01S00245.sympcod +++|     2.0 Coding Standards
00246  M01S00246.sympcod +++|     2.4 DEF
00247  M01S00247.sympcod +++|     -----------------------------------------------------------------
00248  M01S00248.sympcod +++|
00249  M01S00249.sympcod +++|     2.4 DEF
00250  M01S00250.sympcod +++|
00251  M01S00251.sympcod +++|
00252  M01S00252.sympcod +++|        Use DEF to provide symbolic constants  for  numeric  constants
00253  M01S00253.sympcod +++|     for ease in finding, identifying and modifying parameters.
00254  M01S00254.sympcod +++|
00255  M01S00255.sympcod +++|        A DEF must not be used to rename a variable.
00256  M01S00256.sympcod +++|
00257  M01S00257.sympcod +++|        A DEF must not be used to redefine a function call, a reserved
00258  M01S00258.sympcod +++|     word, or an operation unless it is used  consistently  throughout
00259  M01S00259.sympcod +++|     the  system  to  improve  clarity.   Otherwise,  this may tend to
00260  M01S00260.sympcod +++|     obscure the actual code.  All DEFs which  redefine  the  code  or
00261  M01S00261.sympcod +++|     make it a conditional compilation will be placed in a COMDECK.
00262  M01S00262.sympcod +++|
00263  M01S00263.sympcod +++|        The  DEF  format  for a full word octal constant is in 4-digit
00264  M01S00264.sympcod +++|     parcels.  For example:
00265  M01S00265.sympcod +++|
00266  M01S00266.sympcod +++|     DEF ERRMASK #O"0037 7740 0505 0000 7777"#;  # ERROR BIT MASK #
00267  M01S00267.sympcod +++|
00268  M01S00268.sympcod +++|
00269  M01S00269.sympcod +++|     2.5 STATUS
00270  M01S00270.sympcod +++|
00271  M01S00271.sympcod +++|
00272  M01S00272.sympcod +++|        Status lists should contain no unused positions.   Any  unused
00273  M01S00273.sympcod +++|     positions  must  be  filled  with  a  dummy  argument  and have a
00274  M01S00274.sympcod +++|     # RESERVED # or # NOT USED # comment.  It may  be better  to  use
00275  M01S00275.sympcod +++|     DEFs if there are many unused  positions or  any of  the elements
00276  M01S00276.sympcod +++|     are expected to change.
00277  M01S00277.sympcod +++|
00278  M01S00278.sympcod +++|
00279  M01S00279.sympcod +++|     2.6 COMDECK
00280  M01S00280.sympcod +++|
00281  M01S00281.sympcod +++|
00282  M01S00282.sympcod +++|        Executable code should not be placed in a COMDECK.
00283  M01S00283.sympcod +++|
00284  M01S00284.sympcod +++|        The declarations for a data structure must be wholly contained
00285  M01S00285.sympcod +++|     within  a  single common deck.  Where two or more data structures
00286  M01S00286.sympcod +++|     are  interdependent,  the  declarations  for  the  interdependent
00287  M01S00287.sympcod +++|     structures must be in the same common deck.
00288  M01S00288.sympcod +++|
00289  M01S00289.sympcod +++|        Logically  associated  data  items  and  structures  should be
00290  M01S00290.sympcod +++|     declared in one COMDECK unless they are only to be  used  by  one
00291  M01S00291.sympcod +++|     module where they may be declared locally.
00292  M01S00292.sympcod +++|
00293  M01S00293.sympcod +++|        One  or  more COMDECKs must contain all declarations affecting
00294  M01S00294.sympcod +++|     table size which could be changed with the system.   This  is  to
00295  M01S00295.sympcod +++|     facilitate maintenance.
00296  M01S00296.sympcod +++|
00297  M01S00297.sympcod +++|        Common decks must not be listed.
00298  M01S00298.sympcod +++|
00299  M01S00299.sympcod +++|        A PRGM, PROC or FUNC should only call the common decks that it
00300  M01S00300.sympcod +++|     references.
00301  M01S00301.sympcod +++|
00302  M01S00302.sympcod +++|1
00303  M01S00303.sympcod +++|                                                                   2-4
00304  M01S00304.sympcod +++|     NOS SYMPL CODING STANDARD
00305  M01S00305.sympcod +++|                                                              06/01/83
00306  M01S00306.sympcod +++|     -----------------------------------------------------------------
00307  M01S00307.sympcod +++|     2.0 Coding Standards
00308  M01S00308.sympcod +++|     2.6 COMDECK
00309  M01S00309.sympcod +++|     -----------------------------------------------------------------
00310  M01S00310.sympcod +++|
00311  M01S00311.sympcod +++|        Every common deck must have an overview description of what it
00312  M01S00312.sympcod +++|     does.  The following format is to  be  used.   The  list  control
00313  M01S00313.sympcod +++|     statements begin in column 48.
00314  M01S00314.sympcod +++|
00315  M01S00315.sympcod +++|     #     deck name - description.                                     #
00316  M01S00316.sympcod +++|                                                 CONTROL NOLIST;
00317  M01S00317.sympcod +++|                                                 CONTROL IFEQ LISTCON,1;
00318  M01S00318.sympcod +++|                                                 CONTROL LIST;
00319  M01S00319.sympcod +++|                                                 CONTROL FI;
00320  M01S00320.sympcod +++|
00321  M01S00321.sympcod +++|     #
00322  M01S00322.sympcod +++|     ***   deck name - description.
00323  M01S00323.sympcod +++|     *
00324  M01S00324.sympcod +++|     *     (purpose) (several lines can be used)
00325  M01S00325.sympcod +++|     #
00326  M01S00326.sympcod +++|
00327  M01S00327.sympcod +++|                                                 CONTROL LIST;
00328  M01S00328.sympcod +++|
00329  M01S00329.sympcod +++|
00330  M01S00330.sympcod +++|     2.7 Non-array Items
00331  M01S00331.sympcod +++|
00332  M01S00332.sympcod +++|
00333  M01S00333.sympcod +++|        The items, the variable names, the types, the presets and  the
00334  M01S00334.sympcod +++|     embedded  comments should each be vertically aligned.  Leave room
00335  M01S00335.sympcod +++|     for ten character variable names and  leave  room  for  character
00336  M01S00336.sympcod +++|     counts on character type items for ease of future maintenance.
00337  M01S00337.sympcod +++|
00338  M01S00338.sympcod +++|        Variables should be declared alphabetically.
00339  M01S00339.sympcod +++|
00340  M01S00340.sympcod +++|
00341  M01S00341.sympcod +++|     2.8 Arrays
00342  M01S00342.sympcod +++|
00343  M01S00343.sympcod +++|
00344  M01S00344.sympcod +++|        Arrays  used  by  more  than  one  PROC  must  be  defined  in
00345  M01S00345.sympcod +++|     COMDECKs.
00346  M01S00346.sympcod +++|
00347  M01S00347.sympcod +++|        Usage of items from an array must always be  subscripted.   It
00348  M01S00348.sympcod +++|     is confusing to default subscripts.
00349  M01S00349.sympcod +++|
00350  M01S00350.sympcod +++|        Item declarations must be in ascending order (i.e.  word 0 bit
00351  M01S00351.sympcod +++|     0 to word n bit n).  If overlapping declarations are  used,  then
00352  M01S00352.sympcod +++|     the item which spans other items must be first.
00353  M01S00353.sympcod +++|
00354  M01S00354.sympcod +++|        Array indices should start with zero.
00355  M01S00355.sympcod +++|
00356  M01S00356.sympcod +++|        The  array  name, bounds  and   the  allocation/size  must  be
00357  M01S00357.sympcod +++|     separated by blanks (e.g. ARRAY EXMAPLE [0:10] P(2); ).
00358  M01S00358.sympcod +++|
00359  M01S00359.sympcod +++|        Items  within  an array are aligned with the begin for ease of
00360  M01S00360.sympcod +++|     reading.  Each item must be documented.
00361  M01S00361.sympcod +++|
00362  M01S00362.sympcod +++|1
00363  M01S00363.sympcod +++|                                                                   2-5
00364  M01S00364.sympcod +++|     NOS SYMPL CODING STANDARD
00365  M01S00365.sympcod +++|                                                              06/01/83
00366  M01S00366.sympcod +++|     -----------------------------------------------------------------
00367  M01S00367.sympcod +++|     2.0 Coding Standards
00368  M01S00368.sympcod +++|     2.8 Arrays
00369  M01S00369.sympcod +++|     -----------------------------------------------------------------
00370  M01S00370.sympcod +++|
00371  M01S00371.sympcod +++|        The item names, type/positions, preset  values,  and  embedded
00372  M01S00372.sympcod +++|     comments  should  each be vertically aligned.  Leave room for ten
00373  M01S00373.sympcod +++|     character item names and for two digit "ep", "fbit",  and  "size"
00374  M01S00374.sympcod +++|     fields  and  use  at least two spaces after the semicolon to ease
00375  M01S00375.sympcod +++|     future maintenance.
00376  M01S00376.sympcod +++|
00377  M01S00377.sympcod +++|
00378  M01S00378.sympcod +++|     2.9 FOR Loops (Fast or Slow)
00379  M01S00379.sympcod +++|
00380  M01S00380.sympcod +++|
00381  M01S00381.sympcod +++|        FOR loops are of two types.  In the slow FOR loop, the  object
00382  M01S00382.sympcod +++|     code has a direct correspondence with the SYMPL statements.  This
00383  M01S00383.sympcod +++|     is not the case with fast loops.  A fast-for-loop is optimized by
00384  M01S00384.sympcod +++|     pre-evaluating  the  STEP and UNTIL/WHILE elements.  At least one
00385  M01S00385.sympcod +++|     cycle of the loop is executed.
00386  M01S00386.sympcod +++|
00387  M01S00387.sympcod +++|        Fast FOR loops and  slow FOR loops  must be  used.   A  simple
00388  M01S00388.sympcod +++|     FOR  statement  must  not  be  used.   For easier readability and
00389  M01S00389.sympcod +++|     programming, use DEF statements to  set  up  FASTFOR  or  SLOWFOR
00390  M01S00390.sympcod +++|     instead  of  the CONTROL FASTLOOP or CONTROL SLOWLOOP.  These DEF
00391  M01S00391.sympcod +++|     statements should be placed in a COMDECK.
00392  M01S00392.sympcod +++|
00393  M01S00393.sympcod +++|           DEF FASTFOR    #CONTROL FASTLOOP; FOR#
00394  M01S00394.sympcod +++|           DEF SLOWFOR    #CONTROL SLOWLOOP; FOR#
00395  M01S00395.sympcod +++|
00396  M01S00396.sympcod +++|        For  better  optimization  consider  using  STEP/WHILE  as  an
00397  M01S00397.sympcod +++|     alternative to STEP/UNTIL.
00398  M01S00398.sympcod +++|
00399  M01S00399.sympcod +++|        The  induction variable must not be changed during the loop or
00400  M01S00400.sympcod +++|     by a FUNC called while evaluating the STEP/UNTIL/WHILE part.
00401  M01S00401.sympcod +++|
00402  M01S00402.sympcod +++|        The exit from a loop  should  be through  an  UNTIL/WHILE or a
00403  M01S00403.sympcod +++|     return  statement.  The  entry  into a loop  must  not be in  the
00404  M01S00404.sympcod +++|     middle of the loop.
00405  M01S00405.sympcod +++|
00406  M01S00406.sympcod +++|        The  executable  statement(s)  after the DO part of a FOR loop
00407  M01S00407.sympcod +++|     must be enclosed in a BEGIN/END pair.
00408  M01S00408.sympcod +++|
00409  M01S00409.sympcod +++|
00410  M01S00410.sympcod +++|     2.10 GOTOs and SWITCHes (Case Statement)
00411  M01S00411.sympcod +++|
00412  M01S00412.sympcod +++|
00413  M01S00413.sympcod +++|        GOTO should be employed only if the resulting source  code  is
00414  M01S00414.sympcod +++|     demonstrably  superior  in performance, clarity, maintainability,
00415  M01S00415.sympcod +++|     or extendibility.  In spite of structured programming, GOTOs  may
00416  M01S00416.sympcod +++|     make  the  code  more  efficient if employed properly.  GOTOs may
00417  M01S00417.sympcod +++|     make it difficult to follow logic.  Jumps into FOR loops must not
00418  M01S00418.sympcod +++|     be  used.   Jumps  into  code within a THEN or ELSE should not be
00419  M01S00419.sympcod +++|     used.  Jumps backwards in the code should not be used.
00420  M01S00420.sympcod +++|1
00421  M01S00421.sympcod +++|                                                                   2-6
00422  M01S00422.sympcod +++|     NOS SYMPL CODING STANDARD
00423  M01S00423.sympcod +++|                                                              06/01/83
00424  M01S00424.sympcod +++|     -----------------------------------------------------------------
00425  M01S00425.sympcod +++|     2.0 Coding Standards
00426  M01S00426.sympcod +++|     2.10 GOTOs and SWITCHes (Case Statement)
00427  M01S00427.sympcod +++|     -----------------------------------------------------------------
00428  M01S00428.sympcod +++|
00429  M01S00429.sympcod +++|        A GOTO statement specifying a subscripted switch list  may  be
00430  M01S00430.sympcod +++|     used to simulate a case statement.  Each case should end  with  a
00431  M01S00431.sympcod +++|     GOTO branching to a common  exit, a RETURN statement, or an ABORT
00432  M01S00432.sympcod +++|     call.
00433  M01S00433.sympcod +++|
00434  M01S00434.sympcod +++|        Simulated  case  statements may  use a  multiplicity of labels
00435  M01S00435.sympcod +++|     for exits, provided  that  the selection of  exit points is  done
00436  M01S00436.sympcod +++|     to achieve consolidation of similar  sequences  of code, and that
00437  M01S00437.sympcod +++|     all such labels are grouped together.  See the  Examples  section
00438  M01S00438.sympcod +++|     for an example of a simulated case statement.
00439  M01S00439.sympcod +++|
00440  M01S00440.sympcod +++|
00441  M01S00441.sympcod +++|     2.11 IF
00442  M01S00442.sympcod +++|
00443  M01S00443.sympcod +++|
00444  M01S00444.sympcod +++|        The  THEN  and  ELSE part of an IF statement must always use a
00445  M01S00445.sympcod +++|     BEGIN/END pair.  If embedded comments are needed to describe  the
00446  M01S00446.sympcod +++|     condition, they should be placed with either the THEN/ELSE or the
00447  M01S00447.sympcod +++|     associated BEGIN/END pair rather than on the IF.  A  stand  alone
00448  M01S00448.sympcod +++|     comment following  the  THEN  or  ELSE  may be  used  instead  if
00449  M01S00449.sympcod +++|     embedded  comments  would  be  too  long  or  would  restrict the
00450  M01S00450.sympcod +++|     readability of the code.
00451  M01S00451.sympcod +++|
00452  M01S00452.sympcod +++|        Related  IF  statements should not be nested more than 3 deep.
00453  M01S00453.sympcod +++|     A simulated case statement may be used.
00454  M01S00454.sympcod +++|
00455  M01S00455.sympcod +++|        Compound conditionals on an IF  statement  should  be  ordered
00456  M01S00456.sympcod +++|     such  that  the first condition is the one which will most likely
00457  M01S00457.sympcod +++|     terminate the condition evaluation.
00458  M01S00458.sympcod +++|
00459  M01S00459.sympcod +++|
00460  M01S00460.sympcod +++|     2.12 Bead
00461  M01S00461.sympcod +++|
00462  M01S00462.sympcod +++|
00463  M01S00463.sympcod +++|        Avoid using bead functions unless necessary.  Instead, the use
00464  M01S00464.sympcod +++|     of an array with partial-word items is preferred.  Bead functions
00465  M01S00465.sympcod +++|     are difficult to update in a program if the  data  item  that  is
00466  M01S00466.sympcod +++|     beaded  is  ever  changed.   If  used,  do  not  cross-type  (bit
00467  M01S00467.sympcod +++|     functions should be used only on  numeric  data,  byte  functions
00468  M01S00468.sympcod +++|     only on characters).
00469  M01S00469.sympcod +++|
00470  M01S00470.sympcod +++|        Bead  functions  may  be  used  to  simulate  data  definition
00471  M01S00471.sympcod +++|     features not currently implemented with SYMPL such  as  repeating
00472  M01S00472.sympcod +++|     groups within a word.
00473  M01S00473.sympcod +++|1
00474  M01S00474.sympcod +++|                                                                   2-7
00475  M01S00475.sympcod +++|     NOS SYMPL CODING STANDARD
00476  M01S00476.sympcod +++|                                                              06/01/83
00477  M01S00477.sympcod +++|     -----------------------------------------------------------------
00478  M01S00478.sympcod +++|     2.0 Coding Standards
00479  M01S00479.sympcod +++|     2.13 PROCs, FUNCs, and PRGMs
00480  M01S00480.sympcod +++|     -----------------------------------------------------------------
00481  M01S00481.sympcod +++|
00482  M01S00482.sympcod +++|     2.13 PROCs, FUNCs, and PRGMs
00483  M01S00483.sympcod +++|
00484  M01S00484.sympcod +++|
00485  M01S00485.sympcod +++|        XDEFs,   alternate entry points, and internal PROCs should not
00486  M01S00486.sympcod +++|     be used.  they are hard to locate in the program  and  will  make
00487  M01S00487.sympcod +++|     debugging and modification more difficult.
00488  M01S00488.sympcod +++|
00489  M01S00489.sympcod +++|        PROCs  and  FUNCs  must  have a fixed (not variable) number of
00490  M01S00490.sympcod +++|     parameters.
00491  M01S00491.sympcod +++|
00492  M01S00492.sympcod +++|        The F option on the SYMPL  command must not be used.  Instead,
00493  M01S00493.sympcod +++|     use CONTROL FTN in the source when needed.
00494  M01S00494.sympcod +++|
00495  M01S00495.sympcod +++|1
00496  M01S00496.sympcod +++|                                                                   3-1
00497  M01S00497.sympcod +++|     NOS SYMPL CODING STANDARD
00498  M01S00498.sympcod +++|                                                              06/01/83
00499  M01S00499.sympcod +++|     -----------------------------------------------------------------
00500  M01S00500.sympcod +++|     3.0  Naming Conventions
00501  M01S00501.sympcod +++|     -----------------------------------------------------------------
00502  M01S00502.sympcod +++|
00503  M01S00503.sympcod +++|     3.0  Naming Conventions
00504  M01S00504.sympcod +++|
00505  M01S00505.sympcod +++|
00506  M01S00506.sympcod +++|
00507  M01S00507.sympcod +++|
00508  M01S00508.sympcod +++|
00509  M01S00509.sympcod +++|        All declarations and PROC/FUNC names should be descriptive.
00510  M01S00510.sympcod +++|
00511  M01S00511.sympcod +++|        Routines  may use  simple  local  variables  named TMP1, TMP2,
00512  M01S00512.sympcod +++|     etc.  However, such  names  can be  used only  for  multi-purpose
00513  M01S00513.sympcod +++|     items.  Items with a specific computational  purpose  should have
00514  M01S00514.sympcod +++|     a meaningful name.
00515  M01S00515.sympcod +++|
00516  M01S00516.sympcod +++|        All external identifiers (PRGM, PROC, FUNC names) must be 7 or
00517  M01S00517.sympcod +++|     less characters.  The loader truncates a name to 7 characters.
00518  M01S00518.sympcod +++|
00519  M01S00519.sympcod +++|        All internal identifiers (declarations,  arrays,  status  list
00520  M01S00520.sympcod +++|     names) must be 10 or less characters.  A $ may be used as another
00521  M01S00521.sympcod +++|     letter in the alphabet.  However, $ is invalid in the  deck  name
00522  M01S00522.sympcod +++|      because of MODIFY.
00523  M01S00523.sympcod +++|
00524  M01S00524.sympcod +++|        All  array  items  should  be  prefixed  by  the  first 3 or 4
00525  M01S00525.sympcod +++|     characters of the array name.  The last 6 or 7 characters of  the
00526  M01S00526.sympcod +++|     array item are the descriptive name.
00527  M01S00527.sympcod +++|
00528  M01S00528.sympcod +++|        All related DEFs should use the same prefix.
00529  M01S00529.sympcod +++|
00530  M01S00530.sympcod +++|        All  COMDECK names should be 7 characters in length and should
00531  M01S00531.sympcod +++|     be in the following form
00532  M01S00532.sympcod +++|
00533  M01S00533.sympcod +++|               COMxaaa
00534  M01S00534.sympcod +++|
00535  M01S00535.sympcod +++|                    where
00536  M01S00536.sympcod +++|                         aaa = Symbolic name of COMDECK
00537  M01S00537.sympcod +++|                         x = One of the COMDECK indicators:
00538  M01S00538.sympcod +++|                             A = COMDECKs used by more than one of the
00539  M01S00539.sympcod +++|                                 E, U, or Z SYMPL groups
00540  M01S00540.sympcod +++|                             B = Data manager
00541  M01S00541.sympcod +++|                             C = CPU code
00542  M01S00542.sympcod +++|                             D = Display driver code
00543  M01S00543.sympcod +++|                             E = EXEC portion of MSS (SYMPL)
00544  M01S00544.sympcod +++|                             F = Full screen editor (FSE)
00545  M01S00545.sympcod +++|                             I = Initialization
00546  M01S00546.sympcod +++|                             K = Transaction subsystem
00547  M01S00547.sympcod +++|                             M = Mass storage error equivalents
00548  M01S00548.sympcod +++|                             P = PP code
00549  M01S00549.sympcod +++|                             S = Subsystem text symbols, constants
00550  M01S00550.sympcod +++|                             T = Tables
00551  M01S00551.sympcod +++|                             U = Utilities (SYMPL)
00552  M01S00552.sympcod +++|                             Z = Driver portion of MSS (SYMPL)
00553  M01S00553.sympcod +++|
00554  M01S00554.sympcod +++|1
00555  M01S00555.sympcod +++|                                                                   4-1
00556  M01S00556.sympcod +++|     NOS SYMPL CODING STANDARD
00557  M01S00557.sympcod +++|                                                              06/01/83
00558  M01S00558.sympcod +++|     -----------------------------------------------------------------
00559  M01S00559.sympcod +++|     4.0 Code Readability
00560  M01S00560.sympcod +++|     -----------------------------------------------------------------
00561  M01S00561.sympcod +++|
00562  M01S00562.sympcod +++|
00563  M01S00563.sympcod +++|     4.0 Code Readability
00564  M01S00564.sympcod +++|
00565  M01S00565.sympcod +++|
00566  M01S00566.sympcod +++|
00567  M01S00567.sympcod +++|
00568  M01S00568.sympcod +++|
00569  M01S00569.sympcod +++|     4.1 Format of Statements
00570  M01S00570.sympcod +++|
00571  M01S00571.sympcod +++|
00572  M01S00572.sympcod +++|        All declarations must begin in column 7 and be finished before
00573  M01S00573.sympcod +++|     column 72.  Column 72 must be blank to separate  SYMPL  code  and
00574  M01S00574.sympcod +++|     comments  from MODIFY sequence numbers.  Each line of indentation
00575  M01S00575.sympcod +++|     is two spaces.
00576  M01S00576.sympcod +++|
00577  M01S00577.sympcod +++|        Each BEGIN/END is on a separate line.  The first BEGIN  is  in
00578  M01S00578.sympcod +++|     column  7.  Subsequent BEGINs are each indented two spaces.  Code
00579  M01S00579.sympcod +++|     following the BEGIN, up to and including the next  END,  has  the
00580  M01S00580.sympcod +++|     same  indentation as the BEGIN unless exempted by some other rule
00581  M01S00581.sympcod +++|     (i.e.  labels are in column 1).  The END  statement  reduces  the
00582  M01S00582.sympcod +++|     following  indentation  by two spaces.  Any  BEGIN/END  pair that
00583  M01S00583.sympcod +++|     brackets more than  ten statements  should have matching embedded
00584  M01S00584.sympcod +++|     comments on the BEGIN and END.  Redundant BEGIN/END pairs  should
00585  M01S00585.sympcod +++|     not be  used to  highlight  module  structure.  This  function is
00586  M01S00586.sympcod +++|     better accomplished with stand alone comments.
00587  M01S00587.sympcod +++|
00588  M01S00588.sympcod +++|        Each THEN/ELSE/DO is on a separate line and is placed directly
00589  M01S00589.sympcod +++|     beneath the IF or FOR portion of the statement.
00590  M01S00590.sympcod +++|
00591  M01S00591.sympcod +++|        A statement which overflows the line must indent 2 spaces from
00592  M01S00592.sympcod +++|     the original statement.
00593  M01S00593.sympcod +++|
00594  M01S00594.sympcod +++|        Compound conditionals in an IF statement must be separated  at
00595  M01S00595.sympcod +++|     the  OR/AND  if  the  entire  statement  does not fit on a single
00596  M01S00596.sympcod +++|     line.  If the statement needs to  be  separated  because  of  its
00597  M01S00597.sympcod +++|     length  or  at  the programmer-s option, then the AND/OR plus its
00598  M01S00598.sympcod +++|     condition needs a separate line and is indented two spaces.
00599  M01S00599.sympcod +++|
00600  M01S00600.sympcod +++|     Examples
00601  M01S00601.sympcod +++|
00602  M01S00602.sympcod +++|         IF C              IF B            IF B OR C OR D
00603  M01S00603.sympcod +++|           OR (A AND B)      OR C          THEN
00604  M01S00604.sympcod +++|         THEN                OR D            BEGIN
00605  M01S00605.sympcod +++|           BEGIN           THEN              .
00606  M01S00606.sympcod +++|           .                 BEGIN           .
00607  M01S00607.sympcod +++|           .                 .               .
00608  M01S00608.sympcod +++|           .                 .               .
00609  M01S00609.sympcod +++|           END               END             END
00610  M01S00610.sympcod +++|
00611  M01S00611.sympcod +++|        The format of the FOR statement follows the IF.  If the entire
00612  M01S00612.sympcod +++|     statement  will not fit on a single line, then the statement must
00613  M01S00613.sympcod +++|     be separated into two lines and indented two spaces.
00614  M01S00614.sympcod +++|
00615  M01S00615.sympcod +++|1
00616  M01S00616.sympcod +++|                                                                   4-2
00617  M01S00617.sympcod +++|     NOS SYMPL CODING STANDARD
00618  M01S00618.sympcod +++|                                                              06/01/83
00619  M01S00619.sympcod +++|     -----------------------------------------------------------------
00620  M01S00620.sympcod +++|     4.0 Code Readability
00621  M01S00621.sympcod +++|     4.1 Format of Statements
00622  M01S00622.sympcod +++|     -----------------------------------------------------------------
00623  M01S00623.sympcod +++|
00624  M01S00624.sympcod +++|           FASTFOR I=1 STEP 1
00625  M01S00625.sympcod +++|             UNTIL 7
00626  M01S00626.sympcod +++|           DO
00627  M01S00627.sympcod +++|             BEGIN
00628  M01S00628.sympcod +++|             .
00629  M01S00629.sympcod +++|             .
00630  M01S00630.sympcod +++|             .
00631  M01S00631.sympcod +++|             END
00632  M01S00632.sympcod +++|
00633  M01S00633.sympcod +++|
00634  M01S00634.sympcod +++|     4.2 Column 1
00635  M01S00635.sympcod +++|
00636  M01S00636.sympcod +++|
00637  M01S00637.sympcod +++|        The following items must begin in column 1:
00638  M01S00638.sympcod +++|          Labels
00639  M01S00639.sympcod +++|          PRGM/PROC/FUNC statements
00640  M01S00640.sympcod +++|          Single line comments
00641  M01S00641.sympcod +++|          Stand alone comments
00642  M01S00642.sympcod +++|
00643  M01S00643.sympcod +++|
00644  M01S00644.sympcod +++|     4.3 Blank Lines
00645  M01S00645.sympcod +++|
00646  M01S00646.sympcod +++|
00647  M01S00647.sympcod +++|        A blank line must be used in the following cases:
00648  M01S00648.sympcod +++|
00649  M01S00649.sympcod +++|          As the first line in each common deck
00650  M01S00650.sympcod +++|          Between all declaration groupings
00651  M01S00651.sympcod +++|          Before and after every stand-alone comment
00652  M01S00652.sympcod +++|          Before and after all groups of conditional code
00653  M01S00653.sympcod +++|              (except COMDECK list control)
00654  M01S00654.sympcod +++|          After every END statement
00655  M01S00655.sympcod +++|          Before every label (or sequence of labels)
00656  M01S00656.sympcod +++|
00657  M01S00657.sympcod +++|        Blank lines (in addition to those required) may be
00658  M01S00658.sympcod +++|     used to improve the readability of the code.
00659  M01S00659.sympcod +++|
00660  M01S00660.sympcod +++|     4.4 Page Ejects
00661  M01S00661.sympcod +++|
00662  M01S00662.sympcod +++|
00663  M01S00663.sympcod +++|        A page  eject must be used as  a  separator between the
00664  M01S00664.sympcod +++|     declaration groups and the body of code.
00665  M01S00665.sympcod +++|
00666  M01S00666.sympcod +++|        If the declaration groups and the body of code will fit
00667  M01S00667.sympcod +++|     on a single page, five blank lines may be used rather than
00668  M01S00668.sympcod +++|     a page eject.
00669  M01S00669.sympcod +++|
00670  M01S00670.sympcod +++|1
00671  M01S00671.sympcod +++|                                                                   5-1
00672  M01S00672.sympcod +++|     NOS SYMPL CODING STANDARD
00673  M01S00673.sympcod +++|                                                              06/01/83
00674  M01S00674.sympcod +++|     -----------------------------------------------------------------
00675  M01S00675.sympcod +++|     5.0 Documentation Standards
00676  M01S00676.sympcod +++|     -----------------------------------------------------------------
00677  M01S00677.sympcod +++|
00678  M01S00678.sympcod +++|
00679  M01S00679.sympcod +++|     5.0 Documentation Standards
00680  M01S00680.sympcod +++|
00681  M01S00681.sympcod +++|
00682  M01S00682.sympcod +++|
00683  M01S00683.sympcod +++|
00684  M01S00684.sympcod +++|
00685  M01S00685.sympcod +++|        All  documentation  must  conform  to the NOS operating system
00686  M01S00686.sympcod +++|     requirements.  This includes rules concerning complete sentences,
00687  M01S00687.sympcod +++|     capitalization,  punctuation, abreviations, etc.  All stand-alone
00688  M01S00688.sympcod +++|     comments are complete English sentences with correct punctuation,
00689  M01S00689.sympcod +++|     ending with a period.
00690  M01S00690.sympcod +++|
00691  M01S00691.sympcod +++|
00692  M01S00692.sympcod +++|     5.1 Comment Formats and Types
00693  M01S00693.sympcod +++|
00694  M01S00694.sympcod +++|
00695  M01S00695.sympcod +++|        Comments  can  appear in three different formats: stand alone,
00696  M01S00696.sympcod +++|     single line and embedded.  Stand alone comments have  four  types
00697  M01S00697.sympcod +++|     determined  by  the  number of asterisks on the initial line of a
00698  M01S00698.sympcod +++|     sequence of lines with asterisks in column 1.  These  four  types
00699  M01S00699.sympcod +++|     are recognized by the DOCMENT utility and cause some comments (or
00700  M01S00700.sympcod +++|     code) to be included in DOCMENT output depending on  DOCMENT  run
00701  M01S00701.sympcod +++|     time parameters.
00702  M01S00702.sympcod +++|
00703  M01S00703.sympcod +++|
00704  M01S00704.sympcod +++|    5.1.1 Embedded Comments
00705  M01S00705.sympcod +++|
00706  M01S00706.sympcod +++|
00707  M01S00707.sympcod +++|        Embedded   comments  appear  on  the  same  line  following  a
00708  M01S00708.sympcod +++|     declaration or executable statement.  The left delimiter must  be
00709  M01S00709.sympcod +++|     preceded  by  at least two spaces and followed by only one space.
00710  M01S00710.sympcod +++|     At least one space follows the  comment  text  before  the  right
00711  M01S00711.sympcod +++|     delimiter.   At  least one space must follow the right delimiter.
00712  M01S00712.sympcod +++|     Column positioning rules for the left delimiter are given in  the
00713  M01S00713.sympcod +++|     section "Documentation with Embedded Comments".
00714  M01S00714.sympcod +++|
00715  M01S00715.sympcod +++|
00716  M01S00716.sympcod +++|     5.1.2 Single Line Comments
00717  M01S00717.sympcod +++|
00718  M01S00718.sympcod +++|
00719  M01S00719.sympcod +++|        These  comments have a left comment delimiter in column 1, the
00720  M01S00720.sympcod +++|     text starting in column 3 for title lines  or  in  column  7  for
00721  M01S00721.sympcod +++|     common  deck  headers, and a right comment delimiter proceeded by
00722  M01S00722.sympcod +++|     at least one space all on a single line.  This  comment  form  is
00723  M01S00723.sympcod +++|     used in the following cases:
00724  M01S00724.sympcod +++|          -- Title lines
00725  M01S00725.sympcod +++|          -- Common deck headers
00726  M01S00726.sympcod +++|
00727  M01S00727.sympcod +++|1
00728  M01S00728.sympcod +++|                                                                   5-2
00729  M01S00729.sympcod +++|     NOS SYMPL CODING STANDARD
00730  M01S00730.sympcod +++|                                                              06/01/83
00731  M01S00731.sympcod +++|     -----------------------------------------------------------------
00732  M01S00732.sympcod +++|     5.0 Documentation Standards
00733  M01S00733.sympcod +++|     5.1.3 Stand Alone Comments
00734  M01S00734.sympcod +++|     -----------------------------------------------------------------
00735  M01S00735.sympcod +++|
00736  M01S00736.sympcod +++|     5.1.3 Stand Alone Comments
00737  M01S00737.sympcod +++|
00738  M01S00738.sympcod +++|
00739  M01S00739.sympcod +++|        These  comments consist of at least 5 lines with the first and
00740  M01S00740.sympcod +++|     last being blank lines, the second and next to last having (only)
00741  M01S00741.sympcod +++|     a  comment  delimiter  in column 1 with the comment body starting
00742  M01S00742.sympcod +++|     with line 3.  Each line of the comment body has  an  asterisk  in
00743  M01S00743.sympcod +++|     column 1 with blanks normally found in columns 2-6.
00744  M01S00744.sympcod +++|
00745  M01S00745.sympcod +++|        The initial line of the comment body (line 3) may have 1, 2, 3
00746  M01S00746.sympcod +++|     or 4 asterisks starting in column 1  depending  on  the  type  of
00747  M01S00747.sympcod +++|     output desired from the DOCMENT utility.
00748  M01S00748.sympcod +++|
00749  M01S00749.sympcod +++|     5.1.3.1 Brackets (****)
00750  M01S00750.sympcod +++|
00751  M01S00751.sympcod +++|
00752  M01S00752.sympcod +++|        A  pair of stand alone comments of this form causes DOCMENT to
00753  M01S00753.sympcod +++|     copy the comment body starting with the opening bracket, and  all
00754  M01S00754.sympcod +++|     subsequent  code until the closing bracket.  This is required for
00755  M01S00755.sympcod +++|     XREF  declarations.   An  example  is  indicated  with  the  XREF
00756  M01S00756.sympcod +++|     description.   It  may also be employed for other declarations or
00757  M01S00757.sympcod +++|     code which should be included on a DOCMENT run.
00758  M01S00758.sympcod +++|
00759  M01S00759.sympcod +++|        The comment body consists of asterisks  in  columns  1-4  with
00760  M01S00760.sympcod +++|     text  on  the  rest  of  the first line.  The comment text should
00761  M01S00761.sympcod +++|     clearly indicate which is the opening bracket and  which  is  the
00762  M01S00762.sympcod +++|     closing bracket.
00763  M01S00763.sympcod +++|
00764  M01S00764.sympcod +++|    5.1.3.2 External Comments (***)
00765  M01S00765.sympcod +++|
00766  M01S00766.sympcod +++|
00767  M01S00767.sympcod +++|        A  comment  body  which  is  to be included in any DOCMENT run
00768  M01S00768.sympcod +++|     (external or internal) has 3 asterisks  in  columns  1-3  of  the
00769  M01S00769.sympcod +++|     first line of the comment body.  The 3 asterisk form is generally
00770  M01S00770.sympcod +++|     used to explain the interface to a SYMPL PRGM.  It is  also  used
00771  M01S00771.sympcod +++|     in the header documentation for common decks.
00772  M01S00772.sympcod +++|
00773  M01S00773.sympcod +++|     5.1.3.3 Internal Comments (**)
00774  M01S00774.sympcod +++|
00775  M01S00775.sympcod +++|
00776  M01S00776.sympcod +++|        A  comment  body  which  is  to  be  included in a DOCMENT run
00777  M01S00777.sympcod +++|     selecting  internal  documentation  in   addition   to   external
00778  M01S00778.sympcod +++|     documentation  has asterisks in columns 1 and 2 of the first line
00779  M01S00779.sympcod +++|     of the comment body.  This is  generally  used  to  describe  the
00780  M01S00780.sympcod +++|     interface  for  each  PROC/FUNC.  It may also be used to describe
00781  M01S00781.sympcod +++|     other important information about a PROC/FUNC/PRGM.
00782  M01S00782.sympcod +++|
00783  M01S00783.sympcod +++|1
00784  M01S00784.sympcod +++|                                                                   5-3
00785  M01S00785.sympcod +++|     NOS SYMPL CODING STANDARD
00786  M01S00786.sympcod +++|                                                              06/01/83
00787  M01S00787.sympcod +++|     -----------------------------------------------------------------
00788  M01S00788.sympcod +++|     5.0 Documentation Standards
00789  M01S00789.sympcod +++|     5.1.3.4 Module Comments (*)
00790  M01S00790.sympcod +++|     -----------------------------------------------------------------
00791  M01S00791.sympcod +++|
00792  M01S00792.sympcod +++|     5.1.3.4 Module Comments (*)
00793  M01S00793.sympcod +++|
00794  M01S00794.sympcod +++|
00795  M01S00795.sympcod +++|        A comment body which is not to be included in  a  DOCMENT  run
00796  M01S00796.sympcod +++|     simply  has  1  asterisk  on  the first line of the comment body.
00797  M01S00797.sympcod +++|     This type of stand alone comment is generally  used  to  document
00798  M01S00798.sympcod +++|     design  information  which  helps  one  maintain or code review a
00799  M01S00799.sympcod +++|     module.
00800  M01S00800.sympcod +++|
00801  M01S00801.sympcod +++|        This type of comment can present design  information  for  the
00802  M01S00802.sympcod +++|     entire  PROC/FUNC,  or  for a sequence of code.  It should answer
00803  M01S00803.sympcod +++|     the question: "how does this PROC/FUNC code segment work?"
00804  M01S00804.sympcod +++|
00805  M01S00805.sympcod +++|
00806  M01S00806.sympcod +++|     5.2 Program Level Documentation
00807  M01S00807.sympcod +++|
00808  M01S00808.sympcod +++|
00809  M01S00809.sympcod +++|        Every PRGM must have an overview describing what it  does  and
00810  M01S00810.sympcod +++|     external  documentation  describing how it is used.  The overview
00811  M01S00811.sympcod +++|     documentation is very general.  A description of the fields is in
00812  M01S00812.sympcod +++|     the NOS coding standards.
00813  M01S00813.sympcod +++|
00814  M01S00814.sympcod +++|     #
00815  M01S00815.sympcod +++|     ***   (heading)
00816  M01S00816.sympcod +++|     *
00817  M01S00817.sympcod +++|     *     (purpose)
00818  M01S00818.sympcod +++|     *
00819  M01S00819.sympcod +++|     *     (command format)
00820  M01S00820.sympcod +++|     *
00821  M01S00821.sympcod +++|     *     PRGM program name.
00822  M01S00822.sympcod +++|     *
00823  M01S00823.sympcod +++|     *     ENTRY.      .....
00824  M01S00824.sympcod +++|     *
00825  M01S00825.sympcod +++|     *     EXIT.       .....
00826  M01S00826.sympcod +++|     *
00827  M01S00827.sympcod +++|     *     MESSAGES.   .....
00828  M01S00828.sympcod +++|     *
00829  M01S00829.sympcod +++|     *     NOTES.      .....
00830  M01S00830.sympcod +++|     *
Line S00831 Modification History
M01 (Added by) sympcod
M02 (Updated by) 281l803
Seq #  *Modification Id* Act 
----------------------------+
00831  M02S00831.281l803 ---|     *     COPYRIGHT CONTROL DATA CORPORATION, 1983.
00832  M01S00001.281l803 +++|     *     COPYRIGHT CONTROL DATA SYSTEMS INC.  1992.
00833  M01S00832.sympcod +++|     #
00834  M01S00833.sympcod +++|
00835  M01S00834.sympcod +++|        In  addition,  a PRGM may have internal and module comments as
00836  M01S00835.sympcod +++|     appropriate.
00837  M01S00836.sympcod +++|
00838  M01S00837.sympcod +++|1
00839  M01S00838.sympcod +++|                                                                   5-4
00840  M01S00839.sympcod +++|     NOS SYMPL CODING STANDARD
00841  M01S00840.sympcod +++|                                                              06/01/83
00842  M01S00841.sympcod +++|     -----------------------------------------------------------------
00843  M01S00842.sympcod +++|     5.0 Documentation Standards
00844  M01S00843.sympcod +++|     5.3 Documentation of PROCs and FUNCs
00845  M01S00844.sympcod +++|     -----------------------------------------------------------------
00846  M01S00845.sympcod +++|
00847  M01S00846.sympcod +++|     5.3 Documentation of PROCs and FUNCs
00848  M01S00847.sympcod +++|
00849  M01S00848.sympcod +++|
00850  M01S00849.sympcod +++|        Every PROC/FUNC needs an internal documentation  section.   It
00851  M01S00850.sympcod +++|     should  answer the question: "how is this PROC/FUNC  used?".  The
00852  M01S00851.sympcod +++|     description  of  the  different  fields  is  in  the  NOS  Coding
00853  M01S00852.sympcod +++|     Standards.
00854  M01S00853.sympcod +++|
00855  M01S00854.sympcod +++|     #
00856  M01S00855.sympcod +++|     **    (heading)
00857  M01S00856.sympcod +++|     *
00858  M01S00857.sympcod +++|     *     (purpose)
00859  M01S00858.sympcod +++|     *
00860  M01S00859.sympcod +++|     *     (PROC or FUNC statement with semicolon omitted)
00861  M01S00860.sympcod +++|     *
00862  M01S00861.sympcod +++|     *     ENTRY      .....
00863  M01S00862.sympcod +++|     *
00864  M01S00863.sympcod +++|     *     EXIT       .....
00865  M01S00864.sympcod +++|     *
00866  M01S00865.sympcod +++|     *     MESSAGES   .....
00867  M01S00866.sympcod +++|     *
00868  M01S00867.sympcod +++|     *     NOTES      .....
00869  M01S00868.sympcod +++|     *
00870  M01S00869.sympcod +++|     #
00871  M01S00870.sympcod +++|
00872  M01S00871.sympcod +++|        If a PROC or FUNC references a based array whose pointer is in
00873  M01S00872.sympcod +++|     a common block, and the PROC or FUNC assumes that the pointer for
00874  M01S00873.sympcod +++|     that array is set before the PROC  or FUNC is  called, the  entry
00875  M01S00874.sympcod +++|     condition comments should state that assumption.
00876  M01S00875.sympcod +++|
00877  M01S00876.sympcod +++|        In addition, a PROC/FUNC may have additional internal comments
00878  M01S00877.sympcod +++|     and module comments as appropriate.
00879  M01S00878.sympcod +++|
00880  M01S00879.sympcod +++|        Where a higher level of documentation is needed for a  related
00881  M01S00880.sympcod +++|     group of  PROCs  an extra  PROC  should  be added to  contain the
00882  M01S00881.sympcod +++|     unifying  documentation.
00883  M01S00882.sympcod +++|
00884  M01S00883.sympcod +++|
00885  M01S00884.sympcod +++|     5.4 Documentation with Embedded Comments
00886  M01S00885.sympcod +++|
00887  M01S00886.sympcod +++|
00888  M01S00887.sympcod +++|        Embedded comments are of two documentation forms  (i.e.   data
00889  M01S00888.sympcod +++|     declaraction or action code).  This is the only type of a comment
00890  M01S00889.sympcod +++|     that  need  not be a  complete  sentence.  This type  of  comment
00891  M01S00890.sympcod +++|     should  not  be  continued  onto  another  line.   If  absolutely
00892  M01S00891.sympcod +++|     necessary, the comment may be continued  on  the  following line.
00893  M01S00892.sympcod +++|     In this case the second line  must  not  contain code.
00894  M01S00893.sympcod +++|
00895  M01S00894.sympcod +++|           THEN                           # comment which is too long
00896  M01S00895.sympcod +++|                                            continuation of commment #
00897  M01S00896.sympcod +++|1
00898  M01S00897.sympcod +++|                                                                   5-5
00899  M01S00898.sympcod +++|     NOS SYMPL CODING STANDARD
00900  M01S00899.sympcod +++|                                                              06/01/83
00901  M01S00900.sympcod +++|     -----------------------------------------------------------------
00902  M01S00901.sympcod +++|     5.0 Documentation Standards
00903  M01S00902.sympcod +++|     5.4.1  Data Declaration Embedded Comments
00904  M01S00903.sympcod +++|     -----------------------------------------------------------------
00905  M01S00904.sympcod +++|
00906  M01S00905.sympcod +++|     5.4.1  Data Declaration Embedded Comments
00907  M01S00906.sympcod +++|
00908  M01S00907.sympcod +++|
00909  M01S00908.sympcod +++|        Every array, item, status  item,  DEF  and  XREF  item must be
00910  M01S00909.sympcod +++|     documented with appropriate information.  Each declaration should
00911  M01S00910.sympcod +++|     appear  on  a  separate  line  accompanied  by  embedded comments
00912  M01S00911.sympcod +++|     describing its function (optionally,  if  this  is  an  important
00913  M01S00912.sympcod +++|     array,  it  may  be  bracketed by comment lines with asterisks in
00914  M01S00913.sympcod +++|     columns 1 through 4 so that DOCMENT will process it.
00915  M01S00914.sympcod +++|
00916  M01S00915.sympcod +++|        Presets  should  be  commented   individually  to  reflect the
00917  M01S00916.sympcod +++|     function of the preset.
00918  M01S00917.sympcod +++|
00919  M01S00918.sympcod +++|        The left delimiter of the embedded comment should be in column
00920  M01S00919.sympcod +++|     38 unless the statement extends beyond column 35, in  which  case
00921  M01S00920.sympcod +++|     the delimiter is placed at least  two  spaces to the right of the
00922  M01S00921.sympcod +++|     statement.
00923  M01S00922.sympcod +++|
00924  M01S00923.sympcod +++|
00925  M01S00924.sympcod +++|     5.4.2 Action Code Embedded Comments
00926  M01S00925.sympcod +++|
00927  M01S00926.sympcod +++|
00928  M01S00927.sympcod +++|        For BEGIN and END statements, the embedded comments are placed
00929  M01S00928.sympcod +++|     two  spaces  to the right of the statement.  For other statements
00930  M01S00929.sympcod +++|     the embedded comments begin in column  38  unless  the  statement
00931  M01S00930.sympcod +++|     extends beyond column 35 in which case the delimiter is placed at
00932  M01S00931.sympcod +++|     least two spaces to the right of the statement.
00933  M01S00932.sympcod +++|
00934  M01S00933.sympcod +++|
00935  M01S00934.sympcod +++|     5.5 General Documentation for PROCs, PRGMs or FUNCs
00936  M01S00935.sympcod +++|
00937  M01S00936.sympcod +++|
00938  M01S00937.sympcod +++|        Each  PRGM, PROC, FUNC statement must have a corresponding END
00939  M01S00938.sympcod +++|     statement followed by the PRGM, PROC, FUNC name as a  comment  on
00940  M01S00939.sympcod +++|     that  same  line.   SYMPL  comments containing COMPASS-like title
00941  M01S00940.sympcod +++|     pseudo-ops must appear as the second line in a SYMPL  PRGM,  PROC
00942  M01S00941.sympcod +++|     or FUNC.
00943  M01S00942.sympcod +++|
00944  M01S00943.sympcod +++|     PRGM OK;
00945  M01S00944.sympcod +++|     # TITLE OK - description of PRGM OK.                                  #
00946  M01S00945.sympcod +++|
00947  M01S00946.sympcod +++|           BEGIN  # OK #
00948  M01S00947.sympcod +++|           .
00949  M01S00948.sympcod +++|           .
00950  M01S00949.sympcod +++|           .
00951  M01S00950.sympcod +++|           END  # OK #
00952  M01S00951.sympcod +++|
00953  M01S00952.sympcod +++|1
00954  M01S00953.sympcod +++|                                                                   6-1
00955  M01S00954.sympcod +++|     NOS SYMPL CODING STANDARD
00956  M01S00955.sympcod +++|                                                              06/01/83
00957  M01S00956.sympcod +++|     -----------------------------------------------------------------
00958  M01S00957.sympcod +++|     6.0 Examples
00959  M01S00958.sympcod +++|     -----------------------------------------------------------------
00960  M01S00959.sympcod +++|
00961  M01S00960.sympcod +++|     6.0 Examples
00962  M01S00961.sympcod +++|
00963  M01S00962.sympcod +++|
00964  M01S00963.sympcod +++|
00965  M01S00964.sympcod +++|
00966  M01S00965.sympcod +++|
00967  M01S00966.sympcod +++|     6.1 COMDECK Examples
00968  M01S00967.sympcod +++|
00969  M01S00968.sympcod +++|     1     7                              38        48                     71
00970  M01S00969.sympcod +++|     +-----+------------------------------+---------+----------------------+
00971  M01S00970.sympcod +++|     COMASPC
00972  M01S00971.sympcod +++|     COMMON
00973  M01S00972.sympcod +++|
00974  M01S00973.sympcod +++|     #     COMASPC - STEP POINT CONTROL.                                   #
00975  M01S00974.sympcod +++|                                                    CONTROL NOLIST;
00976  M01S00975.sympcod +++|                                                    CONTROL IFEQ LISTCON,1;
00977  M01S00976.sympcod +++|                                                    CONTROL LIST;
00978  M01S00977.sympcod +++|                                                    CONTROL FI;
00979  M01S00978.sympcod +++|           BEGIN  # COMASPC #
00980  M01S00979.sympcod +++|
00981  M01S00980.sympcod +++|     #
00982  M01S00981.sympcod +++|     ***   COMASPC - STEP POINT CONTROL.
00983  M01S00982.sympcod +++|     *
00984  M01S00983.sympcod +++|     *     *COMASPC* CONTAINS DECLARATIONS USED FOR CONTROL OF STEP MODE.
00985  M01S00984.sympcod +++|     #
00986  M01S00985.sympcod +++|
00987  M01S00986.sympcod +++|
00988  M01S00987.sympcod +++|           DEF STEPCNT    #4#;            # NUMBER OF STEP POINTS - 1 #
00989  M01S00988.sympcod +++|           DEF STEPPNT    (I) #B<(I),1>STEPMASK#;  # STEP POINT #
00990  M01S00989.sympcod +++|
00991  M01S00990.sympcod +++|           STATUS STEPVAL                 # STEP POINT VALUES #
00992  M01S00991.sympcod +++|             S1,                          # STAGING STEP POINT 1 #
00993  M01S00992.sympcod +++|             S2,                          # STAGING STEP POINT 2 #
00994  M01S00993.sympcod +++|             S3,                          # STAGING STEP POINT 3 #
00995  M01S00994.sympcod +++|             D1,                          # DESTAGING STEP POINT 1 #
00996  M01S00995.sympcod +++|             D2;                          # DESTAGING STEP POINT 2 #
00997  M01S00996.sympcod +++|
00998  M01S00997.sympcod +++|           COMMOM ASPCCOM;
00999  M01S00998.sympcod +++|
01000  M01S00999.sympcod +++|             BEGIN  # ASPCCOM #
01001  M01S01000.sympcod +++|
01002  M01S01001.sympcod +++|             ITEM HPMASK     U;           # HALTED PROCESS MASK #
01003  M01S01002.sympcod +++|             ITEM STEPMASK   U;           # STEP POINT MASK #
01004  M01S01003.sympcod +++|
01005  M01S01004.sympcod +++|             ARRAY HPT [0:STEPCNT] P(1);  # HALTED PROCESS TABLE #
01006  M01S01005.sympcod +++|               BEGIN
01007  M01S01006.sympcod +++|               ITEM HPT$LINK   U(00,42,18);  # HALTED PROCESS CHAIN LINK #
01008  M01S01007.sympcod +++|               END
01009  M01S01008.sympcod +++|
01010  M01S01009.sympcod +++|             END  # ASPCCOM #
01011  M01S01010.sympcod +++|
01012  M01S01011.sympcod +++|           END  # COMASPC #
01013  M01S01012.sympcod +++|
01014  M01S01013.sympcod +++|                                                 CONTROL LIST;
01015  M01S01014.sympcod +++|
01016  M01S01015.sympcod +++|1
01017  M01S01016.sympcod +++|                                                                   6-2
01018  M01S01017.sympcod +++|     NOS SYMPL CODING STANDARD
01019  M01S01018.sympcod +++|                                                              06/01/83
01020  M01S01019.sympcod +++|     -----------------------------------------------------------------
01021  M01S01020.sympcod +++|     6.0 Examples
01022  M01S01021.sympcod +++|     6.2 PROC Example
01023  M01S01022.sympcod +++|     -----------------------------------------------------------------
01024  M01S01023.sympcod +++|
01025  M01S01024.sympcod +++|     6.2 PROC Example
01026  M01S01025.sympcod +++|
01027  M01S01026.sympcod +++|
01028  M01S01027.sympcod +++|     1     7                              38        48                     71
01029  M01S01028.sympcod +++|     +-----+------------------------------+---------+----------------------+
01030  M01S01029.sympcod +++|     PROC PSFIN((NDVALUE),(SPVALUE));
01031  M01S01030.sympcod +++|     # TITLE PSFIN - INITIALIZES THE CONFIGURARTION.                       #
01032  M01S01031.sympcod +++|
01033  M01S01032.sympcod +++|           BEGIN  # PSFIN #
01034  M01S01033.sympcod +++|
01035  M01S01034.sympcod +++|     #
01036  M01S01035.sympcod +++|     **    PSFIN - INITIALIZES THE CONFIGURATION.
01037  M01S01036.sympcod +++|     *
01038  M01S01037.sympcod +++|     *     *PSFIN* INITIALIZES THE CONFIGURATION OF A FAMILY OF
01039  M01S01038.sympcod +++|     *     DEVICES.
01040  M01S01039.sympcod +++|     *
01041  M01S01040.sympcod +++|     *     PROC PSFIN((NDVALUE),(SPVALUE))
01042  M01S01041.sympcod +++|     *
01043  M01S01042.sympcod +++|     *     ENTRY   (NDVALUE) = NUMBER OF DEVICES IN A FAMILY.
01044  M01S01043.sympcod +++|     *             (SPVALUE) = SPACE ASSIGNED TO EACH DEVICE.
01045  M01S01044.sympcod +++|     *             ARRAY HEADER = PSEUDO PFC.
01046  M01S01045.sympcod +++|     *
01047  M01S01046.sympcod +++|     *     EXIT    CONFIGURATION IS INITIALIZED.
01048  M01S01047.sympcod +++|     *
01049  M01S01048.sympcod +++|     *     NOTES   THE SPECIFIED VALUES ARE PLACED IN THE HEADER.
01050  M01S01049.sympcod +++|     #
01051  M01S01050.sympcod +++|
01052  M01S01051.sympcod +++|           ITEM NDVALUE    U;             # NUMBER OF DEVICES #
01053  M01S01052.sympcod +++|           ITEM SPVALUE    U;             # SPACE AVAILABLE PER DEVICE #
01054  M01S01053.sympcod +++|
01055  M01S01054.sympcod +++|     #
01056  M01S01055.sympcod +++|     ****  PROC PSFIN - XREF LIST BEGIN.
01057  M01S01056.sympcod +++|     #
01058  M01S01057.sympcod +++|
01059  M01S01058.sympcod +++|           XREF
01060  M01S01059.sympcod +++|             BEGIN
01061  M01S01060.sympcod +++|             PROC PSLOCK;                 # INTERLOCKS THE PSEUDO PFC #
01062  M01S01061.sympcod +++|             PROC PSUNLCK;                # RETURNS THE PSEUDO PFC #
01063  M01S01062.sympcod +++|             END
01064  M01S01063.sympcod +++|
01065  M01S01064.sympcod +++|     #
01066  M01S01065.sympcod +++|     ****  PROC PSFIN - XREF LIST END.
01067  M01S01066.sympcod +++|     #
01068  M01S01067.sympcod +++|
01069  M01S01068.sympcod +++|1
01070  M01S01069.sympcod +++|                                                                   6-3
01071  M01S01070.sympcod +++|     NOS SYMPL CODING STANDARD
01072  M01S01071.sympcod +++|                                                              06/01/83
01073  M01S01072.sympcod +++|     -----------------------------------------------------------------
01074  M01S01073.sympcod +++|     6.0 Examples
01075  M01S01074.sympcod +++|     6.2 PROC Example
01076  M01S01075.sympcod +++|     -----------------------------------------------------------------
01077  M01S01076.sympcod +++|
01078  M01S01077.sympcod +++|           DEF OFFSET  #4#;               # DEVICE ENTRY OFFSET IN PFC #
01079  M01S01078.sympcod +++|
01080  M01S01079.sympcod +++|           DEF LISTCON #0#;               # DO NOT LIST COMDECKS #
01081  M01S01080.sympcod +++|     *CALL COMAMSS
01082  M01S01081.sympcod +++|     *CALL COMZHED
01083  M01S01082.sympcod +++|
01084  M01S01083.sympcod +++|           ITEM I         I;              # LOOP VARIABLE #
01085  M01S01084.sympcod +++|           ITEM NUM       U;              # CALCULATED NUMBER #
01086  M01S01085.sympcod +++|                                                    CONTROL EJECT;
01087  M01S01086.sympcod +++|
01088  M01S01087.sympcod +++|           PSLOCK(HEADER);
01089  M01S01088.sympcod +++|
01090  M01S01089.sympcod +++|     #
01091  M01S01090.sympcod +++|     *     SET VALUES IN THE HEADER.
01092  M01S01091.sympcod +++|     #
01093  M01S01092.sympcod +++|
01094  M01S01093.sympcod +++|           HEAD$ND[0] = NDVALUE;
01095  M01S01094.sympcod +++|           HEAD$SPDEV[0] =  SPVALUE;
01096  M01S01095.sympcod +++|           NUM = NDVALUE * SPVALUE;
01097  M01S01096.sympcod +++|           HEAD$SPFAM[0] = NUM;
01098  M01S01097.sympcod +++|           HEAD$SPAVF[0] = NUM;
01099  M01S01098.sympcod +++|           SLOWFOR I = 1 STEP 1 UNTIL NDVALUE
01100  M01S01099.sympcod +++|           DO                             # SET SPACE AVAILALBE #
01101  M01S01100.sympcod +++|             BEGIN
01102  M01S01101.sympcod +++|             HEAD$XX[I + OFFSET] = SPVALUE;
01103  M01S01102.sympcod +++|             END
01104  M01S01103.sympcod +++|
01105  M01S01104.sympcod +++|           PSUNLCK(HEADER);
01106  M01S01105.sympcod +++|           RETURN;
01107  M01S01106.sympcod +++|           END  # PSFIN #
01108  M01S01107.sympcod +++|
01109  M01S01108.sympcod +++|           TERM
01110  M01S01109.sympcod +++|
01111  M01S01110.sympcod +++|1
01112  M01S01111.sympcod +++|                                                                   6-4
01113  M01S01112.sympcod +++|     NOS SYMPL CODING STANDARD
01114  M01S01113.sympcod +++|                                                              06/01/83
01115  M01S01114.sympcod +++|     -----------------------------------------------------------------
01116  M01S01115.sympcod +++|     6.0 Examples
01117  M01S01116.sympcod +++|     6.3 Status List/Status Switch Example
01118  M01S01117.sympcod +++|     -----------------------------------------------------------------
01119  M01S01118.sympcod +++|
01120  M01S01119.sympcod +++|     6.3 Status List/Status Switch Example
01121  M01S01120.sympcod +++|
01122  M01S01121.sympcod +++|
01123  M01S01122.sympcod +++|           STATUS ERSTAT                  # ERROR STATUS #
01124  M01S01123.sympcod +++|             ERRORNO,                     # NO ERROR #
01125  M01S01124.sympcod +++|             ERRORFE,                     # FILE ALREADY EXISTS #
01126  M01S01125.sympcod +++|             ERRORFN,                     # FILE NOT FOUND #
01127  M01S01126.sympcod +++|             ERRORNW,                     # UNABLE TO WRITE PFC #
01128  M01S01127.sympcod +++|             ;                            # END OF *ERSTAT* #
01129  M01S01128.sympcod +++|
01130  M01S01129.sympcod +++|           ITEM FLAG S:ERSTAT;            # ERROR CONDITION #
01131  M01S01130.sympcod +++|
01132  M01S01131.sympcod +++|           SWITCH ERRCASE:ERSTAT          # ERROR LIST #
01133  M01S01132.sympcod +++|                       OK:ERRORNO,        # NO ERROR #
01134  M01S01133.sympcod +++|                 PFEXISTS:ERRORFE,        # FILE ALREADY EXISTS #
01135  M01S01134.sympcod +++|                  NOENTRY:ERRORFN,        # FILE ONT FOUND #
01136  M01S01135.sympcod +++|                  WRITERR:ERRORNW;        # UNABLE TO WRITE PFC #
01137  M01S01136.sympcod +++|
01138  M01S01137.sympcod +++|        A status list may also be defined with an upper limit entry
01139  M01S01138.sympcod +++|     put at the end of the list.  This upper limit can  be used  in
01140  M01S01139.sympcod +++|     the code to test that a variable is within its defined  range.
01141  M01S01140.sympcod +++|     In this  style  the upper  limit entry  is terminated  with  a
01142  M01S01141.sympcod +++|     a semi-colon on the same line.
01143  M01S01142.sympcod +++|
01144  M01S01143.sympcod +++|     Example:
01145  M01S01144.sympcod +++|
01146  M01S01145.sympcod +++|           STATUS ERSTAT                  # ERROR STATUS #
01147  M01S01146.sympcod +++|             ERRORNO,                     # NO ERROR #
01148  M01S01147.sympcod +++|             ERRORFE,                     # FILE ALREADY EXISTS #
01149  M01S01148.sympcod +++|             ERRORFN,                     # FILE NOT FOUND #
01150  M01S01149.sympcod +++|             ERRORNW,                     # UNABLE TO WRITE PFC #
01151  M01S01150.sympcod +++|             ERROREND;                    # END OF *ERSTAT* #
01152  M01S01151.sympcod +++|
01153  M01S01152.sympcod +++|1
01154  M01S01153.sympcod +++|                                                                   6-5
01155  M01S01154.sympcod +++|     NOS SYMPL CODING STANDARD
01156  M01S01155.sympcod +++|                                                              06/01/83
01157  M01S01156.sympcod +++|     -----------------------------------------------------------------
01158  M01S01157.sympcod +++|     6.0 Examples
01159  M01S01158.sympcod +++|     6.3 Status List/Status Switch Example
01160  M01S01159.sympcod +++|     -----------------------------------------------------------------
01161  M01S01160.sympcod +++|
01162  M01S01161.sympcod +++|     #
01163  M01S01162.sympcod +++|     *     PROCESS THE ERROR RESPONSE.
01164  M01S01163.sympcod +++|     #
01165  M01S01164.sympcod +++|
01166  M01S01165.sympcod +++|           GOTO ERRCASE[FLAG];
01167  M01S01166.sympcod +++|
01168  M01S01167.sympcod +++|     #
01169  M01S01168.sympcod +++|     *     stand alone comment here or an embedded comment on the label.
01170  M01S01169.sympcod +++|     #
01171  M01S01170.sympcod +++|
01172  M01S01171.sympcod +++|     PFEXISTS:                            # embedded comment #
01173  M01S01172.sympcod +++|           -------
01174  M01S01173.sympcod +++|           -------
01175  M01S01174.sympcod +++|           GOTO ENDCASE;
01176  M01S01175.sympcod +++|
01177  M01S01176.sympcod +++|     NOENTRY:                             # embedded comment #
01178  M01S01177.sympcod +++|           -------
01179  M01S01178.sympcod +++|           -------
01180  M01S01179.sympcod +++|           GOTO ENDCASE;
01181  M01S01180.sympcod +++|
01182  M01S01181.sympcod +++|     WRITERR:                             # embedded comment #
01183  M01S01182.sympcod +++|           -------
01184  M01S01183.sympcod +++|           -------
01185  M01S01184.sympcod +++|           GOTO ENDCASE;
01186  M01S01185.sympcod +++|
01187  M01S01186.sympcod +++|     OK:                                  # embedded comment #
01188  M01S01187.sympcod +++|           ----------
01189  M01S01188.sympcod +++|           GOTO ENDCASE;
01190  M01S01189.sympcod +++|
01191  M01S01190.sympcod +++|     ENDCASE:
01192  M01S01191.sympcod +++|           -------
01193  M01S01192.sympcod +++|
01194  M01S01193.sympcod +++|     #
01195  M01S01194.sympcod +++|     *     PROCESS THE ERROR RESPONSE.
01196  M01S01195.sympcod +++|     #
01197  M01S01196.sympcod +++|
01198  M01S01197.sympcod +++|1
01199  M01S01198.sympcod +++|                                                                  A1-1
01200  M01S01199.sympcod +++|     NOS SYMPL CODING STANDARD
01201  M01S01200.sympcod +++|                                                              06/01/83
01202  M01S01201.sympcod +++|     -----------------------------------------------------------------
01203  M01S01202.sympcod +++|     A1.0 Addendum for SMF Project
01204  M01S01203.sympcod +++|     -----------------------------------------------------------------
01205  M01S01204.sympcod +++|
01206  M01S01205.sympcod +++|        This  addendum  describes  changes to  the  NOS  SYMPL  coding
01207  M01S01206.sympcod +++|     standard  for  the   Screen  Management  Facility (SMF)  project.
01208  M01S01207.sympcod +++|     Certain parts of this change in the  standard  shall be  relevent
01209  M01S01208.sympcod +++|     only to the Full Screen Editor and not to the screen formatter.
01210  M01S01209.sympcod +++|
01211  M01S01210.sympcod +++|     1.  Structural changes
01212  M01S01211.sympcod +++|
01213  M01S01212.sympcod +++|         a.  Nested  procedures/functions  are  allowable  under   the
01214  M01S01213.sympcod +++|         following conditions.  The  terminology  used  here  shall be
01215  M01S01214.sympcod +++|         "compilation unit" for  an  outermost  PRGM/PROC/FUNC,  since
01216  M01S01215.sympcod +++|         that is the scope  of the  map  and  cross-reference  in  the
01217  M01S01216.sympcod +++|         listing.
01218  M01S01217.sympcod +++|
01219  M01S01218.sympcod +++|         Procedures and functions may be nested.  A  compilation  unit
01220  M01S01219.sympcod +++|         may  contain  XDEF-ed  internal  routines  provided  that   a
01221  M01S01220.sympcod +++|         PROC/FUNC compilation unit is never called via the main entry
01222  M01S01221.sympcod +++|         point.  Any routine may contain internal routines  which  are
01223  M01S01222.sympcod +++|         not XDEF-ed.  That  is, nesting  of  XDEF-ed  PROCs  is  only
01224  M01S01223.sympcod +++|         allowed one level deep.
01225  M01S01224.sympcod +++|
01226  M01S01225.sympcod +++|         The  second level  of nesting is used only for routines which
01227  M01S01226.sympcod +++|         perform an algorithm not expected to be of value  outside  of
01228  M01S01227.sympcod +++|         the parent  routine.  Second  level nested routines should be
01229  M01S01228.sympcod +++|         very simple in their logical structure.  The same  principles
01230  M01S01229.sympcod +++|         will apply for deeper level routines.
01231  M01S01230.sympcod +++|
01232  M01S01231.sympcod +++|         Non-XDEF  internal  procedures  must  have  the  same  header
01233  M01S01232.sympcod +++|         documentation as any external procedure.
01234  M01S01233.sympcod +++|
01235  M01S01234.sympcod +++|         b.  External symbols may be more than 7 characters long.  The
01236  M01S01235.sympcod +++|         programmer is responsible to  assure  uniqueness  within  the
01237  M01S01236.sympcod +++|         first 7 characters.  These  oversize  external  names,  while
01238  M01S01237.sympcod +++|         permissible, are discouraged and should be used only when the
01239  M01S01238.sympcod +++|         programmer cannot reduce the routine  name  to a 7  character
01240  M01S01239.sympcod +++|         name with sufficient clarity.
01241  M01S01240.sympcod +++|
01242  M01S01241.sympcod +++|         c.  COMPASS subroutines are allowed for optimization of tight
01243  M01S01242.sympcod +++|         loops.  Such routines should be designed to contain a minimum
01244  M01S01243.sympcod +++|         of decision-making logic.
01245  M01S01244.sympcod +++|1
01246  M01S01245.sympcod +++|                                                                  A1-2
01247  M01S01246.sympcod +++|     NOS SYMPL CODING STANDARD
01248  M01S01247.sympcod +++|                                                              06/01/83
01249  M01S01248.sympcod +++|     -----------------------------------------------------------------
01250  M01S01249.sympcod +++|     A1.0 Addendum for SMF Project
01251  M01S01250.sympcod +++|     -----------------------------------------------------------------
01252  M01S01251.sympcod +++|
01253  M01S01252.sympcod +++|         d.  Each compilation unit in the editor shall call COMAFSE as
01254  M01S01253.sympcod +++|         its first common deck.  This deck contains symbol  and  macro
01255  M01S01254.sympcod +++|         definitions which must appear early in the source code. Other
01256  M01S01255.sympcod +++|         common decks may be called either in alphabetic order  or  in
01257  M01S01256.sympcod +++|         functional order.  One example of functional order  would  be
01258  M01S01257.sympcod +++|         the storage mapping of a  common  block  which  can  only  be
01259  M01S01258.sympcod +++|         described by using several common decks  (this can arise in a
01260  M01S01259.sympcod +++|         situation where nested common decks would be desired but  the
01261  M01S01260.sympcod +++|         product is is built via MODIFY) correct storage mapping would
01262  M01S01261.sympcod +++|         thus require that the common decks be called in a  particular
01263  M01S01262.sympcod +++|         order for which alphabetic naming may not be reasonable.
01264  M01S01263.sympcod +++|
01265  M01S01264.sympcod +++|
01266  M01S01265.sympcod +++|     2.  Statement formats
01267  M01S01266.sympcod +++|
01268  M01S01267.sympcod +++|         a.  The FOR keyword may be used.  CONTROL FASTLOOP  (FASTFOR)
01269  M01S01268.sympcod +++|         is not permitted.
01270  M01S01269.sympcod +++|
01271  M01S01270.sympcod +++|         b.  FOR  loops  and  simulated case statements are allowed to
01272  M01S01271.sympcod +++|         terminate with a RETURN statement or the IORET macro.  In the
01273  M01S01272.sympcod +++|         editor, the ERRJUMP call may be used to terminate  any  block
01274  M01S01273.sympcod +++|         of code.  ERRJUMP will be a procedure which is itself allowed
01275  M01S01274.sympcod +++|         to execute a jump into a procedure.  ERRJUMP is used to clear
01276  M01S01275.sympcod +++|         the editor  into  a  nominal  condition  after encountering a
01277  M01S01276.sympcod +++|         syntax error.  In the editor, code may also be  terminated by
01278  M01S01277.sympcod +++|         a call to a fatal-error routine.
01279  M01S01278.sympcod +++|
01280  M01S01279.sympcod +++|         Loops may be based on labels and GOTO-s in place of FOR  only
01281  M01S01280.sympcod +++|         when the programmer can defend this  usage  as  substantially
01282  M01S01281.sympcod +++|         more  efficient  or  as  being  simpler  to   maintain   than
01283  M01S01282.sympcod +++|         functionally equivalent structured code.
01284  M01S01283.sympcod +++|
01285  M01S01284.sympcod +++|         Simulated case statements may use a backward jump to  achieve
01286  M01S01285.sympcod +++|         the common exit when the case is  embedded  in  an  iterative
01287  M01S01286.sympcod +++|         structure for which labels and GOTO-s are allowed.
01288  M01S01287.sympcod +++|
01289  M01S01288.sympcod +++|1
01290  M01S01289.sympcod +++|                                                                  A1-3
01291  M01S01290.sympcod +++|     NOS SYMPL CODING STANDARD
01292  M01S01291.sympcod +++|                                                              06/01/83
01293  M01S01292.sympcod +++|     -----------------------------------------------------------------
01294  M01S01293.sympcod +++|     A1.0 Addendum for SMF Project
01295  M01S01294.sympcod +++|     -----------------------------------------------------------------
01296  M01S01295.sympcod +++|
01297  M01S01296.sympcod +++|         c.  A PROC/FUNC/PRGM statement shall begin in column 1 for  a
01298  M01S01297.sympcod +++|         compilation unit and  for  a  first-level  nested  PROC/FUNC.
01299  M01S01298.sympcod +++|         PROC/FUNC  statements  nested  to  deeper  levels  shall   be
01300  M01S01299.sympcod +++|         indented 2 columns per level.  The body of code in a  routine
01301  M01S01300.sympcod +++|         shall be indented 2 columns  from  the  PROC/FUNC  statement.
01302  M01S01301.sympcod +++|         Code contained in a CONTROL IF bracket  shall be  indented  2
01303  M01S01302.sympcod +++|         columns from the CONTROL statement.  BEGINs and ENDs shall be
01304  M01S01303.sympcod +++|         indented 2 columns, and the code within the  BEGIN/END  shall
01305  M01S01304.sympcod +++|         be aligned with the BEGIN/END.  In the  editor,  IOBEGIN  and
01306  M01S01305.sympcod +++|         IOEND macros shall be indented  as though they are BEGIN/END.
01307  M01S01306.sympcod +++|
01308  M01S01307.sympcod +++|
01309  M01S01308.sympcod +++|     3.  Documentation
01310  M01S01309.sympcod +++|
01311  M01S01310.sympcod +++|         a.  Documentaton of  ENTRY/EXIT  conditions  and  of  storage
01312  M01S01311.sympcod +++|         usage must include  assumptions  regarding  manipulations  of
01313  M01S01312.sympcod +++|         pointer words for based arrays.
01314  M01S01313.sympcod +++|
01315  M01S01314.sympcod +++|         b.  For compilation units whose main entry point is uncalled,
01316  M01S01315.sympcod +++|         the main entry may carry documentation considered  applicable
01317  M01S01316.sympcod +++|         to all embedded procedures.
01318  M01S01317.sympcod +++|
01319  M01S01318.sympcod +++|         c.  XREF and XDEF may be provided by lists  of  routine names
01320  M01S01319.sympcod +++|         in common decks.  Such lists of XDEF  should  be  listed, but
01321  M01S01320.sympcod +++|         such lists of XREF should not be listed except for a  comment
01322  M01S01321.sympcod +++|         noting the call to the common deck.  DOCMENT brackets are not
01323  M01S01322.sympcod +++|         required.
01324  M01S01323.sympcod +++|
01325  M01S01324.sympcod +++|         d.  Stand alone comments may be a single  line starting  with
01326  M01S01325.sympcod +++|         a pound  sign in  column 1 and  ending with  a pound  sign in
01327  M01S01326.sympcod +++|         column 71, rather than the COMPASS style comment (asterisk in
01328  M01S01327.sympcod +++|         column 1 of the comment body).
01329  M01S01328.sympcod +++|
01330  M01S01329.sympcod +++|         The  use  of  preceeding  and  proceeding  blank   lines   is
01331  M01S01330.sympcod +++|         negotiable between the programmer and reviewer to  achieve  a
01332  M01S01331.sympcod +++|         mutually  satisfactory  visual   effect.   Note   that   this
01333  M01S01332.sympcod +++|         simplified form for stand alone comments is  only  applicable
01334  M01S01333.sympcod +++|         for comments not  intended  to  be  printed  by  the  DOCMENT
01335  M01S01334.sympcod +++|         utility.
01336  M01S01335.sympcod +++|
01337  M01S01336.sympcod +++|
01338  M01S01337.sympcod +++|     4.  Pseudo-reentrancy considerations (for FSE and SMFEX only).
01339  M01S01338.sympcod +++|
01340  M01S01339.sympcod +++|         a.  The SMFEX Executive  may  contain  a  limited  number  of
01341  M01S01340.sympcod +++|         labels within if or for blocks, and  external  labels  within
01342  M01S01341.sympcod +++|         procedures, as necessary to implement pseudo-reentrancy.
01343  M01S01342.sympcod +++|
01344  M01S01343.sympcod +++|         b.  SMFEX and FSE will contain procedures subject to  reentry
01345  M01S01344.sympcod +++|         under control of the SMFEX Executive.  A reentrant  procedure
01346  M01S01345.sympcod +++|         is a procedure which calls  another  reentrant  procedure  or
01347  M01S01346.sympcod +++|         uses  the  delay  or  recall  statements.   There  cannot  be
01348  M01S01347.sympcod +++|         reentrant functions.
01349  M01S01348.sympcod +++|
01350  M01S01349.sympcod +++|1
01351  M01S01350.sympcod +++|                                                                  A1-4
01352  M01S01351.sympcod +++|     NOS SYMPL CODING STANDARD
01353  M01S01352.sympcod +++|                                                              06/01/83
01354  M01S01353.sympcod +++|     -----------------------------------------------------------------
01355  M01S01354.sympcod +++|     A1.0 Addendum for SMF Project
01356  M01S01355.sympcod +++|     -----------------------------------------------------------------
01357  M01S01356.sympcod +++|
01358  M01S01357.sympcod +++|         c.  The reentrancy technique severly restricts the  usage  of
01359  M01S01358.sympcod +++|         local storage  and  of  parameters.   The  programmer  should
01360  M01S01359.sympcod +++|         dedicate common block storage to the functions  performed  by
01361  M01S01360.sympcod +++|         a reentrant routine, in preference to locals.  Note that  the
01362  M01S01361.sympcod +++|         common block includes one general purpose variable  which  is
01363  M01S01362.sympcod +++|         stackable,  so  that  reentrant  routines   can   dynamically
01364  M01S01363.sympcod +++|         allocate storage on a limited scale.
01365  M01S01364.sympcod +++|
01366  M01S01365.sympcod +++|         d.  Reentrant procedures  must  minimize  the  use  of  local
01367  M01S01366.sympcod +++|         storage.  Any sequence of code in a reentrant procedure which
01368  M01S01367.sympcod +++|         uses local storage must be preceded  and  followed  by  stand
01369  M01S01368.sympcod +++|         alone comments of the form
01370  M01S01369.sympcod +++|
01371  M01S01370.sympcod +++|             # LOCAL #
01372  M01S01371.sympcod +++|
01373  M01S01372.sympcod +++|             # END LOCAL #
01374  M01S01373.sympcod +++|
01375  M01S01374.sympcod +++|         The code  within  the  comments  cannot  call  any  reentrant
01376  M01S01375.sympcod +++|         routines.
01377  M01S01376.sympcod +++|
01378  M01S01377.sympcod +++|         e.  Reentrant procedures must minimize the use of parameters.
01379  M01S01378.sympcod +++|         When parameters are used, it is essential that the parameters
01380  M01S01379.sympcod +++|         be read-only (i.e.  the  subroutine  does  not  compute a new
01381  M01S01380.sympcod +++|         value), and they must be used before any reentrant  procedure
01382  M01S01381.sympcod +++|         is called.  Use of parameters shall be followed  by  a  stand
01383  M01S01382.sympcod +++|         alone comment of the form:
01384  M01S01383.sympcod +++|
01385  M01S01384.sympcod +++|             # END PARAMETERS #
01386  M01S01385.sympcod +++|
01387  M01S01386.sympcod +++|         f.  Reentrant  routines  lose  control  by  calling  DELAY or
01388  M01S01387.sympcod +++|         RECALL.   In  the  single-user  version,  these  are  COMPASS
01389  M01S01388.sympcod +++|         subroutines which execute recall macros.  In  the  multi-user
01390  M01S01389.sympcod +++|         version, these are DEF-ed to  be  calls  into  certain  entry
01391  M01S01390.sympcod +++|         points within SMFEX to invoke the multi-tasking executive.
01392  M01S01391.sympcod +++|
01393  M01S01392.sympcod +++|         g.  Reentrant routines are bracketed by the IOBEGIN and IOEND
01394  M01S01393.sympcod +++|         macros.  In the single-user  version,  these  are  DEF-ed  to
01395  M01S01394.sympcod +++|         simply yield BEGIN and END.  In the multi-user version, these
01396  M01S01395.sympcod +++|         are DEF-ed to generate code to maintain data structures which
01397  M01S01396.sympcod +++|         help the SMFEX multi-task executive  supervise  the  reentry.
01398  M01S01397.sympcod +++|         Reentrant routines cannot use the RETURN statement,  but  can
01399  M01S01398.sympcod +++|         use the IORET macro.
01400  M01S01399.sympcod +++|
01401  M01S01400.sympcod +++|1
01402  M01S01401.sympcod +++|                                                                  A1-5
01403  M01S01402.sympcod +++|     NOS SYMPL CODING STANDARD
01404  M01S01403.sympcod +++|                                                              06/01/83
01405  M01S01404.sympcod +++|     -----------------------------------------------------------------
01406  M01S01405.sympcod +++|     A1.0 Addendum for SMF Project
01407  M01S01406.sympcod +++|     -----------------------------------------------------------------
01408  M01S01407.sympcod +++|
01409  M01S01408.sympcod +++|         h.  Reentrant routines must be restricted as to the  type  of
01410  M01S01409.sympcod +++|         monitor calls they can issue either explicitly or by  calling
01411  M01S01410.sympcod +++|         other routines.  In particular, reentrant code must use  only
01412  M01S01411.sympcod +++|         CIO and each  CIO call  must  be explicit.  This  effectively
01413  M01S01412.sympcod +++|         bans the use of the standard NOS common decks.   Furthermore,
01414  M01S01413.sympcod +++|         the  only  file which  can be dealt with by reentrant code is
01415  M01S01414.sympcod +++|         the editor workfile.  Terminal I/O will be funneled into  one
01416  M01S01415.sympcod +++|         module of code, which shall  conditionally  compile  to yield
01417  M01S01416.sympcod +++|         conventional FET-s and CIO calls for FSE, and  calls  to  the
01418  M01S01417.sympcod +++|         SMFEX Executive for SMF.
01419  M01S01418.sympcod +++|
01420  M01S01419.sympcod +++|         i.  The only writeable storage which can be used  other  than
01421  M01S01420.sympcod +++|         local storage as described above shall  reside  in  a  single
01422  M01S01421.sympcod +++|         common block, or shall reside in based arrays  whose  pointer
01423  M01S01422.sympcod +++|         words are in the common block.  The  common  block  shall  be
01424  M01S01423.sympcod +++|         organized into several sections based on the various  degrees
01425  M01S01424.sympcod +++|         of reentrancy services provided by the SMFEX  Executive.   in
01426  M01S01425.sympcod +++|         the single-user editor, portions of this common block must be
01427  M01S01426.sympcod +++|         compiled to map exactly the same as the  multi-user  version,
01428  M01S01427.sympcod +++|         since that portion of the common block is tranferred verbatim
01429  M01S01428.sympcod +++|         through  the  workfile  for  communication  between  the  two
01430  M01S01429.sympcod +++|         versions of the editor.  All critical storage mapping must be
01431  M01S01430.sympcod +++|         identified as such in documentation.
01432  M01S01431.sympcod +++|
01433  M01S01432.sympcod +++|         j.  Reentrant code shall minimize dynamic relocation of based
01434  M01S01433.sympcod +++|         arrays.  Relocation is allowed if the pointer word is treated
01435  M01S01434.sympcod +++|         as  non-reentrant.   Relocation  is  possible  with   limited
01436  M01S01435.sympcod +++|         reentrancy provided the  pointer  word  is  mapped  into  the
01437  M01S01436.sympcod +++|         reentrant section of the common block.  Note that while  this
01438  M01S01437.sympcod +++|         will keep a pointer value alive for the duration of disk I/O,
01439  M01S01438.sympcod +++|         it is not able to keep any pointer valid across terminal  I/O
01440  M01S01439.sympcod +++|         unless the pointer points  within  reentrant  common  itself.
01441  M01S01440.sympcod +++|         This is due to the re-mapping of array locations performed by
01442  M01S01441.sympcod +++|         the SMFEX Executive upon internal swaps.   For  those  arrays
01443  M01S01442.sympcod +++|         re-mapped by SMFEX swapping, no module except SMFEX can  ever
01444  M01S01443.sympcod +++|         change the pointer word.
01445  M01S01444.sympcod +++|*WEOR
cdc/nos2.source/opl.opl871/deck/sympcod.txt ยท Last modified: by 127.0.0.1