 |                                                                    |        
 |                                                                    |        
 |                                                                    |        
 |              Waterloo SCRIPT - Version 88.1 (87DEC11)              |        
 |                                                                    |        
 |                          Reference Manual                          |        
 |                                                                    |        
 |                                                                    |        
 |                                                                    |        

                                                                               
                    Department of Computing Services                           

                         University of Waterloo                                

                   Waterloo, Ontario, Canada  N2L 3G1                          


                                                                               
                      Printed on October 18, 1988                              


                                                                               
                    For next updates, specify 881018                           
                                                                               
                                                                               
 Waterloo SCRIPT                                                Preface        


 |                                                                    |        
 |                              PREFACE                               |        
 |                                                                    |        


 The quality and accuracy of a document depend greatly on the ease with        
 which  revisions can  be made  to  the document.    This statement  is        
 particularly true of technical documents (into which class the present        
 manual falls),  which  should always accurately reflect  the status of        
 the things they describe.                                                     
    It is natural  that computer software solutions to  the problems of        
 document  production should  be  devised.    "Runoff" under  CTSS  and        
 MULTICS, IBM's "DCF", "Scribe", "TeX", "Troff" under UNIX and "SCRIPT"        
 represent such solutions.                                                     
    This manual describes  "Waterloo SCRIPT",  an outgrowth  of NSCRIPT        
 intended for use  under TSO (currently still available  from the SHARE        
 programme library).    NSCRIPT in turn  was derived from  CP/67 SCRIPT        
 which ran under  CMS on a System/360 model 67.    SCRIPT running under        
 OS/TSO  or VM/CMS  has  the same  outward appearance  as  it did  when        
 running under CP/67 CMS.  Its set of command words encompasses most of        
 those belonging to  SCRIPT,  MULTIC's "runoff" and  TSO's FORMAT.   In        
 many cases they perform identical functions and have the same symbolic        
 notation.                                                                     
    It has been the end users and their requirements that has sustained        
 continued development of  this software solution to  document composi-        
 tion problems.  If new output devices with enhanced function are to be        
 supported,  some care must be given to compatibility of existing input        
 files.   Issues concerning the ease of  use has prompted new primitive        
 function and modifications to existing function.   Even more important        
 has been the  development of Macro packages and  Markup Language pack-        
 ages to mask the existence of low  level detail from a person who only        
 wants their document to have a professional appearance.                       


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                - iii -                                        
                                                                               
 Purpose                                                Waterloo SCRIPT        


 |                                                                    |        
 |                              PURPOSE                               |        
 |                                                                    |        


 SCRIPT is  used to format  an input  file containing text  and control        
 lines.   The  file may  contain fixed-  or variable-length  records or        
 WYLBUR Edit-format records.   Formatting is specified by control lines        
 (lines  that  begin with  a  control  indicator,  normally  a  period,        
 followed by a two-letter control  word).   The appendix titled "Sample        
 Input to  SCRIPT" contains  an unformatted listing  of a  sample input        
 file.                                                                         
    The "SCRIPT"  command causes  the specified file  to be  edited and        
 formatted,  directed by control lines contained within the input file.        
 Each line read from the input file  is inspected for a first character        
 equal to the control identifier, normally a period, which identifies a        
 control line.   Control lines are not  output,  but are interpreted to        
 specify the format of the output.    The control word may be specified        
 in either upper or  lower case (or a mixture of the  two)  and must be        
 separated from its arguments (if any) by one or more spaces.   Control        
 lines may appear anywhere in the file,   and have effect on all output        
 produced after their appearance.                                              
    Output  can be  directed to  the  user's terminal,   to an  offline        
 printer,  to  a disk  file for  later processing  or to  a variety  of        
 special laser  printers by passing the  SCRIPT output through  a post-        
 processor.   Certain differences in the  processing occur depending on        
 where the output is directed and to what type of output device.  These        
 differences are described below under individual headings.                    


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                 - iv -                                        
                                                                               
 Waterloo SCRIPT                                      Table of Contents        


 Ŀ        
 |                                                                    |        
 |                         TABLE OF CONTENTS                          |        
 |                                                                    |        
         


 Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  iii        

 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv        

 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1        

 The CMS Environment . . . . . . . . . . . . . . . . . . . . . . . .  6        

      Input files  . . . . . . . . . . . . . . . . . . . . . . . . .  6        
      Output to the Terminal . . . . . . . . . . . . . . . . . . . .  6        
      Specifying SCRIPT Options  . . . . . . . . . . . . . . . . . .  7        
      Special Options for the SCRIPT/CMS Interface . . . . . . . . .  7        

 The TSO Environment . . . . . . . . . . . . . . . . . . . . . . . .  9        

      Input Files  . . . . . . . . . . . . . . . . . . . . . . . . .  9        
      Options  . . . . . . . . . . . . . . . . . . . . . . . . . . . 10        

 Online Terminal Support . . . . . . . . . . . . . . . . . . . . . . 12        

      "Stop" Codes . . . . . . . . . . . . . . . . . . . . . . . . . 12        
      Special Terminals  . . . . . . . . . . . . . . . . . . . . . . 12        
      Options for Special Terminals  . . . . . . . . . . . . . . . . 13        

 The OS and VS Batch Environments  . . . . . . . . . . . . . . . . . 15        

      DDnames used by SCRIPT . . . . . . . . . . . . . . . . . . . . 15        
      SCRIPT Catalogued Procedure  . . . . . . . . . . . . . . . . . 16        
      Using the Catalogued Procedure . . . . . . . . . . . . . . . . 16        

 Offline Printer Support . . . . . . . . . . . . . . . . . . . . . . 17        

      Options  . . . . . . . . . . . . . . . . . . . . . . . . . . . 17        
      How SCRIPT Handles the Printer . . . . . . . . . . . . . . . . 17        

 Creation of Input Files . . . . . . . . . . . . . . . . . . . . . . 18        

      File Format  . . . . . . . . . . . . . . . . . . . . . . . . . 18        
      Breaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18        
      Punctuation  . . . . . . . . . . . . . . . . . . . . . . . . . 18        
      Backspaces in the Input  . . . . . . . . . . . . . . . . . . . 18        
      Escapes  . . . . . . . . . . . . . . . . . . . . . . . . . . . 19        


                                                                               


                                                                               
                                 - v -                                         
                                                                               
 Table of Contents                                      Waterloo SCRIPT        


 Control Word Operands . . . . . . . . . . . . . . . . . . . . . . . 20        

      Positional Operands  . . . . . . . . . . . . . . . . . . . . . 20        
      BEGIN/END Operands . . . . . . . . . . . . . . . . . . . . . . 20        
      DELETE/PURGE/CANCEL Operands . . . . . . . . . . . . . . . . . 20        
      Numeric Operands . . . . . . . . . . . . . . . . . . . . . . . 20        
      Absolute Horizontal Units  . . . . . . . . . . . . . . . . . . 21        
      Absolute Vertical Units  . . . . . . . . . . . . . . . . . . . 22        

 Script Control Words  . . . . . . . . . . . . . . . . . . . . . . . 23        

 Appendix A:  Error Messages . . . . . . . . . . . . . . . . . . .  171        

      Levels of Errors . . . . . . . . . . . . . . . . . . . . . .  171        
      Message Formats  . . . . . . . . . . . . . . . . . . . . . .  171        
      Messages . . . . . . . . . . . . . . . . . . . . . . . . . .  171        

 Appendix B:  Archaic Control Words  . . . . . . . . . . . . . . .  181        

 Appendix C:  Sample Input to SCRIPT . . . . . . . . . . . . . . .  184        

 Appendix D:  Sample Output from SCRIPT  . . . . . . . . . . . . .  185        

 Appendix E:  The Output Page  . . . . . . . . . . . . . . . . . .  186        

 Appendix F:  Notes on the Organization of this Manual . . . . . .  188        

      SCRIPT Input Files . . . . . . . . . . . . . . . . . . . . .  188        
      Headings and Table of Contents . . . . . . . . . . . . . . .  188        
      Footnotes and Footnote Numbering . . . . . . . . . . . . . .  189        
      Automatic Dating with the Current Version of SCRIPT  . . . .  190        
      Formatting for Single- or Double-Sided Printing  . . . . . .  190        
      Single- or Multiple-Column Format  . . . . . . . . . . . . .  190        
      Generating Update Pages for the Manual . . . . . . . . . . .  190        

 Appendix G:  System Set Symbols and Macros  . . . . . . . . . . .  191        

      Date and Time  . . . . . . . . . . . . . . . . . . . . . . .  191        
      Current Computing Environment  . . . . . . . . . . . . . . .  191        
      Input File Processing  . . . . . . . . . . . . . . . . . . .  191        
      The Output Page  . . . . . . . . . . . . . . . . . . . . . .  192        
      The Output Device  . . . . . . . . . . . . . . . . . . . . .  192        
      Font Information . . . . . . . . . . . . . . . . . . . . . .  192        
      Error-Condition Indicators . . . . . . . . . . . . . . . . .  193        
      Current Value of Control Words . . . . . . . . . . . . . . .  193        
      SCRIPT Option Values and Indicators  . . . . . . . . . . . .  194        
      Automatic Macros . . . . . . . . . . . . . . . . . . . . . .  195        

 Appendix H:  Functions  . . . . . . . . . . . . . . . . . . . . .  196        

      Attributes of a Symbol . . . . . . . . . . . . . . . . . . .  196        
      Built-in Functions . . . . . . . . . . . . . . . . . . . . .  197        


                                                                               
                                 - vi -                                        
                                                                               
 Waterloo SCRIPT                                      Table of Contents        


 Appendix I:  Print Trains . . . . . . . . . . . . . . . . . . . .  207        

 Appendix J:  Control Word Summary, in Alphabetical Order  . . . .  209        


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                - vii -                                        
                                                                               
 Table of Contents                                      Waterloo SCRIPT        


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                - viii -                                       
                                                                               
 Waterloo SCRIPT                       SCRIPT Control Words by Function        


 Ŀ        
 |                                                                    |        
 |                  SCRIPT CONTROL WORDS BY FUNCTION                  |        
 |                                                                    |        
         


   * -- indicates Control Words that cause a Break                             

 Backspace                                                                     

     .BS     BackSpace . . . . . . . . . . . . . . . . . . . . . . . 33        

 Boxes                                                                         

   * .BX     BoX . . . . . . . . . . . . . . . . . . . . . . . . . . 34        

 Comment                                                                       

     .CM     CoMment . . . . . . . . . . . . . . . . . . . . . . . . 45        
     .*      Comment . . . . . . . . . . . . . . . . . . . . . . . . 45        
     .OC     Output Comment. . . . . . . . . . . . . . . . . . . .  106        

 Conditional Facilities                                                        

     .CS     Conditional Section . . . . . . . . . . . . . . . . . . 47        
     .IF     IF. . . . . . . . . . . . . . . . . . . . . . . . . . . 89        
     .TH     THen. . . . . . . . . . . . . . . . . . . . . . . . .  155        
     .EL     ELse. . . . . . . . . . . . . . . . . . . . . . . . . . 62        
     .DO     DO. . . . . . . . . . . . . . . . . . . . . . . . . . . 59        
     .PE     PErform . . . . . . . . . . . . . . . . . . . . . . .  112        

     see also .CC, .CP, .SK, .SP                                               

 Control Word Operations                                                       

     .CW     Control Word separator. . . . . . . . . . . . . . . . . 49        
     .LI     LIteral . . . . . . . . . . . . . . . . . . . . . . .  100        
     .       NUll. . . . . . . . . . . . . . . . . . . . . . . . . . 23        

 File Processing                                                               

     .AP     APpend. . . . . . . . . . . . . . . . . . . . . . . . . 25        
     .IM     IMbed . . . . . . . . . . . . . . . . . . . . . . . . . 91        
     .EF     End of File . . . . . . . . . . . . . . . . . . . . . . 61        
     .ME     Macro Exit. . . . . . . . . . . . . . . . . . . . . .  104        
     .PU     PUt workfile. . . . . . . . . . . . . . . . . . . . .  123        
   * .QQ     Quit Quickly. . . . . . . . . . . . . . . . . . . . .  124        
   * .QU     QUit. . . . . . . . . . . . . . . . . . . . . . . . .  125        

     .GO     GOto. . . . . . . . . . . . . . . . . . . . . . . . . . 74        
     ...     Set Label . . . . . . . . . . . . . . . . . . . . . . . 24        


                                                                               
                                 - ix -                                        
                                                                               
 SCRIPT Control Words by Function                       Waterloo SCRIPT        


 Floating Text Blocks                                                          

     .FB     Floating Block. . . . . . . . . . . . . . . . . . . . . 66        
     .FK     Floating Keep . . . . . . . . . . . . . . . . . . . . . 67        

 Font Processing                                                               

     .BF     Begin Font. . . . . . . . . . . . . . . . . . . . . . . 29        
     .DF     Define Font . . . . . . . . . . . . . . . . . . . . . . 53        
     .PF     Previous Font . . . . . . . . . . . . . . . . . . . .  113        
     .PH     PHoto font. . . . . . . . . . . . . . . . . . . . . .  113        

 Footnotes                                                                     

     .FN     FootNote. . . . . . . . . . . . . . . . . . . . . . . . 68        

 Formatting                                                                    

   * .BR     BReak . . . . . . . . . . . . . . . . . . . . . . . . . 32        
   * .CE     CEnter. . . . . . . . . . . . . . . . . . . . . . . . . 42        
   * .CO     COncatenate . . . . . . . . . . . . . . . . . . . . . . 46        
   * .FO     FOrmat. . . . . . . . . . . . . . . . . . . . . . . . . 70        
   * .JU     JUstify . . . . . . . . . . . . . . . . . . . . . . . . 97        
   * .LA     Left Adjust . . . . . . . . . . . . . . . . . . . . . . 98        
   * .NF     No Format . . . . . . . . . . . . . . . . . . . . . .  105        
   * .OJ     Out Justify . . . . . . . . . . . . . . . . . . . . .  108        
   * .RI     RIght adjust. . . . . . . . . . . . . . . . . . . . .  129        

 Formatting Environment Status                                                 

     .RE     Restore Environment . . . . . . . . . . . . . . . . .  128        
     .SA     SAve Environment. . . . . . . . . . . . . . . . . . .  133        

 Formula Processing                                                            

     .EQ     EQuation. . . . . . . . . . . . . . . . . . . . . . . . 64        

 GML Support                                                                   

     .GA     Gml Attribute . . . . . . . . . . . . . . . . . . . . . 71        
     .GT     Gml Tag . . . . . . . . . . . . . . . . . . . . . . . . 75        

 Headnotes                                                                     

     .HN     HeadNote. . . . . . . . . . . . . . . . . . . . . . . . 81        

 Hyphenation Control                                                           

     .HY     HYphenate . . . . . . . . . . . . . . . . . . . . . . . 84        
     .HW     Hyphenate Word. . . . . . . . . . . . . . . . . . . . . 83        


                                                                               


                                 - x -                                         
                                                                               
 Waterloo SCRIPT                       SCRIPT Control Words by Function        


 Index                                                                         

     .IE     Index Entry . . . . . . . . . . . . . . . . . . . . . . 88        
     .IX     IndeX Display . . . . . . . . . . . . . . . . . . . . . 95        

 Input Text Modification                                                       

   * .BL     Blank Line. . . . . . . . . . . . . . . . . . . . . . . 30        
     .CT     Continued Text. . . . . . . . . . . . . . . . . . . . . 48        
   * .LB     Leading Blank . . . . . . . . . . . . . . . . . . . . . 98        
   * .LT     Leading Tab . . . . . . . . . . . . . . . . . . . . .  103        
     .NL     Null Line . . . . . . . . . . . . . . . . . . . . . .  106        

 Line Spacing                                                                  

   * .SK     SKip. . . . . . . . . . . . . . . . . . . . . . . . .  136        
   * .SP     SPace . . . . . . . . . . . . . . . . . . . . . . . .  138        
   * .LN     LiNe immediate. . . . . . . . . . . . . . . . . . . .  101        
   * .SS     Single Space. . . . . . . . . . . . . . . . . . . . .  141        
   * .DS     Double Space. . . . . . . . . . . . . . . . . . . . . . 59        
   * .LS     Line Spacing. . . . . . . . . . . . . . . . . . . . .  102        
     .LE     LEading space . . . . . . . . . . . . . . . . . . . . . 99        
   * .SL     Set Leading . . . . . . . . . . . . . . . . . . . . .  137        

 Macros                                                                        

     .DM     Define Macro. . . . . . . . . . . . . . . . . . . . . . 58        
     .EC     Execute Control . . . . . . . . . . . . . . . . . . . . 61        
     .EM     Execute Macro . . . . . . . . . . . . . . . . . . . . . 63        
     .MS     Macro Substitution. . . . . . . . . . . . . . . . . .  105        
     .RM     ReMote Definition . . . . . . . . . . . . . . . . . .  129        

 Margin Modification                                                           

   * .AD     ADjust. . . . . . . . . . . . . . . . . . . . . . . . . 24        
   * .HI     Hanging Indent. . . . . . . . . . . . . . . . . . . . . 79        
   * .IN     INdent. . . . . . . . . . . . . . . . . . . . . . . . . 92        
   * .IL     Indent Line . . . . . . . . . . . . . . . . . . . . . . 91        
   * .IR     Indent Right. . . . . . . . . . . . . . . . . . . . . . 93        
   * .OF     OFfset. . . . . . . . . . . . . . . . . . . . . . . .  107        
   * .PM     Page Margin . . . . . . . . . . . . . . . . . . . . .  119        
   * .PP     Paragraph start . . . . . . . . . . . . . . . . . . .  121        
   * .UN     UNdent. . . . . . . . . . . . . . . . . . . . . . . .  167        

 Multiple Columns                                                              

     .BC     Balance Columns . . . . . . . . . . . . . . . . . . . . 27        
   * .CB     Column Begin. . . . . . . . . . . . . . . . . . . . . . 38        
   * .CC     Conditional Column. . . . . . . . . . . . . . . . . . . 39        
   * .CD     Column Definition . . . . . . . . . . . . . . . . . . . 40        
   * .CL     Column Length . . . . . . . . . . . . . . . . . . . . . 45        
   * .MC     Multiple Column . . . . . . . . . . . . . . . . . . .  104        
   * .SC     Single Column . . . . . . . . . . . . . . . . . . . .  135        


                                 - xi -                                        
                                                                               
 SCRIPT Control Words by Function                       Waterloo SCRIPT        


 Overlaying Text                                                               

     .BD     BolD. . . . . . . . . . . . . . . . . . . . . . . . . . 27        
     .BI     Bold Italic . . . . . . . . . . . . . . . . . . . . . . 30        
     .OO     Output Overlay. . . . . . . . . . . . . . . . . . . .  109        
     .OV     OVerlay on input. . . . . . . . . . . . . . . . . . .  110        

 Page Dimensions                                                               

   * .LL     Line Length . . . . . . . . . . . . . . . . . . . . .  101        
   * .PL     Page Length . . . . . . . . . . . . . . . . . . . . .  118        
     .PW     Page Width. . . . . . . . . . . . . . . . . . . . . .  123        

   * .TM     Top Margin. . . . . . . . . . . . . . . . . . . . . .  157        
   * .HM     Heading Margin. . . . . . . . . . . . . . . . . . . . . 81        
   * .HS     Heading Space . . . . . . . . . . . . . . . . . . . . . 82        

   * .BM     Bottom Margin . . . . . . . . . . . . . . . . . . . . . 31        
   * .FM     Footing Margin. . . . . . . . . . . . . . . . . . . . . 68        
   * .FS     Footing Space . . . . . . . . . . . . . . . . . . . . . 71        

 Page Numbering                                                                

     .PS     Page Symbol . . . . . . . . . . . . . . . . . . . . .  121        
     .PN     Page Numbering. . . . . . . . . . . . . . . . . . . .  120        

 Pagination                                                                    

   * .PA     PAge eject. . . . . . . . . . . . . . . . . . . . . .  111        
   * .CP     Conditional Page. . . . . . . . . . . . . . . . . . . . 47        
     .EM     EMpty Page. . . . . . . . . . . . . . . . . . . . . . . 63        

 Page Titles                                                                   

     .RT     Running Title . . . . . . . . . . . . . . . . . . . .  131        
     .TT     Top Title . . . . . . . . . . . . . . . . . . . . . .  162        
     .BT     Bottom Title. . . . . . . . . . . . . . . . . . . . . . 33        

 Revision Codes                                                                

     .RC     Revision Code . . . . . . . . . . . . . . . . . . . .  125        

 Set Symbols                                                                   

     .RV     Read Variable . . . . . . . . . . . . . . . . . . . .  132        
     .SE     SEt symbol. . . . . . . . . . . . . . . . . . . . . .  135        
     .SR     Set Reference . . . . . . . . . . . . . . . . . . . .  138        
     .SU     SUbstitute Symbol . . . . . . . . . . . . . . . . . .  141        
     .IT     Input Trace . . . . . . . . . . . . . . . . . . . . . . 94        


                                                                               


                                                                               
                                - xii -                                        
                                                                               
 Waterloo SCRIPT                       SCRIPT Control Words by Function        


 Spelling Verification                                                         

     .DU     Dictionary Update . . . . . . . . . . . . . . . . . . . 60        
     .SV     Spelling Verify . . . . . . . . . . . . . . . . . . .  143        
     .UW     Unverified Word . . . . . . . . . . . . . . . . . . .  169        

 System Communication                                                          

     .SY     SYstem. . . . . . . . . . . . . . . . . . . . . . . .  146        

 Tabs                                                                          

   * .SX     Split Text. . . . . . . . . . . . . . . . . . . . . .  145        
   * .TB     TaB . . . . . . . . . . . . . . . . . . . . . . . . .  147        
   * .TP     Tab Position. . . . . . . . . . . . . . . . . . . . .  158        

 Tables of Contents                                                            

     .DH     Define Heading. . . . . . . . . . . . . . . . . . . . . 56        
   * .HL     Heading Level . . . . . . . . . . . . . . . . . . . . . 80        
   * .Hn     also Heading Level. . . . . . . . . . . . . . . . . . . 87        
     .PT     Put Table of contents . . . . . . . . . . . . . . . .  122        
   * .TC     Table of Contents . . . . . . . . . . . . . . . . . .  150        

 Terminal Input and Output                                                     

     .ER     ERror . . . . . . . . . . . . . . . . . . . . . . . . . 65        
     .RD     ReaD terminal . . . . . . . . . . . . . . . . . . . .  127        
     .TE     TErminal input. . . . . . . . . . . . . . . . . . . .  154        
     .TY     TYpe on terminal. . . . . . . . . . . . . . . . . . .  164        

 Translation of Characters                                                     

     .CH     CHange. . . . . . . . . . . . . . . . . . . . . . . . . 43        
     .DC     Define Character. . . . . . . . . . . . . . . . . . . . 50        
     .TI     Translate on Input. . . . . . . . . . . . . . . . . .  156        
     .TR     TRanslate on output . . . . . . . . . . . . . . . . .  161        
     .TU     Translate Uppercase . . . . . . . . . . . . . . . . .  163        

 Underscoring and Uppercase                                                    

     .UC     Underscore and Capitalize . . . . . . . . . . . . . .  165        
     .UD     Underscore Definition . . . . . . . . . . . . . . . .  165        
     .UP     UPpercase . . . . . . . . . . . . . . . . . . . . . .  167        
     .US     UnderScore. . . . . . . . . . . . . . . . . . . . . .  168        

 Widow Control                                                                 

     .WD     WiDow . . . . . . . . . . . . . . . . . . . . . . . .  170        


                                                                               


                                                                               
                                - xiii -                                       
                                                                               
 SCRIPT Control Words by Function                       Waterloo SCRIPT        


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                - xiv -                                        
                                                                               
 Waterloo SCRIPT                                                Options        


 Ŀ        
 |                                                                    |        
 |                              OPTIONS                               |        
 |                                                                    |        
         


 The options you specify when you  invoke SCRIPT control the formatting        
 of output and the mechanical processes of the output device.   Options        
 may be delimited by blanks,  and  keyword operands may be delimited on        
 the left with an equal sign  or the operand surrounded by parentheses.        
 Capital letters  indicate minimum  shortforms.   Underscores  indicate        
 default values.                                                               

 Bind(margin) | Bind(omargin emargin)                                          
    To define  the initial  Page Margins  (.PM).   A  single suboperand        
    defines the Page Margins for all pages;  two suboperands define the        
    Odd Page Margin and Even Page Margin.  The default value is zero.          

 COntinue | NOCOntinue | COntinue=<0|n>                                        
    Specifies the number  of errors to be allowed  before processing is        
    terminated.   NOCO  is the  same as CO=0,   and CO  is the  same as        
    CO=100.                                                                    

 DEBUG | NODEBUG                                                               
 SPIE | NOSPIE                                                                 
    This is  a debugging  tool for  the person  maintaining the  SCRIPT        
    program.  It prevents a program interrupt exit from being set, thus        
    preventing a SCRW999T diagnostic from occurring.                           

 DUPLEX | NODUPLEX                                                             
    This option has no effect on SCRIPT itself.   It is used to set the        
    value  of  the  SYSDUPLEX System  Set  Symbol.    "DUPLEX"  assigns        
    &SYSDUPLEX the value "ON" and the default "NODUPLEX" sets the value        
    to "OFF".   It is  used by the GML layouts to  define even/odd page        
    layouts for duplex printing.                                               

 FIle | NOFIle                                                                 
    When used  in combination  with the  TErminal option,   this causes        
    output to  be written  to the usual  offline file  but in  a format        
    suitable for an online terminal.                                           

 FOrmatted | UNformatted                                                       
    The specified  file is printed along  with all control  lines.   No        
    other processing takes place.                                              

 FNSize=<1000|n>                                                               
    Specifies the maximum number of output lines (from 1 to 32767) that        
    may be outstanding in a Keep or Footnote at any one time.                  

 FROM=<*|frompage> | TO=<*|topage> | FOR=n | ONLY                              
    Selectively print only the specified pages of a document.  Multiple        
    occurrences of FROM/TO,   FROM/FOR and FROM/ONLY may  be specified.        
    FROM  specifies a  string to  match the  printable form  of a  page        

                                 - 1 -                                         
                                                                               
 Options                                                Waterloo SCRIPT        


    number at the top of some page of the document.   The string may be        
    numeric,  roman numerals,  with or without a page number prefix and        
    suffix.  An operand of * will match any page number.  TO after FROM        
    specifies a  string to  match the page  number at  the bottom  of a        
    page.   An operand of  * will continue to the end  of the document.        
    FOR after FROM specifies the number of pages to print.   ONLY after        
    FROM indicates that only the FROM page is to be printed.                   

 INDEX | NOINDEX                                                               
    The NOINDEX option will disable the Index (.IX)  control word which        
    can reduce the processing time for draft documents.                        

 LAYout(name1 <name2 ...>)                                                     
    causes the specified file to be imbedded (.IM) at the start of each        
    pass,  after PROfile processing;  if  LAYout is specified more than        
    once or with more than one  suboperand,  the files will be imbedded        
    in the order specified.                                                    

 LIBrary(name1 <name2 ...>)                                                    
    specifies  the  names of  partitioned  input  library files  to  be        
    searched to find  input files.   If LIBrary is  specified more than        
    once all libraries are searched in the order specified.  The SYSLIB        
    and SCRIPLIB libraries are always searched.                                

 LINenumber=<0|n> | LEGalnumber=<0|n>                                          
    LIN causes  the current output  line number  within the page  to be        
    displayed if the  output line is non-blank and that  portion of the        
    output line starting at  column "n" (ranging from 1 to  200)  is to        
    the right of data in the line.   LEG numbers sequentially only non-        
    blank lines in the text area.  LIN and LEG are mutually exclusive.         

 MArk | NOMArk                                                                 
    Marks the  beginning of each line  of the original input  by under-        
    scoring the first printable character of each record.                      

 MEMo                                                                          
    The formatted  output is directed to  the output file in  an online        
    terminal  format so  that it  may be  displayed later  at a  user's        
    terminal.  This option is equivalent to ONline and FIle.                   

 NUmber | NONUmber | NUmber=<0|n>                                              
    Displays the number of the record in the input file being processed        
    when the current output line was printed.  The value of "n" (from 1        
    to 200)  defines the starting column  in the output line where this        
    information  is to  appear,  if  those columns  would otherwise  be        
    blank.   NUmber will place the  information five columns beyond the        
    current Line Length.  NONUmber is the same as NUmber=0.                    

 NEW | OLD                                                                     
    The NEW  option redefines some  initial default values  for control        
    words.    Leading Space  ".LE YES" now  defaults  to allow  leading        
    spaces, but not Leading Skips, at the top of all pages and columns.        
    Empty Page ".EM YES" now defaults to  allow entirely blank pages to        
    print.                                                                     

                                 - 2 -                                         
                                                                               
 Waterloo SCRIPT                                                Options        


 PASses=<1|n>                                                                  
    Causes SCRIPT to make "n-1" complete passes through the input file,        
    performing all indicated  formatting but not producing  any output.        
    A last pass  is then made,  during which output  is produced.   The        
    value of "n"  may range from 1  to 10.   This option  is useful for        
    processing a file which uses set  symbol variables defined later in        
    the input.                                                                 
       Note that multiple passes in a  HASP or JES environment will not        
    work correctly if any SCRIPT input  comes from a "SYSIN DD *" file.        
    Because a card reader is being emulated, such an input file may not        
    be reread.                                                                 

 PAUse | NOPAUse                                                               
    The PAUSE  option is  equivalent to  STOP and  WAIT.   The  NOPAUSE        
    option is equivalent to NOSTOP and NOWAIT.                                 

 PRinter or OFfline                                                            
    Causes the output to be formatted  for the offline printer.   It is        
    recommended that PRinter be used when proof-reading the output.            

 PROfile | NOPROfile | PROfile(name <...>)                                     
    Causes an imbed (.IM)  of a file  called PROFILE or the user speci-        
    fied filename(s) automatically at the start of each pass.  Each use        
    of PROfile,  NOPROfile or PROfile(  will replace any already speci-        
    fied.                                                                      

 TWOPass or 2Pass | ONEPass or 1Pass                                           
    The TWOPASS option is a shortform for PASSES=2.  The ONEPASS option        
    is a short form for PASSES=1.                                              

 QUiet | NOQUiet                                                               
    If TErminal is in effect, QUiet causes the SCRIPT version identifi-        
    cation line to be suppressed.                                              

 QQuit | NOQQuit                                                               
    The QQUIT option causes the final end  of input to be treated as if        
    the Quit Quickly (.QQ) control word had been present.                      

 RMSize=<200|n>                                                                
    Specifies the  maximum number  of input records  (from 1  to 32767)        
    that may  be included in  any single  Macro (.DM)  or  Remote (.RM)        
    definition.                                                                

 SCREen | NOSCREen                                                             
    Specifies that the output device is a SCREEN or CRT device.   It is        
    effective only for TErminal output.   SCREEN  is set as the default        
    if the output device is known to be a CRT.   The effect is to print        
    overstruck output on one or more consecutive lines instead of using        
    "backspace and underscore".                                                

 SEGlib | SEGlib(name) | NOSEGlib                                              
    Specifies the segment library that contains INLINE graphic segments        
    for the I3820 and POSTScript device options.                               
       The  SEGLIB default  under CMS  is (PSEG3820 *)   for I3820  and        

                                 - 3 -                                         
                                                                               
 Options                                                Waterloo SCRIPT        


    (EPSF *)  for POSTScript.   The SEGLIB default for other systems is        
    to search DDNAME (SYSGLIB).                                                
       NOSEGLIB disables all graphic  segment processing.   All Segment        
    Include (.SI)  control words will leave white space for the graphic        
    but none will be processed.                                                

 SEQColumn=<1|n>                                                               
    Specifies the  first of  eight contiguous columns  (from 1  to 240)        
    where the input  record sequence number may be  found for variable-        
    length  input files.    SEQ=0 means  that no  sequence numbers  are        
    present and this is the default under CMS.   If "n" is greater than        
    the length of a record, then the last eight columns are presumed to        
    contain the sequence number for that record.                               

 SIX | EIGHT                                                                   
    The SIX  option defines the initial  Page Length for six  lines per        
    inch on  an eleven  inch page,  with  line three  set to  the first        
    normal  print line  on the  page.    The EIGHT  option defines  the        
    initial Page  Length for  eight lines  per inch  on an  eleven inch        
    page,  with  line four set  to the first  normal print line  on the        
    page.                                                                      

 NOSPELLchk | SPELLchk                                                         
    The  SPELLchk   option  requests  that  Spelling   Verification  be        
    performed on  input text.    This is  done with  a "dictionary"  of        
    correctly spelled words with prefix and suffix analysis, and with a        
    correct list of words specified as part of the input.                      

 SRLength=<240|n>                                                              
    Specifies the maximum  length of character string  operands for set        
    symbol variables; "n" may range from 4 to 240.                             

 STATistics | NOSTATistics                                                     
    Causes various and sundry statistics information to be displayed to        
    the error file at termination.                                             

 STop | NOSTop                                                                 
    Causes a  pause at the  bottom of each page  when output is  to the        
    terminal.  This pause allows the user to insert the next page.  The        
    pause is terminated by a carriage return or break.                         

 TABLeft=<0|1>                                                                 
    Controls the operation of a Left Tab.   A "0" value makes Left Tabs        
    work like a  typewriter,  with the character following  a tab being        
    placed in the  column specified.   A "1" value  makes the character        
    following a  Left Tab  go immediately  after the  column specified.        
    See the Tab control word (.TB).                                            

 TErminal or ONline                                                            
    Directs the formatted document to be output to the terminal.   This        
    option is mutually exclusive of the PRinter option.                        


                                                                               

                                 - 4 -                                         
                                                                               
 Waterloo SCRIPT                                                Options        


 UPcase | NOUPcase                                                             
 TRanslate | NOTRanslate                                                       
    Causes character translation using a  translate table that contains        
    as default lower to uppercase mapping.   Other types of translation        
    may be specified with the .TR control word.                                

 UPPer | NOUPPer                                                               
    Causes all Set Symbol variable names  to be converted to uppercase.        
    The effect may also be achieved with the .SU control word.                 

 WAit | NOwait                                                                 
    Causes output  to begin immediately  without waiting for  the first        
    page to be positioned by the user.   This option has no effect when        
    producing offline output.                                                  

 +symbol=string OR &symbol=string                                              
    At the beginning of the first pass,  a ".SR symbol=string;" control        
    line will  be executed for  each such  option in the  options list.        
    See the .SR control word for operand format rules.   This is useful        
    for setting values externally to the SCRIPT input.                         

 The following  options may be used  to set initial and  default values        
 for the corresponding control words:                                          

    Ŀ                      
    |   Parameter           |  Minimum       Maximum    |                      
    |||                      
    |   BMargin=<6|n>       |  0             33         |                      
    |   FMargin=<1|n>       |  0             33         |                      
    |   HMargin=<1|n>       |  0             33         |                      
    |   LLength=<60|n>      |  2             240        |                      
    |   PLength=<66|n>      |  10            32767      |                      
    |   TMargin=<6|n>       |  0             33         |                      
                          


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                 - 5 -                                         
                                                                               
 The CMS Environment                                    Waterloo SCRIPT        


 Ŀ        
 |                                                                    |        
 |                        THE CMS ENVIRONMENT                         |        
 |                                                                    |        
         


 The CMS command format is as follows:                                         

      Ŀ             
      |       |                                                  |             
      | SCript|    fn <SCRIPT|ft <*|fm>> <( options ... >        |             
      |       |                                                  |             
                   

 Input files                                                                   

 The "fileid" specified  is the name of the primary  SCRIPT input file.        
 If a "filetype" other than "SCRIPT" is specified,  then all internally        
 appended and imbedded files will first  search for a file matching the        
 primary filetype,  and then  look for a file of type  "SCRIPT".   If a        
 "filemode" other than "*" is specified,  then SCRIPT will first search        
 the specified disk for input files before searching all disks that are        
 currently accessed.    A "filename" of question  mark "?" will  type a        
 file of help documentation from the system disk.                              
    Any  "filenames" specified  with the  LAYout  option are  processed        
 before the primary input file.  More than one LAYout name may be spec-        
 ified.                                                                        
    If a  file PROFILE SCRIPT  exists on any  accessed disk,   then the        
 default setting  of the NOPROFILE option  will be changed  to PROFILE.        
 The user  may alternately select the  name of the PROFILE  file(s)  by        
 specifying the filenames as suboperands in the options list.                  
    Input files may be stored as  members of MACLIBs.   The "filenames"        
 of  the MACLIBs  to  be searched  may be  specified  with the  LIBrary        
 option.   These names are in addition to the default SYSLIB MACLIB and        
 SCRIPLIB MACLIB.                                                              

 Output to the Terminal                                                        

 (1) Unless the QUIET option was  specified,  the immediate response to        
     issuing the SCRIPT command is:                                            
       Waterloo SCRIPT - Version 88.1 (87DEC11)                                
 (2) Unless the NOWAIT option was specified, the next response is:             
       Load paper...                                                           
     The user should remove the ordinary  terminal paper and insert the        
     paper on which the output is to appear.  The paper should be posi-        
     tioned in such a way that the top  edge of the paper is just below        
     the typeball runner.   Output may  be started by pressing Carriage        
     Return, but this will start output on the line following where the        
     paper was  positioned.   Pressing  Attention or  Break will  start        
     output at the  line where the paper was positioned.    If the user        
     wishes to  use the Attention method  of starting output,   a "TERM        
     ATTN OFF"  command should be  issued to  CP to prevent  any system        
     output.                                                                   

                                 - 6 -                                         
                                                                               
 Waterloo SCRIPT                                    The CMS Environment        


        If SCRIPT was invoked with a value of the PASses option greater        
     than 1,  this message is not produced  until the start of the last        
     pass.  If SCRIPT was invoked from a 3270-type terminal then NOWAIT        
     is default to suppress the "Load paper..." prompt.                        
 (3) If the STOP option was supplied,  output  will pause at the end of        
     each page.    The user should insert  and align the next  sheet of        
     paper and press RETURN.                                                   
 (4) At the conclusion of the last page of output, the carriage will be        
     spaced several lines into the  following page before SCRIPT termi-        
     nates.  If STOP was specified, output will pause at the end of the        
     last page.                                                                

 Specifying SCRIPT Options                                                     

 Beware of the eight-character limit per "token" in a CMS command line.        
 When specifying keyword options, use a blank instead of the "=",  such        
 as "(LL 66" to specify an initial Line Length.                                
    Set Symbols may be  defined in the options by entering  a plus sign        
 "+" or an ampersand followed by the name of the variable, a blank, and        
 the value.   Specifying a  ?  instead of a value will  cause SCRIPT to        
 prompt for the value on a separate  line that will not be subjected to        
 tokenization or conversion to uppercase.                                      
    A  special  set  of  Set  Symbols  may  be  entered  by  specifying        
 "SYSVAR (" in the options.   Following this, in pairs,  are the SYSVAR        
 name qualifier and the value.   The name  qualifier may be from one to        
 four characters long and multiple pairs may be entered,  terminated by        
 end-of-line or a  right parenthesis.   As for other  Set Symbols,  the        
 value for a SYSVAR variable may be specified as a ? to cause the value        
 to be prompted from the terminal.  For example, the CMS command               
   SCRIPT FN (QUIET +X ABC SYSVAR (1 ONE EXEC 3270                             
 passes the following to SCRIPT as the "invocation parameter list":            
   QUIET +X=ABC +SYSVAR1=ONE +SYSVAREXEC=3270                                  

 Special Options for the SCRIPT/CMS Interface                                  

 Any one  of several  options may  be specified  to direct  the output.        
 They are mutually exclusive;  if more than one is specified,  the last        
 occurrence will be used.                                                      

 FIle | NOFIle:  These options specify if  the target is a disk file or        
    not.   The option may be  specified with suboperands in parentheses        
    that specify the "filename|*", "filetype|*" and "filemode|*" of the        
    target disk file.  If the "filename" and "filetype" matches that of        
    the primary input  file,  processing will terminate  with an error.        
    Such a file may be typed or  printed depending on the TERM or PRINT        
    option.                                                                    
 DIsk:  The formatted output will be directed to the primary input disk        
    or the "A1"  disk if the input disk  is not a R/W  extension of the        
    "A" disk,  with a filename of "filename LISTING".   By default this        
    file has a variable record format and ASA carriage control.                
 LASERJET:  The  Hewlett-Packard LaserJet option directs  the specially        
    formatted output to a file with filetype LASERJET on the input disk        
    or the "A1"  disk if the input disk  is not a R/W  extension of the        
    "A" disk.  The LASERJET file is a variable length file suitable for        

                                 - 7 -                                         
                                                                               
 The CMS Environment                                    Waterloo SCRIPT        


    post-processing  into  the  native PCL  language  of  the  LaserJet        
    printer.                                                                   
 IP300:   The  Imagen  24/300  Printer  option  directs  the  specially        
    formatted output to a file with filetype IP300 on the input disk or        
    the "A1" disk if  the input disk is not a R/W  extension of the "A"        
    disk.   The IP300 file is a variable length file suitable for post-        
    processing into the native IMPRESS language of the 24/300.                 
 I3820:  The  IBM 3820 Printer  option directs the  specially formatted        
    output to a file with filetype I3820  on the input disk or the "A1"        
    disk if the input disk is not a R/W extension of the "A" disk.  The        
    I3820 file is  a variable length file  suitable for post-processing        
    into the native CPDS language of the IBM 3820 or 3812 printer.             
 I6670:  The  IBM 6670  Document Printer  option directs  the specially        
    formatted output to a file with  filetype PUN6670 on the input disk        
    or the "A1"  disk if the input disk  is not a R/W  extension of the        
    "A" disk.   The  PUN6670 file is always a  fixed,  eighty character        
    file suitable for PUNCHing to a 6670.                                      
 MEMo:  The formatted output  is directed to a file with  a filename of        
    "filename MEMO" in terminal format so that it may be TYPEd later at        
    the user's terminal.                                                       
 PHOTO:  The formatted output is directed to  a file with a filename of        
    "filename PHOTO".   The variable length  file contains device inde-        
    pendent formatting instructions.                                           
 POSTScript:  The Adobe PostScript Printer option directs the specially        
    formatted output to a file with filetype POSTS on the input disk or        
    the "A1" disk if  the input disk is not a R/W  extension of the "A"        
    disk.   The POSTS file is a variable length file suitable for post-        
    processing into the native POSTSCRIPT language of printers that are        
    available from a variety of vendors.                                       
 PRt / PRinter:  The formatted output is written directly to the user's        
    virtual printer.                                                           
 NOPRt / NOPRint:  The formatted output is thrown away to a DUMMY file.        
    Errors, however, are still displayed at the terminal.                      
 TErminal:  The formatted  output is displayed at  the user's terminal.        
    This is the default under CMS.                                             
 QMSlaser:  The  QMS Lasergrafix Printer  option directs  the specially        
    formatted output to a file with filetype QMSLASER on the input disk        
    or the "A1"  disk if the input disk  is not a R/W  extension of the        
    "A" disk.  The QMSLASER file is a variable length file suitable for        
    post-processing into the native QUIC language of the Lasergrafix.          
 X2700:  The Xerox 2700 Printer  option directs the specially formatted        
    output to a file with filetype X2700  on the input disk or the "A1"        
    disk if the input disk is not a R/W extension of the "A" disk.  The        
    X2700 file  is a variable length  file that must be  post processed        
    before PUNCHing to a 2700.                                                 


                                                                               


                                                                               


                                                                               

                                 - 8 -                                         
                                                                               
 Waterloo SCRIPT                                    The TSO Environment        


 Ŀ        
 |                                                                    |        
 |                        THE TSO ENVIRONMENT                         |        
 |                                                                    |        
         


 The TSO command format is as follows:                                         

      Ŀ             
      |       |                                                  |             
      | SCRIPT|    'input-dsname'                                |             
      |       |     <''values-list''>                            |             
      |       |     <LIBrary('data-set-name')>                   |             
      |       |     <PRint('data-set-name'<,'output-type'>)>     |             
      |       |     <MESsage('data-set-name')>                   |             
      |       |     <other options>                              |             
      |       |                                                  |             
                   

 Input Files                                                                   

 Input data sets are expected to have  the suffix TEXT as part of their        
 data set name.   Data set names used  for input are given in the oper-        
 ands "input-dsname" and  LIBRARY:  the first of these is  the data set        
 which  contains SCRIPT  commands  and text  to  control your  document        
 production;  the  LIBRARY operand supplies  the name of  a partitioned        
 data set,  and is used in conjunction with the ".IM" control word,  to        
 include additional  text and control  information inside  the document        
 being produced.    The "input-dsname" must  be given with  each SCRIPT        
 command.  The LIBRARY operand is optional; if omitted, it will use the        
 standard SCRIPT library for imbedding purposes;  if given, the LIBRARY        
 data set  you specify will  be concatenated  in front of  the standard        
 SCRIPT imbedding library.   Online information to be entered for ".RD"        
 or ".RV" control words will always be taken from your terminal.               
    All dataset names  may be specified in apostrophes,   in which case        
 the full name must be specified.  Dataset names may be entered without        
 apostrophes,  in  which case the  name will  be completed by  adding a        
 prefix and optional suffix;  the current prompter will add a suffix of        
 TEXT only if 'userid.name' is not catalogued.                                 
    The document  output from  the SCRIPT command  is indicated  by the        
 PRINT operand:  if PRINT is omitted,  output from the terminal will be        
 routed to the terminal;  if a data  set name is specified in the PRINT        
 operand, it will be assumed to be suffixed with LIST.   A message data        
 set -- for output  from the ".TY" control word and  for error messages        
 -- is designated  by the MESSAGE operand:   if the  MESSAGE operand is        
 omitted, the output will be routed to your terminal;  the assumed data        
 set name suffix for the message data set is SCRPLIST.                         


                                                                               


                                                                               

                                 - 9 -                                         
                                                                               
 The TSO Environment                                    Waterloo SCRIPT        


 Options                                                                       

 Other options of the SCRIPT command have already been described in the        
 section on Options.    However,  in order to  follow TSO specification        
 conventions, one must specify an option by:  (1) the option-name trun-        
 cated to any unique length (e.g. AD or ADJUST) (2) the option specifi-        
 cation following immediately  with no blanks,  and  enclosed in paren-        
 theses.   Options used should follow the specification of SCRIPT input        
 or output data sets (if any): thus,                                           
   SCRIPT ZAP '&SITE=UICC' LIB(SCRIPT) AD(15)                                  
 would process the data set ZAP.TEXT, using SCRIPT.TEXT as an imbedding        
 library.   It would set the Set Symbol "SITE" to the value "UICC"; and        
 it would set the ADJUST option to give a 15 character left-hand margin        
 before the start of the SCRIPTed document's output line.  The initial-        
 ization of the Set Symbol SITE is not considered to be an option,  but        
 is part of the "values-list" to be specified immediately following the        
 "input-dsname".   Several Set Symbols may be initialized to particular        
 values,  without having  to add ".SR" control words to  the input data        
 set being SCRIPTed.                                                           
    Some options  may be of  interest because  of their effect  on your        
 terminal output.  In particular,                                              
 (1) Unless the QUIET option was  specified,  the immediate response to        
     issuing the SCRIPT command is the following line:                         
       Waterloo SCRIPT - Version 88.1 (87DEC11)                                
 (2) Unless  the NOWAIT  option was  specified,  the  next response  to        
     issuing the SCRIPT command is:                                           
       Load paper...                                                           
     The user should remove the ordinary  terminal paper and insert the        
     paper on which the output is to appear.  The paper should be posi-        
     tioned in such a way that the top  edge of the paper is just below        
     the typeball  runner.   Output to the  terminal may be  started by        
     pressing Carriage Return,  but this will  start output on the line        
     following where the paper was positioned.                                 
 (3) If the NOSTOP option is omitted,  output  will cease at the end of        
     each  page.   The  user should  insert  the next  piece of  paper,        
     aligning  it as  described  above,  and  type  a carriage  return.        
     Otherwise, the STOP option will be assumed in effect.                     
 (4) At the conclusion of the last page of output, the carriage will be        
     spaced several lines into the  following page before SCRIPT termi-        
     nates. The user may re-insert the terminal paper at this time.           
 (5) One of three options can be used  to govern the form of the output        
     you  receive from  SCRIPT.   The  TERMINAL  option formats  output        
     without carriage  control characters,   inserting spaces  into the        
     text where  blank lines  ought to be  generated in  your document.        
     The OFFLINE  option formats output  with carriage  control charac-        
     ters.   If output to a dataset, the document may be formatted once        
     and   be  sent   to  the   printer   many  times   later  with   a        
 _______________________                                                       

  If SCRIPT  was invoked with  a value greater  than 1 for  the PASses        
   option,  this  message is not produced  until the start of  the last        
   pass.                                                                       

  If STOP is specified, output will pause at the end of the last page.        

                                 - 10 -                                        
                                                                               
 Waterloo SCRIPT                                    The TSO Environment        


     dataset-to-printer utility  program.   The MEMO option  causes the        
     formatted output to go  to a disk dataset in a  format that may be        
     typed back to a terminal later.   This output file has no carriage        
     control,  will  contain backspace characters for  overstriking and        
     contains blank lines for generating spaces.                               

 As usual under TSO, if you have to continue the text of a command onto        
 more than one  line,  the command line  to be continued must  end with        
 blank/plus ( +)  or blank/minus ( -).    Operands and keywords for the        
 SCRIPT command should be separated from one another by a blank.               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                 - 11 -                                        
                                                                               
 Online Terminal Support                                Waterloo SCRIPT        


 Ŀ        
 |                                                                    |        
 |                      ONLINE TERMINAL SUPPORT                       |        
 |                                                                    |        
         


 In response  to the "Load paper..."  message or when SCRIPT  pauses at        
 the end of a page if the STOP option has been specified,  the user may        
 type "stop" to terminate further processing.                                  
    The  user  may  also enter  "FROM frompage"  or  multiple  FROM/TO,        
 FROM/FOR or  FROM/ONLY options to  continue output with  another "Load        
 paper..." message at the requested page number.                               

 "Stop" Codes                                                                  

 SCRIPT has  support for  "STOP" codes  when output  is directed  to an        
 online terminal.  The user must enter "STOP" codes as part of the text        
 and when that text  is displayed SCRIPT will display up  to the "STOP"        
 and then accept input from the terminal.   An Attention or Break and a        
 Carriage Return  will terminate the input  at which point  SCRIPT will        
 display the rest of  the text for that line.   "STOP"  codes may be at        
 the start of a line, between any two characters in a line or be at the        
 end of a line.   The System Set Symbol SYSSTOP may be used to create a        
 "STOP" code in the text or the user may create one by entering X'27FF'        
 into the input document.   Note that the  user may wish to prevent the        
 host operating system from displaying any "PROMPT" characters when the        
 read is issued and prevent any  "ATTENTION" action if the Attention or        
 Break key is used.   "STOP" codes have no effect if the output is to a        
 file.                                                                         

 Special Terminals                                                             

 SCRIPT has enhanced support for  ASCII terminals.   In particular this        
 support would be most useful for hardcopy terminals using the 'Diablo'        
 print mechanism.   For such terminals,   if the user includes terminal        
 escape codes as part of the document,  then these escape codes will be        
 retained within  the text without  confusing the  justification algor-        
 ithm.                                                                         
    For terminals  supporting a Negative Line  Feed it will be  used to        
 support the  "Skip or Space minus  one" control words and  the "Output        
 Overlay" control word.    If the user makes use of  the Null Character        
 (X'00'), TN superscripts and box drawing characters or ALA subscripts,        
 these will be altered to the appropriate escapes and printable charac-        
 ters for the terminal.   For  multiple-column output,  SCRIPT generate        
 left or  right relative movements  between the columns.    And lastly,        
 SCRIPT will  take advantage  of the  variable Horizontal  Motion Index        
 feature to display output at a  variable number of characters per inch        
 specified  by CPI  and will  generate  proportional interword  spacing        
 codes.                                                                        


                                                                               


                                 - 12 -                                        
                                                                               
 Waterloo SCRIPT                                Online Terminal Support        


 Options for Special Terminals                                                 

 CPInch  <10|n>:  specifies  the horizontal  number  of characters  per        
    inch.   For this  to have any effect,  the  Horizontal Motion Index        
    (HMI) must be defined for the terminal.  The default CPI is 10, but        
    may range from 4 to 72.                                                    
 AGILE:   for  the Agile  (Gencom)   terminal.    SCRIPT makes  use  of        
    Subscript, Superscript and Negative Line Feed.                             
 AJ830:  for the Anderson Jacobson 830  terminal.   SCRIPT makes use of        
    the  Move Carriage  Right,  Negative  Line  Feed,  Superscript  and        
    Subscript of the terminal.  The CPI option may only be 10 or 12 and        
    must agree with the pitch setting on the terminal.                         
 AJ832:  for the Anderson Jacobson 832  terminal.   SCRIPT makes use of        
    the Move Carriage Right, Set Horizontal Pitch,  Negative Line Feed,        
    Superscript and Subscript features of the terminal.                        
 AJ833:  for the Anderson Jacobson 833  terminal.   SCRIPT makes use of        
    Negative Line Feed,  Subscript,   Superscript,  Auto Underscore and        
    Auto Boldface features of the terminal.                                    
 ASISterm:  may  be specified as a  qualifier for any of  the supported        
    output terminal types.    It defines a terminal  that knows nothing        
    about escape characters and special characters such as Superscripts        
    and Subscripts.   It outputs all  EBCDIC codes without translation.        
    This is useful when mixing APL characters in text on a 3270 type of        
    terminal.                                                                  
 MULTI3:  for the  Ahearn and Soper Multiwriter III  terminal or Multi-        
    writer IV  in MIII  mode.   The  terminal itself  will do  backward        
    typing,  horizontal and  vertical tabbing to optimize  the speed of        
    output.                                                                    
 MULTIP:   for the  Ahearn  and Soper  Multiwriter  III  with the  Word        
    Processing Option.   SCRIPT makes use of the HMI,  Set Space Value,        
    Negative Line Feed,  Auto Underscore  and Auto Boldface features of        
    the terminal.                                                              
 MULTI4:  for  the Ahearn and  Soper Multiwriter IV  terminal.   SCRIPT        
    makes use of the HMI,  Set  Space Value,  Negative Line Feed,  Auto        
    Underscore and Auto Boldface features of the terminal.                     
 NEC5520:  for  the NEC  Spinwriter 5510/5520  terminal.   Proportional        
    spaced interword blanks,  Negative Line Feed,  Subscript and Super-        
    script is supported.                                                       
 NEC5525:  for the NEC Spinwriter  5515/5525 terminal.   The Horizontal        
    Motion  Index,   Negative  Line Feed,   Superscript  and  Subscript        
    features are supported.                                                    
 NEC7720:  for  the NEC  Spinwriter 7710/7720  terminal.   Proportional        
    spaced interword blanks,  Negative Line Feed,  Subscript and Super-        
    script is supported.                                                       
 NEC7725:  for the NEC Spinwriter  7715/7725 terminal.   The Horizontal        
    Motion  Index,   Negative  Line Feed,   Superscript  and  Subscript        
    features are supported.                                                    
 QUME:  for the  QUME terminal.   Currently it is defined  with none of        
    the attributes that SCRIPT requires for enhanced output.  The func-        
    tion codes are known  to be different from the X1620  but what they        
    are exactly is not known for this version of SCRIPT.                       
 SPRINT11:  for the Qume SPRINT 11  terminal.   SCRIPT makes use of the        
    HMI, Negative Line Feed,  Superscript,  Subscript,  Auto Underscore        
    and Auto Boldface features of the terminal.                                

                                 - 13 -                                        
                                                                               
 Online Terminal Support                                Waterloo SCRIPT        


 X1620:  for the Xerox 1620 Diablo  terminal.   SCRIPT makes use of the        
    HMI, Negative Line Feed,  Superscript and Subscript features of the        
    terminal.                                                                  
 X1650:  for the Xerox 1650 Diablo  terminal.   SCRIPT makes use of the        
    HMI, Negative Line Feed,  Superscript,  Subscript,  Auto Underscore        
    and Auto Boldface features of the terminal.                                
 X630:  for  the Xerox 630 Diablo  terminal.   SCRIPT makes use  of the        
    HMI, Negative Line Feed,  Superscript,  Subscript,  Auto Underscore        
    and Auto Boldface features of the terminal.                                


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                 - 14 -                                        
                                                                               
 Waterloo SCRIPT                       The OS and VS Batch Environments        


 Ŀ        
 |                                                                    |        
 |                  THE OS AND VS BATCH ENVIRONMENTS                  |        
 |                                                                    |        
         


 DDnames used by SCRIPT                                                        

 SYSIN:   This is  the primary  input  file consisting  of text  and/or        
    control words.   It is a sequential  data set or a specified member        
    of a  partitioned data  set.   The  file may  contain fixed-length,        
    variable-length,  or  WYLBUR Edit-Format  undefined-length records.        
    Concatenated input on unlike devices is supported.   This DDname is        
    required.                                                                  
 SYSLIB:  This  is a  partitioned input  dataset for  User files  whose        
    members are included by Append (.AP) and Imbed (.IM) control words.        
    The same record formats are  supported as for SYSIN.   Concatenated        
    files are  supported for this  DDname if they  are all of  the same        
    record format.   If  you attempt to concatenate  files of different        
    record formats SCRIPT will only know the record format of the first        
    file which will lead to strange deblocking errors.  This DDname may        
    be omitted.                                                                
 SCRIPLIB:  This is a partitioned input data set for System files whose        
    members are included by Append (.AP) and Imbed (.IM) control words.        
    The same rules apply  as for SYSLIB.   This file is  searched for a        
    member if it cannot be found  in SYSLIB.   It normally contains the        
    support for Generalized Markup Language (GML),  and font definition        
    files.                                                                     
 others:  Before searching  SYSLIB and SCRIPLIB for  a member specified        
    in an Append (.AP)  or Imbed (.IM)  control word,  a search is made        
    for "other" DDnames also specified.   If  a match is found then the        
    Library files are not used.   The  same rules apply for any "other"        
    file as for SYSIN.                                                         
 SYSPRINT:  This is the primary output data set for the formatted text.        
    The  record format  will default  to variable  length records  with        
    fixed length records as an option.   ASA carriage control is always        
    used for Printer files.   Any block  size that does not span tracks        
    may be specified.   The record length may  range up to 500 with 137        
    as the default.  This DDname is required.                                  
 SYSTERM:  This is the error file  for displaying error messages.   The        
    output  from Type  On Terminal  (.TY)   and Error  (.ER)  are  also        
    directed to  this file.   It may  contain variable or  fixed length        
    records with  ASA carriage  control.   Variable  length records  of        
    length 137 are the default.  This DDname is required.                      
 SYSCONS:  This is the terminal input file for the Terminal Input (.TE)        
    control word.   It  would normally not be used in  Batch Mode.   In        
    interactive Mode under CMS or TSO  the user's terminal becomes this        
    file.                                                                      
 SYSUSR01, SYSUSR02, ...  SYSUSR09:  These are the optional user output        
    files.  Records may be written to these files with the Put Workfile        
    (.PU)  control  word.   The  default file  attributes are  variable        
    length records of length 136 and a block size of 800.  Any file may        
    also contain fixed length records in  which case the default record        

                                 - 15 -                                        
                                                                               
 The OS and VS Batch Environments                       Waterloo SCRIPT        


    length is 80 with a block size of 800.                                     

 SCRIPT Catalogued Procedure                                                   

 A catalogued  procedure exists to  invoke SCRIPT and  provide commonly        
 required DD  statements.   The following is  a possibility for  such a        
 procedure:                                                                    

   //SCRIPT  PROC  PROG=SCRIPT,SCRIPT=,SIZE=1024K                              
   //SCRIPT  EXEC  PGM=&PROG,PARM='&SCRIPT',REGION=&SIZE                       
   //*                                                                         
   //*     S C R I P T                                                         
   //*                                                                         
   //SCRIPLIB  DD  DSN=SCRIPT.SCRIPLIB,DISP=SHR                                
   //SYSPRINT  DD  SYSOUT=A                                                    
   //SYSTERM   DD  SYSOUT=A                                                    

 The SCRIPT  procedure definition contains several  keyword parameters.        
 Their use is as follows:                                                      

 PROG=:  provides a default for the program name to be executed.  It is        
    normally "SCRIPT" but  could be set to  the program name of  a test        
    version or an alternate version that  does not support the Spelling        
    Verification.                                                              
 SCRIPT=:  provides the options for SCRIPT.                                    
 SIZE=:  provides  the maximum amount  of storage available  to SCRIPT.        
    While  some simple  jobs would  execute successfully  in less  than        
    896K, the value has been set higher at 1024K so that most jobs will        
    execute at this  size and because this  is a multiple of  64K,  the        
    size of a memory segment.   This  region size would be 256K smaller        
    if   SCRIPT  is   installed  without   the  Spelling   Verification        
    Dictionary.                                                                

 Using the Catalogued Procedure                                                

 A simple SCRIPT run consisting of  a single input file "SCRIPT.MYFILE"        
 that might use GML would look like this:                                      

   //      EXEC SCRIPT                                                         
   //SYSIN  DD  DSN=SCRIPT.MYFILE,DISP=SHR                                     

 A   more  complicated   SCRIPT   run  with   a   library  of   members        
 "SCRIPT.MYLIB", each of which contains a chapter, a member within that        
 library named "DRIVER" that puts  the chapters together and parameters        
 to number the output and continue in  case of an error would look like        
 this:                                                                         

   //      EXEC SCRIPT,SCRIPT='NUM=85,CONT'                                    
   //SYSLIB DD  DSN=SCRIPT.MYLIB,DISP=SHR                                      
   //SYSIN  DD  DSN=SCRIPT.MYLIB(DRIVER),DISP=SHR                              


                                                                               


                                 - 16 -                                        
                                                                               
 Waterloo SCRIPT                                Offline Printer Support        


 Ŀ        
 |                                                                    |        
 |                      OFFLINE PRINTER SUPPORT                       |        
 |                                                                    |        
         


 Options                                                                       

 Keyword parameters may be specified  to define the physical character-        
 istics of the output printer.                                                 

 FFCHannel=<1|n>:  The Form  Feed Channel option specifies  the printer        
    channel from 1  to 9 that SCRIPT  will use to align  output below a        
    page perforation.                                                          
 FFTOp=<3|n>:  The  Form Feed Top option  specifies the line  number on        
    the page that corresponds to the  FFCHANNEL skip on an output page.        
    The value of this parameter may vary from line 1 to 175.                   

 How SCRIPT Handles the Printer                                                

 (1) The  first page  of output  will be  positioned at  a page  crease        
     (perforation)  before normal first-page processing is initiated if        
     a title  or text  is to be  printed above the  Form Feed  Top line        
     (FFTOP) of the page.                                                      
 (2) If a Top Title (.TT)  is to be printed on the first page,  the .TT        
     control word must precede the first text line in the input stream.        
 (3) SCRIPT uses  all the lines  on the  output page,  starting  at the        
     first line just below the page  perforation and continuing for the        
     full Page Length (.PL).   Therefore  the .PL value,  the FFCHANNEL        
     and  FFTOP values  should agree  with  the physical  setup of  the        
     printer paper.                                                            
 (4) Blank output  lines preceding  the FFCHANNEL  line on  each output        
     page are not printed.   Similarly blank output lines at the bottom        
     of a  page are not  printed.   Thus SCRIPT  output to an  IBM 3800        
     printer will be correct if the user does not put titles or text in        
     the top and bottom one half inch  of an output page.   Put another        
     way,  for six lines per inch output to a 3800 printer if ".HM+.HS"        
     is at  least three smaller  than ".TM"  and ".FM+.FS" is  at least        
     three smaller than  ".BM" and the Page Length (.PL)   is 66,  then        
     output will be formatted correctly on an output page.                     


                                                                               


                                                                               


                                                                               


                                                                               


                                 - 17 -                                        
                                                                               
 Creation of Input Files                                Waterloo SCRIPT        


 Ŀ        
 |                                                                    |        
 |                      CREATION OF INPUT FILES                       |        
 |                                                                    |        
         


 File Format                                                                   

 All input  files must have either  a fixed- or  variable-length record        
 format.    In the  CMS environment,   these files  must have  filetype        
 SCRIPT.   In the OS/VS environments, WYLBUR Edit-format files are also        
 supported.   A fixed file is assumed to be sequenced in the last eight        
 columns of each record,  an assumption  that is dropped with the first        
 record per  file or member  that doesn't  have only numerics  in those        
 columns.    A file  with  a  variable format  is  also  assumed to  be        
 sequenced in a specifiable eight columns of each record,  normally the        
 last eight.   Input lines can have a maximum length of 250 characters.        
 SCRIPT will format these input lines into lines of length specified by        
 ".ll", by default 60.                                                        

 Breaks                                                                        

 Formatting of  a line  with characters  from a  following line  can be        
 prevented by  creating what is called  a "break".   A break  is caused        
 explicitly by use of leading blanks (one is sufficient), a tab, or the        
 break control word  (.BR).   Implicit breaks are caused by  any of the        
 control  words  that cause  normal  line  spacing to  be  interrupted.        
 Breaking  capabilities for  each  control word  can  be  found in  its        
 complete description in this manual.                                          

 Punctuation                                                                   

 If an input line that ends with a period,  exclamation mark,  question        
 mark, or colon,  SCRIPT will insert two blanks between it and the next        
 word on the output  line.   Also,  if an input line  ends with a right        
 parenthesis or quote (") preceded by one of the above punctuation, two        
 blanks will be inserted.   Spacing and punctuation in the middle of an        
 input line are not affected.                                                  

 Backspaces in the Input                                                       

 Input lines containing backspaces may be canonicalized or uncanonical-        
 ized.   This means that if "<" represents the backspace character then        
 "ABC<<<___"  and "A<_B<_C<_"  will  produce  identical results.    The        
 correct number of character positions will be typed per line if online        
 and will overprint properly if offline.   The control words .BD,  .BI,        
 .UC,  .UD,  and .US may eliminate most of the necessity to enter back-        
 spaces into the input file.                                                   
 _______________________                                                       

  If the sequence  "character,  backspace,  character" is  found,  the        
   "backspace,  character" will not be  counted towards the output line        
   length.                                                                     

                                 - 18 -                                        
                                                                               
 Waterloo SCRIPT                                Creation of Input Files        


 Escapes                                                                       

 An input line  may contain an Escape Character (X'27')   followed by a        
 single Function  Character and  an optional  argument.   The  Function        
 arguments are terminal  dependent and specified via  parameter option.        
 These two  characters do not  count toward  filling the length  of the        
 line.   If "!" represents the Escape Character,  "!D" on your terminal        
 moves the  paper down one  half line and "!U"  moves the paper  up one        
 half line,  then "X!D2!U"  could be used to create the  symbols for "X        
 squared".   For offline output to a printer,  the Escape Character and        
 the following Function Character are lost.                                    
    Escape Characters must be entered  in canonicalized order.   If "<"        
 represents a backspace, then to enter "A" sub "i+1" to the power "n-2"        
 requires:                                                                     
    A!Ui<!D!Dn!U!U+<!D!D-!U!U1<!D!D2!U                                         
 The following,  which  may be more natural,  is  not canonicalized and        
 will not work:                                                                
    A!Ui+1<<<!D!Dn-2!U                                                         


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                 - 19 -                                        
                                                                               
 Control Word Operands                                  Waterloo SCRIPT        


 Ŀ        
 |                                                                    |        
 |                       CONTROL WORD OPERANDS                        |        
 |                                                                    |        
         


 Operands are supported  for most SCRIPT control  words.   The operands        
 specify the  exact intent or  quantity to  be applied for  the control        
 word.   If no operand is present,  a default will normally apply.   An        
 operand is  always separated  from the  control word  by at  least one        
 blank.  Multiple blanks between operands are always permitted.                

 Positional Operands                                                           

 One  common operand  type is  a  positional operand.    It is  entered        
 following the control word and qualifies  the meaning to be performed.        
 For example,  the justification of text in a document is controlled by        
 .JU but it may be qualified as  in .JU ON (justify both left and right        
 margins),  .JU LEFT (justify  the left margin)  or  .JU RIGHT (justify        
 right margin).                                                                

 BEGIN/END Operands                                                            

 A class of control words have a sense  of "do it" and "don't do it any        
 more",  "start it" and "stop it".   For example a footnote would begin        
 with ".FN BEGIN",  text  would be centred with  ".CE YES" or automatic        
 hyphenation would be  enabled with ".HY ON".   The  following operands        
 are equivalent and may be used interchangeably:                               

     Ŀ                                               
     | Positive   | Negative   |                                               
     |||                                               
     | BEGIN      | END        |                                               
     | ON         | OFF        |                                               
     | YES        | NO         |                                               
                                                    

 Therefore,  .CE BEGIN,  .CE ON,  and .CE YES all have the same effect,        
 and any one of them can be terminated by .CE END, .CE OFF, or .CE NO.         

 DELETE/PURGE/CANCEL Operands                                                  

 Some control words have a DELETE  operand that eliminates something if        
 it currently exists.   The operands PURGE  and CANCEL achieve the same        
 result.                                                                       

 Numeric Operands                                                              

 A second operand type is numeric (integer-valued only).  The length of        
 a text line is defined by Line Length (.LL).  The numeric operand that        
 follows  is the  number of  characters in  the length  of a  formatted        
 output line (such as .LL 60).  Wherever a numeric operand may be used,        
 you  may  always  enter  a   numeric  expression  with  the  following        

                                 - 20 -                                        
                                                                               
 Waterloo SCRIPT                                  Control Word Operands        


 operators:                                                                    

     Ŀ                              
     | Operator   | Meaning                     |                              
     |||                              
     | +          | unary plus                  |                              
     | -          | unary minus                 |                              
     | +          | addition                    |                              
     | -          | subtraction                 |                              
     | *          | multiplication              |                              
     | /          | division                    |                              
     | ( )        | to order the operators      |                              
                                   

 The result of an expression is always an integer and all numeric terms        
 that make up the expression must  be integers.   For example,  a valid        
 operand to define the Line Length could be specified as ".LL 111/2+5".        
 Note that  multiplication and  division are  done before  addition and        
 subtraction, and that division yields an integer result,  so "111/2+5"        
 is "55+5" or "60".                                                            
    Where meaningful,   a relative  numeric operand  may be  specified.        
 This is a  leading plus or minus  sign on a numeric  expression.   The        
 effect is to  add an amount to  the current value or  subtract it from        
 the current value.   ".LL +10" would add ten characters to the current        
 Line Length and ".LL -2*5" would subtract ten.  The control words that        
 allow numeric  operands and relative  numeric operands are  shown with        
 general operands <n|+n|-n> in the documentation.                              

 Absolute Horizontal Units                                                     

 Some operands  may be  specified with  absolute horizontal  distances.        
 Such operands are independent of the  output device and the Characters        
 Per Inch  (CPI)  option.   The unit  of measurement may be  entered in        
 uppercase or lowercase, but only uppercase is shown in the examples.          

     Ŀ                       
     | Space Unit    | How Entered    | Examples       |                       
     ||||                       
     | Em Space      | aaM            | 50M   +5M      |                       
     | Cicero        | aaCbb          | 10C6  5C       |                       
     | Pica          | aaPbb          | 42P6  45P      |                       
     | Centimeter    | aaCM           | 20CM  20.5CM   |                       
     | Millimeter    | aaMM or aaW    | 200MM 40.5W    |                       
     | Inch          | aaIN or aaI    | 6.25I 6IN      |                       
                            

 (1) the "Em" unit is the character  width of one blank character.   It        
     is the same as a pure numeric argument.                                   
 (2) the Cicero (about 0.1776 inches or  4.512 millimeters)  is a meas-        
     urement used in the printing industry.    The number of Ciceros is        
     entered before the  letter "C" and the number of  Didots after the        
     "C".  Twelve Didots equals one Cicero.                                    


                                                                               
                                 - 21 -                                        
                                                                               
 Control Word Operands                                  Waterloo SCRIPT        


 (3) the Pica (about 0.1663 inches or 4.224 millimeters)  is a measure-        
     ment used in  the printing industry in Britain  and North America.        
     The  number of  Picas is  entered before  the letter  "P" and  the        
     number of Points after the "P".  Twelve Points equals one Pica.           
 (4) the Centimeter may be entered as  an integer or a decimal fraction        
     before the letters "CM".                                                  
 (5) the Millimeter may be entered as  an integer or a decimal fraction        
     before the letters "MM" or the letter "W".                                
 (6) the Inch may be entered as an integer or a decimal fraction before        
     the letters "IN" or the letter "I".                                       

 The control words  that allow absolute horizontal operands  as well as        
 numeric operands are shown with general operands of the form <h|+h|-h>        
 in the documentation.                                                         

 Absolute Vertical Units                                                       

 Some operands may be specified with absolute vertical distances.  Such        
 operands are independent  of the output device and the  Lines Per Inch        
 (LPI) option.   The unit of measurement may be entered in uppercase or        
 lowercase, but only uppercase is shown in the examples.                       

     Ŀ                       
     | Space Unit    | How Entered    | Examples       |                       
     ||||                       
     | Em Space      | aaM            | 50M   +5M      |                       
     | Cicero        | aaCbb          | 10C6  5C       |                       
     | Pica          | aaPbb          | 42P6  45P      |                       
     | Centimeter    | aaCM           | 20CM  20.5CM   |                       
     | Millimeter    | aaMM or aaW    | 200MM 40.5W    |                       
     | Inch          | aaIN or aaI    | 6.25I 6IN      |                       
                            

 (1) the "Em" unit is the character  width of one blank character.   It        
     is the same as a pure numeric argument.                                   
 (2) the Cicero (about 0.1776 inches or  4.512 millimeters)  is a meas-        
     urement used in the printing industry.    The number of Ciceros is        
     entered before the  letter "C" and the number of  Didots after the        
     "C".  Twelve Didots equals one Cicero.                                    
 (3) the Pica (about 0.1663 inches or 4.224 millimeters)  is a measure-        
     ment used in  the printing industry in Britain  and North America.        
     The  number of  Picas is  entered before  the letter  "P" and  the        
     number of Points after the "P".  Twelve Points equals one Pica.           
 (4) the Centimeter may be entered as  an integer or a decimal fraction        
     before the letters "CM".                                                  
 (5) the Millimeter may be entered as  an integer or a decimal fraction        
     before the letters "MM" or the letter "W".                                
 (6) the Inch may be entered as an integer or a decimal fraction before        
     the letters "IN" or the letter "I".                                       

 The control  words that  allow absolute vertical  operands as  well as        
 numeric operands are shown with general operands of the form <v|+v|-v>        
 in the documentation.                                                         


                                 - 22 -                                        
                                                                               
 Waterloo SCRIPT                                   Script Control Words        


 Ŀ        
 |                                                                    |        
 |                        SCRIPT CONTROL WORDS                        |        
 |                                                                    |        
         


                                                                               


                                                                               
 Ŀ                                                                      
 |  .   |                                                                      
                                                                       

 NULL treats a line operand as input, either text or control word.             

      Ŀ             
      |       |                                                  |             
      |  .    |    <line>                                        |             
      |       |                                                  |             
                   

 The ".  "  control word  is specified by  the control  word indicator,        
 immediately followed by one or more blanks.   Its function is to treat        
 the "line" operand  as SCRIPT input.   The "line"  operand starts with        
 the first non-blank character and may be text or another control word.        
    This control word will not cause a break.   However, a control word        
 specified in the "line"  operand may cause a break to  occur.   If the        
 "line" operand is omitted, a blank input line is assumed.                     
    This control word has two uses.   The first allows text followed by        
 control words to be entered on the same input line.  The second allows        
 input lines to be indented  for readability.   While usually specified        
 with a "blank" control word,  the  implementation of this control word        
 allows ".NU" (NUll) to be specified.  The result is the same.                 

 EXAMPLES                                                                      
 (1) . this is some text;.sk;and this is more.                                 
     is the same as:                                                           
       this is some text                                                       
       .sk                                                                     
       and this is more.                                                       
 (2) .dm TEST begin                                                            
     .if '&*1' = ''                                                            
     .   .th .do begin                                                         
     .       .fo;.sk;.cc 5                                                     
     .   .do end                                                               
     .   .el &*1                                                               
     .dm TEST end                                                              
     The NULL control word is very useful for improving the readability        
     of structured code.                                                       


                                                                               

                                 - 23 -                                        
                                                                               
 ... (set label)                                        Waterloo SCRIPT        


 Ŀ                                                                      
 | ...  |                                                                      
                                                                       

 ... (SET LABEL) defines an input line that has a "label".                     

      Ŀ             
      |       |                                                  |             
      |  ...  |    <label|n>  <line>                             |             
      |       |                                                  |             
                   

 A blank is not required between the ... and the label.                        

 ...label <line>:  Labels are used as "target" lines for the GO control        
    word.   A label may consist of  a maximum of eight characters,  and        
    must be unique within the input file, Macro,  or Remote in which it        
    is defined.    Labels are stored  internally by SCRIPT  entirely in        
    uppercase; therefore, "...hi" and "... HI" are identical.                  
 ...n <line>:  Numeric  labels are used to verify that  the line really        
    is the "nth" record in the input file,  Macro,  or Remote.   If the        
    verification fails, SCRIPT generates an error message.                     

 This  control word  does not  cause a  break.   The  optional text  or        
 control-word "line", starting one blank after the label,  is processed        
 after the  label field is scanned.    If "line" is omitted,   no other        
 action is  performed.   Control  words within  the "line"  operand may        
 cause a break.                                                                

 EXAMPLES                                                                      
 (1) ...skip .sk 2                                                             
     This defines a "SKIP" label on a "skip two" statement.                    
 (2) ... 99 This had better be line ninety-nine.                               
     This verifies that the line of text occurs in input line 99 of the        
     current input file, or results in an error message if not.                


                                                                               
 Ŀ                                                                      
 | .AD  |                                                                      
                                                                       

 ADJUST positions the beginning of the  output page with respect to the        
 physical left margin of the output device.                                    

      Ŀ             
      |       |                                                  |             
      |  .AD  |    <EVEN|ODD> <0|h|+h|-h>                        |             
      |       |                                                  |             
                   


                                                                               


                                 - 24 -                                        
                                                                               
 Waterloo SCRIPT                                                 ADjust        


 <0|h|+h|-h>:  A value of the form "h" positions the first character of        
    the output line "h" spaces to the right of the first possible print        
    position of the output device.   A value  of the form "+h" adds "h"        
    spaces to  the current  adjust value.    A value  of the  form "-h"        
    subtracts "h" from the current adjust value.                               
 <EVEN|ODD>:  If "EVEN" is specified as  the first operand,  then even-        
    numbered pages  will be adjusted by  the sum of the  current adjust        
    value plus the specified value.  The "ODD" option works in the same        
    way for odd-numbered pages.                                                

 This control word causes a break.   The adjust value remains in effect        
 for all subsequent output lines until altered by another ".AD" control        
 word.   If  .AD is specified  with no  operands,  the adjust  value is        
 assumed from the initial value set by the BIND option,  normally zero.        
 The default for an EVEN or ODD Adjust is always zero.                         

 NOTES                                                                         
 (1) Specifying Page  Margin values  is something  that should  be done        
     only at the start of the input  file;  in most cases,  they should        
     not be altered thereafter.                                                
 (2) The  current adjust  value  may be  accessed  via  the &SYSAD  Set        
     Symbol.                                                                   

 EXAMPLES                                                                      
 (1) .ad 1.5i                                                                  
     sets an adjust value of one-and-one-half inches.                          
 (2) .if &SYSAD LT 5 .th .ad 5                                                 
     ensures that the current adjust value is at least five spaces.            


                                                                               
 Ŀ                                                                      
 | .AP  |                                                                      
                                                                       

 APPEND  terminates processing  of the  current input  file and  starts        
 processing of the specified input file.                                       

      Ŀ             
      |       |                                                  |             
      |       |    Filename                < . <n1 <n2>>>        |             
      |  .AP  |                     <args>                       |             
      |       |    Filename(member)        < . <label>>          |             
      |       |                                                  |             
                   


 Filename<(member)>:  If no operands other than the filename are speci-        
    fied, the new file will be processed starting at the first line.           
 . <n1 <n2>|label>:  The file will be processed from lines "n1" to "n2"        
    or starting at label "...label".   The "." must be the control-word        
    indicator (normally a period) that is currently in effect.                 


                                                                               
                                 - 25 -                                        
                                                                               
 APpend                                                 Waterloo SCRIPT        


 args:  Any operands specified ("args")   after the filename and before        
    the "."  are passed to the file being appended in the same way that        
    operands are passed to a macro when it is invoked.                         

 This control word  does not create a  break.   An "*" may  be coded in        
 place of "n1 n2" to indicate that  the entire file is to be processed.        
 If no  other operands appear after  the filename,  the entire  file is        
 processed.   If "n1" is  coded,  "*" may be coded in  place of "n2" to        
 indicate that the entire remainder of the file is to be processed;  if        
 neither "n2" or "*" is specified, "*" is assumed.                             

 NOTES                                                                         
 (1) If .AP FILENAME is used to supply the filename, a five-step proce-        
     dure is followed in searching for the referenced file.   In order,        
     a search is conducted for:                                                
     -1- A  DD  statement  "FILENAME"  which  points  to  a  sequential        
         dataset.                                                              
     -2- A  DD  statement  "FILENAME" which  points  to  a  partitioned        
         dataset, which itself contains a member "FILENAME'.                   
     -3- A member "FILENAME"  in an active partitioned  dataset.   (The        
         active partitioned datasets are searched for member "FILENAME"        
         in reverse order of opening.)                                         
     -4- A  member  "FILENAME"  in the  optional  "SYSLIB"  partitioned        
         dataset.                                                              
     -5- A  member "FILENAME"  in the  optional "SCRIPLIB"  partitioned        
         dataset.                                                              
 If nothing is  found,  a message is  printed out and an  empty file is        
 APpended.                                                                     
 (2) If .AP FILENAME(MEMBERNAME) is used to supply the file name,  step        
     -3- of the search is skipped, and in steps -2- and -4-, the parti-        
     tioned  datasets  in question  are  searched  for a  member  named        
     "MEMBERNAME" not "FILENAME".                                              

 EXAMPLES                                                                      
 (1) .AP CHA4CONT                                                              
     The file  named CHA4CONT  SCRIPT will  be read  and formatted  for        
     output as a continuation of the  current SCRIPT file.   &*0 is set        
     to zero.   &* is set to the  null string.   If the output is being        
     created in  OS,  a DD statement  similar to one of  the statements        
     below would have to be included in the job setup for input of this        
     file.  If CHA4CONT were a sequential file:                                
       //CHA4CONT DD DSNAME=xxxxxx,DISP=SHR                                    
     If CHA4CONT were a  member of a library it could  be referenced by        
     including a "SYSLIB DD" statement.                                        
       //SYSLIB   DD DSNAME=xxxxxx,DISP=SHR                                    
     If CHA4CONT were a member of  a particular partitioned dataset the        
     following "DD statement" would be necessary:                              
       //CHA4CONT DD DSNAME=xxxxxx(CHA4CONT),DISP=SHR                          
 (2) .AP FIG2 one 'one plus one' . 12 *                                        
     The  file named  FIG2 will  be read  starting with  record 12  and        
     output as a continuation of the current input file.   The value of        
     set symbol &*0 will be set to "2",  with &*1 and &*2 taking values        
     "one" and "one plus one" respectively.   The value of &* is set to        
     "one 'one plus one'".                                                     

                                 - 26 -                                        
                                                                               
 Waterloo SCRIPT                                                 APpend        


 (3) .ap TEST type=CHAPTER TITLE='New World' err(5)=4*4                        
     The file named TEST will be read with keywords TYPE, TITLE and ERR        
     set.  &*0 will be set to zero.                                            


                                                                               
 Ŀ                                                                      
 | .BC  |                                                                      
                                                                       

 BALANCE COLUMNS  enables or  disables column  balancing for  multiple-        
 column output.                                                                

      Ŀ             
      |       |                                                  |             
      |  .BC  |    <ON|OFF>                                      |             
      |       |                                                  |             
                   


 ON:  When multiple-column output is in effect,  the columns of text on        
    a page  that are  not full may  be balanced when  a column  or page        
    eject or column definition occurs.  SCRIPT will attempt to make the        
    number of lines in each column as equal as possible.   However, any        
    column that is terminated by a .CB, .CC, .CP,  or .PA is ineligible        
    for balancing unless it is the last column on the page.   If a Skip        
    (.SK)  is  ignored at  the top of  a column  then text  in previous        
    columns are not eligible for balancing.  Any column that contains a        
    footnote is ineligible for balancing.                                      
 OFF:  No attempt is made to balance the columns.                              

 This control word  does not create a break.   The  initial and default        
 operand is "ON".                                                              


                                                                               
 Ŀ                                                                      
 | .BD  |                                                                      
                                                                       

 BOLD boldfaces the specified number of input text lines.                      

      Ŀ             
      |       |                                                  |             
      |  .BD  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   


 n:  The next "n" input text lines  are to be made Bold by overstriking        
    each character with itself.    If "n" is omitted,  a value  of 1 is        
    assumed.                                                                   


                                                                               
                                 - 27 -                                        
                                                                               
 BolD                                                   Waterloo SCRIPT        


 ON:  All following input text lines are to be made Bold.                      
 OFF:  Terminates  the boldface  effect,  whether  initiated by  "n" or        
    "ON".                                                                      
 line:  The  boldface effect will be  applied to the  resulting "line".        
    If "line"  starts with a control  word indicator,  the  Bold action        
    will start one blank after the control word at the start of "line",        
    and the result of overstriking must  fit within the maximum allowed        
    input line  length.   This restriction does  not apply to  a "line"        
    operand of text or text following a numeric or "ON" operand.               

 This control word does not cause a break.  BOLD operates independently        
 of other control words that modify text.    When more than one of .BD,        
 .BI,  .UC,  .UL,  .UP,  or .US are  in effect,  the result is the best        
 equivalent of the  sum of the effects.    They may be disabled  in any        
 order;  the result  will be the best  equivalent of the ones  still in        
 effect.   The .UD "INCLUDE/IGNORE/SET" characters  may be used to turn        
 the function on and  off within a "line" or in  subsequent input text.        
 See .UD for defaults and details.                                             

 NOTES                                                                         
 (1) For output devices  that support multiple fonts,   the output from        
     this  control word  is  not necessarily  bold  but  may merely  be        
     selected from a different font.                                           
 (2) Text may also be emphasized with the &'bold( function.                    
 (3) Do not  attempt to use a  numeric expression as a  "line" operand,        
     because  it  will be  taken  as  an  "n" operand.    For  example,        
     ".BD (1988)" will boldface  the next 1988 input lines  of text and        
     not the string  "(1988)".   Use ".BD 1;(1988)" or  ".BD;(1988)" or        
     &'bold(1988) instead.                                                     

 EXAMPLES                                                                      
 (1) This is                                                                   
     .BD Bold text                                                             
     and this                                                                  
     .BD ON;is more Bold                                                       
     output text.                                                              
     .BD OFF                                                                   
     .BD .CE BOLD END                                                          
     produces:  This is Bold text and this is more Bold output text.           
                                  BOLD END                                     
 (2) Text comes                                                                
     .BD ON;in Boldface                                                        
     .US ON;and Underscored                                                    
     .UP ON;and Uppercase/Underscored                                          
     .US OFF;and Uppercase                                                     
     .UP OFF;and so                                                            
     .BD OFF;on.                                                               
     produces:     Text  comes   in   Boldface   and  Underscored   AND        
     UPPERCASE/UNDERSCORED AND UPPERCASE and so on.                            


                                                                               


                                                                               
                                 - 28 -                                        
                                                                               
 Waterloo SCRIPT                                             Begin Font        


 Ŀ                                                                      
 | .BF  |                                                                      
                                                                       

 BEGIN FONT begins a new font name and saves the current font status.          

      Ŀ             
      |       |                                                  |             
      |  .BF  |    <fontname ... <=>>                            |             
      |       |                                                  |             
                   

 This control word does not cause a break.   The current font status is        
 saved in a push down stack that may be up to twenty levels deep.              
    If no font name is specified as an operand, the current font status        
 is stacked  and remains in  effect.   More than  one font name  may be        
 specified:   the first that matches a Defined Font (.DF)  name will be        
 used.   A single equal  sign '=' at the end of such  a list will stack        
 the current font status in effect.                                            
    A font  name that has  been begun  is terminated with  the Previous        
 Font (.PF) control word.                                                      

 NOTES                                                                         
 (1) The System Set Symbol &SYSBFONTS contains the names of the stacked        
     font names in effect.   These names  are separated by a blank with        
     the most recent first.                                                    
 (2) This control word is treated as  a comment for output devices that        
     do not support fonts.                                                     

 EXAMPLES                                                                      
 (1) .bf head text                                                             
     This would stack a defined font name with the name of 'head'.   If        
     'head' does not  exist,  then one with  a name of 'text'  would be        
     stacked.  An error will occur if neither is defined.                      
 (2) .bf head text =                                                           
     Now if neither 'head' or 'text' is a defined fontid, a copy of the        
     current font definition will be stacked.                                  
 (3) .bf                                                                       
     With no operand a copy of the current font definition is stacked.         


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                 - 29 -                                        
                                                                               
 Bold Italic                                            Waterloo SCRIPT        


 Ŀ                                                                      
 | .BI  |                                                                      
                                                                       

 BOLD ITALIC overstrikes  an input line with itself  and underscores it        
 for a boldface italic effect.                                                 

      Ŀ             
      |       |                                                  |             
      |  .BI  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   

 This control word does not cause a break.   The operands are identical        
 to those for the .BD control word.                                            

 NOTES                                                                         
 (1) For output devices  that support multiple fonts,   the output from        
     this control word is not  necessarily underscored.   It often will        
     display in a bold italic font, for example.                               
 (2) Text may also be emphasized with the &'bitalic( function.                 

 EXAMPLES                                                                      
 (1) This is                                                                   
     .BI Bold Italic text                                                      
     and this                                                                  
     .BI ON;is more Bold Italic                                                
     output text.                                                              
     .BI OFF                                                                   
     .BI .CE BOLD ITALIC END                                                   
     produces:   This is Bold Italic text  and this is more Bold Italic        
     output text.                                                              
                              BOLD ITALIC END                                  


                                                                               
 Ŀ                                                                      
 | .BL  |                                                                      
                                                                       

 BLANK LINE is generated internally by  SCRIPT each time a blank record        
 is encountered in an input file.                                              

      Ŀ             
      |       |                                                  |             
      |  .BL  |                                                  |             
      |       |                                                  |             
                   

 This control word causes a break.  Any operands specified are ignored.        
 The function  it will perform is  equivalent to a Skip  (.SK)  control        
 word.   If some  other effect is desired for blank  input records then        
 you may define a macro named "BL" to perform whatever is required.            


                                 - 30 -                                        
                                                                               
 Waterloo SCRIPT                                             Blank Line        


 EXAMPLES                                                                      
 (1) .dm BL /.cm/                                                              
     Once this macro has been defined,   any blank lines encountered in        
     the input will  cause the BL macro  to be invoked,  which  will do        
     nothing.  The blank input lines will therefore "vanish".                  
 (2) .dm BL /.cc 2/.sk c/                                                      
     Each time  a blank input line  is encountered,  the BL  macro will        
     make sure  that there are at  least two usable lines  remaining in        
     the text area and will then generate a "conditional skip".                


                                                                               
 Ŀ                                                                      
 | .BM  |                                                                      
                                                                       

 BOTTOM MARGIN specifies the number of lines to be left between the end        
 of the text area and the bottom of the physical page.                         

      Ŀ             
      |       |                                                  |             
      |  .BM  |    <6|v|+v|-v>                                   |             
      |       |                                                  |             
                   


 <6|v>:  At  the bottom of all  subsequent output pages  (including the        
    current page), "v" lines will appear between the bottom of the text        
    area and the  physical bottom of the  page.   A value of  zero will        
    suppress the entire Bottom Margin area of the page.                        
 <+v|-v>:  this value will modify the  current Bottom Margin value,  so        
    long as the resulting value is not negative.                               

 This control word  causes a break.   Unless  otherwise specified "v=6"        
 will be  in effect.   If  used without an  operand,  the value  of the        
 BMargin option  will be taken,  normally  6.   Any footing  lines will        
 appear within these "v" lines.                                                
    If the  Footing Margin is  fm,  the Footing  Space is fs,   and the        
 Bottom Margin bm, then the bottom of each page will contain:                  
 (1) fm blank lines,                                                           
 (2) the fs footing lines,                                                     
 (3) bm - fm - fs blank lines.                                                 

 The Footing  Margin plus  Footing Space  must always  be less  than or        
 equal to the Bottom Margin,  unless  the Bottom Margin is zero.   Then        
 the text area will extend to the bottom of the page.                          

 NOTES                                                                         
 (1) The checking  for a valid  combination of Bottom  Margin,  Footing        
     Margin and Footing Space is made when  the page is printed and not        
     when these values are set.                                                
 (2) Footnotes are printed in the text area above the Bottom Margin.           


                                                                               
                                 - 31 -                                        
                                                                               
 Bottom Margin                                          Waterloo SCRIPT        


 (3) Do not  confuse Running Titles  that print  at the bottom  of each        
     page with footnotes.  Bottom Running Title lines are those "bottom        
     title" lines defined by the ".BT",  ".EB",  ".OB" and ".RT BOTTOM"        
     control words, and are printed in the area defined by ".FS".              


                                                                               
 Ŀ                                                                      
 | .BR  |                                                                      
                                                                       

 BREAK forces  the current partially-full output  line (if any)   to be        
 printed without  justification (if on),  and  a new output line  to be        
 begun.                                                                        

      Ŀ             
      |       |                                                  |             
      |  .BR  |    <line>                                        |             
      |       |                                                  |             
                   

 The optional  "line" operand starts one  blank after the  control word        
 and may be text or another control word.                                      

 NOTES                                                                         
 (1) Many other control words also cause  a Break.   No Break is neces-        
     sary  when one  of these  is  present.   The  description of  each        
     control word  indicates whether  it causes  a break,   and summary        
     lists are contained in other components of this document.                 
 (2) A blank or tab in column one of  an input line has the effect of a        
     Break immediately before the line.    See Leading Blank (.LB)  and        
     Leading Tab (.LT) to control this automatic Break.                        
 (3) If Concatenate NO is in effect, all lines appear to be followed by        
     a Break.                                                                  

 EXAMPLES                                                                      
 (1) This is a text line                                                       
     .br                                                                       
     followed by a .BR control word.                                           
     produces:                                                                 
     This is a text line                                                       
     followed by a .BR control word.                                           

     Without the Break, it would print as:                                     
     This is a text line followed by a .BR control word.                       


                                                                               


                                                                               


                                                                               

                                 - 32 -                                        
                                                                               
 Waterloo SCRIPT                                              BackSpace        


 Ŀ                                                                      
 | .BS  |                                                                      
                                                                       

 BACKSPACE specifies the user-defined input  character to be treated as        
 a logical backspace  character.   This is most useful  when the user's        
 input device does not offer a backspace input facility.                       

      Ŀ             
      |       |                                                  |             
      |  .BS  |    <char>                                        |             
      |       |                                                  |             
                   


 char:  In  subsequent input  text and the  operands of  control lines,        
    each occurrence  of the  "char" character will  be replaced  by the        
    logical backspace (hex '16').    The ".BS" control word  itself and        
    ".  ",  ".DO",  ".EL",  ".SU",  ".TH" and ".UR" will not have their        
    operands altered.                                                          

 This control word  does not cause a break.   The  initial default user        
 backspace character  is defined  as a  hexadecimal '16'.    An omitted        
 character operand will reset the user backspace to hex '16'.                  

 EXAMPLES                                                                      
 (1) .BS +;ABCDEFG+++++++_______                                               
     produces:  ABCDEFG                                                        
 (2) .bs <;In f<_i<_g<_ 91<<__.                                                
     produces:  In fig 91.                                                     


                                                                               
 Ŀ                                                                      
 | .BT  |                                                                      
                                                                       

 BOTTOM  TITLE defines  a running  title that  will be  printed at  the        
 bottom of even- and odd-numbered pages.                                       

      Ŀ             
      |       |                                                  |             
      |  .BT  |    <1|n>  /left/centre/right/                    |             
      |       |                                                  |             
                   

 Equivalent to ".RT BOTTOM"; see .RT for details.                              


                                                                               


                                                                               


                                 - 33 -                                        
                                                                               
 Box                                                    Waterloo SCRIPT        


 Ŀ                                                                      
 | .BX  |                                                                      
                                                                       

 BOX generates the horizontal lines and initiates the vertical lines of        
 a box.                                                                        

      Ŀ             
      |       |                                                  |             
      |       |    <h1 </> ... hn>                               |             
      |  .BX  |    <NEW|ON|OFF|SET> <h1 </> ... hn>              |             
      |       |    <CANCEL>                                      |             
      |       |    <CHAR name>                                   |             
      |       |                                                  |             
                   

 SCRIPT generates a box by constructing line segments through character        
 positions or "cells".                                                         

 Line Segments                                                                 

 There are only four possible line  segments in a character cell,  each        
 of which can be described in terms  of movement from the center of the        
 cell to one of its four sides:                                                
 (1) horizontal right (from the center of the cell to the right side of        
     the cell)                                                                 
 (2) horizontal left (from the  center of the cell to the  left side of        
     the cell)                                                                 
 (3) vertical ascender (from the  center of the cell to the  top of the        
     cell)                                                                     
 (4) vertical descender (from  the center of the cell to  the bottom of        
     the cell)                                                                 

 In the operand descriptions below,   the following two generalizations        
 are made:                                                                     
 (1) horizontal rule (all of the horizontal segments from the center of        
     one cell  to the center  of a cell somewhere  to the right  on the        
     same output line)                                                         
 (2) vertical rule  (a vertical line  from the top  of one cell  to the        
     bottom of  that same cell;  that  is,  a vertical ascender  plus a        
     vertical descender)                                                       

 Operands                                                                      

 <h1 </> ...   hn>:  When used with numeric  operands "h1 ... hn" only,        
    .BX  begins a  single  box by  generating  a  horizontal rule  with        
    vertical descenders in the specified columns;  if a previous box is        
    still in  effect,  then the horizontal  rule is generated  from the        
    leftmost  vertical  position of  the  two  boxes to  the  rightmost        
    vertical position of the two boxes,  with vertical ascenders in the        
    vertical positions of the previous box,  and the previous box defi-        
    nition is  terminated.   On all  subsequent output lines  until the        
    next .BX control word is encountered, vertical rules will be gener-        
    ated in the specified columns.                                             

                                 - 34 -                                        
                                                                               
 Waterloo SCRIPT                                                    Box        


       The numeric  operands are relative  to the current  ADJUST (.ad)        
    value, and must be specified in increasing column order.   A signed        
    numeric operand is relative to the preceding operand.                      
       When a Box definition is in effect and a .BX with no operands is        
    encountered,   a horizontal  rule is  generated  from the  leftmost        
    vertical position to the rightmost vertical position, with vertical        
    ascenders and descenders in all of the vertical positions.                 
       A single  numeric operand defines a  box with only  one vertical        
    descender.                                                                 
       The  character '/'  between  numeric  operands defines  multiple        
    side-by-side boxes between which no horizontal rules will be gener-        
    ated.                                                                      
 ON <h1 </>  ...  hn>:  When a  box definition is in  effect and SCRIPT        
    encounters  a  new box  definition  that  is specified  using  only        
    numeric operands, the horizontal rule that closes the first box and        
    starts the second box is generated  from the leftmost to the right-        
    most of the vertical positions of the two boxes.  "ON" as the first        
    operand of the  second box definition will suppress  those parts of        
    the horizontal rule that are not part of either box, in cases where        
    the two boxes are not vertically aligned.                                  
 NEW <h1 </> ...  hn>:  superimposes the definition for this box on top        
    of  the previous  box definition.    If  the new  box overlaps  the        
    previous box,  none of the line segments "beneath" the new box will        
    be generated.   This allows  boxes to be drawn within or  on top of        
    boxes.   The superimposed segments of  the previous box will become        
    visible again once the new box definition is terminated.                   
       If no column operands are present or if no previous box is still        
    in effect, then the "NEW" operand is ignored.                              
 SET <h1 </> ...  hn>:  is treated  in all respects like "NEW" with the        
    exception that  the definition for the  new box is put  into effect        
    without generating  the horizontal rule  or the  vertical ascenders        
    and descenders.                                                            
 OFF <h1 </> ...  hn>:  terminates the definition of the current box by        
    generating  the  "bottom"  horizontal   rule  and  the  appropriate        
    vertical ascenders.                                                        
       Any numeric column operands used with "OFF" will cause the hori-        
    zontal rule to  be generated from the leftmost to  the rightmost of        
    the combination  of the defined  and specified  vertical positions,        
    with vertical ascenders in all of those positions.  If no box is in        
    effect when the OFF is encountered, only the numeric operands spec-        
    ified with the  OFF determine the positions of  the horizontal rule        
    and vertical ascenders.                                                    
       If  current box  was  started with  NEW  or  SET,  the  vertical        
    descenders of the previous box will also be generated.                     
 CANcel (alias "DELETE"):  terminates the definition of the current box        
    without generating its closing horizontal  rule and vertical ascen-        
    ders.                                                                      
 CHAR <TRM|32T|TNC|38C|GPC|APL>:   specifies the character set  that is        
    to be used by SCRIPT in  constructing the four line segments needed        
    for boxes.    By default,   when SCRIPT is  producing output  for a        
    terminal,  the CHAR TRM set of "-",  "|"  and "+" is used to give a        
    gross approximation of horizontal rules, vertical rules, and inter-        
    sections.  In other cases, such as output to a line printer, SCRIPT        
    uses the CHAR TNC set of special  box-drawing characters for the TN        

                                 - 35 -                                        
                                                                               
 Box                                                    Waterloo SCRIPT        


    print train; this results in a better approximation, although still        
    not exact.  With the CHAR operand, the named set of characters will        
    always be used, independent of the output device.                          
       The IBM  3270 "text terminal" is  specified by "32T".    The IBM        
    3800 character  set with the long  "or" bar is specified  by "38C".        
    The IBM 3800  GP12 font without the  long "or" bar is  specified by        
    "GPC".  The APL character set is specified by "APL".                       

 Debugging Aid                                                                 

 CHAR HEX:   The HEX operand is  provided as a "debugging  aid".   Each        
    character  cell in  which one  or more  of the  four line  segments        
    occurs will be  printed using one of the  hexadecimal characters in        
    the sequence 0123456789ABCDEF, to represent combinations of a 4-bit        
    pattern "xxxx" where each "x" is a 0 or a 1.                               
       This pattern can best be discussed in terms of "8421".   The "8"        
    position represents "vertical ascender".    The "4" position repre-        
    sents "vertical  descender".   The  "2" position  represents "hori-        
    zontal  left".   The  "1" position  represents "horizontal  right".        
    Therefore, a character cell printed as "E" represents "1110", which        
    indicates that the  cell contains a vertical  ascender,  a vertical        
    descender,  and  a horizontal  left.   If CHAR  TRM were  in effect        
    instead,  SCRIPT would approximate that cell  with a "+",  which is        
    clearly incorrect but is the best that can be done for that kind of        
    output  device.    If  SCRIPT  must approximate,   it  does  so  by        
    displaying more  than really exists,   since displaying  less could        
    result in a blank cell.                                                    

 This control word creates a break.                                            

 EXAMPLES                                                                      
 (1) .in 4                                                                     
     .bx 1 70                                                                  
     .sk;.la ONE;.ce TWO;.ra THREE                                             
     .sk;.bx                                                                   
     This is a continued box showing                                           
     formatted text in a box.                                                  
     .bx off                                                                   
     produces:                                                                 

 Ŀ        
 |                                                                    |        
 |   ONE                                                              |        
 |                                TWO                                 |        
 |                                                            THREE   |        
 |                                                                    |        
 ||        
 |   This is a continued box showing formatted text in a box.         |        
         

 (2) .bx 20 +10;.sk;.bx;.sk;.bx 10 +30;.sk                                     
     .bx 20 +10;.sk;.bx off                                                    
     produces:                                                                 


                                 - 36 -                                        
                                                                               
 Waterloo SCRIPT                                                    Box        


                    Ŀ                                                
                    |         |                                                
                    ||                                                
                    |         |                                                
          Ŀ                                      
          |                             |                                      
                                                
                    |         |                                                
                                                                    


 (3) .bx 10 +10 +10;.sk                                                        
     .bx new 15 +10;.sk;.bx off                                                
     .sk;.bx off                                                               
     produces:                                                                 

          Ŀ                                                
          |         |         |                                                
          |    Ŀ    |                                                
          |    |         |    |                                                
          |        |                                                
          |         |         |                                                
                                                          

 (4) .bx 10 +20;.sk                                                            
     .bx set 15 +10;.sk                                                        
     .bx 20;.sk                                                                
     .bx can;.sk                                                               
     .bx off                                                                   
     produces:                                                                 

          Ŀ                                                
          |                   |                                                
          |    |         |    |                                                
          |        |                                                
          |         |         |                                                
          |                   |                                                
                                                          

 (5) .bx 10 20 / 25 35;.sk                                                     
     .bx 15;.sk                                                                
     .bx 10 20 / 25 35;.sk                                                     
     .bx off                                                                   
     produces:                                                                 

          Ŀ    Ŀ                                           
          |         |    |         |                                           
                                                         
               |                                                               
          Ŀ    Ŀ                                           
          |         |    |         |                                           
                                                         


                                                                               
                                 - 37 -                                        
                                                                               
 Box                                                    Waterloo SCRIPT        


 (6) .bx 22 28;.sk                                                             
     .bx 25;.sk                                                                
     .bx 7 19 31 43                                                            
     .bx can                                                                   
     .bx set 7 / 19 / 31 / 43;.sk                                              
     .bx on 4 10 / 16 22 / 28 34 / 40 46 / 52 58                               
     .bx new 46 52;.bx can                                                     
     .bx on 43;.sk                                                             
     .bx 34 52;.bx can                                                         
     .bx set 34 / 52;.sk                                                       
     .bx on 31 37 / 49 55;.sk;.bx off                                          
     produces:                                                                 

                      Ŀ                                                  
                      |     |                                                  
                                                                        
                         |                                                     
       Ŀ                                   
       |           |           |           |                                   
    Ŀ     Ŀ     Ŀ     Ŀ     Ŀ                    
    |     |     |     |     |     |     |     ||     |                    
                                            
                                           |                                   
                                  Ŀ                          
                                  |                 |                          
                               Ŀ           Ŀ                       
                               |     |           |     |                       
                                                                 


                                                                               
 Ŀ                                                                      
 | .CB  |                                                                      
                                                                       

 COLUMN BEGIN positions output to the top  of the next column (or page,        
 if in single-column mode).                                                    

      Ŀ             
      |       |                                                  |             
      |  .CB  |                                                  |             
      |       |                                                  |             
                   

 This control word causes a break.    No operand may be specified.   If        
 this control word is encountered while processing the last column on a        
 page, SCRIPT ejects to the first column of the next page.   Unlike the        
 action of  a .CC (Conditional Column)   with no operands,  a  .CB will        
 eject to the  top of the next  column even if output  is already posi-        
 tioned at the top of a column.  This control word is illegal in a Keep        
 or Footnote.                                                                  


                                                                               

                                 - 38 -                                        
                                                                               
 Waterloo SCRIPT                                     Conditional Column        


 Ŀ                                                                      
 | .CC  |                                                                      
                                                                       

 CONDITIONAL COLUMN positions  output to the top of the  next column if        
 insufficient  lines remain  in the  current  column (or  page,  if  in        
 single-column mode).                                                          

      Ŀ             
      |       |                                                  |             
      |       |    <v>                                           |             
      |  .CC  |                                                  |             
      |       |    <BEGIN|INLINE|END <0|w>>                      |             
      |       |                                                  |             
                   

 If no operand is specified,  this control  word will cause a break and        
 then,  if the output is not already positioned at the top of a column,        
 it will position to the top of the next column.                               

 v:  With  a vertical  space operand,  a  check is  made for  "v" space        
    remaining in the  current column.   If "v" space does  not remain a        
    new output  column will be started,   which also makes  the current        
    column ineligible for balancing.  If "v" space or more does remain,        
    no action is performed,  but if Balance Columns is "ON" then output        
    in the  current column may  be split  by later balancing  of column        
    text.  If "v" is not positive then no action is performed.                 
 <BEGIN|INLINE>:  starts a "conditional column" text block.  If started        
    with "BEGIN",  this control word causes  a break.   If started with        
    "INLINE",  it does not cause a break and any not-yet-printed output        
    line will  become the first  line of  the text block.    All output        
    thereafter becomes part of this "block".                                   
 END <0|w>:   terminates a  "conditional column"  text block.    If the        
    block was started with "INLINE", no break is caused; the block does        
    not  include the  current  not-yet-printed  output line  (if  any).        
    SCRIPT will  compare the size  of the text  block to the  amount of        
    space left in the current column. The "END" operand may be further        
    qualified by "w"  vertical space units which defaults  to zero.   A        
    new output column will be started if the text block does not fit or        
    if there  will be  less than "w"  space units  left in  the current        
    column after  the text  block is  printed.   If  insufficient space        
    remains in the current column, SCRIPT ejects to the top of the next        
    column before  printing the block.    Otherwise,  the  block prints        
    immediately.    If a  "conditional" SKIP  or  SPACE terminates  the        
    block,  the conditional  SKIPs or SPACEs are put  into effect AFTER        
    the block is output.                                                       

 "In-storage" text  blocks are created  via begin/end sequences  of the        
 .CC,  .CP,  .FB,  .FK,  and .FN  control words.   These control words,        
 _______________________                                                       

  The amount of  space between the current position in  the column and        
   the first line reserved for footnotes (if any)  or the bottom of the        
   text area (if no footnotes are currently waiting to print).                 

                                 - 39 -                                        
                                                                               
 Conditional Column                                     Waterloo SCRIPT        


 control words that cause column or page ejects, and control words that        
 alter the columns-per-page environment (.CD, .MC,  .SC)  may NOT occur        
 within an in-storage block.                                                   


                                                                               
 Ŀ                                                                      
 | .CD  |                                                                      
                                                                       

 COLUMN DEFINITION  defines the number of  columns into which  the text        
 area is to be formatted,  and optionally the starting position of each        
 relative to the beginning of the output line.                                 

      Ŀ             
      |       |                                                  |             
      |       |    SET <n <gmin <gmax>>>                         |             
      |  .CD  |                                                  |             
      |       |    <n <h1 <h2 ... h9>>>                          |             
      |       |                                                  |             
                   


 SET  <n <gmin  <gmax>>>:  SCRIPT  calculates the  Column Length  (.CL)        
    value and the starting position of each column relative to the Page        
    Margin value by dividing the current  Line Length (.LL)  value into        
    "n"  equal columns  with  "n-1" equal  gutters  (the space  between        
    columns).   The value specified for "n" may  range from 1 to 9.   A        
    signed value specifies  a change relative to the  number of columns        
    currently in effect.   The "gmin" operand allows you to specify the        
    minimum gutter length  in horizontal units.   A  signed value indi-        
    cates a change relative to the current gutter length; if omitted, a        
    value equal  to 5% of  the Line Length  will be used.    The "gmax"        
    operand allows  you to specify the  maximum gutter length  in hori-        
    zontal units.   A  signed value indicates a change  relative to the        
    "gmin" value;  if omitted, the Line Length value will be used.   If        
    only  SET is  specified,  the  control word  re-defines the  COLUMN        
    DEFINITION currently in effect.                                            
 <n <h1 <h2 ...  h9>>>:  The  numeric operands following the "n" define        
    the starting position (the displacement) of each column relative to        
    the Adjust (.AD) value.   A zero displacement means no displacement        
    at all.  If a displacement is signed, it means a change relative to        
    the previous displacement in the  same control word.   If displace-        
    ment operands are omitted,  their former  values are used.   If all        
    operands are omitted,   it is a redefinition of  the current COLUMN        
    DEFINITION.   This form  of the COLUMN DEFINITION does  not set the        
    width of each column;  you must do that yourself,  using the Column        
    Length (.CL) control word.                                                 

 This control word  causes a break.   The initial number  of columns is        
 one, with displacements 0, 46, 92, 0, 0, 0, 0, 0, 0.  Omitted operands        
 in this control word retain their former value.                               


                                                                               
                                 - 40 -                                        
                                                                               
 Waterloo SCRIPT                                      Column Definition        


 NOTES                                                                         
 (1) The .CD  control word causes  all input text  to that point  to be        
     printed with the former definition.                                       
 (2) If the text  in one column should  overflow past the start  of the        
     next  column (because  of  FORMAT NO  or  overlays),   it will  be        
     replaced by the text of that next column.                                 
 (3) This control word is not allowed in Keeps or Footnotes.                   
 (4) When the SET notation is used,  SCRIPT first attempts to calculate        
     column and gutter lengths that produce  a displacement of zero for        
     the first column  and cause the last character of  the last column        
     to be positioned at the Line Length.   If that fails, then it will        
     attempt to calculate column and gutter lengths such that there are        
     an equal number of blank positions at the beginning and the end of        
     the line.   If that fails, it will use the "gmin" value (specified        
     or default) for the gutter length and produce a Column Length that        
     results in one more blank position at  the end of the line than at        
     the beginning of the line.                                                

 EXAMPLES                                                                      
 (1) .ll 132;.cd set 3                                                         
     This example results in a 132-character output line with 3 columns        
     of text  per page and  an appropriate gutter-length  calculated by        
     SCRIPT.                                                                   
 (2) .cd 1 0                                                                   
     This is the same as single-column  mode.   It specifies one column        
     at displacement zero.                                                     
 (3) .ll 60;.cl 27;.cd 2 0 33                                                  
     This specifies  a Line  Length of 60  and a  Column Length  of 27.        
     Text will be formatted from column 1 (displacement 0) to column 27        
     and from  column 34  (displacement 33)  to  column 60,   leaving a        
     6-character "gutter" or white space between columns.                      
 (4) .ll 6.5i;.cl 3i;.cd 2 0.0i 3.5i                                           
     This specifies a Line Length of 6.5 inches.  The first column text        
     will be  formatted from the beginning  of the Line Length  for 3.0        
     inches  and the  second column  text  will be  formatted from  3.5        
     inches into  the Line Length for  3.0 inches.   This will  leave a        
     gutter .5 inches wide between the columns.                                


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                 - 41 -                                        
                                                                               
 CEnter                                                 Waterloo SCRIPT        


 Ŀ                                                                      
 | .CE  |                                                                      
                                                                       

 CENTER centers  the specified number of  text input lines  between the        
 margins currently defined by the left and right indent values.                

      Ŀ             
      |       |                                                  |             
      |  .CE  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   


 <1|n>:  The next "n" input text lines will be centered on output.             
 <ON|OFF>:   ON causes  all text  lines  thereafter to  be centered  on        
    output.   OFF  terminates the centering  effect initiated by  ON or        
    "n".                                                                       
 line:  The result of the specified input "line" will be centered.  The        
    "line" can be either simple text or a control-word line.                   

 This control word causes a break.  Any leading blanks at the beginning        
 of a text input  line to be centered will be included  in the count of        
 characters to be centered.   If the input text line is longer than the        
 output line length,  that leftmost portion of the input line that will        
 fit on  the output line  will be centered,   and the remainder  of the        
 input line will be centered on the next output line(s).  The effect of        
 Centering is terminated  by the OFF operand or by  the next occurrence        
 of Concatenate (.CO), Format (.FO), Left Adjust (.LA)  or Right Adjust        
 (.RI).                                                                        

 EXAMPLES                                                                      
 (1) .ce This will be centered.                                                
     produces:                                                                 
                           This will be centered.                              
 (2) .ce .us Underscored text to be centered.                                  
     produces:                                                                 
                      Underscored text to be centered.                         
 (3) .ce 3;first line                                                          
     .sk;second line                                                           
     third line                                                                
     produces:                                                                 
                                 first line                                    

                                second line                                    
                                 third line                                    
 (4) Do not  attempt to use a  numeric expression as a  "line" operand,        
     because  it  will be  taken  as  an  "n" operand.    For  example,        
     ".CE (1988)" will center the next 1988 input lines of text and not        
     the string "(1988)".  Use ".CE 1;(1988)" or ".CE;(1988)" instead.         


                                                                               


                                 - 42 -                                        
                                                                               
 Waterloo SCRIPT                                                 CHange        


 Ŀ                                                                      
 | .CH  |                                                                      
                                                                       

 CHANGE  defines strings  of text  to  be replaced  in following  input        
 records.                                                                      

      Ŀ             
      |       |                                                  |             
      |       |    /string1/string2/<n> ...                      |             
      |  .CH  |                                                  |             
      |       |    DELETE </string1/ ...>                        |             
      |       |                                                  |             
                   


 /string1/string2/ ...:   SCRIPT examines  subsequent input  text lines        
    and the operands  of control words for  character string "string1",        
    and wherever found,  replace "string1"  by "string2" before further        
    processing the line.    The second character string  may be longer,        
    shorter, or the same length as the "string1".   Either "string1" or        
    "string2" may  be null,  but if  "string1" is null  the replacement        
    string is inserted at the front of text lines only.   The character        
    delimiting the strings  is always first and cannot  occur in either        
    of the strings.   Trailing delimiters will be assumed,  if omitted.        
    When searching for strings to be replaced, the longest "string1" is        
    always searched for first.   After replacement  has been done on an        
    input line,  the first column is  again examined for a control-word        
    indicator,  normally period (".").   If  there is one,  the changed        
    input line will be processed as a control line;  otherwise, it will        
    be processed as a text input line.                                         
 /string1/string2/<n> ...:  Only the first "n" occurrences of "string1"        
    per input line will be replaced.   If omitted,  all occurrences per        
    line will be  changed.   Multiple string pairs may  be specified on        
    the same .CH control word.                                                 
 DELETE  </string1/  ...>:   removes  "string1"  from  the  replacement        
    action.   Multiple delimited strings to be deleted may be specified        
    on the  same ".CH"  control word.    If no  string operands  follow        
    "DELETE", all CHANGE strings currently in effect are deleted.              

 This control word does  not cause a break.   No changes  are in effect        
 initially and they are cleared between PASses.   If replacement yields        
 a resulting input  line longer than 250 characters,   an error message        
 results.                                                                      

 NOTES                                                                         
 (1) Only  one  CHANGE operation  will  be  applied per  logical  input        
     record,  so control words with  "line" operands or another control        
     word as operand will not be altered more than once.                       
 (2) The operands of some control words  are not directly altered by an        
     outstanding  CHANGE.    When  the  result  of  these  operands  is        
     processed they will be subject to change.  These control words are        
     ".  ", ".CH", ".DO", ".EL", ".SU", ".TH", and ".UR".                      


                                 - 43 -                                        
                                                                               
 CHange                                                 Waterloo SCRIPT        


 EXAMPLES                                                                      
 (1) .CH /UW/University of Waterloo/                                           
     The UW version of SCRIPT is used by                                       
     faculty, staff, and students at the UW.                                   
     .CH DELETE /UW/                                                           
     produces:  The University of Waterloo version of SCRIPT is used by        
     faculty, staff, and students at the University of Waterloo.               
 (2) .ch /SUP0/&S'0./ /SUP1/&S'1./                                             
     .ch /BULLET/&X'AF./ /SQUARE/&X'9F./                                       
     This will do superscripts (SUP0, SUP1)                                    
     and bullets (BULLET, SQUARE).                                             
     .ch delete /BULLET/ /SQUARE/ /SUP0/ /SUP1/                                
     produces:  This will do superscripts (, ) and bullets (, ).           
 (3) .ch //.us /                                                               
     This produces a paragraph of text that is all                             
     underscored.  The ".us" control word is inserted                          
     at the front of each line.                                                
     .ch DELETE //                                                             
     produces:   This produces  a paragraph of text that  is all under-        
     scored.   The ".us" control word is  inserted at the front of each        
     line.                                                                     
 (4) .CH /ABC/the first three letters of the alphabet/                         
     .CH /ABCD/ABCD/                                                           
     Always change ABC but don't touch ABCDEFGH..XYZ.                          
     .CH DELETE /ABC/ /ABCD/                                                   
     produces:   Always change the first  three letters of the alphabet        
     but don't touch ABCDEFGH...XYZ.                                           
 (5) .ch '*****'AAAAA'                                                         
     *************** <-- fifteen characters                                    
     .ch DELETE '*****'                                                        
     produces:  AAAAAAAAAAAAAAA <-- fifteen characters                         
 (6) .ch /*****/AAAAA/1 /****/BBBB/1 /***/CCC/1                                
     .ch /**/DD/1 /*/E/1                                                       
     *************** <-- fifteen characters                                    
     .ch DELETE                                                                
     produces:  AAAAABBBBCCCDDE <-- fifteen characters                         


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                 - 44 -                                        
                                                                               
 Waterloo SCRIPT                                          Column Length        


 Ŀ                                                                      
 | .CL  |                                                                      
                                                                       

 COLUMN LENGTH defines the horizontal length  of the column output line        
 in multiple-column mode.                                                      

      Ŀ             
      |       |                                                  |             
      |  .CL  |    <0|h|+h|-h>                                   |             
      |       |                                                  |             
                   


 <h|+h|-h>:   The length  may be  set with  an absolute  value,  or  be        
    changed relative to its current length with a signed value.                
 0:  sets the column length equal to the current Line Length (.LL).            

 This control word causes a break.  It is not required if the multiple-        
 column mode has been defined using the "SET" operand of Column Defini-        
 tion  (.CD).   The  initial and  default value  is equal  to the  Line        
 Length.   The  System Set Symbol &SYSCL  has as its value  the current        
 Line Length if no ".CD SET" or ".CL" has yet been encountered,  or the        
 current value of the Column Length otherwise.                                 


                                                                               
 Ŀ                                                                      
 | .CM  |                                                                      
                                                                       

 COMMENT allows comments to be stored in the SCRIPT file.                      

      Ŀ             
      |       |                                                  |             
      |  .*   |    <information>                                 |             
      |       |                                                  |             
      |||             
      |       |                                                  |             
      |  .CM  |    <information>                                 |             
      |       |                                                  |             
                   

 This control word does not cause a break.   Comments have no effect on        
 SCRIPT's processing of the input file.                                        

 .*  <information>:   Everything up  to the end  of the  physical input        
    line will be treated as a comment, independent of whether "informa-        
    tion" contains a control-word separator.                                   
 .CM <information>:  Everything up to a control-word separator (if any)        
    or the  end of the  physical line (if none)   will be treated  as a        
    comment.                                                                   


                                                                               
                                 - 45 -                                        
                                                                               
 CoMment                                                Waterloo SCRIPT        


 EXAMPLES                                                                      
 (1) .CM .FO OFF is used below.                                                
     The comment  line will be  seen when  editing the SCRIPT  file and        
     will serve to clarify what follows.                                       
 (2) .cm This is a comment;.ty This will be executed.                          
     This is an example of two control words entered on one input line.        
     The first is  a comment delimited with  the control-word separator        
     character and the second control word will always be executed.            


                                                                               
 Ŀ                                                                      
 | .CO  |                                                                      
                                                                       

 CONCATENATE  enables  or cancels  the  formation  of output  lines  by        
 concatenating input lines and truncating  at the nearest word boundary        
 to fit on the output line.                                                    

      Ŀ             
      |       |                                                  |             
      |  .CO  |    <ON|OFF>                                      |             
      |       |                                                  |             
                   


 ON:  Output lines will be created by adding words from the input lines        
    until a word is found which will  not fit on the output line.   The        
    resulting output line will therefore have as many words as possible        
    without  exceeding the  line-length  restriction (or  column-length        
    restriction, if in multiple-column mode).                                  
 OFF:  Suppresses  the concatenation action,   which results in  a "one        
    line in,  one  line out" effect that  may exceed the length  of the        
    output line,   depending on  the lengths of  the input  lines.   If        
    justification (.JU)  is  still enabled,  extra blanks  will then be        
    added between words to extend the line to the right margin.                

 This control word  causes a break.   An omitted operand  is treated as        
 "ON".   Concatenation is "ON" at the  start of SCRIPT processing,  and        
 can only be suppressed  by the .CO or .FO control  words with an "OFF"        
 operand.   Multiple  blanks that occur  together within an  input line        
 will  all be  retained  in the  concatenated  output  line unless  the        
 concatenation  process "breaks"  the  input line  at  that point  when        
 adding words to the output line.                                              


                                                                               


                                                                               


                                                                               


                                 - 46 -                                        
                                                                               
 Waterloo SCRIPT                                       Conditional Page        


 Ŀ                                                                      
 | .CP  |                                                                      
                                                                       

 CONDITIONAL PAGE positions  output to the top of the  next page column        
 if insufficient  lines remain in the  current column (or page,   if in        
 single-column mode).                                                          

      Ŀ             
      |       |                                                  |             
      |       |    <v>                                           |             
      |  .CP  |                                                  |             
      |       |    <BEGIN|INLINE|END <0|w>>                      |             
      |       |                                                  |             
                   

 The operands of .CP are identical to those of .CC; see the description        
 of .CC for details.   The only  difference is that .CP always operates        
 on full pages  instead of columns.   If no operand  is specified,  .CP        
 will cause a break and then,  if  the output is not already positioned        
 at the  top of a page  it will position to  the top of the  next page,        
 independent of whether  single- or multiple-column mode  is in effect.        
 It should  therefore be used only  in those circumstances where  it is        
 desirable to start a new page.   In other cases,  the .CC control word        
 should be used instead.                                                       


                                                                               
 Ŀ                                                                      
 | .CS  |                                                                      
                                                                       

 CONDITIONAL SECTION  provides a  means of creating  a section  of text        
 and/or  control  words  that  will  only  be  included  during  SCRIPT        
 processing under the specified condition.                                     

      Ŀ             
      |       |                                                  |             
      |       |    <n> <ON|OFF>                                  |             
      |  .CS  |                                                  |             
      |       |    <n> <INCLUDE|IGNORE>                          |             
      |       |                                                  |             
                   


 <ON|OFF>:  ON  defines the  start of a  conditional section  that will        
    never be  processed by  SCRIPT,  and  OFF defines  the end  of that        
    block.                                                                     
 n <INCLUDE|IGNORE>:  "n" specifies the number of a conditional-section        
    block (from  1 to  99)  that is  either to  be INCLUDEd  or IGNOREd        
    during SCRIPT processing.  INCLUDE is the initial and default state        
    for all 99 block numbers.                                                  


                                                                               
                                 - 47 -                                        
                                                                               
 Conditional Section                                    Waterloo SCRIPT        


 n <ON|OFF>:  ON defines the start  of a conditional-section block that        
    will or will not be processed depending on the INCLUDE/IGNORE state        
    currently in effect for "conditional section n" blocks.                    

 This control word does  not cause a break.   For each  of the 99 block        
 numbers,  any number of conditional  sections may occur.   When SCRIPT        
 encounters the ON of an un-numbered  conditional-section block or of a        
 numbered block for which the state is  IGNORE,  it goes into a special        
 "read input  and throw it  away" mode until it  finds the OFF  of that        
 block.                                                                        

 EXAMPLES                                                                      
 (1) .cs 1 ignore                                                              
     This is a                                                                 
     .cs 1 on;Introductory User's                                              
     .cs 1 off                                                                 
     .cs 2 on;Reference                                                        
     .cs 2 off                                                                 
     Manual.                                                                   
     produces: This is a Reference Manual.                                     
 (2) .if &debug eq no .th .cs on                                               
     .ty Imbedding the CHECKER file;.im CHECKER                                
     .cs off                                                                   
     The message about  and the imbedding of CHECKER will  not occur if        
     &debug has the value "no".                                                


                                                                               
 Ŀ                                                                      
 | .CT  |                                                                      
                                                                       

 CONTINUED TEXT causes the first character  of the next text input line        
 to be placed onto the output line immediately following the last char-        
 acter already on the output line, with no intervening blank.                  

      Ŀ             
      |       |                                                  |             
      |  .CT  |    <line>                                        |             
      |       |                                                  |             
                   

 When concatenation is in effect,  each new input text record is joined        
 to previous  text with an intervening  blank.   Text that occurs  in a        
 "line" operand with  this control word will be joined  to any previous        
 text with no intervening blank.   If  no previous text exists then the        
 "line" operand  will be processed  as normal text.    If concatenation        
 (.CO)  is not in effect then there  will never be any previous text to        
 be immediately  continued.   This  can be  contrasted with  the Define        
 Character "continue" character (.DC CONT)  that  is used to continue a        
 text line with text that follows.                                             
    This control word does not cause a break.  If it is used without an        
 operand  line,  the  continuation  of text  is  disabled  even if  the        
 previous text was to be continued.                                            

                                 - 48 -                                        
                                                                               
 Waterloo SCRIPT                                         Continued Text        


 EXAMPLES                                                                      
 (1) This is an example of con                                                 
     .ct tinued text.                                                          
     produces:  This is an example of continued text.                          


                                                                               
 Ŀ                                                                      
 | .CW  |                                                                      
                                                                       

 CONTROL WORD SEPARATOR defines the character  that SCRIPT is to recog-        
 nize as  a "logical line  end" so that  multiple control words  may be        
 entered on one physical input line.                                           

      Ŀ             
      |       |                                                  |             
      |  .CW  |    <;|character>                                 |             
      |       |                                                  |             
                   

 This control word does not cause a break.  All subsequent control-word        
 input lines  are examined for the  control word separator.    If found        
 then  the physical  input line  is  logically divided  into two  input        
 lines,  the second of which starts at the first column after the sepa-        
 rator.   The control-word-separator  scanning rule is then  applied to        
 this resulting second  input line.   The initial  default control word        
 separator character is the semi-colon (;).  Any character or two-digit        
 hexadecimal value may be specified.                                           

 NOTES                                                                         
 (1) The last "logical" input line may be a text line.                         
 (2) If substitution (.SU) of Set Symbols is ON and the input line is a        
     control-word line,   the substitution scan  will terminate  at the        
     first control word separator.   The remainder  of the line will be        
     substituted when it is processed later as an input line.                  
 (3) Scanning for  the control  word separator may  be suspended  on an        
     input control line if a single quote (',  the apostrophe)  immedi-        
     ately  follows  the  control-word  indicator.    This  allows  the        
     control-word separator to be used as operand text.  It also allows        
     an entire input line to be substituted with set symbols.                  
 (4) If the  operand is omitted,  the  existence of and scanning  for a        
     control-word separator is terminated.  Therefore, multiple control        
     words will not be recognized on subsequent input lines,  nor may a        
     control word be followed by text on the same input line.                  
 (5) Disabling the separator character is the same as ".CW 00".                

 EXAMPLES                                                                      
 (1) .'bd This is text; it contains a semi-colon.                              
     produces:  This is text; it contains a semi-colon.                        
     The  control word  modifier  (')  suspends  control-word-separator        
     scanning and  allows semi-colons  to be  entered in  the operands.        
     The  same  input line  without  the  control word  modifier  would        
     produce:  This is text                                                    

                                 - 49 -                                        
                                                                               
 Control Word separator                                 Waterloo SCRIPT        


      it contains a semi-colon.                                                
 (2) .sr i = &i + 1;The value of I is "&i".                                    
     The value of "i"  is incremented by one and the  result is used in        
     the text input line that follows.                                         
 (3) .sk;.of 4;(a) This is text in a list.                                     
 (4) .cw #;.rt top /left;/center;/right;/#.cw ;#.sk;.cm                        
     This example makes the separator "#",  defines a TOP running title        
     containing semi-colons,  redefines  the separator to be  ";",  and        
     then uses it.                                                             


                                                                               
 Ŀ                                                                      
 | .DC  |                                                                      
                                                                       

 DEFINE CHARACTER defines  characters of special meaning  when found in        
 input and produced as output.                                                 

      Ŀ             
      |       |                                                  |             
      |  .DC  |    option <char ...|OFF>                         |             
      |       |                                                  |             
                   

 "Option" specifies  which special  character or  characters are  to be        
 defined.  Any operands that follow specify the values of those charac-        
 ters.   All character operands may be entered as a single character or        
 as a pair of hexadecimal digits.   In all cases an "OFF" operand disa-        
 bles the feature  and a missing operand reinstates  the default value.        
 The default  and "OFF" values for  the characters are  specified under        
 the various  character options.    The character  options that  may be        
 specified are:                                                                

 BS  (backspace):   defines a  character to be  treated as  a backspace        
    character in  input text and  control words.   The  initial default        
    value and the "OFF" value is hex 16,  the real backspace character,        
    which  is always  recognized  as a  backspace  character even  when        
    .DC BS has  been used  to define another.    The &SYSBS  Set Symbol        
    returns the current user-defined backspace character,  or hex 16 if        
    none has been defined.                                                     
 CONT  (continue):   defines a character  for continuing an  input line        
    without an intervening blank.   If an input text line ends with the        
    continue character, the following input text line is placed immedi-        
    ately following.   A control word that causes a break will clear an        
    outstanding continue character and the character will not appear in        
    the output.   The  initial and "OFF" value for continue  is a blank        
    (hex 40).   The  Set Symbol &SYSCONT  returns the  current continue        
    character.                                                                 
 CW   (control  word  separator):  defines  a  character  for  entering        
    multiple control words on one input  line.   Text lines (lines that        
    do not begin with a control  word indicator)  are never affected by        
    this character.   The initial control word separator character is a        
    semicolon (;).  The "OFF" value is a hex 00.  The Set Symbol &SYSCW        

                                 - 50 -                                        
                                                                               
 Waterloo SCRIPT                                       Define Character        


    returns the current control word separator character.                      
 GML  (Generalized Markup Language tag  indicator):  the character that        
    precedes a GML Tag.  The initial and "OFF" value for GML is a blank        
    (hex 40).   The default character, if none is specified, is a colon        
    (:).  The &SYSGML Set Symbol returns the current GML character.            
 HYPH  (hyphenation character):  defines the  character to be placed at        
    the end  of words hyphenated by  SCRIPT.   The default  and initial        
    Hyphenation Character is a minus (-, hex 60).  The "OFF" value is a        
    blank.                                                                     
 HYTR  (Hyphenation Translate):   defines character  pairs ("from"  and        
    "to") to be used when a word is processed for hyphenation.  Leading        
    characters may be ignored by translating  them to single quotes and        
    embedded characters can be treated as  valid break points by trans-        
    lating them to a hyphen.  The default translation is none.                 
 IXB  (Index  Blank):  define characters that  are to be treated  as if        
    they were blanks when sorting Index Headers.   The table of IXB and        
    IXI characters is  reset when no characters are  specified or "OFF"        
    is used.  There are no initial IXB characters.  See .DC IXI also.          
 IXI  (Index  Ignore):  define characters that  are to be  ignored when        
    sorting Index Headers.   There are no initial IXI characters.   See        
    .DC IXB also.                                                              
 IXJ  (IndeX  reference Join  character):  defines  the character  that        
    will be used  to join index references on  consecutive pages.   The        
    default and initial index reference  join character is a hyphen(-).        
    The "OFF"  value is a blank.    The &SYSIXJ Set Symbol  returns the        
    index reference join character.                                            
 LB  (leading blank character):  defines  how a leading blank character        
    on  an input  text record  is to  be processed.    The initial  and        
    default action is  to process leading blanks as  Required Blanks or        
    En Spaces in the current font.  Any printable character may also be        
    selected.   The "OFF"  value will treat these  characters as blanks        
    with width equal to the Characters Per Inch (CPI) option.                  
 LI  (control word  indicator):  defines the character  that identifies        
    special control  records when it  occurs at  the start of  an input        
    line.   If the character occurs once then it may be a macro invoca-        
    tion or a native control word.   If the character occurs twice in a        
    row then  it may only  be a  control word indicator.    The initial        
    control word  indicator is  a period  (.).   The  "OFF" value  is a        
    blank.   The  &SYSLI Set  Symbol returns  the current  control word        
    indicator.                                                                 
 LINB  (Nobreak  control word indicator):   defines the  character that        
    identifies an input line as a control word but suppresses the break        
    action of  that control word.    The initial  and "OFF" value  is a        
    blank.  The &SYSLINB Set Symbol returns the current nobreak control        
    word indicator.                                                            
 MCS  (GML Markup/Content Separator):  the  character that terminates a        
    GML Tag and its attributes.   The initial and default character, if        
    none is specified,  is a period (.).   The "OFF" value for MCS is a        
    blank (hex 40).    The &SYSMCS Set  Symbol returns the  current MCS        
    character.                                                                 
 PIX  (Primary IndeX reference entry indicator):  defines the character        
    that,  when  used as the first  or only character in  an "alternate        
    reference entry" with the .IX control word, causes that index entry        
    to appear at the beginning of the list of reference entries.   This        

                                 - 51 -                                        
                                                                               
 Define Character                                       Waterloo SCRIPT        


    character does not get added to  the reference entry.   The default        
    and initial primary index character is an asterisk (*).   The "OFF"        
    value is  a blank.    The &SYSPIX  Set Symbol  returns the  current        
    primary index character.                                                   
 PS  (Page  Symbol):  defines the character  that is to be  replaced by        
    the current  page number in title  control words.   It may  also be        
    used  in Set  Symbol assignments.    The default  and initial  page        
    symbol character is the percent (%).    The "OFF" value is a blank.        
    The &SYSPS Set Symbol returns the current page symbol character.           
 PUNC  (Spell Punctuation):   define characters that are  to be consid-        
    ered as part of a word if they  occur in the middle of a word,  but        
    are to be ignored  if they occur at the end.    The initial default        
    PUNC character is the single quote.  See .DC WORD also.                    
 RB  (Required Blank):  defines a character that  is to be treated as a        
    required blank (will appear as a blank  on output,  but will not be        
    recognized as an interword blank).  This is useful for keeping text        
    together on one line.  The initial and default value for a required        
    blank is  hex 00.   The "OFF"  value is  a blank.   The  &SYSRB Set        
    Symbol returns the current required blank character.                       
 STOP  (full-stop punctuation):  defines the characters that are recog-        
    nized as "full stops"  when they occur at the end  of an input text        
    line.  Two intervening blanks will be placed after such characters,        
    before the next word on the  output line.   The initial and default        
    list of stop characters are the period (.), question (?),  exclama-        
    tion (!)   and colon (:).   When  SCRIPT is invoked with  the PHOTO        
    option, "OFF" is default.                                                  
 SUB (SUBscript  characters):  defines  the characters  that are  to be        
    used for  the Subscript  Function (&s').    Character operands  are        
    specified in  pairs,  with  the first  specifying the  normal input        
    character  and the  second specifying  the output  character to  be        
    generated when  the input character is  used in the operand  of the        
    Subscript Function.   The initial  and default Subscript characters        
    are  defined in  the  ALA print  character  assignments.   See  the        
    Appendix on "Print  Trains" for those character  assignments.   The        
    "OFF" operand translates all Subscript Function characters to them-        
    selves.                                                                    
 SUP  (SUPerscript characters):   defines character  pairs ("from"  and        
    "to") to be used with the Superscript Function (&S').   The default        
    character assignments are those of the TN character assignments.           
 TB  (TaB  character):  defines a character  that will be treated  as a        
    tab character in input text and control words.  The initial default        
    value and the "OFF" value is hex 05, the real tab character,  which        
    is always recognized  as a tab character even when  .DC TB has been        
    used to define another.   The &SYSTB Set Symbol returns the current        
    user-defined tab character, or hex 05 if none has been defined.            
 TI  (Translate on Input):  defines an escape character that causes the        
    character immediately  following it to  be translated  according to        
    the .TI translate table currently  in effect.   The initial default        
    value  and the  "OFF" value  is a  blank.   The  &SYSTI Set  Symbol        
    returns the current escape character.                                      
 WORD   (Spell Word  Delimiters):   define  characters that  are  never        
    considered as part of a word.  By default, only the alphabetics are        
    valid  characters and  everything else  will terminate  a word  for        
    purposes of Spelling Verification.  The single quote (see .DC PUNC)        

                                 - 52 -                                        
                                                                               
 Waterloo SCRIPT                                       Define Character        


    is valid within a word.   Any given character may be either a Spell        
    Punctuation character or a Spell Word Delimiter character,  but not        
    both at the same time.                                                     
 XTEXT  (Transparent Text):   defines the character that  delimits text        
    that is transparent for purposes of  justifying lines when it imme-        
    diately follows the escape character.    Such transparent text will        
    follow <escape><xtext> and is terminated on the right by an <xtext>        
    character  or the  end of  the input  line.   Any  text except  the        
    <xtext> character itself,  including  other escapes and backspaces,        
    may appear between the delimiters.    The initial default value and        
    the "OFF" value is a blank.    The &SYSXTEXT Set Symbol returns the        
    current transparent text character.                                        

 This control word does not cause a break in any of its forms.                 

 EXAMPLES                                                                      
 (1) .dc BS   <      ;.* User Backspace Character                              
     .dc CONT +      ;.* Input Continue Character                              
     .dc RB @        ;.* User Required Blank Character                         
     .ce 1                                                                     
     Centre this cont+                                                         
     inued text line                                                           
     H<_ilighted text<<<<____                                                  
     .br                                                                       
     Special terms in "@your@text@" may require                                
     special S@P@A@C@I@N@G and must always be                                  
     kept@together@on@a@single@output@line.                                    
     produces:                                                                 
                      Centre this continued text line                          
     Hilighted text                                                            
     Special terms  in " your text " may require  special S P A C I N G        
     and must always be kept together on a single output line.                 


                                                                               
 Ŀ                                                                      
 | .DF  |                                                                      
                                                                       

 DEFINE FONT  defines a user  font name to  represent a set  of logical        
 font identifiers.   For output devices that  support a range of point-        
 sizes, the pointsize may also be specified.                                   

      Ŀ             
      |       |                                                  |             
      |  .DF  |    FONT fontname fontid <s1> <...>               |             
      |       |                                                  |             
                   

 This control word does  not cause a break.   It defines  a "font name"        
 that will  represent a set  of up to  four font identifiers  and their        
 pointsizes to  be called on  later.   A fontname  may be up  to twelve        
 arbitrary characters in length and is  treated as if entered in upper-        
 case.                                                                         

                                 - 53 -                                        
                                                                               
 Define Font                                            Waterloo SCRIPT        


    The logical font identifiers and  their optional pointsizes follow.        
 The first is a Roman or Normal font,  used by a normal character in an        
 input text  record.   The second is  an Italic font,  used  whenever a        
 character is underscored.   The underscoring  might exist in the orig-        
 inal input or be the result of  an Underscore (.US)  or Underscore and        
 Capitalize (.UC) control word.   The third is a Bold font,  used when-        
 ever an input character is overstruck  with itself.   This can be done        
 with the Bold (.BD)  control word.    The fourth automatic font is the        
 Bold Italic font.   A Bold Italic character  is one that is both over-        
 struck with itself  and underscored,  as happens with  the Bold Italic        
 (.BI) control word.                                                           
    The fontnames that  correspond to the automatic  font selection for        
 an input  character are  assigned by Define  Font.   The  first Define        
 Fontname becomes the default set of fonts to be used by SCRIPT if none        
 other has been specified by Begin Font (.BF).                                 
    The  construction of  the  logical font  definitions  with .PH  and        
 linking them to a Font Definition can  be tedious and error prone to a        
 user who knows  less than everything about a  particular output device        
 and its fonts.                                                                

 SYSAPS:  To  greatly simplify the  definition of a  set of up  to four        
    logical fonts in a Fontname,  a sample interface driver file called        
    SYSAPS is  provided for  an Autologic Micro  5 typesetter.    In it        
    simplest form,  you must imbed SYSAPS  with a type-style operand of        
    four letters.  For example,                                                
      .im SYSAPS FONT standard time                                            
    brings in one logical font, "Times-Roman".   The Fontname is "stan-        
    dard".   The  pointsize is  set to the  default PSIZE  option.   To        
    define the same font with a pointsize of 8 you would specify,              
      .im SYSAPS FONT standard time 8                                          
    If your  document requires more  than one type-style,   the Italic,        
    Bold and Bold-Italic font identifiers would follow the Roman speci-        
    fication.  For example,                                                    
      .im SYSAPS FONT standard time 8 time 8 time 8 time 8                     
    would define a user fontname  of "standard" containing four Logical        
    Fonts:  the first for ROMAN, ITALIC, BOLD and lastly BOLD-ITALIC.          
       The normal  order can be altered  by specifying a  qualifier for        
    the font name, as in:                                                      
      .im SYSAPS FONT heading times-bold-italic 12                             
    When the "heading" fontname is used in Begin Font, all text whether        
    underscored or not  will appear in TIMES-BOLD-ITALIC  with a point-        
    size of 12.  Finally a wide variety of fonts can be accommodated in        
    a single Font Identifier as in:                                            
      .im SYSAPS FONT fred gene-bold 8 cour-ital 8 bask-bold-ital 8            
    to display normal  text in GENEVA-BOLD,  underscored  text in mono-        
    space    COURIER-ITALIC,    bold    and    bold-italic   text    in        
    BASKERVILLE-BOLD-ITALIC.                                                   

 NOTES                                                                         
 (1) This control word is treated as  a comment for output devices that        
     do not support fonts.                                                     


                                                                               

                                 - 54 -                                        
                                                                               
 Waterloo SCRIPT                                            Define Font        


      Ŀ             
      |       |                                                  |             
      |  .DF  |    fontname <FONT fontid>  </ ...>               |             
      |       |             <CODEPAGE cp-id>                     |             
      |       |             <US|NOUS>                            |             
      |       |             <OS RTP n|OS CHAR c>                 |             
      |       |             <v|+v|-v>                            |             
      |       |                                                  |             
                   

 This is an alternate implementation for the ".DF" control word that is        
 supported by the IP300, I3820,  POSTScript,  QMSLaser and X2700 output        
 devices.                                                                      
    This control word does not cause a break.  It defines a "font name"        
 that will  represent a set  of up to  four font identifiers  and their        
 pointsizes.                                                                   
 fontname:  A  fontname may  be up  to twelve  arbitrary characters  in        
    length and is treated  as if entered in uppercase.   It  is by this        
    name that use of this Defined Font  is started using the Begin Font        
    (.BF) control word.   The first fontname defined is immediately put        
    into effect and cannot be removed.                                         
 FONT fontid:  This parameter specifies the name of the font identifier        
    to be  used.   The  "fontid" must  be defined  with the  ".PH FONT"        
    control word.   This operand may be  omitted and if so the "fontid"        
    of the currently active font will  be retained when this "fontname"        
    is started with the Begin Font control word.                               
 CODEPAGE cp-id:  A Codepage is a  table which maps input characters to        
    characters in  a physical  font.   A Codepage  is defined  with the        
    ".PH CODEPAGE" control word.  If omitted, then the Codepage associ-        
    ated with the fontid  will be used,  and if that  was not specified        
    then the first defined "cp-id" is used.                                    
 <US|NOUS>:   Specifies that  characters  in this  fontname  are to  be        
    underscored when printed.   If the  output device cannot underscore        
    text, this option is ignored.                                              
 <OS RPT n|OS CHAR c>:  OS RPT  specifies how many times each character        
    is to be overstruck.   If the device supports offsetting of charac-        
    ters,  it specifies  the number of printer device  units each char-        
    acter is to  be offset.   A value  of zero indicates that  no over-        
    striking is to occur.                                                      
       OS CHAR specifies that each character is to be overstruck with a        
    particular printable character.                                            
 <v|+v|-v>:  A valid size specifies the  pointsize of the character set        
    to use.   A signed  operand will make a relative change  in size to        
    the pointsize currently in effect.                                         
 /:  The slash  character separates up to four  font definitions.   The        
    first is used for normal text,  the  second for Italic text that is        
    underscored (.US) on input.   The third is for bold (.BD)  text and        
    the last for bold-italic (.BI) text.                                       

    Resolution of the  fonts to use is postponed until  the fontname is        
 begun with the Begin Font (.BF) control word.                                 


                                                                               

                                 - 55 -                                        
                                                                               
 Define Font                                            Waterloo SCRIPT        


 EXAMPLES                                                                      
 (1) This will  define a user font  named "TEXT".   The normal  text is        
     printed from a  font identifier "ROMAN" that has  a "STD" codepage        
     to map the input characters and the  italic text is printed from a        
     font identifier "ITAL" with a "ASC" codepage to map the input.            
       .DF text FONT roman 10 CODEPAGE std / FONT ital 10 CODEPAGE asc         


                                                                               
 Ŀ                                                                      
 | .DH  |                                                                      
                                                                       

 DEFINE HEADING defines  the "text" and "table  of contents" formatting        
 conditions for all  the heading levels generated with  the .Hn control        
 words.                                                                        

      Ŀ             
      |       |                                                  |             
      |       |    <SET m> n <<BR|NBR> <CENTRE>  <FONT fontname> |             
      |       |               <PA|NPA> <LEFT>    <NOHANG|HANG h> |             
      |       |               <TC|NTC> <INSIDE>  <SKBF v>        |             
      |  .DH  |               <TO|NTO> <OUTSIDE> <SPAF v>        |             
      |       |               <TS|NTS> <RIGHT>   <SPBF v>        |             
      |       |               <UP|NUP>           <TCIN h>        |             
      |       |               <US|NUS>           <TCOF h>        |             
      |       |               <AUTOHY|NOHY>      <TFONT fontname>>             
      |       |                                                  |             
                   


 <SET m>:   specifies to which of  the ten (0 to  9)  table-of-contents        
    workareas this definition applies.   If omitted,  it applies to the        
    one currently being used (0, at the start of SCRIPT processing).           
 n <options>:  specifies to  which of the ten (0 to  9)  heading levels        
    this definition applies.  See the Head Level control word (.HL) for        
    the initial setting of the options.                                        
 AUTOHY|NOHY:  controls hyphenation of the  heading text.   AUTOHY does        
    not alter the active level of hyphenation (ON, USER or OFF).   NOHY        
    will  suppress  automatic  hyphenation for  the  heading  text  and        
    restore the setting after.                                                 
 BR|NBR:  specifies whether  to cause a break after the  heading in the        
    text.                                                                      
 CEnter (or CEntre):  the heading text will be centered (.FO CENTER).          
 FONT  fontname:   specifies  the  name  of a  font  to  be  used  when        
    displaying the heading  text in the body of the  document.   If the        
    'fontname' is omitted or OFF is specified,  then the current active        
    font will be used.                                                         
 HANG h|NOHANG:  specifies the amount of offset to be used when heading        
    text requires  more than a  single output  line to format.    If an        
    offset (.OF) is in effect then this will be ignored.  NOHANG aligns        
    the heading text with the current left margin.                             


                                                                               
                                 - 56 -                                        
                                                                               
 Waterloo SCRIPT                                         Define Heading        


 INside:   the heading  text will  be justified  to the  right on  odd-        
    numbered pages and to the left on even-numbered pages.                     
 LEFT:  the heading text will be justified on the left (.FO LEFT).             
 OUTside:   the heading  text will  be justified  to the  left on  odd-        
    numbered pages and to the right on even-numbered pages.                    
 PA|NPA:  specifies whether to do a page eject before the heading.             
 RIGHT:  the heading text will be justified on the right (.FO RIGHT).          
 SKBF v:  the amount of unconditional space (.SK)  to be skipped before        
    the head level text.                                                       
 SPAF v:  the amount of conditional space  (.SP C)  to be printed after        
    the head level text.                                                       
 SPBF v:  the amount of unconditional space (.SP)  to be printed before        
    the head level text.                                                       
 TC|NTC:  specifies  whether to  include the  heading in  the table  of        
    contents.                                                                  
 TCIN h:  the indent value for the heading in the table of contents.           
 TCOF h:  the offset value for the heading in the table of contents.           
 TFONT  fontname:   specifies the  name  of  a  font  to be  used  when        
    displaying the  heading text  in the  table of  contents.   If  the        
    'fontname' is omitted or OFF is specified,  then the font in effect        
    when the table of contents is printed will be used.                        
 TO|NTO:  specifies whether  to include this heading ONLY  in the table        
    of contents.   If TO is specified,  the heading will not be printed        
    in the text.                                                               
 TS|NTS:   specifies whether  to  output a  "single  space" before  the        
    heading in the table of contents.                                          
 UP|NUP:  specifies whether to convert the  heading to uppercase in the        
    text.   (Headings included  in the table of  contents always appear        
    "as entered".)                                                             
 US|NUS:  specifies whether to underscore the head level text.                 

 This control word does not cause a break.   See the example given with        
 the .TC control word.                                                         


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                 - 57 -                                        
                                                                               
 Define Macro                                           Waterloo SCRIPT        


 Ŀ                                                                      
 | .DM  |                                                                      
                                                                       

 DEFINE  MACRO defines  a  sequence of  input lines  to  be invoked  by        
 ".name" as  a user-defined control word  or as an Execute  Macro (.EM)        
 operand.                                                                      

      Ŀ             
      |       |                                                  |             
      |       |    name /line1/.../linen</>                      |             
      |  .DM  |    name <BEGIN|END>                              |             
      |       |    name DELETE                                   |             
      |       |                                                  |             
                   

 Such user macros may be used for common sequences of control words and        
 text.   Keyword and positional parameters (&*, &*0, &*1, etc.)  may be        
 checked and substituted when the macro is invoked.                            

 name:  The user  macro is known by  "name",  a one to  eight character        
    identifier.                                                                
 name /line 1/line 2/.../line n/:  The  "macro body" of "name" consists        
    of the input lines that are  separated by a self-defining character        
    shown in the command prototype as "/".                                     
 name <BEGIN|END>:  Longer user macros  are defined with a "name BEGIN"        
    at the start and "name END" to terminate.   The ".DM name END" must        
    start in column one of the input line.                                     
 name DELETE:  A user macro may  be deleted by specifying "name DELETE"        
    as an operand; "name OFF" is an alternate way to delete a macro.           

 This control word does not cause a break.                                     

 NOTES                                                                         
 (1) The invoking of  defined user macros by ".name"  can be suppressed        
     with the ".MS"  (Macro Substitution)  control word.    Invoking by        
     ".EM .name" cannot be suppressed.                                         
 (2) The ".DM name END" operands  are verified for a  macro "name" that        
     matches the ".DM name BEGIN".   ".DM" starting  in column one with        
     no operands will also successfully terminate a macro definition.          
 (3) The user-defined  macro may  be invoked  with a  variable list  of        
     keyword and positional operands                                           
       .name operand1 operand2                                                 
     that will assign to the local Set Symbols &*1, &*2, ..., the value        
     of corresponding operands in the macro call.   Each operand may be        
     a character string,  a delimited  character string,  or a numeric.        
     Numeric operands  that do not consist  entirely of digits  will be        
     treated as a character string.                                            
       .name key1=value key2=value                                             
     Operands  that consist  of  a valid  Set  Symbol name  immediately        
     followed by an  equal sign will assign  the value on the  right of        
     the equal  sign to  the specified Set  Symbol before  invoking the        
     macro.   If the Set Symbol begins with an asterisk the symbol will        
     be local to the invoked macro.                                            

                                 - 58 -                                        
                                                                               
 Waterloo SCRIPT                                                     DO        


 Ŀ                                                                      
 | .DO  |                                                                      
                                                                       

 DO may be used following a Then or Else control word to allow multiple        
 input lines to be conditionally processed.                                    

      Ŀ             
      |       |                                                  |             
      |  .DO  |    <BEGIN|END>                                   |             
      |       |                                                  |             
                   

 This control word may  only be used as the object of  a Then (.TH)  or        
 Else (.EL)  control word.   The input control word and text lines from        
 the  .DO to  the next  corresponding  ".DO END" control  word are  all        
 treated as the object of the Then or Else and are processed or ignored        
 depending on the truth value of the preceding .IF control word.               
    Further Ifs within a Do group are  valid,  as are Imbeds (.IM)  and        
 Execute Macros  (.EM).   This  control word  does not  cause a  break,        
 although control words within the Do group may create a break.   If no        
 operand is specified then BEGIN is assumed.                                   

 EXAMPLES                                                                      
 (1) To define one of two Top Titles depending on the value of "&copy":        
       .if '&copy' = 'F'                                                       
       .th .do begin                                                           
       .   .rt top //FINAL COPY//                                              
       .do end                                                                 
       .el .do begin                                                           
       .   .rt top //DRAFT COPY//                                              
       .do end                                                                 


                                                                               
 Ŀ                                                                      
 | .DS  |                                                                      
                                                                       

 DOUBLE SPACE causes  all output lines in  the text area to  be double-        
 spaced.                                                                       

      Ŀ             
      |       |                                                  |             
      |  .DS  |                                                  |             
      |       |                                                  |             
                   

 This control word causes a break.   SCRIPT achieves the double-spacing        
 effect by creating  a "conditional skip" (.SK 1 C)   after each output        
 line.   The  .DS control word  is merely a  special case of  .LS (Line        
 Spacing); for details, refer to the .LS description.                          


                                                                               
                                 - 59 -                                        
                                                                               
 Dictionary Update                                      Waterloo SCRIPT        


 Ŀ                                                                      
 | .DU  |                                                                      
                                                                       

 DICTIONARY UPDATE defines correctly spelled words in a user's spelling        
 dictionary.                                                                   

      Ŀ             
      |       |                                                  |             
      |       |    ADD word word ...                             |             
      |  .DU  |                                                  |             
      |       |    DEL word word ...                             |             
      |       |                                                  |             
                   

 When the SPELLCHK  option has been specified,  input  text is verified        
 against  words found  in a  "dictionary" of  correctly spelled  words.        
 Since this dictionary  does not contain all words  from every special-        
 ized discipline, the Dictionary Update control word allows the correct        
 spelling of more words to be defined.  The words specified are treated        
 as  root words  and  are eligible  for prefix  and  suffix removal  as        
 described under Spelling Verification (.SV).                                  
    The case,   upper and lower,  of  operand words is honoured  in the        
 process of spelling verification.   If an  operand word is entered all        
 in uppercase then it will only match  an input word entirely in upper-        
 case.   If the operand is entered  with an initial capital letter,  it        
 will match  an input  word entirely  in uppercase  or with  an initial        
 capital,  but will  not match the word entered with  a lowercase first        
 letter.   An operand word entered in  lowercase will match any form of        
 that word in the input.                                                       

 ADD word  word ...:  The  ADD function  of Dictionary Update  adds the        
    specified word or words to the user dictionary of correctly spelled        
    words.    If the  word  has already  been  defined,   no action  is        
    performed.                                                                 
 DEL word word ...:  The DELETE  function removes the specified word or        
    words from the  dictionary of correctly spelled words.    If such a        
    word does not exist in the user dictionary, no action is performed.        

    This control word does not cause a break.   It will be treated as a        
 comment if the SPELLCHK option has  not been specified.   In addition,        
 Spelling Verification is only performed on  the last pass of the input        
 so Dictionary Update  is always treated as a comment  for input passes        
 other than the last.                                                          

 EXAMPLES                                                                      
 (1) .DU ADD ascii EBCDIC                                                      
     "ASCII",   "Ascii",  "ascii"  and "EBCDIC"  will  be verified  but        
     "Ebcdic" and "ebcdic" will fail.                                          
 (2) .DU ADD Pennsylvania                                                      
     the word  specified will be valid  only if entered with  a capital        
     first letter.                                                             


                                                                               
                                 - 60 -                                        
                                                                               
 Waterloo SCRIPT                                   Execute Control word        


 Ŀ                                                                      
 | .EC  |                                                                      
                                                                       

 EXECUTE CONTROL WORD treats the operand  line as a native control word        
 even if a macro is defined with the same name.                                

      Ŀ             
      |       |                                                  |             
      |  .EC  |    .xx <operands>                                |             
      |       |                                                  |             
                   

 This control word does not cause a break; however, the control word in        
 its operand field  may.   The first operand must start  with a control        
 word indicator character, normally period ".".  Two control word indi-        
 cator characters in a row before a control word provide the same func-        
 tion of disabling macro calls.                                                

 EXAMPLES                                                                      
 (1) A macro  to ensure there  are always  at least three  usable lines        
     remaining in the text area after  a SKIP.   The ".ec .SK &*" could        
     have been coded as "..SK &*" instead.                                     
       .dm SK begin                                                            
       .ec .SK &*                                                              
       .cc 3                                                                   
       .dm SK end                                                              


                                                                               
 Ŀ                                                                      
 | .EF  |                                                                      
                                                                       

 END  FILE causes  immediate termination  of the  file currently  being        
 processed and resumption of the higher-level file (if any) or termina-        
 tion of processing (if none).                                                 

      Ŀ             
      |       |                                                  |             
      |       |    <YES|NO|CLOSE|NOCLOSE>                        |             
      |  .EF  |                                                  |             
      |       |    <SET <CLOSE|NOCLOSE>>                         |             
      |       |                                                  |             
                   

 The "file  currently being processed" can  be an imbedded  or appended        
 file or a Macro or Remote.                                                    

 <YES|NO|CLOSE|NOCLOSE>:  If used without an  operand,  YES is assumed,        
    and processing of the current file is terminated.   If NO is speci-        
    fied, no action is taken.   CLOSE terminates processing of the file        
    so that if it is imbedded or  appended again,  it will be processed        
    from the  beginning.   NOCLOSE suspends  processing of the  file so        

                                 - 61 -                                        
                                                                               
 End File                                               Waterloo SCRIPT        


    that if  it is imbedded or  appended again,  processing  will begin        
    immediately following the last ".EF NOCLOSE".                              
 SET <CLOSE|NOCLOSE>:   defines CLOSE  or NOCLOSE as  the action  to be        
    performed when this control  word is used with no operand  or a YES        
    operand.   If NOCLOSE  has been "set",  then a  ".EF" and ".EF YES"        
    will   behave   as   ".EF NOCLOSE".      The   initial   value   is        
    ".EF SET CLOSE".                                                           

 This control word does not cause a break.  If .EF is used to terminate        
 the highest-level input file,  SCRIPT advances  to the top of the next        
 page  and prints  any stacked  footnotes or  "in-storage" text  blocks        
 before termination of all processing.                                         

 NOTES                                                                         
 (1) See Macro Exit (.ME), which performs a similar function.                  


                                                                               
 Ŀ                                                                      
 | .EL  |                                                                      
                                                                       

 ELSE causes conditional processing of an input line,  depending on the        
 truth value of a previous IF control word.                                    

      Ŀ             
      |       |                                                  |             
      |  .EL  |    line                                          |             
      |       |                                                  |             
                   

 This control word  does not cause a break.    However,  a control-word        
 "line" operand may.    This control word may be  used only immediately        
 following a .IF,  a  .TH or a .TH .DO group.    The "line" that begins        
 with  the first  non-blank character  after  the .EL  control word  is        
 processed only if the preceding .IF was "false".  The line may include        
 any control word except another THEN  (.TH)  or ELSE (.EL).   The line        
 may be  another .IF and  these may be nested  up to ten  levels.   The        
 object may be an Imbed (.IM) or Macro Call,  in which case the current        
 IF status and its nesting level will  be saved and later restored when        
 the current file nest level is resumed.   When using a nested IF,  the        
 Else is always matched to the innermost unpaired Then.  It may thus be        
 necessary to enter an Else with no  object line to define the required        
 branching structure.   If "line" is omitted then the object of the .EL        
 has no effect.                                                                

 EXAMPLES                                                                      
 (1) This sequence  will format a sentence  describing the kind  of day        
     that is to be hoped for:                                                  
       Have a                                                                  
       .if &value le 0                                                         
       .   .th great                                                           
       .   .el .if &value eq 1                                                 
       .       .th good                                                        

                                 - 62 -                                        
                                                                               
 Waterloo SCRIPT                                                   ELse        


       .       .el .if &value eq 2                                             
       .           .th bad                                                     
       .           .el .if &value eq 3                                         
       .               .th terrible                                            
       .               .el *!?                                                 
       day.                                                                    
 (2) This  sequence will  set page  titles  depending on  the value  of        
     &type:                                                                    
       .if &type = FINAL                                                       
       .   .th .do                                                             
       .       .rt top //Final Copy//                                          
       .       .rt bottom //-%-//                                              
       .   .do end                                                             
       .   .el .do                                                             
       .       .rt top //Draft Copy//                                          
       .       .rt bottom //-%-/Please Return/                                 
       .   .do end                                                             


                                                                               
 Ŀ                                                                      
 | .EM  |                                                                      
                                                                       

 EMPTY PAGE,  EXECUTE MACRO:   EMPTY PAGE controls suppression of empty        
 pages (pages  that contain nothing in  the text area);   EXECUTE MACRO        
 treats the operand line as a  macro,  even if Macro Substitution (.MS)        
 is OFF.                                                                       

      Ŀ             
      |       |                                                  |             
      |  .EM  |    <YES|NO|OFFNO>                                |             
      |       |                                                  |             
      |||             
      |       |                                                  |             
      |  .EM  |    .macro <args>                                 |             
      |       |                                                  |             
                   

 Neither form of this control word causes a break.                             

 .EM <YES|NO|OFFNO>:  The  situation can often arise in  which an empty        
    page  is created  (a  page that  contains  only  top and/or  bottom        
    running titles).    By default,   SCRIPT does  output these  pages.        
    Specifying .EM YES allows  SCRIPT to print them,   .EM NO specifies        
    that they are not to be printed,  and .EM OFFNO specifies that they        
    are not to be printed and that the  page number is not to be incre-        
    mented.   ".EM YES"  is the  initial value.    Empty pages  will be        
    printed unless ".em no" is encountered.   If the operand is omitted        
    then "YES" is assumed.                                                     
 .EM .macro <parameters>:  If the operands are missing it is treated as        
    EMPTY PAGE (See above).   If the first operand of the ".EM" control        
    word begins with a control word indicator,  then that first operand        
    is  treated as  a  Macro or  Remote  name.    Optional keyword  and        

                                 - 63 -                                        
                                                                               
 Empty Page, Execute Macro                              Waterloo SCRIPT        


    positional parameters  may follow the  macro name.   The  local set        
    symbol &*0  is set to the  count of positional parameters  and &*1,        
    &*2, etc. contain their values.   The symbol &* contains the entire        
    parameter list.   Keyword parameters are accessed as set symbols by        
    the keyword name.                                                          

 EXAMPLES                                                                      
 (1) .EM .TEST parm1 KW1=parm2                                                 
     A macro named  TEST is invoked;  &*0 is  set to 1,  &*1  is set to        
     "parm1",   &KW1   is  set   to  "parm2",    and  &*   is  set   to        
     "parm1 KW1=parm2".                                                        
 (2) .EM .SK 1                                                                 
     A macro named "SK" is invoked.    A native control word will never        
     be assumed.   If the specified macro has not already been defined,        
     an error will result.                                                     


                                                                               
 Ŀ                                                                      
 | .EQ  |                                                                      
                                                                       

 EQUATION marks  the input that  is to  be processed as  a mathematical        
 formula.                                                                      

      Ŀ             
      |       |                                                  |             
      |       |    <ON|OFF>                                      |             
      |  .EQ  |    <line>                                        |             
      |       |    <SET options>                                 |             
      |       |                                                  |             
                   

 This control word does not cause a break.                                     

 ON:  All input lines which follow are treated as formula input.   This        
    mode of input can only be terminated with ".EQ OFF".                       
 OFF:  This  will terminate formula mode  for input.   If  this control        
    word is encountered  when a formula is  not in effect,  it  will be        
    diagnosed as an error.                                                     
 line:  If the  operand of this control  word is not the  token "ON" or        
    "OFF" or  "SET" then the  text "line" of  the control word  will be        
    treated as a formula.                                                      
 SET options:  This is used  to initialize device dependent information        
    for  the formula  processor.    All the  options  of ".EQ SET"  are        
    described   in  the   document   "Waterloo   SCRIPT  with   Formula        
    Processing".                                                               

 NOTES                                                                         
 (1) The Formula Processor  is only supported for  some output devices.        
     If an unsupported output device such as a line printer or terminal        
     is selected then the input will be processed as normal text.              


                                                                               
                                 - 64 -                                        
                                                                               
 Waterloo SCRIPT                                               Equation        


 (2) Since this control word does not cause a break, an equation may be        
     generated "inline" with the formatted text or as a "display" equa-        
     tion on a line by itself.                                                 
 (3) If Format is disabled (.FO OFF) or Centre (.CE),  Left Align (.LA)        
     or Right Adjust (.RI)  is in effect then the formula will print on        
     the next output line.                                                     


                                                                               
 Ŀ                                                                      
 | .ER  |                                                                      
                                                                       

 ERROR sets a  program return code for SCRIPT and/or  displays an error        
 message.                                                                      

      Ŀ             
      |       |                                                  |             
      |  .ER  |    <n|*>  <line>                                 |             
      |       |                                                  |             
                   


 <n|*>:  The  optional first operand  of ERROR may  be used to  set the        
    return code  passed back to  the caller  of SCRIPT.   If  the first        
    operand is a numeric expression then  the maximum of that value and        
    the current return code is set.  If the first operand is omitted or        
    '*' then no return code is set.                                            
 <line>:  the  error message  to be  displayed;  if  omitted,  none  is        
    displayed.                                                                 

 This control word does not cause a break.   Zero is the default return        
 code value if none is specified.   An error return code of higher than        
 eight is  considered to  be a  Terminal Error  and will  terminate all        
 input and output processing.   The  system variable symbol &SYSRETCODE        
 is provided to examine the current return code.                               

 EXAMPLES                                                                      
 (1) .er 4 This is a comment about an error.                                   
     sets the program return code to 4 and displays a warning message.         
 (2) .er 8                                                                     
     sets  the  return  code  to  8  and  continues  execution  if  the        
     'CONTINUE' option has been specified.  If the default 'NOCONTINUE'        
     is in effect SCRIPT will terminate.                                       
 (3) .er 16                                                                    
     sets the return code to 16  and displays a message of "TERMINATED"        
     before SCRIPT ends.                                                       
 (4) .er * HI!                                                                 
     leaves the return code unchanged and displays a "HI!" message.            


                                                                               


                                                                               
                                 - 65 -                                        
                                                                               
 Floating Block                                         Waterloo SCRIPT        


 Ŀ                                                                      
 | .FB  |                                                                      
                                                                       

 FLOATING BLOCK allows the user to create an "in-storage" block of text        
 that will not be printed until the user chooses to print it.                  

      Ŀ             
      |       |                                                  |             
      |       |    <BEGIN|END <0|w>>                             |             
      |  .FB  |                                                  |             
      |       |    <DUMP <n>>                                    |             
      |       |                                                  |             
                   


 <BEGIN|END <0|w>>:  When the ".FB BEGIN"  control word is encountered,        
    the values  of all relevant print  control variables are  saved and        
    SCRIPT prepares to accept Floating Block text.   When the ".FB END"        
    control word is encountered,  a break is caused for text within the        
    block  and the  former  values are  restored.    An additional  "w"        
    vertical units may  be used to logically alter the  number of lines        
    in the text block.   If not specified,  the default is zero.   More        
    than one Floating Block may be created before being output.                
 <DUMP <n>>:  causes the first "n" Floating  Blocks to be output to the        
    text area.   If  "n" is not specified,  then  all existing Floating        
    Blocks are output.                                                         

 This control  word causes a  break only  with the "DUMP"  operand.   A        
 first operand must be provided as none will be assumed.                       

 NOTES                                                                         
 (1) See the  discussion under  the .CC  control word  for the  list of        
     control words that may not be used within the BEGIN/END range of a        
     .FB text block.                                                           
 (2) The &SYSFBC System Set Symbol can  be examined after the ".FB END"        
     control  word  to   determine  the  count  of   lines  within  all        
     outstanding text  blocks.   The &SYSFBF  System Set Symbol  can be        
     used to determine the count of  lines within the first outstanding        
     block.                                                                    


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                 - 66 -                                        
                                                                               
 Waterloo SCRIPT                                          Floating Keep        


 Ŀ                                                                      
 | .FK  |                                                                      
                                                                       

 FLOATING KEEP  enables the user  to create a  block of text  that will        
 print together,  either  immediately or at the top of  the next column        
 (or page, if in single-column mode).                                          

      Ŀ             
      |       |                                                  |             
      |       |    <BEGIN|END <0|w>>                             |             
      |  .FK  |                                                  |             
      |       |    <DUMP <n>>                                    |             
      |       |                                                  |             
                   


 <BEGIN|END <0|w>>:  These operands are equivalent to those for the .CC        
    control word,  with the exception that if the block will not fit in        
    the current column, then it is queued for output into the text area        
    at the top  of the next column,   and the remainder of  the current        
    column is filled  with the output produced by the  text and control        
    words that come  after the ".FK END".   Text blocks  created by .FK        
    may therefore be "floated" to a position later than where they were        
    defined in the input.   The "END"  operand may be further qualified        
    by "w" vertical space units which defaults to zero.  The text block        
    will be "floated" if it does not fit  or if there will be less than        
    "w" space units left in the current  column after the text block is        
    printed.                                                                   
 DUMP  <n>:  forces  the immediate  output of  all (or  the first  "n")        
    Floating  Keep  blocks  that  have  not  yet  been  output.    Each        
    outstanding block  of text  will print at  the top  of a  column if        
    there is insufficient room left in the current column.                     

 This control word causes a break.  An operand must be provided as none        
 will  be assumed.    See the  description under  .CC for  the list  of        
 control words that  may not be used within the  BEGIN/END range.   The        
 &SYSFKC System Set Symbol can be  examined after the ".FK END" control        
 word  to determine  the count  of lines  in all  Floating Keep  blocks        
 currently waiting to be output.                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                 - 67 -                                        
                                                                               
 Footing Margin                                         Waterloo SCRIPT        


 Ŀ                                                                      
 | .FM  |                                                                      
                                                                       

 FOOTING MARGIN specifies the number of blank lines that are to be left        
 between the bottom of the text area  and the Footing Space defined for        
 running bottom titles by the .FS control word.                                

      Ŀ             
      |       |                                                  |             
      |  .FM  |    <1|v|+v|-v>                                   |             
      |       |                                                  |             
                   


 <1|v>:  Defines the size  of the blank area between the  bottom of the        
    text area and the start of any  Running Titles at the bottom of the        
    page.                                                                      
 <+v|-v>:  An operand of this form  modifies the current Footing Margin        
    value, so long as the resulting value is not negative.                     

 This control  word causes a break.    If the operand is  omitted,  the        
 value of the FMargin SCRIPT option will be taken (1 by default).   The        
 initial and default Footing Margin is 1  if the FMargin option was not        
 specified.   See the .BM description for the relationship between .FM,        
 .FS, and .BM.                                                                 


                                                                               
 Ŀ                                                                      
 | .FN  |                                                                      
                                                                       

 FOOTNOTE allows  you to define  the text for  a footnote that  will be        
 printed at  the bottom  of the text  area.   It  also allows  you some        
 ability to control the manner in which footnotes are printed.                 

      Ŀ             
      |       |                                                  |             
      |       |    <BEGIN|END>                                   |             
      |       |    <THRESH <ON|OFF|v>>                           |             
      |  .FN  |    <SET n>                                       |             
      |       |    <SET n /s1/s2/s3>                             |             
      |       |    <SUP BEGIN|END|n>                             |             
      |       |                                                  |             
                   


 BEGIN:   The current  values  of all  relevant  control variables  are        
    saved,   and  SCRIPT  goes into  "single-spaced  output"  mode  and        
    prepares to accept footnote text.  All text thereafter becomes part        
    of the footnote.   Any formatting control  word may appear within a        
    footnote except another Footnote (.FN) or Keep (.CC, .CP, .FK, .FB)        
    control word,   a page  eject (.PA),  or  an Immediate  Line (.LN).        

                                 - 68 -                                        
                                                                               
 Waterloo SCRIPT                                               FootNote        


    Skips and spaces (.SK and .SP)  in footnotes are normally forced to        
    single space  mode and  all formatting requests  apply only  to the        
    footnote.                                                                 
 END:   The values  saved  by the  ".fn begin"  are  then restored  and        
    formatting of "normal" output continues.                                   
 THRESH <ON|OFF|v>:  SCRIPT has a  "threshold" rule that confines foot-        
    notes to  the bottom half  of the  text area.   The  THRESH operand        
    allows you  to manipulate  this rule.    In the  ON condition  (the        
    initial value), the "threshold" rule is obeyed.   In the OFF condi-        
    tion, SCRIPT will use as much of the text area as it needs in order        
    to print  any outstanding  footnote lines;   when there  are enough        
    outstanding footnote  lines to fill  the entire text  area,  SCRIPT        
    will by-pass the printing of the  footnote separator lines and fill        
    the entire  text area  with footnotes.    An absolute  operand will        
    allow footnotes  to occupy all  but the top  "v" lines of  the text        
    area.                                                                      
 SET n:  define the number of lines  that are to separate the last line        
    of "normal" text in  the text area from the first  line of footnote        
    text.   The initial value of "n" is three and "n" must be a numeric        
    value from zero to thirty-two.                                             
 SET n /s1/s2/s3:  defines line number "n" (from one to thirty-two)  of        
    the  footnote separator,   and the  three  strings that  are to  be        
    printed on that  line:   "s1" will be left-adjusted,   "s2" will be        
    centered,  and "s3" will be right-adjusted.   The initial value for        
    all separator  lines is blank  except for  the second,  which  is a        
    centered row of dashes (-) of length one third the line length.            
 SUP <BEGIN|END|n>:  enables you to suppress the printing of footnotes.        
    If SUP is followed by BEGIN,  then  all footnotes that have not yet        
    printed and all footnotes defined thereafter will not be allowed to        
    print.   If SUP is followed by  END,  then all suppressed footnotes        
    and all  footnotes defined  thereafter will  become eligible  to be        
    printed.   If SUP is followed by  a non-negative integer "n",  then        
    the  printing of  footnotes will  be  suppressed for  the next  "n"        
    pages, starting with the current page.                                     

 SCRIPT attempts to reserve enough room at  the bottom of the text area        
 to print the separator lines and  the footnotes.   If enough room does        
 not exist,  footnotes will be continued at the bottom of the text area        
 of the next column or page.  This control word does not cause a break.        
 An operand must be provided, as none will be assumed.                         

 NOTES                                                                         
 (1) When  ".fn begin" is  encountered,   single-spacing  (.ss)  is  in        
     effect.  The Line Spacing may be altered and will remain in effect        
     until the end of the Footnote.                                            

 _______________________                                                       

  With the  exception of  the line-spacing  mode,  format  controls in        
   effect when the  ".fn begin" is encountered remain  in effect during        
   formatting  of  the  footnote unless  explicitly  overridden.    For        
   example,  if indentation  of the text has been requested  with a .IN        
   control word,  the footnote will also  be indented unless the .IN is        
   altered within the footnote.                                                

                                 - 69 -                                        
                                                                               
 FootNote                                               Waterloo SCRIPT        


 (2) No more than the value of the SCRIPT option FNSize (normally 1000)        
     footnote lines may be waiting for output at any time.                     
 (3) If there are "n" footnote separator lines,  then no footnotes will        
     appear at  the bottom of  the page unless  there are at  least n+1        
     lines available  in the  text area.    If footnotes  are generated        
     within n+2 lines of  the bottom,  they will be saved  for the next        
     page.                                                                     
 (4) The text line  that precedes a footnote definition  will always be        
     printed on  the current page.   It  can never be displaced  to the        
     next page by accumulation of footnotes.                                   
 (5) Footnotes appear at the bottom of the text area, NOT in the Bottom        
     Margin area set by the ".BM" control word.                                
 (6) See the description  under .CC for the list of  control words that        
     may not be used within the BEGIN/END range.                               
 (7) A Floating Keep (.FK) or Conditional Page (.CP or .CC)  text block        
     that prints starting  at the top of a page  will displace footnote        
     lines on that page  if the text block extends down  into the foot-        
     note area above the Bottom Margin.                                        
 (8) Footnote numbering,  as used in this  manual,  is described in the        
     Appendix containing notes on the construction of this manual.             

 EXAMPLES                                                                      
 (1) As Anderson<1>                                                            
     .fn begin;.of 4;<1> Anderson, D.A.,                                       
     .us Grundlagen der Madchenjagdt,                                          
     MIT Press, August 1932.                                                   
     .fn end                                                                   
     has noted, this phenomenon is indigenous to ...                           
     produces:  As Anderson<1> has noted, this phenomenon is indigenous        
     to ...                                                                    


                                                                               
 Ŀ                                                                      
 | .FO  |                                                                      
                                                                       

 FORMAT combines the effect of Concatenate and Justify.                        

      Ŀ             
      |       |                                                  |             
      |       |    <ON|OFF                                       |             
      |  .FO  |     Left|Right|Centre|                           |             
      |       |     INSIDE|OUTSIDE|HALF>                         |             
      |       |                                                  |             
                   

 This control word creates a break.  The "OFF" operand is equivalent to        
 the control words Concatenate OFF and Justify OFF.  An omitted operand        
 is treated as "ON",  which is equivalent to Concatenate ON and Justify        
 _______________________                                                       

 <1> Anderson,  D.A.,  Grundlagen der Madchenjagdt,  MIT Press,  August        
     1932.                                                                     

                                 - 70 -                                        
                                                                               
 Waterloo SCRIPT                                                 FOrmat        


 ON.  The other possible operands specify Concatenate ON and the appro-        
 priate mode of Justify.  See the .CO and .JU descriptions for details.        


                                                                               
 Ŀ                                                                      
 | .FS  |                                                                      
                                                                       

 FOOTING  SPACE specifies  the  number  of lines  to  be  used for  the        
 printing of bottom running titles on even- and odd-numbered pages.            

      Ŀ             
      |       |                                                  |             
      |  .FS  |    <1|n|+n|-n>                                   |             
      |       |                                                  |             
                   

 This control word  causes a break.   Up to thirty-two  footings may be        
 defined and printed  at the bottom of  each page.   An operand  of the        
 form "+n" or "-n" adds this value algebraically to the current Footing        
 Space,  so long as the resulting value  is not negative.   See the .BM        
 description for the relationship between .FS, .FM, and .BM.                   


                                                                               
 Ŀ                                                                      
 | .GA  |                                                                      
                                                                       

 GML ATTRIBUTE defines an attribute of a GML tag.  Multiple uses of the        
 control word are needed to define the  list of values that this attri-        
 bute accepts.                                                                 

      Ŀ             
      |       |                                                  |             
      |  .GA  |    tagname|*  attname|*  <opA>  <opV>            |             
      |       |                                                  |             
                   

 This control word defines an attribute of  a GML tagname that has been        
 previously  defined by  the GML  Tag  (GT)  control  word.   (See  the        
 description of GT for information on the internal data structures that        
 SCRIPT creates from the definitions of a GML tagset.)                         

 tagname|*:  The name of  the tag for which this is  an attribute.   If        
    the tagname does not exist in  the internal GML data structure,  an        
    error message is produced and no  further processing occurs.   If *        
    is  specified instead  of  a tagname,   the  most recently  defined        
    tagname will be used.   There  is processing-performance benefit to        
    defining a tagname (GT)  and then following it immediately with all        
    of the attribute definitions (GA)  using  the * notation instead of        
    the tagname,  since  it avoids repeatedly causing  SCRIPT to search        
    for the tagname in its internal data structures.                           

                                 - 71 -                                        
                                                                               
 Gml Attribute                                          Waterloo SCRIPT        


 attname|*:  Specifies the name of the attribute being defined for this        
    tagname.  The attname may contain a maximum of 9 alphanumeric char-        
    acters.   Once  an attname has  been defined,  the  subsequent .GAs        
    immediately following may  use the * notation  to define additional        
    values for that same attribute.   (See above comment on performance        
    benefits for the * notation.)                                              
 opA:  This is a list of one or more "attribute operands" (see below).         
 opV:  This is an "attribute value" specification (see below).                 

 Attribute Operands (opA)                                                      

 In the definition  of most GML tagsets,  each  tagname definition (GT)        
 will be followed immediately by all of the attribute/value definitions        
 (GA)  for that tagname.   The "opA" operands specify information about        
 the attribute itself.   Any number of  these operands may be specified        
 on the same control word.                                                     

 OFF|ON:   OFF  causes  user  specification of  this  attribute  to  be        
    ignored.   The value the user has  specified for the attribute will        
    be verified, but will not be presented to the tag's APF macro.   ON        
    terminates a previous  OFF condition;  no error results  if the OFF        
    condition was not in effect.                                               
 UPpercase:   The  attribute  value  specified  by  the  user  will  be        
    converted to uppercase  before being verified,  and  the uppercased        
    result will be presented to the APF macro.                                 
 REQuired:  The  attribute is  always required when  this tag  is used.        
    Failure to specify the attribute will result in an error message.          

 Attribute Value Operands (opV)                                                

 While any  number of attribute operands  (opA)  may be specified  on a        
 single .GA,  only one of the following attribute-value operands may be        
 specified per .GA control word.                                               

 AUTOmatic  'value   string':   This  attname  will   automatically  be        
    presented to  the APF macro,  with  the "value string" text  as its        
    value.   Any  attempt by  the user to  specify this  attribute will        
    result in an error message.                                                
 LENgth maxlength:  This attribute accepts  any value whose length does        
    not exceed "maxlength" characters.                                         
 RANge minvalue maxvalue <default1 <default2>>:  This attribute accepts        
    a range of  numeric values.   If a "default1" value  is also speci-        
    fied,  that default value will be presented to the APF macro if the        
    user does not specify the attribute,   or if the user specifies the        
    attribute with no value.   If a "default2" value is also specified,        
    the "default1" value will be presented to the APF macro if the user        
    does not specify  the attribute,  and the "default2"  value will be        
    presented if the user specifies the attribute with no value.               
 VALue valname  <DEFault>:  This  defines "valname" as  one value  in a        
    list of values that the attribute accepts.  The valname may contain        
    a maximum  of ten  characters,  and  may be  specified as  a quoted        
    string if it contains embedded blanks.    If DEFault is also speci-        
    fied,  then this valname will be used as the default value and will        
    be presented  to the  APF macro if  the user  does not  specify the        

                                 - 72 -                                        
                                                                               
 Waterloo SCRIPT                                          Gml Attribute        


    attribute.                                                                 
 VALue valname USE 'value string' <DEFault>:  As above, with the excep-        
    tion that the "value string" will be  presented to the APF macro as        
    the value  of the  attribute,  instead  of "valname".    The "value        
    string" may contain a maximum of 50 characters.                            
 ANY <'value string'>:  This attribute accepts any value.   If a "value        
    string"  is  also  specified,   then the  "value  string"  will  be        
    presented to the APF macro instead of the user-specified value.            
 RESET valname|'value string'|numeric:   This form of the  control word        
    resets an  attribute's currently-defined AUTOmatic  'value string',        
    RANge default,  VALue valname DEFault,  or ANY 'value string'.   If        
    the attribute has a RANge of  numeric values,  two numeric operands        
    may be specified,  corresponding to  "default1" and "default2";  if        
    only one  is specified,  then  it resets  both defaults (it  is not        
    necessary that previously-defined defaults  exist).   If the attri-        
    bute has a  list of VALue valnames,   the RESET operand must  be an        
    already-defined valname;   it is not  necessary that  a previously-        
    defined default exist.    If the attribute was defined  in a manner        
    such that it  does not have something  that can be RESET,   then an        
    error message is produced.                                                 

 EXAMPLES                                                                      
 (1) The following is a partial definition  of the FIG tag,  taken from        
     the tagset definition for the  "standard layouts" described in the        
     Waterloo SCRIPT/GML User's Guide document.                                
       .gt FIG add @FIGTAB attributes texterror                                
       .ga * DEPTH range 0 32000 0                                             
       .ga * FONT off upper                                                    
       .ga * * value MONO default                                              
       .ga * * value TEXT                                                      
       .ga * FRAME value BOX default                                           
       .ga * * value NONE                                                      
       .ga * * value RULE                                                      
       .ga * ID length 6                                                       
       .ga * NAME automatic 'Figure'                                           
       .ga * PLACE upper value FLOAT default                                   
       .ga * * value ANY                                                       
     FIG is defined  as a tag that  has attributes and does  not accept        
     tagtext;   a  macro  named  @FIGTAB  is  to  be  invoked  for  APF        
     processing.   If the first occurrence of  the FIG tag is specified        
     by the  user with  attributes FONT=text  and PLACE=any,   then the        
     following local-symbol  values will  be presented  to the  @FIGTAB        
     macro:                                                                    
       *_TAG = 'FIG'                                                           
       *_N = 1                                                                 
       *DEPTH = 0                                                              
       *FRAME = 'BOX'                                                          
       *NAME = 'Figure'                                                        
       *PLACE = 'ANY'                                                          
 (2) If  the following  occurred  after the  GT/GA  definitions in  the        
     example above,                                                            
       .ga FIG FONT on                                                         
       .ga * FRAME reset RULE                                                  
     before the  first user occurrence of  the same FIG tag,   then the        

                                 - 73 -                                        
                                                                               
 Gml Attribute                                          Waterloo SCRIPT        


     following local-symbol  values will  be presented  to the  @FIGTAB        
     macro:                                                                    
       *_TAG = 'FIG'                                                           
       *_N = 1                                                                 
       *DEPTH = 0                                                              
       *FRAME = 'RULE'                                                         
       *FONT = 'TEXT'                                                          
       *NAME = 'Figure'                                                        
       *PLACE = 'ANY'                                                          


                                                                               
 Ŀ                                                                      
 | .GO  |                                                                      
                                                                       

 GOTO transfers processing  to the specified input line  in the current        
 file or macro.                                                                

      Ŀ             
      |       |                                                  |             
      |  .GO  |    <label|n|+n|-n>                               |             
      |       |                                                  |             
                   


 <label>:   The specified  label  will be  converted  to uppercase  and        
    processing will transfer  to the line defined  by the corresponding        
    SET LABEL  (...)  control  word within  the current  input file  or        
    Macro.                                                                     
 <n|+n|-n>:  Alternatively,  an absolute line number or signed relative        
    line number  may be specified.    In either case,   processing will        
    continue at the specified line.                                            

 This control word does not cause a break.  The transfer of control may        
 be forward or backward within a Macro and within an input file that is        
 on a  DASD device (Disk),   but may only be  forward in an  input file        
 being processed from a Unit Record device (Card Reader).   If the GOTO        
 control word is  used within an If  or Nested If,  SCRIPT  cannot know        
 where it will be positioned in any If structure.  After a GOTO, SCRIPT        
 will therefore assume  it is no longer  in the range of  any If struc-        
 ture.                                                                         

 EXAMPLES                                                                      
 (1) .if '&*1' eq DONE .go DONE                                                
     Not finished yet.                                                         
     ...DONE The End.                                                          
 (2) This example formats a produces a list of the first fifty numbers:        
     .sr i=0                                                                   
     ...loop .sr i = &i + 1                                                    
     &i                                                                        
     .if &i lt 50 .go loop                                                     


                                                                               
                                 - 74 -                                        
                                                                               
 Waterloo SCRIPT                                                Gml Tag        


 Ŀ                                                                      
 | .GT  |                                                                      
                                                                       

 GML TAG defines a GML tag.                                                    

      Ŀ             
      |       |                                                  |             
      |  .GT  |    tagname ADD macro <tagopts>                   |             
      |       |    tagname CHAnge macro                          |             
      |       |    tagname OFF|ON                                |             
      |       |    tagname|* DELete|PRint                        |             
      |       |                                                  |             
                   

 The first  form of this  control word defines the  name of a  GML tag,        
 identifies the macro that is to be invoked when the tag is encountered        
 in input,   and specifies "tag  options" that control  tag processing.        
 The other forms permit modifications to an already-defined tag, or the        
 display of information about already-defined tags.                            

 Overview                                                                      

 SCRIPT provides abilities  for the text programmer to create  a set of        
 "Generalized Markup Language" (GML)  tags and the related application-        
 processing functions (APFs).  The collection of APF macros is called a        
 "layout".   For details on the syntax of  GML tags and an example of a        
 large tagset with multiple layouts, see the Waterloo SCRIPT/GML User's        
 Guide.                                                                        
    The tags and  their attributes and values are defined  by using the        
 GML Tag (GT)   and GML Attribute (GA)  control  words.   SCRIPT builds        
 three internal data  structures from the information  specified by the        
 GT and GA control words:   a tagname structure, with an attribute-name        
 structure for each tagname, and a value-list structure for each attri-        
 bute of the tag.   The information in these data structures is used in        
 the processing of GML tags that occur in user input.  The application-        
 processing functions (APFs)  are defined as macros by using the Define        
 Macro control  word (DM).    The character  with which  the user  must        
 precede each tagname, in order for SCRIPT to recognize it,  is defined        
 by the text programmer by using  the "GML" operand of Define Character        
 (DC).                                                                         

 The "ADD" Operand                                                             

 This form of the control word is used to define a GML tag.   It speci-        
 fies the name of the GML tag,  the name of the macro that provides the        
 application-processing function for that tag,  and a number of related        
 "tag option" operands,  as appropriate.   A tagname may not consist of        
 more than  15 alphanumeric characters.    The "tag options"  and their        
 meanings are as follows; note that some of these operands are mutually        
 exclusive.                                                                    


                                                                               

                                 - 75 -                                        
                                                                               
 Gml Tag                                                Waterloo SCRIPT        


 ATTributes:  This tag has one or  more attributes.   If not specified,        
    then  any subsequent  GML  Attribute (GA)   control  word for  this        
    tagname will result in an error message.                                   
 CONTinue:   A "continue"  character (see  the CONT  operand of  Define        
    Character)  is  to be  generated internally by  SCRIPT if  this tag        
    occurs after column one of an input line.   If not specified,  each        
    in-line occurrence  of the tag will  be processed as though  it had        
    occurred at the start of an input line of its own.                         
 CSOFF:  This tag  will cause the termination of  an outstanding Condi-        
    tional Section 99 (see CS).                                                
 NOCONTinue:  This tag  cannot be continued by another tag  on the same        
    input line;   the second  tag will  be processed  as though  it had        
    occurred at the start of an input line of its own.                         
 TAGnext:  Another tag  must follow this tag.   Whether  the second tag        
    may occur on the same input line  is not relevant;  what matters is        
    that a  text input line may  not follow this tag.    (The necessary        
    processing code to enforce this during subsequent SCRIPT processing        
    has not yet been implemented.)                                             
 TEXTDef 'default tagtext':  The specified  "default tagtext" string is        
    to be used  as the tagtext for  this tag if the  user specified the        
    tag without tagtext.                                                       
 TEXTError:  If tagtext  is specified with this tag,   an error message        
    will result.                                                               
 TEXTLine:  Everything from the tagname to the end of the input line is        
    to be treated as tagtext.                                                  
 TEXTReqd:  If tagtext is not specified with this tag, an error message        
    will result.                                                               

 Other Forms of the Control Word                                               

 The other  forms of  the control  word modify  or display  information        
 contained in the data structures.                                             

 tagname CHAnge  macro:  The specified  "macro" name becomes  the macro        
    that will  be invoked  when this tag  is encountered  in subsequent        
    input.                                                                     
 tagname DELete:   This tag and its  related attributes and  values are        
    deleted from the data structures.                                          
 *  DELete:  All  tags  and their  related  attributes  and values  are        
    deleted from the data structures.                                          
 tagname OFF|ON:  OFF  causes subsequent occurrences of this  tag to be        
    ignored;  any attribute list or tagtext will not be validated,  and        
    the APF macro  will not be invoked.   ON terminates  a previous OFF        
    condition; no error results if the OFF condition was not in effect.        
 tagname PRint:   The current data-structure  information for  this tag        
    and  its attributes  and values  will  be displayed  on the  output        
    device  to which  the  results of  a TYpe  control  word (TY)   are        
    directed.   (This will be of occasional  use to the text programmer        
    as a debugging aid during the tagset-development process.)                 
 * PRint:   As above,  but  displays the  information for all  tags and        
    their related attributes and values.                                       


                                                                               

                                 - 76 -                                        
                                                                               
 Waterloo SCRIPT                                                Gml Tag        


 GML Tag Scanning                                                              

 Once a Define Character "GML" character has been defined, SCRIPT exam-        
 ines every  subsequent input line  for occurrences of  that character.        
 When an occurrence of the character is found, SCRIPT begins collecting        
 subsequent characters until it encounters a blank,  a period,  another        
 "GML" character,  or the end of the input line.   SCRIPT then searches        
 the tagname data  structure looking for a tagname equal  to the upper-        
 case version  of the  collected characters.    If no  match is  found,        
 SCRIPT treats  the "GML" character  and collected characters  as text,        
 and continues scanning for the next occurrence of a "GML" character in        
 the input line.   If a match is found, however, then SCRIPT splits the        
 original input line into two "logical" input lines, the first of which        
 contains all characters  to the left of the "GML"  character,  and the        
 second  of which  begins  with the  first  character  of the  tagname.        
 SCRIPT  then resumes  the process  of scanning  this second  "logical"        
 input line, starting after the tagname and its delimiter,  looking for        
 another "GML" character.                                                      
    In this manner,   an input line containing (text and)   one or more        
 tags is parsed into one or more  "logical" input lines.   If the orig-        
 inal input  line started with text,   then the first of  the resulting        
 "logical" input lines will  be a text line,  and will  be processed as        
 any other text  input line,  with the possible exception  that the tag        
 that followed it may have caused a "continue" character to be appended        
 to it.                                                                        
    Any remaining  "logical" input lines  (those representing  the tags        
 and what is assumed to be their attribute lists and tagtext)  are then        
 re-inserted  back into  the  input stream,   prefixed  with a  special        
 "Generated by  GML processing" (GG)   control word.   (Because  the GG        
 control word is not intended for use by the SCRIPT user, no commitment        
 is made to its continued existence as "GG";  it might be replaced in a        
 future version  of SCRIPT by  a control word  of some other  name,  or        
 deleted.)                                                                     
    The exception to the above is a  tag that has been defined with the        
 TEXTLine option.   Everything from the tagname to the end of the input        
 line will be treated as tagtext.                                              

 Attribute-List and Tagtext Processing                                         

 The  parsing and  validation of  the  attribute list  and tagtext  are        
 handled by the GG control word, as follows:                                   
 (1) The existence  of this  tagname in the  tagname data  structure is        
     verified,   or  an  error  message  is  produced  and  no  further        
     processing occurs.   This re-verification is necessary because the        
     tagname may have  been deleted from the data structure  by the APF        
     macro for a previous tag on the same (original) input line.               
 (2) If the  OFF condition is  in effect  for the tagname,   no further        
     processing occurs.   (Note  that a tag that has  been defined with        
     the TEXTLine option and is in  the OFF condition provides the text        
     programmer with  the ability  to define tags  that are  treated as        
     comments).                                                                
 (3) The existence of the APF macro for this tagname is verified, or an        
     error message is produced and no further processing occurs.               


                                 - 77 -                                        
                                                                               
 Gml Tag                                                Waterloo SCRIPT        


 (4) A local symbol dictionary is pre-generated for the APF macro,  and        
     all  AUTO and  DEFAULT  attribute names  and  values  (see GA  for        
     details) are added to it as local symbols of the form "*attname".         
 (5) Any user-specified attribute list is scanned, from left to right.         
       (a)  For an attribute of the  form "attname=value",  if the name        
     does not exist  in the tag's attribute-list data  structure or the        
     attribute name  has been  defined as  AUTO,  an  error message  is        
     produced and no further processing occurs.   Otherwise, the attri-        
     bute value is  verified in the value-list data  structure for this        
     attribute of the tag.    If it is not valid,  an  error message is        
     produced and no further processing occurs.   Otherwise, the attri-        
     bute name and value are added to the local symbol dictionary being        
     generated for the APF macro.                                              
       (b)  For  an attribute of the  form "attname" with  no "=value",        
     processing is  handled as in (a)   if the attribute has  a default        
     value.   However,  if the attname does not exist in the attribute-        
     list data structure, then a WARNING is generated and the string is        
     assumed to be the start of the tagtext.                                   
 (6) If tagtext  was specified  but not  permitted,  or  if tagtext  is        
     required but was not specified,  an  error message is produced and        
     no further processing occurs.   Otherwise, any tagtext (or default        
     tagtext,  if any)  is added to  the local symbol dictionary as the        
     local symbol  "*",  with  a "continue"  character appended  to its        
     value if  required and  permitted (if  not permitted,   it is  not        
     appended).                                                                
 (7) The tag-usage counter for this tagname is incremented by one,  and        
     the resulting value is added to the local symbol dictionary as the        
     value of  the local symbol  "*_N".   The  tagname is added  to the        
     local symbol dictionary as the value of the local symbol "*_TAG".         
 (8) If  the "GML"  operand of  Input Trace  (IT)  is  in effect,   the        
     "logical"  input  line  and  the  contents  of  the  local  symbol        
     dictionary are displayed in the trace output.                             
 (9) The APF macro is invoked.                                                 

 The Local Symbol Dictionary for the APF Macro                                 

 The pre-generation of the local symbol dictionary completely by-passes        
 the  normal operand-scanning  and  initialization  processes of  macro        
 invocation.   As a result,  symbols such as "*0" and "*1" will have no        
 values within a macro that has been invoked as the APF macro for a GML        
 tag,  nor  will the  values of  the global  symbols "0",   "1",...  be        
 altered.                                                                      

 EXAMPLES                                                                      
 See the GML Attribute (.GA) control word.                                     


                                                                               


                                                                               


                                                                               

                                 - 78 -                                        
                                                                               
 Waterloo SCRIPT                                         Hanging Indent        


 Ŀ                                                                      
 | .HI  |                                                                      
                                                                       

 HANGING INDENT causes  all output lines after the next  to be indented        
 the specified amount,  over and above any existing left indent created        
 by the .IN control word.                                                      

      Ŀ             
      |       |                                                  |             
      |  .HI  |    <0|h|+h|-h|ON|OFF>                            |             
      |       |                                                  |             
                   

 The initial and default value is zero.   The operand may be signed, in        
 which case the  current value is incremented  or decremented appropri-        
 ately.  The resulting value may never be negative or exceed the length        
 of the output line minus one (.LL or  .CL).   ON sets the value to 0.5        
 inches.   OFF sets the value to  zero.   Setting a hanging indent will        
 clear any offset (.OF) currently in effect, and vice versa.                   
    This control  word causes a break.    The Hanging Indent  offset is        
 applied  after  every break  that  follows  until the  Hanging  Indent        
 cancelled.                                                                    

 EXAMPLES                                                                      
 (1) .in +5                                                                    
     .hi 5                                                                     
     (a)  This is point number one that will demonstrate                       
     the function of Hanging Indent.                                           
     .br                                                                       
     (b)  After every break in the text, the first output line                 
     is aligned to the current Indent value.                                   
     .br                                                                       
     (c)  But the second and subsequent lines of each point                    
     are indented further from the left margin as if an                        
     OFFSET control word had preceded each point.                              
     .hi                                                                       
     The sequence above produces the following result:                         
      (a)  This is point number one  that will demonstrate the function        
           of Hanging Indent.                                                  
      (b)  After every  break in  the text,  the  first output  line is        
           aligned to the current Indent value.                                
      (c)  But  the  second and  subsequent  lines  of each  point  are        
           indented  further  from the  left  margin  as if  an  OFFSET        
           control word had preceded each point.                               


                                                                               


                                                                               


                                                                               

                                 - 79 -                                        
                                                                               
 Heading Level                                          Waterloo SCRIPT        


 Ŀ                                                                      
 | .HL  |                                                                      
                                                                       

 HEADING LEVEL adds a  heading to the text and/or to  the current Table        
 of Contents.                                                                  

      Ŀ             
      |       |                                                  |             
      |  .HL  |    <0|n> line                                    |             
      |       |                                                  |             
                   

 This control word causes a break.                                             

 n:  specifies the heading level (from 0 to 9).                                
 line:  This is the text of the  heading.   It should be entered as you        
    would expect it to print in the Table of Contents.                         

 The heading line is  formatted into the text area and/or  added to the        
 current "table of contents" workarea depending  on the values shown in        
 the following table.                                                          

    Ŀ                        
    | .HL     | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |                        
    ||||||||||||                        
    | PA      |   | Y |   |   |   |   |   |   |   |   |                        
    | SPBF    | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |                        
    | SKBF    | 0 | 0 | 3 | 3 | 3 | 1 | 1 | 0 | 0 | 0 |                        
    | AUTOHY  | N | Y | Y | Y | Y | Y | Y | Y | Y | Y |                        
    | HANG    | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |                        
    | OUTSIDE |   | Y |   |   |   |   |   |   |   |   |                        
    | LEFT    |   |   | Y | Y | Y | Y | Y | Y | Y | Y |                        
    | SPAF    | 0 | 5 | 2 | 2 | 2 | 0 | 0 | 0 | 0 | 0 |                        
    | UP      |   | Y | Y | Y |   | Y |   |   |   |   |                        
    | US      |   | Y | Y |   | Y | Y | Y |   |   |   |                        
    | BR      |   | Y | Y | Y | Y |   |   |   |   |   |                        
    | TCIN    | 0 | 0 | 0 | 2 | 4 | 6 | 8 | 0 | 0 | 0 |                        
    | TCOF    | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |                        
    | TC      | Y | Y | Y | Y |   |   |   |   |   |   |                        
    | TO      | Y |   |   |   |   |   |   |   |   |   |                        
    | TS      |   | Y |   |   |   |   |   |   |   |   |                        
                            

 See the description of the Define  Heading (.DH)  control word for the        
 meaning of these options.  See the .TC control word for examples.             


                                                                               


                                                                               


                                                                               
                                 - 80 -                                        
                                                                               
 Waterloo SCRIPT                                         Heading Margin        


 Ŀ                                                                      
 | .HM  |                                                                      
                                                                       

 HEADING MARGIN specifies the number of  blank lines that are to appear        
 between the Heading Space area and the first line of the text area.           

      Ŀ             
      |       |                                                  |             
      |  .HM  |    <1|v|+v|-v>                                   |             
      |       |                                                  |             
                   


 <1|v>:  Defines  the size  of the blank  area between  the end  of any        
    Running Titles  at the top  of the page and  the start of  the text        
    area.                                                                      
 <+v|-v>:  An  operand of this form  modifies the current value  of the        
    Heading Margin, so long as the resulting value is not negative.            

 This control word causes a break.   If specified with no operand,  the        
 initial value set by the HMargin SCRIPT option will be used (1, if not        
 specified).   See  the .TM description  for the  relationships between        
 .HM, .HS, and .TM.                                                            


                                                                               
 Ŀ                                                                      
 | .HN  |                                                                      
                                                                       

 HEADNOTE formats a  block of text that  will be printed at  the top of        
 the text area on all subsequent pages.                                        

      Ŀ             
      |       |                                                  |             
      |       |    <EVEN|ODD> <BEGIN|END>                        |             
      |  .HN  |                                                  |             
      |       |    <EVEN|ODD> <DELETE|DUMP>                      |             
      |       |                                                  |             
                   

 If neither EVEN nor ODD is  specified,  the operation applies to head-        
 notes for both even- and odd-numbered pages.                                  

 <EVEN|ODD> <BEGIN|END>:  BEGIN and END define the start and end of the        
    headnote.    The  formatting  environment is  saved  by  BEGIN  and        
    restored by END.    The headnote block will be  formatted to occupy        
    the entire line length, NOT the column length; headnotes are always        
    in single-column  mode.   (Any outstanding Conditional  or Floating        
    text blocks will print following a headnote,  and in the single- or        
    multiple-column mode in which they were created.)                          


                                                                               
                                 - 81 -                                        
                                                                               
 HeadNote                                               Waterloo SCRIPT        


 <EVEN|ODD> DELETE:  Deletes the specified headnote.                           
 <EVEN|ODD> DUMP:  Forces the immediate printing of the specified head-        
    note, whether currently at the top of a page or not.                       

 This control word does  not cause a break.   No operand  is assumed by        
 default.                                                                      

 EXAMPLES                                                                      
 (1) This example  defines a  headnote consisting  of a  boxed-in title        
     that  will print  at the  tops of  all subsequent  even- and  odd-        
     numbered pages until  re-defined or deleted,  or until  the end of        
     SCRIPT processing:                                                        
       .HN BEGIN                                                               
       .bx 1 &SYSLL                                                            
       .sk;.ce .us Sample Headnote                                             
       .sk;.bx off;.sk 2                                                       
       .HN END                                                                 


                                                                               
 Ŀ                                                                      
 | .HS  |                                                                      
                                                                       

 HEADING  SPACE specifies  the  number  of lines  to  be  used for  the        
 printing of top running titles on even- and odd-numbered pages.               

      Ŀ             
      |       |                                                  |             
      |  .HS  |    <1|n|+n|-n>                                   |             
      |       |                                                  |             
                   

 This control word causes a break.  Up to thirty-two running top titles        
 may be defined and printed at the top of each page.  An operand of the        
 form "+n" or "-n" adds this value algebraically to the current Heading        
 Space,  so long as the resulting value  is not negative.   See the .TM        
 description for the relationship between .HS, .HM, and .TM.                   


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                 - 82 -                                        
                                                                               
 Waterloo SCRIPT                                         Hyphenate Word        


 Ŀ                                                                      
 | .HW  |                                                                      
                                                                       

 HYPHENATE WORD  specifies conditional  hyphenation break-points  for a        
 word that  is then  formatted into  the text  area according  to those        
 break-points.                                                                 

      Ŀ             
      |       |                                                  |             
      |  .HW  |    text-line                                     |             
      |       |                                                  |             
                   

 The "text-line" operand starts one blank  after the control word.   If        
 the "text-line" will  fit on the current output line,   it will appear        
 without the conditional hyphens.   Otherwise,   SCRIPT will attempt to        
 use one of the conditional hyphens as a break-point, and the word will        
 appear without the others.   Automatic Hyphenation may be ON or OFF at        
 the time this control word is encountered.   The Hyphenation Exception        
 Dictionary is not affected by this.  A compound word such as "brother-        
 in-law" must be entered with double hyphens,  indicating that a single        
 hyphen must remain.    A hyphen is only  considered to be a  hyphen if        
 preceded and followed by an  alphabetic character.   This control word        
 does not  cause a break.    If the operand  is omitted,  no  action is        
 performed.   If a word is specified with no conditional hyphens,  then        
 it will not be hyphenated if automatic hyphenation is in effect.              

 EXAMPLES                                                                      
 (1) .HW I need a pter-o-phyl-lum sca-la-re                                    
     .HW and a le-bis-tes                                                      
     .HW re-tic-u-la-tus.                                                      
     The above sequence results in:  I need a  pterophyllum scalare and        
     a lebistes reticulatus.                                                   
 (2) .HW This is for your mo-ther--in--law.                                    
     results in:  This is for your mother-in-law.                              


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                 - 83 -                                        
                                                                               
 HYphenate                                              Waterloo SCRIPT        


 Ŀ                                                                      
 | .HY  |                                                                      
                                                                       

 HYPHENATE is used  to set the automatic hyphenation  function,  to set        
 the  level of  automatic hyphenation  required and  to manipulate  the        
 Hyphenation Exception Dictionary.                                             

      Ŀ             
      |       |                                                  |             
      |       |    <ON|USER|OFF|SUP>                             |             
      |       |    <LADDER <3|n|+n|-n>>                          |             
      |       |    <MAXPT  <3|n|+n|-n>>                          |             
      |       |    <MINPT  <3|n|+n|-n>>                          |             
      |  .HY  |    <MINWORD <5|n|+n|-n>>                         |             
      |       |    <UPPER  <ALL|ON|OFF>>                         |             
      |       |    <USER   <ON|OFF>>                             |             
      |       |    <RULEs  value>                                |             
      |       |    <ADD|CHANGE|DELETE> word-with-breaks          |             
      |       |    <DUMP|PURGE>                                  |             
      |       |    <TEST word>                                   |             
      |       |                                                  |             
                   


 The Levels of Hyphenation                                                     

 ON:  Enables the  automatic hyphenation of words that are  too long to        
    fit on the output line.                                                    
 USER:  No automatic  hyphenation will be performed.    However,  words        
    containing hyphens such as "brother-in-law",  may be broken after a        
    "-" when concatenating text.  It also causes a hyphen at the end of        
    any input line to be treated  as a conditional hyphen.   The condi-        
    tional hyphen will be discarded if there  is space for more text on        
    the current output line and will remain  as entered if the line can        
    hold no more.                                                              
 OFF:  No hyphenation  at all will be performed.    Only blanks between        
    words are to be considered for the purpose of concatenating text.          
 SUP:  Suppresses  automatic hyphenation to  the "OFF" level  until the        
    next break occurs.   This is useful to effectively turn hyphenation        
    off  until the  end of  a paragraph,   at which  point the  current        
    setting is restored.                                                       

 The Hyphenation Algorithm                                                     

 The  technique  used to  hyphenate  words  may  be selected  from  the        
 following list.   You must still  enable hyphenation with ".HY ON" for        
 any of  the rules to  be enabled.    The user exception  dictionary of        
 words is always used in conjunction with any rule selected.                   

 RULEs  ON:   This enables  the  default  hyphenation for  the  English        
    language.    It is  done  with three  different  techniques plus  a        
    built-in exception dictionary.   The  algorithmic hyphenation rules        
    employed  have been  adapted and  extended from  a program  package        

                                 - 84 -                                        
                                                                               
 Waterloo SCRIPT                                              HYphenate        


    called  HYPHENATION/360.    See  the  IBM  Application  Description        
    Manual,  form E20-0257,  for a clear description (in ten pages)  of        
    the algorithms employed.                                                   
 RULEs ENGLISH:  This enables hyphenation  by comparing segments of the        
    word with a predefined table of  English word patterns.   The tech-        
    nique used to derive these patterns  from a hyphenated English word        
    list  is described  in:   "Word  Hy-phen-a-tion by  Com-put-er"  by        
    Franklin Mark Liang of the Department  of Computer Science at Stan-        
    ford University (Report No. STAN-CS-83-977).                               
 RULEs FRENCH:   This enables hyphenation with  a table of  French word        
    patterns.                                                                  
 RULEs GERMAN:   This enables hyphenation with  a table of  German word        
    patterns.                                                                  
 RULEs ITALIAN:  Hyphenation with Italian word patterns.                       
 Other RULEs:  The operands DANISH, DUTCH, SPANISH and SWEDISH are also        
    recognized  but no  hyphenation patterns  for  these languages  are        
    currently defined.                                                         

 Limits for Automatic Hyphenation                                              

 For all  of these Hyphenation  operands,  a  value of zero  means "the        
 largest possible value".                                                      

 LADDER <3|n|+n|-n>:  Defines the maximum  number of consecutive output        
    lines that will be eligible  for automatic hyphenation.   After "n"        
    consecutive hyphenated lines on the same page, the next output line        
    will not be hyphenated.  (SUP is an alias for LADDER.)                     
 MAXPT <3|n|+n|-n>:  Defines the minimum number of characters that must        
    be left after the hyphen.  The initial and default value of 3 means        
    at  least three  characters  at the  end  of a  word  will be  kept        
    together.  (ENDPT is an alias for MAXPT.)                                  
 MINPT <3|n|+n|-n>:  Defines the minimum number of characters that must        
    appear before the hyphen.  The initial and default value of 3 means        
    at least  three characters  at the  start of  a word  will be  kept        
    together.                                                                  
 MINWORD  <5|n|+n|-n>:   Defines  minimum number  of  characters  in  a        
    hyphenated word.  The value must be positive and has an initial and        
    default value of 5,  which means that  no word with fewer than five        
    characters will be hyphenated.  (THRESH is an alias for MINWORD.)          
 UPPER ALL:  All  words containing letters and the  user delimiters '-'        
    and '/'  are eligible  for hyphenation,   even if  the word  is all        
    uppercase.                                                                 
 UPPER ON:  Words  in which all the  letters are uppercase will  not be        
    eligible for hyphenation.   This is the initial value; proper names        
    and the  first word of a  sentence may be hyphenated,   but special        
    terms such  as "FORTRAN" or  "ELECTROSTATIC" will never  be hyphen-        
    ated.                                                                      
 UPPER  OFF:   Only  words  that contain  only  lowercase  letters  are        
    eligible for hyphenation.                                                  
 USER ON:  Compound words are eligible  for hyphenation at points other        
    than the compound break point (at a  "-" or "/" in the word).   The        
    compound break point would  only be used if it were  the best break        
    for the  current length of  line.   This  is the initial  value for        
    "USER".                                                                    

                                 - 85 -                                        
                                                                               
 HYphenate                                              Waterloo SCRIPT        


 USER OFF:   When a  compound word  is being  examined for  hyphenation        
    points,  only  the compound break points  in the word may  be used.        
    Therefore, a word such as "extra-special" may only be broken at the        
    "-".                                                                       

 The Hyphenation Exception Dictionary                                          

 SCRIPT uses  both algorithmic  and exception-dictionary  techniques to        
 hyphenate  words.   When  running with  multiple  passes,  you  should        
 construct  any large  "user" exception  dictionary only  on the  first        
 pass, as the exception dictionary is not cleared between passes.              
    The exception-dictionary technique is  essential,  since the algor-        
 ithms may not work successfully for all words in the language.  SCRIPT        
 is distributed with a built-in  dictionary of known "exception" words,        
 and it is possible to add to  or override this internal dictionary via        
 a "user"  dictionary.   The "user"  exception dictionary  is something        
 that must  be constructed  during SCRIPT  processing via  the operands        
 discussed below.                                                              

 ADD  word-with-breaks:   Inserts  a word  into  the  "user"  exception        
    dictionary.   This  is sometimes  necessary to  distinguish between        
    words such as the noun "pres-ent" and the verb "pre-sent".   A word        
    may be  specified without  break points,   such as  "Waterloo",  to        
    prevent it from being broken across  output lines.   A word already        
    in the  dictionary may  be added  again,  as  these duplicates  are        
    entered in a "last in, first out" order.                                   
 CHANGE word-with-breaks:  Operates as "ADD"  if the alphabetic charac-        
    ters of the word  operand do not match any current  entry.   If the        
    characters do match an entry,  that  entry is replaced with its new        
    break points.                                                              
 DELETE word-with-breaks:  To "DELETE" a word,  the letters of the word        
    and its break points must match.  (Words cannot be DELETEd from the        
    built-in internal dictionary.)                                             
 TEST word:  To  find all the hyphen  break points of a  word,  use the        
    "TEST" operand.   SCRIPT  will display the input word  and the word        
    with its break points shown as special characters.                         
     *  yes/no table                                                           
     -  exception dictionary                                                   
     /  suffix                                                                 
     +  probability algorithm                                                  
     @  pattern analysis                                                       
    Numeric digits are used to indicate break points when word patterns        
    are used, with higher numbers indicating higher probabilities.             
 PURGE:  Deletes all the entries in the "user" exception dictionary.           
 DUMP:  Displays all  words in the current  "user" exception dictionary        
    at the terminal.    Note that the words list by  word length within        
    the first letter of the word.                                              

 This control word does not cause a break.   There are no default oper-        
 ands.   The initial setting of the hyphenation level is "USER" with no        
 entries in the "user" exception word dictionary.                              


                                                                               

                                 - 86 -                                        
                                                                               
 Waterloo SCRIPT                                              HYphenate        


 EXAMPLES                                                                      
 (1) .HY on                                                                    
     To enable automatic hyphenation.                                          
 (2) .HY on maxpt 2 minpt 2                                                    
     To enable automatic hyphenation,  allowing for two character frag-        
     ments at the start and end of an output line.                             
 (3) .HY ADD scripture                                                         
     Never hyphenate any occurrence of the word "scripture".                   
 (4) .HY ADD pres-ent                                                          
     A happy birthday present.                                                 
 (5) .HY CHANGE pre-sent                                                       
     The University of Waterloo has presented ...                              


                                                                               
 Ŀ                                                                      
 | .H0  |                                                                      
                                                                       

 HEADING LEVEL  "N" formats  the specified heading  into the  text area        
 and/or adds it to the current Table of Contents.                              

      Ŀ             
      |       |                                                  |             
      |  .H0  |                                                  |             
      |   to  |    line                                          |             
      |  .H9  |                                                  |             
      |       |                                                  |             
                   

 The .H0 to .H9 control words are short form commands for Heading Level        
 (.HL)  with an operand of 0 to 9.   These control words cause a break.        
 See Heading Level (.HL) for all the information.                              

 EXAMPLES                                                                      
 (1) .h1 This is a level-one heading                                           
     This control word is equivalent to:                                       
     .hl 1 This is a level-one heading                                         


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                 - 87 -                                        
                                                                               
 Index Entry                                            Waterloo SCRIPT        


 Ŀ                                                                      
 | .IE  |                                                                      
                                                                       

 INDEX ENTRY controls  the formatting of the entries for  each level of        
 headers in an index structure.                                                

      Ŀ             
      |       |                                                  |             
      |       |    <H character>                                 |             
      |  .IE  |                                                  |             
      |       |    <1|2|3 <string>>                              |             
      |       |                                                  |             
                   

 This control word causes a break.                                             

 Printing the Index                                                            

 H character:   An Index Entry  control word  is generated with  an 'H'        
    operand  before  each  new  first character  for  the  first  level        
    headers.  The new character follows as the second and last operand.        
    The new character is displayed, followed by a blank line.                  
 1|2|3  string:  The  control word  is generated  before printing  each        
    header  level in  the index  structure.    The first  operand is  a        
    numeric indicating which header level  and references follow.   The        
    header level string itself follows.  Each level sets an indentation        
    from the left margin to show the level of the index header.                

 Customizing the Index Format                                                  

 Four macros may be  defined to control how the index  levels are to be        
 formatted.                                                                    
 (1) IEH  is invoked  when the  first character  of a  level one  index        
     header changes.   It is called with a single character operand, so        
     that Local Symbol  &* may be used  to access the new  character is        
     now beginning.                                                            
 (2) IE1 is invoked before a level-one index header.                           
 (3) IE2, before a level-two index header.                                     
 (4) IE3, before a level-three index header.                                   

 In the latter 3 macros,  the Local Symbol &* contains the index header        
 to follow.   The string "&SYSIXREF." is placed between an index header        
 and its  reference data  if reference data  is present.    The initial        
 value for  this System Set  Symbol is  ", " (comma-blank)  but  may be        
 redefined by the user.   Therefore substitution (.SU)  must be ON when        
 printing the index.                                                           

 NOTES                                                                         
 (1) For  compatibility with  previous versions  of  SCRIPT the  native        
     Index Entry  control word  will generate  a macro  call to  macros        
     SYSIX0, SYSIX1, SYSIX2 and SYSIX3 if they are defined.  The imple-        
     mentation is identical to previous versions except that the System        
     Set Symbol &SYSIXOP  is no longer supported.   Refer  to Local Set        

                                 - 88 -                                        
                                                                               
 Waterloo SCRIPT                                            Index Entry        


     Symbol &* in macros IE1, IE2 and IE3 if this is required.                 

 EXAMPLES                                                                      
 (1) The following shows how index structure 1 can be printed:                 
       .dm IEH begin                                                           
       .in;.sk;.cc 5;.bd 1;  &*                                                
       .dm IEH end                                                             
       .dm IE1 /.in 3/.of 3 no/                                                
       .dm IE2 /.in 6/.of 3 no/                                                
       .dm IE3 /.in 9/.of 3 no/                                                
       .se SYSIXREF = ' ... '                                                  
       .co;.ju no                                                              
       .ix . DUMP                                                              


                                                                               
 Ŀ                                                                      
 | .IF  |                                                                      
                                                                       

 IF causes conditional processing of an  object "line" depending on the        
 relationship of two numeric or character-string quantities.                   

      Ŀ             
      |       |                                                  |             
      |       |    s1  relation  s2  <line>                      |             
      |  .IF  |                                                  |             
      |       |    n1  relation  n2  <line>                      |             
      |       |                                                  |             
                   


 s1 and  s2:  undelimited  character strings,   or delimited  character        
    strings that may contain any characters (including blank).                 
 n1 and n2:  integers or integer expressions containing no blanks.             
 relation:  one of the following  "relational operators",  preceded and        
    followed by at least one blank:                                            
      =  or EQ  -  equal                                                       
      ^= or <> or NE  -  not equal                                             
      <  or LT  -  less than                                                   
      >  or GT  -  greater than                                                
      <= or LE  -  less than or equal                                          
      >= or GE  -  greater than or equal                                       

    The two character or numeric operands and the "relational operator"        
    form a  "condition" that  is either  "true" or  "false".   Multiple        
    conditions  may occur  in one  .IF by  using one  of the  following        
    "logical operators" between conditions:                                    
      AND or &                                                                 
      OR  or |                                                                 
    such as:                                                                   
      .if condition1 and condition2 <line>                                     
    Evaluation of multiple conditions is done left to right.                   


                                 - 89 -                                        
                                                                               
 IF                                                     Waterloo SCRIPT        


 <line>:  a control-word  or text input line,  starting  with the first        
    non-blank character following the second operand.   If omitted, the        
    next logical input line will be used as the <line> operand. If the        
    condition is true, the <line> operand is processed;  otherwise, the        
    <line> operand will  be excluded from processing.    The THEN (.TH)        
    and ELSE  (.EL)  control  words may  be used  instead of  <line> to        
    provide one <line> to  be processed if the condition is  true and a        
    different <line>  to be  processed if the  condition is  false.   A        
    series of .IFs may be nested up to  ten levels by making an .IF the        
    object of a .TH  or an .EL.   See the .TH  and .EL descriptions for        
    details.                                                                   

 This control word does not cause a break; the <line> operand may.   If        
 both  operands are  valid  numerics or  numeric  expressions then  the        
 comparison will be between two signed  integers.   If one of the oper-        
 ands is  not a valid  numeric expression  then the comparison  will be        
 between  two character  strings using  the  standard EBCDIC  collating        
 sequence.   If the  two character strings to be  compared have unequal        
 lengths,  then  the comparison  will be  done from  the start  of both        
 strings with the minimum length of  the two.   If those characters are        
 the same then the shorter string is considered to be the smaller.             

 EXAMPLES                                                                      
 (1) .if 'A' eq A .ty this is always true                                      
 (2) .if 9 eq +11-4 .ty this is never true                                     
 (3) .if &SYSPAGE/2*2 eq &SYSPAGE .cp                                          
     If the  current output  page number  is even,   the ".cp"  will be        
     executed.   This may make an  interesting example,  but the result        
     can be achieved by ".PA ODD" with much less complexity.                   
 (4) .if &number = 'roman' or &number = 'ROMAN'                                
     .   .th .do                                                               
     .       .pn roman                                                         
     .   .do end                                                               
     .   .el .do                                                               
     .       .pn arabic                                                        
     .   .do end                                                               
     This  will set  subsequent  page numbering  to  roman numerals  or        
     arabic numerals depending on the value of "&number".                      


                                                                               


                                                                               


                                                                               


 _______________________                                                       

  The "next logical input line" consists of everything up to the first        
   following control-word separator (see .CW)  or  the end of the phys-        
   ical input record, whichever occurs first.                                  

                                 - 90 -                                        
                                                                               
 Waterloo SCRIPT                                            Indent Line        


 Ŀ                                                                      
 | .IL  |                                                                      
                                                                       

 INDENT LINE causes the next output  line to be positioned horizontally        
 with  respect  to  the  normal  starting  position  for  output  lines        
 currently in effect.                                                          

      Ŀ             
      |       |                                                  |             
      |  .IL  |    <0|h|+h|-h>                                   |             
      |       |                                                  |             
                   

 This control word causes  a break.   If the operand is  omitted then 0        
 will be assumed.   A relative  operand alters an immediately preceding        
 Indent Line (.IL) or Undent (.UN).                                            
    An Indent Line  will remain in effect until the  next Indent (.IN),        
 Indent Line (.IL) or Undent (.UN) control word.                               

 EXAMPLES                                                                      
 (1) .in 10;.il +3;This is an example of                                       
     text on two or more output lines                                          
     to show the result of a spilled line.                                     
     This example produces:                                                    
              This is an example of text on two or more output lines to        
           show the result of a spilled line.                                  
 (2) .in +5;.il -3;This is a second test of a line of                          
     text on two or more output lines                                          
     to show the result of a spilled line.                                     
     This example produces:                                                    
       This is a  second test of a line  of text on two  or more output        
          lines to show the result of a spilled line.                          


                                                                               
 Ŀ                                                                      
 | .IM  |                                                                      
                                                                       

 IMBED suspends  processing of the  current input file,   processes the        
 specified input file, and resumes processing of the suspended file.           

      Ŀ             
      |       |                                                  |             
      |       |    Filename                < . <n1 <n2>>>        |             
      |  .IM  |                     <args>                       |             
      |       |    Filename(member)        < . <label>>          |             
      |       |                                                  |             
                   

 This control word does not cause a break.   The operands are identical        
 to those  for the APPEND  control word;   see the .AP  description for        
 details.   The  number of  levels to  which files  may be  imbedded is        

                                 - 91 -                                        
                                                                               
 IMbed                                                  Waterloo SCRIPT        


 limited by the  amount of storage available to  contain control blocks        
 and buffers:  one file may imbed another file or itself, and then that        
 file may imbed another file or itself, and then that file ... this can        
 continue until the  stack of imbedded files becomes so  large that all        
 available storage contains  imbedded file control blocks  and an error        
 results.                                                                      

 NOTES                                                                         
 (1) The word  "imbed" does  not exist in  the English  language.   Its        
     usage here merely  reflects the ".IM" control  word.   The correct        
     word for the function is "embed" but ".EM" was taken.                     


                                                                               
 Ŀ                                                                      
 | .IN  |                                                                      
                                                                       

 INDENT causes  text to  be indented  with respect  to the  left and/or        
 right ends of the output line.                                                

      Ŀ             
      |       |                                                  |             
      |  .IN  |    <0|h|+h|-h|*> <0|i|+i|-i|*>                   |             
      |       |                                                  |             
                   

 These indents remain in effect for all subsequent output lines, until        
 reset by the next occurrence of the .IN control word.                         

 <0|h|+h|-h|*>:  For the first operand, a value of the form "h" indents        
    the start of all  subsequent output "h" spaces to the  right of the        
    start of the  line.   An operand of  the form "+h" adds  "h" to the        
    current left  indent.   An operand of  the form "-h"  subtracts "h"        
    from the  current left  indent or makes  it zero  if the  result is        
    negative.   An  operand of  the form  "*" leaves  the current  left        
    indent unchanged.                                                          
 <0|i|+i|-i|*>:  The second  operand specifies a "right  indent" value.        
    A value  of the  form "i" or  "+i" will move  the right  indent "i"        
    spaces to the right of its current  position.   A value of the form        
    "-i" will  move the  right indent  "i" spaces  to the  left of  its        
    current position.    A value of the  form "0-i" will set  the right        
    indent "i" spaces to the left end  of the output line.   A value of        
    the form "*" leaves the current right indent unchanged.                    

 This control word causes a break.   The initial value for the Left and        
 Right Indent is  zero.   Specifying ".IN 0 0" or  ".IN" will terminate        
 any left and right indents currently in effect.  An .IN will terminate        
 any Offset  (.OF),  Indent Line (.IL)   or Undent (.UN)   currently in        
 effect unless a first operand of "*" is specified.                            
 _______________________                                                       

  Including new paragraphs, new footnotes, and new pages.   It remains        
   in effect even if ".FO NO" is specified.                                    

                                 - 92 -                                        
                                                                               
 Waterloo SCRIPT                                           Indent Right        


 Ŀ                                                                      
 | .IR  |                                                                      
                                                                       

 INDENT RIGHT  indents the end of  the output line the  specified hori-        
 zontal position with respect to the line-length (.LL) value (or .CL in        
 multiple-column mode).                                                        

      Ŀ             
      |       |                                                  |             
      |   .IR |    <0|h|+h|-h>                                   |             
      |       |                                                  |             
                   

 This control word causes a break.    The initial Right Indent value is        
 zero.   If the operand is omitted zero is assumed.   An operand of the        
 form "+h" adds to the current Right Indent and "-h" subtracts from it.        
 This indentation  remains in  effect for  all subsequent  output lines        
 until another .IR or .IN is encountered.  ".IR" or ".IR 0" will cancel        
 the right indentation and cause output to be formatted to the original        
 right margin.                                                                 

 EXAMPLES                                                                      
 (1) .in 4                                                                     
     The first paragraph demonstrates the normal width                         
     of formatted text.                                                        
     It extends to the current Line Length.                                    
     .ir 4                                                                     
     The second paragraph demonstrates the width of formatted                  
     text with a Right Indent specified.                                       
     Note that the Left Indent is unchanged.                                   
     .ir;The third paragraph again demonstrates the normal                     
     width of formatted text to the full Line Length.                          

 This example produces the following output:                                   

     The first  paragraph demonstrates  the normal  width of  formatted        
     text.  It extends to the current Line Length.                             
     The second paragraph demonstrates the  width of formatted text            
     with a Right Indent specified.   Note  that the Left Indent is            
     unchanged.                                                                
     The  third  paragraph  again  demonstrates  the  normal  width  of        
     formatted text to the full Line Length.                                   


                                                                               


                                                                               


                                                                               


                                                                               
                                 - 93 -                                        
                                                                               
 Input Trace                                            Waterloo SCRIPT        


 Ŀ                                                                      
 | .IT  |                                                                      
                                                                       

 INPUT TRACE displays  trace information about control  words,  macros,        
 GML tags, and/or symbol substitution at the terminal.                         

      Ŀ             
      |       |                                                  |             
      |       |    <ON|OFF>                                      |             
      |  .IT  |    <MAC|SUB|GML|ALL> <ON|OFF>                    |             
      |       |    <SNAP>                                        |             
      |       |                                                  |             
                   


 <MAC|SUB|GML|ALL> <ON|OFF>:  MAC  displays each line of  control words        
    and text as it is executed from  a Macro.   These lines are flagged        
    with '*M*'.  SUB displays each line of control words and text if it        
    contains a  set symbol that is  changing the original  input.   The        
    original line  is marked with the  file name and record  number and        
    all substitutions in the line are flagged with '*S*'.  A set symbol        
    that begins  with a  control word  separator will  be flagged  with        
    '*T*' to show that  the input is being truncated and  a logical new        
    line started.    GML displays the  transformation of  a Generalized        
    Markup Language  tag into a macro.    These lines are  flagged with        
    '*G*'.  Each may be turned ON or OFF separately.   ALL combines the        
    effect of MAC, SUB and GML.                                                
 <ON|OFF>:  ON  combines the effect of  MAC and SUB.   OFF  cancels the        
    effect of MAC, SUB, and GML.                                               
 <SNAP>:  displays  the name  and value  of all  Set Symbols  currently        
    defined.   Local Symbols  and their values are  displayed after the        
    name of  the file  in which they  are defined.    The names  of all        
    System Set Symbols  and their values are displayed  last.   A char-        
    acter value  of a  Symbol is  displayed within  single quotes.    A        
    subscripted  Symbol is  displayed  as  a subscript  in  parentheses        
    following  the unsubscripted  Symbol name.    The  Symbols are  not        
    displayed in any predictable order.                                        

 This control word does not cause a  break.   If no operands are speci-        
 fied, no action is performed.                                                 

 EXAMPLES                                                                      
 (1) This  example will  display a  trace  of the  substitution of  all        
     Symbols:                                                                  
       .IT SUB                                                                 
       .se i = 0                                                               
       .se i = &i + 1                                                          
       .se *roman = &r'&i                                                      
       .IT OFF                                                                 
 (2) This will show all Global,  Local and System Set Symbols and their        
     values:                                                                   
       .IT SNAP                                                                


                                 - 94 -                                        
                                                                               
 Waterloo SCRIPT                                                  IndeX        


 Ŀ                                                                      
 | .IX  |                                                                      
                                                                       

 INDEX builds  an index structure  with up  to three levels  of headers        
 with references, or prints the index structure.                               

      Ŀ             
      |       |                                                  |             
      |       |    <1|n> 's1' <'s2' <'s3'>> <<.> <ref>>          |             
      |  .IX  |                                                  |             
      |       |    <1|n> . <DUMP|PURGE>                          |             
      |       |                                                  |             
                   

 This control word does not cause a break.                                     

 <1|n>:  specifies the index structure (from 1 to 9) on which the oper-        
    ation is to be performed.  If omitted, structure 1 is used.                

 Building the Index                                                            

 's1' <'s2' <'s3'>>:  adds  up to three levels of index  headers to the        
    index structure.  The index headers may be specified as undelimited        
    strings,  or as delimited strings  if they contain embedded blanks.        
    The current output page number will be used as the reference entry.        
 <<.>  <ref>>:  specifies  a  "reference string"  that  is  to be  used        
    instead of the current output page  number for the reference entry.        
    If s3 (or s2 and s3)  is  omitted,  then the control word indicator        
    (normally period) must be placed between the index level(s) and the        
    reference operand.   If all four operands  are present,  the use of        
    the control word indicator as a separator is optional.   Use of the        
    control word indicator means a reference must follow,  even if null        
    (see the Example below).                                                   

 It is possible  to designate one or more reference  entries as primary        
 reference entries,   so that  they will  appear first  in the  list of        
 reference entries  for that index  header entry,  regardless  of where        
 they appeared in  the input.   If the reference entry  is an asterisk,        
 then the  current page number  will be  used as the  primary reference        
 entry.   If the reference entry is a character string starting with an        
 asterisk,  then the characters following the  asterisk will be used as        
 the primary reference entry.   The asterisk character used to identify        
 a primary reference may be changed with a ".DC PIX" control word.             

 Printing the Index Structure                                                  

 .  DUMP:  DUMP  causes it to be  output and then deleted.    The index        
    structure will be printed in  alphabetic order within levels.   For        
    purposes of ordering the level entries,  the entries are treated as        
    if entered in uppercase as defined by the Translate Uppercase (.TU)        
    control word.                                                              
       A list of characters  may be specified that are to  be sorted as        
    if they were blanks with the ".DC IXB" control word.  Characters to        

                                 - 95 -                                        
                                                                               
 IndeX                                                  Waterloo SCRIPT        


    be  totally  ignored  for  sorting purposes  may  be  defined  with        
    ".DC IXI".                                                                 
       Index references on a range of consecutive pages are joined with        
    the "&SYSPRS" symbol,   Page Range Separator,  which  defaults to a        
    hyphen  character (-)   but may  be redefined  before printing  the        
    index.   Other references are separated  by the Page List Separator        
    symbol,  ",  ",  which defaults  to comma/blank (, ).   The default        
    range character may be redefined or disabled with ".DC IXJ".   Only        
    internally generated page numbers are eligible for joining, never a        
    user reference string.   A null reference between two references on        
    consecutive  pages  will  make   those  references  ineligible  for        
    joining.                                                                   
 .  PURGE:   PURGE causes  the index  structure to  be deleted  without        
    printing it.                                                               

 NOTES                                                                         
 (1) This control word will be ignored  if the NOINDEX option is speci-        
     fied.  This can reduce the processing time for draft documents.           

 EXAMPLES                                                                      
 (1) .ix 'level1' 'level2'                                                     
     adds  a first-  and a  second-level  header and  the current  page        
     number as the reference entry, to index structure 1.                      
 (2) .ix 2 'level1' . 'see...'                                                 
     adds a  first-level header  and the  reference string  "see..." to        
     index structure 2.                                                        
 (3) .ix 'level1' . ''                                                         
     adds a  first-level header  and a  null reference  entry to  index        
     structure 1.                                                              
 (4) .ix 'level1' 'level2' . *                                                 
     adds a first- and second-level index  header to index structure 1,        
     using the current page number as a primary reference entry.               
 (5) .ix 'level1' . '*text'                                                    
     adds a first-level  index header to index structure  1,  using the        
     characters "text" as the primary reference entry.                         
 (6) The index  structure is printed with  the DUMP operand.    See the        
     Index Entry control word (.IE)  for  customizing the format of the        
     result.                                                                   
       .ix . DUMP                                                              


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                 - 96 -                                        
                                                                               
 Waterloo SCRIPT                                                JUstify        


 Ŀ                                                                      
 | .JU  |                                                                      
                                                                       

 JUSTIFY causes output lines to be padded with inter-word blanks to the        
 right margin.                                                                 

      Ŀ             
      |       |                                                  |             
      |       |    <ON|HALF|OFF|                                 |             
      |  .JU  |     Left|Right|Centre|                           |             
      |       |     INSIDE|OUTSIDE>                              |             
      |       |                                                  |             
                   


 OFF:  suppresses the  justification process.   If Concatenate  is OFF,        
    input lines  will be  copied to  output lines  on a  "one for  one"        
    basis;  if  Concatenate is  ON,  the  output line  will retain  its        
    "ragged right" style from the point in the concatenation process at        
    which SCRIPT decides it cannot get any more on the output line.            
 ON:  On output devices that support "proportional spacing", the inter-        
    word blanks will be equal between all words on the output line.  On        
    other devices,  the following justification algorithm is used until        
    no blanks remain  to be distributed between the  words:   one extra        
    blank is first placed after each period, exclamation mark, or ques-        
    tion mark in the  output line;  then an extra blank  will be placed        
    after any colon  or semi-colon,  and then after any  comma or right        
    parenthesis;  if more blanks must still  be added they are distrib-        
    uted at equidistant places between words.                                  
 HALF:  produces an effect between  "ragged right" and "full justifica-        
    tion" by only  distributing half of the blanks that  it would under        
    "ON".                                                                      
 <Left|Right|Centre|Center>:   causes  the  output  line  to  be  left-        
    justified, right-justified or centered.                                    
 <INSIDE|OUTSIDE>:   INSIDE  causes  odd-numbered  pages  to  be  left-        
    justified and  even-numbered pages to be  right-justified;  OUTSIDE        
    does the opposite.                                                         

 This control word causes a break.   ON  is in effect until a ".JU OFF"        
 or ".FO OFF" is encountered.   An omitted  operand is treated as "ON".        
 The  Format control  word combines  the functions  of Concatenate  and        
 Justify.                                                                      


                                                                               


                                                                               


                                                                               


                                                                               
                                 - 97 -                                        
                                                                               
 Left Adjust                                            Waterloo SCRIPT        


 Ŀ                                                                      
 | .LA  |                                                                      
                                                                       

 LEFT ADJUST  causes the specified  number of  input lines to  be left-        
 adjusted on output.                                                           

      Ŀ             
      |       |                                                  |             
      |  .LA  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   

 This control word causes a break.  The operands are identical to those        
 for  the Center  (.CE)  control  word;   see the  .CE description  for        
 details.   The effect is  as if the input lines were  output under the        
 influence of ".FO OFF".                                                       


                                                                               
 Ŀ                                                                      
 | .LB  |                                                                      
                                                                       

 LEADING BLANK is  generated internally by SCRIPT to cause  a break for        
 each input line that starts with one or more blanks.                          

      Ŀ             
      |       |                                                  |             
      |  .LB  |    <line>                                        |             
      |       |                                                  |             
                   

 An input text line  that begins with one or more  blanks will normally        
 cause a break in the output,  and the next output line will start with        
 the leading blank(s).  The break is actually done by the ".LB" control        
 word that  is generated  and executed before  the line  containing the        
 leading blank is processed.   The generated ".LB" control word has the        
 same function as the Break (.BR) control word.                                
    To alter the function of this generated ".LB" control word, you may        
 use .DM to define a macro named "LB".   This macro might be defined to        
 do nothing,   or it  might create  a new  paragraph by  issuing a  .SK        
 control word,  or  whatever else is appropriate to your  needs.   If a        
 "LB" macro is defined, the original input line will be processed imme-        
 diately afterwards.   The leading blank will still be present but this        
 will not cause a break.   The original  text line with a leading blank        
 could be processed differently by  using ".RV symbol FILE" and manipu-        
 lating the original text in a Set Symbol.                                     
    This control  word causes a  break.   When generated  internally by        
 SCRIPT, it has no operand line.  It is not generated to create a break        
 when ".LI ON" is in effect.                                                   
    See Define  Character (.DC  LB)  for a  description of  how leading        
 blank characters are processed.                                               


                                 - 98 -                                        
                                                                               
 Waterloo SCRIPT                                          Leading Blank        


 EXAMPLES                                                                      
 (1) .dm LB /.cc 2/.sk c/                                                      
     This is the first paragraph of formatted text.                            
     It does not start with any leading blanks.                                
          This is the second paragraph of formatted text.                      
     It starts with five leading blanks                                        
     and creates a blank line.                                                 

     This example produces the following output:                               

     This is the first paragraph of formatted text.   It does not start        
     with any leading blanks.                                                  

          This is the  second paragraph of formatted  text.   It starts        
     with five leading blanks and creates a blank line.                        


                                                                               
 Ŀ                                                                      
 | .LE  |                                                                      
                                                                       

 LEADING SPACE suppresses or allows the printing of blank lines created        
 by .SP at the top of an output column or page.                                

      Ŀ             
      |       |                                                  |             
      |  .LE  |    <ON|OFF>                                      |             
      |       |                                                  |             
                   


 ON:  At the start of SCRIPT processing, .LE is ON:  blank lines gener-        
    ated by  .SP are never thrown  away if they  occur at the top  of a        
    column or page.   For example,  if a ".SP 10" occurs six lines from        
    the bottom  of the page,   the remaining  four blank lines  will be        
    printed at the  top of the next  page.   If the operand  is omitted        
    then "ON" is assumed.  The initial value is also "ON".                     
 OFF:  causes such spaces  to be thrown away at the top  of a column or        
    page,  even if they occur within a text block such as a Conditional        
    Column (.CC) or Floating Keep (.FK).                                       

 This control word  does not cause a break.   Leading  spaces and skips        
 are allowed on the first page of the output.   Thereafter, blank lines        
 generated by .SK are always "thrown away"  if they occur at the top of        
 a column or page.   This discussion applies only to the text area, not        
 to running top titles or top-margin blank lines.                              


                                                                               


                                                                               


                                 - 99 -                                        
                                                                               
 LIteral                                                Waterloo SCRIPT        


 Ŀ                                                                      
 | .LI  |                                                                      
                                                                       

 LITERAL causes  following input  records to be  treated as  text lines        
 even if they begin with the control word indicator.                           

      Ŀ             
      |       |                                                  |             
      |  .LI  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   

 This control word does not cause a break.                                     

 line:  causes the specified "line" to be  treated as text,  even if it        
    starts with the control word indicator.                                    
 <ON|OFF>:  If ON is specified, then all subsequent input lines will be        
    treated as  text until  a physical input  line is  encountered that        
    contains ".LI OFF" starting in column one.                                 
 <1|n>:  causes the next "n" input lines to be treated as text.   If no        
    operand at  all is  specified,  the  following input  line will  be        
    treated as literal text.                                                   

 NOTES                                                                         
 (1) An input record may begin with two occurrences of the control word        
     indicator character.   This indicates that  the control word which        
     follows always a native control word and never a macro name.              
 (2) An input record that begins with  the control word indicator char-        
     acter followed immediately by a backspace character will always be        
     treated as text.                                                          
 (3) If the control  word indicator is followed by a  single quote ".'"        
     then any  control word separator characters,   normally semi-colon        
     ";", will be treated as any other character in the record.                
 (4) The control word  indicator is normally the  period "." character.        
     It may be altered with the Define Character (.DC LI) control word.        


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                - 100 -                                        
                                                                               
 Waterloo SCRIPT                                            Line Length        


 Ŀ                                                                      
 | .LL  |                                                                      
                                                                       

 LINE LENGTH defines the horizontal size of  the output line to be used        
 in "formatted" mode.                                                          

      Ŀ             
      |       |                                                  |             
      |  .LL  |    <60|h|+h|-h>                                  |             
      |       |                                                  |             
                   

 This control word  causes a break.   If used without  an operand,  the        
 value is taken  from the value of  the LLength SCRIPT option  (60,  if        
 none was specified).   An  operand of the form "+h" or  "-h" adds this        
 value  algebraically to  the  current line  length,   so  long as  the        
 resulting value is 2  or greater and not more than  240.   If the text        
 area is  subsequently divided into multiple  columns by using  the SET        
 operand of  the .CD control word,   the total length of  the multiple-        
 column output lines plus the inter-column "gutters" will add up to the        
 .LL value.                                                                    
    Almost all line printers and many fixed-pitch terminals print at 10        
 characters per horizontal inch.   For such output devices, the default        
 value of 60 used in combination with ".AD 10" produces a 1.5-inch left        
 margin and a 1-inch right margin.                                             

 EXAMPLES                                                                      
 (1) This sets the line length to 65 characters:                               
       .ll 65                                                                  
 (2) This sets the line length to six and one half inches.   The number        
     of characters would depend on the  value specified for the Charac-        
     ters Per Inch (CPI) option when SCRIPT was invoked:                       
       .ll 6.5i                                                                


                                                                               
 Ŀ                                                                      
 | .LN  |                                                                      
                                                                       

 IMMEDIATE LINE positions  subsequent output to start  at the specified        
 line of the text area, which may be further down the current column or        
 higher up on the next.                                                        

      Ŀ             
      |       |                                                  |             
      |  .LN  |    <v|+v|-v>                                     |             
      |       |                                                  |             
                   


                                                                               


                                - 101 -                                        
                                                                               
 immediate LiNe                                         Waterloo SCRIPT        


 <v>:  An operand must be specified.    This specifies a vertical posi-        
    tion within the text area of the page.  An operand of "1" specifies        
    the first line following the Top Margin.    If a line higher in the        
    column than the current output line is specified,  a "column eject"        
    is done first, followed by the required number of vertical spaces.         
 <+v|-v>:   An operand  of the  form "+v"  spaces down  on the  current        
    column and an operand  of the form "-v" continues higher  up in the        
    next column.                                                               

 This control word causes a break.                                             

 NOTES                                                                         
 (1) When spacing, numbered Remotes are not invoked.                           
 (2) Leading  spaces are  allowed  on a  page whether  or  not the  .LE        
     control word has been specified.                                          
 (3) This control word cannot be used within the BEGIN/END range of any        
     "in-storage" text block such as a .CC or .FN.                             

 EXAMPLES                                                                      
 (1) .ln 22                                                                    
     A break is caused and subsequent  output is positioned to the next        
     occurrence of line 22 in the  text area.   If currently above line        
     22, this is accomplished by spacing down the text area to the 22nd        
     line.   If  currently below  line 22,  this  is accomplished  by a        
     column  eject (a  page eject,   in single-column  mode)  and  then        
     spacing down to the 22nd line of the text area.                           
 (2) .ln -5                                                                    
     This ejects the current column (or page)  and spaces to five lines        
     higher than the former position.  This would cause an error if the        
     former position  were not at  least five  lines down from  the top        
     margin.                                                                   


                                                                               
 Ŀ                                                                      
 | .LS  |                                                                      
                                                                       

 LINE SPACING causes zero or more  "conditional skip" blank lines to be        
 produced after each output line in the text area.                             

      Ŀ             
      |       |                                                  |             
      |  .LS  |    <0|n|+n|-n|ON|OFF>                            |             
      |       |                                                  |             
                   


 <0|n|+n|-n>:  After each  subsequent output line,  SCRIPT  will inter-        
    nally generate a ".SK n C".    Therefore,  consecutive output lines        
    created by text  will be separated by (at least)   "n" blank lines.        
    If a SKIP (.SK) or SPACE (.SP) control word is used to create blank        
    lines between text,   the maximum of the  .SK or .SP value  and the        
    "conditional skip"  .LS value  will be used.    The operand  may be        

                                - 102 -                                        
                                                                               
 Waterloo SCRIPT                                           Line Spacing        


    signed,  in which case the current  line space value is incremented        
    or decremented.                                                            
 <ON|OFF>:  ON implies one line or  Double Spacing (.DS).   OFF implies        
    zero lines or Single Spacing (.SS).                                        

 This control word  causes a break.   An omitted operand  is treated as        
 Single Space.   ".SK" and ".SP" control words encountered with ".LS n"        
 in effect will produce "n" times the specified skips or spaces.   SKIP        
 and SPACE  control words  specified with  the "Absolute"  operand will        
 always produce "n" blank lines in the output.   A ".FN BEGIN" sets the        
 .LS value to 0 at the start of the footnote.   Numeric operands of .CC        
 and .CP are not multiplied by "n" when ".LS n" is in effect.                  


                                                                               
 Ŀ                                                                      
 | .LT  |                                                                      
                                                                       

 LEADING TAB is generated internally by  SCRIPT to cause a break before        
 processing an input line that begins with one or more leading tabs.           

      Ŀ             
      |       |                                                  |             
      |  .LT  |    <line>                                        |             
      |       |                                                  |             
                   

 This control word causes a break.  An input text line that begins with        
 a tab will normally cause a break in the output (see .BR for details).        
 The break is actually caused by the  ".LT" control word that is gener-        
 ated and executed  by SCRIPT before the  text with the leading  tab is        
 processed.   You can alter this by using .DM to define a "LT" macro to        
 do  whatever is  appropriate  for your  needs.   If  a  "LT" macro  is        
 defined,  the original input line will be processed immediately after-        
 wards;  the leading tab(s)  will still be present but will not cause a        
 break unless something in your macro causes one.  When generated, this        
 control word has no  operand line.   It is not generated  by SCRIPT to        
 cause a break when ".LI ON" is in effect.                                     

 EXAMPLES                                                                      
 (1) .dm LT /.cm/                                                              
     .tb 20 '.'40                                                              
     .dc tb >                                                                  
     .br                                                                       
     >twenty                                                                   
     >forty                                                                    
     The above example produces the following output:                          
                    twenty .............forty                                  


                                                                               


                                                                               
                                - 103 -                                        
                                                                               
 Multiple Column                                        Waterloo SCRIPT        


 Ŀ                                                                      
 | .MC  |                                                                      
                                                                       

 MULTIPLE COLUMN restores the columns-per-page  environment that was in        
 effect just before the last-executed Single Column (.SC) control word.        

      Ŀ             
      |       |                                                  |             
      |  .MC  |                                                  |             
      |       |                                                  |             
                   

 This control word causes a break.    It takes no operands.   If Single        
 Column (.SC)  had  not been previously specified,  no  other action is        
 taken.                                                                        


                                                                               
 Ŀ                                                                      
 | .ME  |                                                                      
                                                                       

 MACRO EXIT  causes immediate  termination of the  macro or  input file        
 currently being processed  and resumption of the  higher-level file or        
 macro (if any) or termination of processing (if none).                        

      Ŀ             
      |       |                                                  |             
      |  .ME  |    <line>                                        |             
      |       |                                                  |             
                   

 This control word does  not cause a break.   If an  operand "line" has        
 been specified,  it will be processed  as an input line immediately on        
 return to the higher-level file or macro.   If the .ME control word is        
 used in the highest-level file, SCRIPT advances to the top of the next        
 page  and  prints  any  stacked   output  before  termination  of  all        
 processing.                                                                   

 EXAMPLES                                                                      
 (1) .me .im nextfile                                                          
     This will  terminate the file  or macro currently  being processed        
     and  cause the  higher-level  file or  macro  to imbed  "nextfile"        
     before it does anything else.                                             
 (2) .me .me                                                                   
     This will  terminate the current  file or  macro and will  in turn        
     terminate the higher-level file or macro.                                 


                                                                               


                                                                               

                                - 104 -                                        
                                                                               
 Waterloo SCRIPT                                     Macro Substitution        


 Ŀ                                                                      
 | .MS  |                                                                      
                                                                       

 MACRO SUBSTITUTION prevents the invocation of user-defined macros.            

      Ŀ             
      |       |                                                  |             
      |  .MS  |    <ON|OFF>                                      |             
      |       |                                                  |             
                   

 This control word does not cause a break.  No default is assumed.   ON        
 is the  initial setting,  and SCRIPT  will therefore invoke  any macro        
 whose name is  used as a control word.   OFF  suppresses this;  SCRIPT        
 will assume  that all  control lines  thereafter are  "native" control        
 words, without checking to see if a macro by the same name exists.  ON        
 restores this checking.   Even with  Macro Substitution "OFF",  macros        
 may still be invoked by using Execute Macro (.EM).   Named Remotes are        
 not affected by the .MS setting.                                              


                                                                               
 Ŀ                                                                      
 | .NF  |                                                                      
                                                                       

 NO FORMAT suppresses or enables the formatting process.                       

      Ŀ             
      |       |                                                  |             
      |  .NF  |    <ON|OFF>                                      |             
      |       |                                                  |             
                   

 This is an archaic form of the Format (.FO) control word;  see the .FO        
 description for details.                                                      


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                - 105 -                                        
                                                                               
 Null Line                                              Waterloo SCRIPT        


 Ŀ                                                                      
 | .NL  |                                                                      
                                                                       

 NULL LINE  is generated internally  by SCRIPT  each time a  null input        
 line is encountered.                                                          

      Ŀ             
      |       |                                                  |             
      |  .NL  |                                                  |             
      |       |                                                  |             
                   

 This control word does not cause a break.  Any operands specified will        
 be ignored.    Any pending input continuation  will be cleared  if the        
 previous input line ended with a continuation character.                      
    A null input  record may result from Terminal input  (.TE),  from a        
 macro definition line or  as a result of substitution of  a set symbol        
 that has a null value.  If some other effect is desired for null input        
 records then you may define a macro  named "NL" to perform whatever is        
 required.                                                                     
    An input line that contains only,   one or more blank characters is        
 processed by the Blank Line (.BL) control word.   A null input line is        
 different from a blank input line.                                            

 EXAMPLES                                                                      
 (1) .dm NL /.br/                                                              
     Once this macro  has been defined,  any null  lines encountered in        
     the input will cause the NL macro to be invoked,  which will cause        
     a break.                                                                  
 (2) .dm NL /.br/.cc 2/                                                        
     Each time  a null input  line is  encountered,  the NL  macro will        
     cause a  break and make  sure that there  are at least  two usable        
     lines remaining in the text area.                                         


                                                                               
 Ŀ                                                                      
 | .OC  |                                                                      
                                                                       

 OUTPUT COMMENT causes one line of  information to be inserted into the        
 output as a comment.                                                          

      Ŀ             
      |       |                                                  |             
      |  .OC  |    <information>                                 |             
      |       |                                                  |             
                   

 This  control word  does not  cause a  break.   If  specified with  no        
 operand, no action is taken.  The operand line is not itself formatted        
 and  does not  add to  the count  of lines  on the  output page  being        
 formatted.   The  comment line  is immediately  written to  the output        

                                - 106 -                                        
                                                                               
 Waterloo SCRIPT                                         Output Comment        


 file.   Thus  if it  were to occur  within a  paragraph or  within the        
 BEGIN/END range of an "in-storage" text  block (.CC,  .FN,  etc),  the        
 position of the comment  in the output would not agree  with its posi-        
 tion in the input.   This would  be most noticeable in multiple-column        
 mode.   This  control word would normally  be used when  the formatted        
 output is  to be re-processed by  another program,  an editor,   or an        
 intelligent output device.                                                    

 NOTES                                                                         
 (1) If multiple  passes are in effect,   the Output Comments  are only        
     written during the last pass.                                             
 (2) Output Comments are  processed even if the current page  is not to        
     be displayed because of FROM page options.                                


                                                                               
 Ŀ                                                                      
 | .OF  |                                                                      
                                                                       

 OFFSET causes all output lines after the next output line to be offset        
 to the right of the current left Indent value.                                

      Ŀ             
      |       |                                                  |             
      |  .OF  |    <0|h|+h|-h <ON|OFF>>                          |             
      |       |                                                  |             
                   


 <0|h|+h|-h>:  The .OF value is relative  to the left indent defined by        
    the last .IN control word encountered.  An operand of the form "+h"        
    adds the value to the current offset.   An operand of the form "-h"        
    subtracts the value from the current offset.  The offset remains in        
    effect until another .HI, .IN or .OF control word is encountered.          
 ON|OFF:  When text is being offset, it is often a requirement that the        
    start of the second and following  lines be aligned with some char-        
    acter in the first.   A list of  numbered items is such an example.        
    When offsetting text by "n" columns and the "n"th input column is a        
    blank then  the vertical  alignment of the  following text  will be        
    done.                                                                      
       The alignment will not  be done if the "n"th character  is not a        
    blank or if  the offset value is specified as  an absolute measure-        
    ment such  as inches or centimeters.    You can force it  by adding        
    "OFF" as a second operand to the control word.                             

 This control word causes a break.  If no operand is specified, zero is        
 assumed.                                                                      


                                                                               


                                                                               

                                - 107 -                                        
                                                                               
 OFfset                                                 Waterloo SCRIPT        


 NOTES                                                                         
 (1) Consider the following input sequence:                                    
       .OF h                                                                   
       <text>                                                                  
       .OF i                                                                   
       <text>                                                                  
     The second offset  will be added to  the first if "i"  is a signed        
     integer.    If "i"  is unsigned,   this addition  will not  occur.        
     Phrased differently:   if "i" is signed, all but the first line of        
     the  first section  together with  the  first line  of the  second        
     section will be  offset "h" spaces and  all but the first  line of        
     the second section will be offset "h" + "i" spaces.                       
 (2) An Offset following  another Offset with no  intervening text will        
     override the first value.                                                 
 (3) If Hanging Indent is in effect,  an Offset control word will over-        
     ride the next time the Hanging Indent is to be used.                      
 (4) The System Set Symbol &SYSOF will return the current Offset value.        

 EXAMPLES                                                                      
 (1) A numbered  list of  points can  be formatted  with the  following        
     sequence:                                                                 
        <last line of text before list>                                        
       .in 5                                                                   
       .of 4                                                                   
       (1) <text>                                                              
       .of 4                                                                   
       (2) <text>                                                              
          .                                                                    
          .                                                                    
       .in                                                                     


                                                                               
 Ŀ                                                                      
 | .OJ  |                                                                      
                                                                       

 OUT JUSTIFY  aligns the specified  number of  input text lines  to the        
 outside of the  page (the side opposite  from the side on  which it is        
 bound).                                                                       

      Ŀ             
      |       |                                                  |             
      |  .OJ  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   

 This control word causes a break.   It performs like Left Adjust (.LA)        
 on even-numbered  pages and like  Right Adjust (.RI)   on odd-numbered        
 pages.   The operands and other  considerations are identical to those        
 for the Center control word; see the .CE description for details.             


                                                                               

                                - 108 -                                        
                                                                               
 Waterloo SCRIPT                                         Output Overlay        


 Ŀ                                                                      
 | .OO  |                                                                      
                                                                       

 OUTPUT OVERLAY causes output lines to  be overlaid with a user-defined        
 string.                                                                       

      Ŀ             
      |       |                                                  |             
      |       |    <1|n|ON <string>>                             |             
      |  .OO  |                                                  |             
      |       |    <OFF|DELETE>                                  |             
      |       |                                                  |             
                   

 This control word does not cause a break.                                     

 <1|n|ON <string>>:  The  following output line,  or  "n" output lines,        
    will be overstruck with the output overlay "string".   The "string"        
    is processed as a No Format input line  and is placed on top of the        
    previous line.                                                             
       The  "string" is  defined  starting one  blank  after the  first        
    operand on the  same line.   If omitted,  the "string"  will be the        
    next input record.  The first operand specifies the number of times        
    the  overlay  operation  is  to be  performed.    An  "ON"  operand        
    continues the process indefinitely.   More  than one Output Overlay        
    "string" may be specified.  These are printed in the order in which        
    they are defined.   If a Skip  or Space Conditional is pending when        
    the overlay is defined then the  overlay will not print until after        
    the blank lines are output.                                                
 <OFF|DELETE>:   An "OFF"  operand terminates  the first  entry on  the        
    queue;   a "0"  operand defines  an entry  that is  never used;   a        
    "DELETE" operand purges the entire queue.  An entry that is deleted        
    will not be used on an output line  that is not yet full.   A break        
    may  be used  to terminate  the  current line  before deleting  the        
    output overlay.                                                            

 EXAMPLES                                                                      
 (1) To facilitate margin headers:                                             
       .oo 1 Head One                                                          
       .oo 1                                                                   
       Head Two                                                                
       .in 1.3i                                                                
       This is some text that will have a margin header                        
       defined in the left margin.  Those header lines                         
       read "Head One" and "Head Two".                                         
     This sequence  of control  words and  text produces  the following        
     result:                                                                   

              This is some text that will  have a margin header defined        
              in the left margin.   Those  header lines read "Head One"        
              and "Head Two".                                                  


                                                                               
                                - 109 -                                        
                                                                               
 OVerlay                                                Waterloo SCRIPT        


 Ŀ                                                                      
 | .OV  |                                                                      
                                                                       

 OVERLAY causes blanks  in the specified number of input  text lines to        
 be overlaid by a user-defined string.                                         

      Ŀ             
      |       |                                                  |             
      |       |    <1|n|ON <string>>                             |             
      |  .OV  |                                                  |             
      |       |    <OFF|DELETE>                                  |             
      |       |                                                  |             
                   

 This control word does not cause  a break.   Every occurrence of blank        
 in the  subsequent text  input lines  will be  replaced by  the corre-        
 sponding character in  the "string",  up to the maximum  length of the        
 "string" and  the input  text line.    An "ON"  operand continues  the        
 process indefinitely.   An  "OFF" operand terminates the  process.   A        
 "DELETE" operand  purges the  entire queue.    Multiple Input  Overlay        
 strings are queued.  See Output Overlay (.OO) for more information.           

 EXAMPLES                                                                      
 (1) To facilitate block building:                                             
       .ov on                                                                  
              |       *                                                        
       ****************                                                        
       *                                                                       
       *    Title                                                              
       *                                                                       
       ****************                                                        
       .ov off                                                                 
     This input sequence produces the following result:                        
       ****************                                                        
       *      |       *                                                        
       *    Title     *                                                        
       *      |       *                                                        
       ****************                                                        


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                - 110 -                                        
                                                                               
 Waterloo SCRIPT                                             PAge eject        


 Ŀ                                                                      
 | .PA  |                                                                      
                                                                       

 PAGE EJECT positions output to the top of the next physical page.             

      Ŀ             
      |       |                                                  |             
      |       |    <n|+n|-n <m|+m|-m>>                           |             
      |  .PA  |    <NOSTART>                                     |             
      |       |    <ODD|EVEN>                                    |             
      |       |                                                  |             
                   

 This control word causes a break.  When it is encountered, the rest of        
 the current page is skipped, any saved footnote lines are printed, the        
 Footing Space  lines are printed,   and a new  page is begun.    If no        
 operand is specified then the next  page will be numbered sequentially        
 one more than the current page number.                                        

 <n|+n|-n <m|+m|-m>>:   An operand of  the form  "n" will make  the new        
    page be numbered "n".   A "+n" will make the new page number be "n"        
    greater than the number of the page on which the .PA occurred,  and        
    "-n" will make it  be "n" less.   A second operand  of the form "m"        
    may optionally be  specified to make SCRIPT number  and count pages        
    in the form  "n.m",  incrementing "m" on each page  instead of "n".        
    Thus a chapter or an update  to be page-numbered 3,  3.1,  3.2, ...        
    would be started by specifying ".PA 3 0".                                  
 <NOSTART>:  The current page is terminated  and the next page will not        
    be started.  This is the normal action.                                    
 <ODD|EVEN>:  ODD positions to the top of the next odd-numbered page if        
    not already  there.   EVEN positions to  the top of the  next even-        
    numbered page if not already there.                                        

 NOTES                                                                         
 (1) If the  STOP option was specified  when SCRIPT was  invoked,  then        
     each time the bottom of a page  is reached,  SCRIPT will eject the        
     page and pause to allow you to insert the next sheet of paper.            
 (2) If the current page is empty and ".EM NO" is in effect, .PA has no        
     effect other  than causing  the page number  to be  incremented or        
     reset.   Consequently,  top  running titles are not  printed until        
     there is a line about to be printed in the text area.  This allows        
     you to  do the  "page eject"  and THEN  make whatever  changes are        
     required to the page-layout environment.                                  
 (3) When numbering  pages with  a decimal  portion,  the  even or  odd        
     attribute is  determined by summing the  two portions of  the page        
     number.   Thus 3.0 is odd and 3.1 is  even,  4.5 is odd and 4.6 is        
     even.                                                                     
 (4) If the current  page number is "3.4"  then a .PA with  no operands        
     would place the output at the top of page "4".                            


                                                                               


                                - 111 -                                        
                                                                               
 PErform                                                Waterloo SCRIPT        


 Ŀ                                                                      
 | .PE  |                                                                      
                                                                       

 PERFORM processes the remainder of the current physical input line (if        
 any) or the next physical input line (if none) the specified number of        
 times.                                                                        

      Ŀ             
      |       |                                                  |             
      |  .PE  |    <1|n|ON|OFF|DELETE>                           |             
      |       |                                                  |             
                   

 This control  word does not  cause a  break,  although the  line being        
 performed may.    Perform provides a  primitive facility  for one-line        
 loops.                                                                        

 <1|n|ON>:  If used with no operand,  the  line to be performed will be        
    processed once.    An integer  operand "n"  causes the  line to  be        
    processed "n" times,   and "ON" causes it  to be processed up  to a        
    maximum of 32,767 times or until  Perform is turned OFF or DELETEd.        
    performs within performs are allowed.                                      
 0:  An zero operand terminates processing  of the line currently being        
    performed but will not terminate an active Perform line.                   
 <OFF|DELETE>:  An "OFF" operand terminates  all processing of the line        
    currently being performed.   DELETE terminates all nested levels of        
    performs.                                                                  

 EXAMPLES                                                                      
 (1) To produce 20 centered lines of "Hi There!":                              
       .pe 20;.ce;Hi There!                                                    
 (2) Alternatively,  the "object" of the Perform  may be the next phys-        
     ical input line:                                                          
       .pe 20                                                                  
       .ce;Hi There!                                                           
 (3) To format the first 1000 numbers into 10 paragraphs of 100 each:          
       .sr i = 0;.* number of numbers done                                     
       .sr j = 0;.* "paragraph" counter                                        
       .dm GROUP begin                                                         
       .if &j eq 0 .pp                                                         
       .sr i = &i + 1;&i                                                       
       .sr j = &j + 1                                                          
       .if &j eq 10 .sr j = 0                                                  
       .dm GROUP end                                                           
       .pe on;.GROUP;.if &i ge 1000 .pe delete                                 
 (4) The same example as above, using nested performs:                         
       .sr i=0;.pe 10;.pp;.pe 100;.sr i=&i+1;&i                                


                                                                               


                                                                               

                                - 112 -                                        
                                                                               
 Waterloo SCRIPT                                          Previous Font        


 Ŀ                                                                      
 | .PF  |                                                                      
                                                                       

 PREVIOUS FONT restores the last font name saved by Begin Font.                

      Ŀ             
      |       |                                                  |             
      |  .PF  |                                                  |             
      |       |                                                  |             
                   

 This control word does  not cause a break.   If no  font name has been        
 saved, an error will result.  The first font name created by the first        
 Define Font (.DF)   control word is always available if  no fonts have        
 been begun and this font name cannot be removed.                              

 NOTES                                                                         
 (1) This control word is treated as  a comment for output devices that        
     do not support fonts.                                                     


                                                                               
 Ŀ                                                                      
 | .PH  |                                                                      
                                                                       

 PHOTO FONT  defines character sets and  fonts for output  devices with        
 multiple font capabilities.                                                   

      Ŀ             
      |       |                                                  |             
      |       |    <ON fontid>                                   |             
      |       |    <ichar font# wid ochar>                       |             
      |  .PH  |    <OFF fontid>                                  |             
      |       |    <CHANGE fontid ichar font# wid ochar>         |             
      |       |    <DUMP  <fontid <...>>>                        |             
      |       |    <SET n>                                       |             
      |       |                                                  |             
                   

 This control word does not cause a break.   It defines "Logical Fonts"        
 of  characters that  may be  selected by  the Define  Font command  in        
 conjunction with  the control words that  are used to  emphasize text.        
 The first is a Roman or Normal font,  used by a normal character in an        
 input text  record.   The second is  an Italic font,  used  whenever a        
 character is underscored.   The underscoring  might exist in the orig-        
 inal input or be the result of  an Underscore (.US)  or Underscore and        
 Capitalize (.UC) control word.   The third is a Bold font,  used when-        
 ever an input character is overstruck  with itself.   This can be done        
 with the Bold (.BD)  control word.    The fourth automatic font is the        
 Bold Italic font.   A Bold Italic character  is one that is both over-        
 struck with itself  and underscored,  as happens with  the Bold Italic        
 (.BI) control word.                                                           

                                - 113 -                                        
                                                                               
 PHoto font                                             Waterloo SCRIPT        


 Logical Font Definitions                                                      

 fontid <FROM m TO n>:  A logical  font of characters is defined by the        
    name of the font.  The name may consist of up to 32 arbitrary char-        
    acters and is  treated as if entered in  uppercase.   Following the        
    fontid,  FROM  with a minimum pointsize  value for the font  may be        
    specified and TO with a maximum pointsize value for the font.   The        
    fontid and its minimum/maximum pointsize together define the actual        
    name for the font.    It is possible thus to have  a font with name        
    "TIMES-ROMAN FROM 5 TO 10" and  another with name "TIMES-ROMAN FROM        
    11 TO 20".                                                                 
       The "m" and  "n" pointsize operands default to 4  and 72 points,        
    respectively.   One  "point" is roughly equal  to 1/72 of  an inch.        
    Whenever the fontid is selected,   the desired pointsize is matched        
    with the minimum and maximum pointsize of the font definition.             
 ON fontid:   A logical  font of characters  is defined  beginning with        
    ".PH ON" followed by the name of the font.                                 
 OFF fontid:  A ".PH OFF" control word with a "fontid" that matches the        
    previous ".PH ON" control word "fontid" closes the font definition,        
    and invalidates  further use  of the .PH  with the  four character-        
    definition operands until after another ".PH ON" occurs.                   
 DUMP <fontid <...>>:  displays at the terminal, for each of the speci-        
    fied "fontid"s,   a table  showing each of  the characters  in that        
    font, its font number, relative width, and output character.  If no        
    fontid operand is specified, all known fonts are displayed.                

 Character Definitions                                                         

 ichar font# wid ochar:  After a ".PH ON",  the characters in this font        
    are defined by multiple ".PH" control words with four operands:            
 ichar:  The first, "ichar", is the single character or two hexadecimal        
    digits that  define a  character that  will be  valid in  the input        
    text.   The Backspace  Character (X'16')  and the  Escape Character        
    (X'27') may not be defined as input characters.                            
 font#:  The second operand,  "font#",  is  the physical font number in        
    which the  input character is  to be  found.   The font  number may        
    range from 0 to 32,767.   A font number of 0 means the character is        
    not in  any particular font  but really in  every font (a  space or        
    blank is normally such a character).                                       
 wid:  The third  operand,  "wid",  is the relative width  of the char-        
    acter.   The relative  width multiplied by the  pointsize expresses        
    how wide the character actually is in absolute units.  The width of        
    a character  may vary from 0  to 32767.   Only an  accent character        
    that appears  on top  of another  character might  have a  relative        
    width of 0.   A relative width of minus one is reserved to indicate        
    an undefined input character.                                              
 ochar:  The last operand,  "ochar",  is  the character in character or        
    hex to which  the original input character is to  be translated for        
    output.   The letter "A" as an output character might be the letter        
    "A" on font number one,  but  on font number five the corresponding        
    location could represent another special character.                        
 ichar <ALL|CTL|ASCII|ALPHA|NUM>:  If the input character is "ALL" then        
    all  characters in  the font  are  defined to  have identical  font        
    numbers, widths and output characters.  "CTL" refers to the Control        

                                - 114 -                                        
                                                                               
 Waterloo SCRIPT                                             PHoto font        


    Characters less than a blank  (X'40').   "ALPHA" selects all lower-        
    case and uppercase  alphabetic characters and "NUM"  is the numeric        
    digits from  '0' to '9'.   "ASCII"  selects the 94  printable ASCII        
    characters, not including blank.  If one of these special values is        
    used as "ichar" then the specifying  '=' as the "ochar" defines the        
    Output Character to be the same as the Input Character.                    
 CHANGE fontid ichar font# wid ochar:   re-defines one character in the        
    specified "fontid".   This  is useful when you want  to access many        
    special characters one at a time  but you don't have enough charac-        
    ters on your terminal to account for them all at once.                     

 Definition of Device Units                                                    

 SET n:  defines the number of relative units in one "em space".   This        
    value varies with the target typesetter, but values 18,  54 and 100        
    relative units in  one "em space" are common.   This  value must be        
    set before any input text can be processed.  The value may be reset        
    to the same value many times,  but may never be changed after it is        
    set.                                                                       

 The System  Set Symbol  &SYSFONTS has as  its value  the names  of all        
 currently-defined fonts, each separated by a blank.  It may be used to        
 conveniently DUMP all current fonts.                                          

      Ŀ             
      |       |                                                  |             
      |       |    <CODEPAGE cp-id>                              |             
      |       |    <ichar rel# ochar>                            |             
      |       |    <INIT|ADD|REP cp-id>                          |             
      |  .PH  |    <END cp-id>                                   |             
      |       |    <CHANGE cp-id ichar rel# ochar>               |             
      |       |    <DUMP  <cp-id <...>>>                         |             
      |       |    <FONT   fontid <CODEPAGE cp-id> <n|* ...>>    |             
      |       |    <SET n>                                       |             
      |       |                                                  |             
                   

 This is an alternate implementation for the ".PH" control word that is        
 supported by the IP300, I3820,  PostScript,  QMSlaser and X2700 output        
 devices.                                                                      
    This control  word does  not cause a  break.   It  defines "Logical        
 Fonts" of characters  that may be selected by the  Define Font command        
 in conjunction with the control words that are used to emphasize text.        
 The first is a Roman or Normal font,  used by a normal character in an        
 input text  record.   The second is  an Italic font,  used  whenever a        
 character is underscored.   The underscoring  might exist in the orig-        
 inal input or be the result of  an Underscore (.US)  or Underscore and        
 Capitalize (.UC) control word.   The third is a Bold font,  used when-        
 ever an input character is overstruck  with itself.   This can be done        
 with the Bold (.BD)  control word.    The fourth automatic font is the        
 Bold Italic font.   A Bold Italic character  is one that is both over-        
 struck with itself  and underscored,  as happens with  the Bold Italic        
 (.BI) control word.                                                           


                                - 115 -                                        
                                                                               
 PHoto font                                             Waterloo SCRIPT        


 Logical Font Definitions                                                      

 FONT fontid <CODEPAGE cp-id> n|* <n|* ...>:  A logical font of charac-        
    ters is defined by the name of  a fontid.   The name may consist of        
    up  to 32  arbitrary characters  and is  treated as  if entered  in        
    uppercase.   The  codepage definition defines how  input characters        
    are  to be  mapped into  the  character positions  of the  physical        
    fonts.   Up to ten physical font numbers "n" may be specified or an        
    asterisk "*" which indicates no font exists in this position.   The        
    codepage mapping selects these physical font numbers by their posi-        
    tion in the list.  "+1" is the first, "+2" is the second, etc.             

 Codepage Definitions                                                          

 CODEPAGE cp-id:  A logical font of characters requires a definition of        
    how the input characters are to be defined in the physical fonts of        
    the printer.   A 'cp-id' is the name of a table that maps the input        
    characters into character positions of  one or more physical fonts.        
    A "cp-id" may be  up to 32 characters long and is  treated as if it        
    were entered in uppercase.                                                 
 END cp-id:  A  ".PH END" control word with a "cp-id"  that matches the        
    previous ".PH CODEPAGE"  control word  "cp-id" closes  the codepage        
    definition,  and invalidates further use of  the .PH with the three        
    character-definition  operands until  after another  ".PH CODEPAGE"        
    occurs.                                                                    
 DUMP <cp-id <...>>:  displays at the terminal,  for each of the speci-        
    fied codepages,   a table  showing each of  the characters  in that        
    font, its relative font number, and output character.   If no cp-id        
    operand is specified, all known codepages are displayed.                   

 Character Definitions                                                         

 ichar rel# ochar:  After a ".PH CODEPAGE", the characters in this font        
    are defined by multiple ".PH" control words with three operands:           
 ichar:  The first, "ichar", is the single character or two hexadecimal        
    digits that  define a  character that  will be  valid in  the input        
    text.   The Backspace  Character (X'16')  and the  Escape Character        
    (X'27') may not be defined as input characters.                            
 rel#:  The  second operand,  "rel#",  is  the relative font  number in        
    which the  input character is  to be  found.   The font  number may        
    range from +0 to +10.   A font  number of +0 means the character is        
    not in  any particular font  but really in  every font (a  space or        
    blank is normally such a character).                                       
 ochar:  The last operand,  "ochar",  is  the character position in the        
    physical font to which the original input character is to be trans-        
    lated.   The letter "A" as an  output character might be the letter        
    "A" on relative font number one, but on font number five the corre-        
    sponding location could represent another special character.               
 ichar <ALL|CTL|ALPHA|NUM>:  If  the input character is  "ALL" then all        
    characters in the font are defined  to have identical font numbers,        
    widths and output characters.   "CTL" refers to the Control Charac-        
    ters less than a blank (X'40').   "ALPHA" selects all lowercase and        
    uppercase alphabetic  characters and  "NUM" is  the numeric  digits        
    from '0' to '9'.  If one of these special values is used as "ichar"        

                                - 116 -                                        
                                                                               
 Waterloo SCRIPT                                             PHoto font        


    then the specifying '=' as the "ochar" defines the Output Character        
    to be the same as the Input Character.                                     
 INIT|ADD|REPlace cp-id:   uses character definitions from  an existing        
    codepage to alter the codepage being defined.  "INIT" will sets all        
    character entries with  those from the specified  codepage.   "ADD"        
    sets only the undefined character  entries from the specified code-        
    page and leaves the defined  characters unchanged.   "REPlace" will        
    reset each character that is defined  in the specified codepage and        
    leave the rest unchanged.                                                  
 CHANGE cp-id ichar rel# ochar:  re-defines one character in the speci-        
    fied "cp-id".   This is useful when you want to access many special        
    characters one  at a time but  you don't have enough  characters on        
    your terminal to account for them all at once.                             

 Definition of Device Units                                                    

 SET n:  defines the number of relative units in one "em space".   This        
    value varies with the target typesetter, but values 18,  54 and 100        
    relative units in  one "em space" are common.   This  value must be        
    set before any input text can be processed.  The value may be reset        
    to the same value many times,  but may never be changed after it is        
    set.                                                                       

 NOTES                                                                         
 (1) The System Set Symbol &SYSCPAGES has as its value the names of all        
     defined cp-ids,   each separated by a  blank.   It may be  used to        
     conveniently DUMP all current codepages.                                  

 EXAMPLES                                                                      
 (1) This example defines a cp-id  called "STANDARD" containing a defi-        
     nition for two input characters 'A'  and X'AF'.   The logical font        
     "AAA" will select character 'A' from  physical font number 101 and        
     the bullet  from physical  font number  937 at  character position        
     X'82'.   Logical  font "BBB" selects  character 'A'  from physical        
     font number  501 and  the same character  position and  the bullet        
     from the same physical font and position as "AAA":                        
       .PH CODEPAGE standard                                                   
       .PH A  +1 A ;.* the letter A                                            
       .PH AF +3 82;.* the bullet                                              
       .PH END standard                                                        
       .PH FONT aaa CODEPAGE standard 101 * 937                                
       .PH FONT bbb CODEPAGE standard 501 * 937                                


                                                                               


                                                                               


                                                                               


                                                                               

                                - 117 -                                        
                                                                               
 Page Length                                            Waterloo SCRIPT        


 Ŀ                                                                      
 | .PL  |                                                                      
                                                                       

 PAGE LENGTH specifies the physical size of the output page.                   

      Ŀ             
      |       |                                                  |             
      |  .PL  |    <66|v|+v|-v>                                  |             
      |       |                                                  |             
                   


 <66|v>:  This will set the depth of the physical output page.                 
 <+v|-v>:  An operand  of the form "+v"  or "-v" is used  to modify the        
    current page length, so long as the resulting value is greater than        
    the Top Margin (.TM) plus Bottom Margin (.BM).                             

 This control word  causes a break.   The initial and  default value is        
 the value of  the PLength SCRIPT option (if not  specified when SCRIPT        
 was invoked,  then 66 if the EIGHT option was not specified,  or 88 if        
 EIGHT was specified).                                                         

 NOTES                                                                         
 (1) For any output device that prints at 6 lines per vertical inch, an        
     8.5x11" page has 66 lines on it.   At 8 lines per inch,  it has 88        
     lines.                                                                    
 (2) To be used properly  (if at all),  .PL should be  specified at the        
     beginning of your input file,   and then never altered thereafter.        
     Use of .PL for any other  purpose than specifying the actual phys-        
     ical size of the output paper may yield inappropriate results; .TM        
     and .BM should be  used to control the placement of  the text area        
     on the physical page.                                                     
 (3) If the Page  Length value is "very"  large so that there  are more        
     than 999  lines between the  last line of text  on a page  and the        
     start of Footnotes or the Bottom Margin area,  only one blank line        
     will be  left.   This could be  used when producing output  on one        
     "long", single page.                                                      


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                - 118 -                                        
                                                                               
 Waterloo SCRIPT                                            Page Margin        


 Ŀ                                                                      
 | .PM  |                                                                      
                                                                       

 PAGE  MARGIN positions  the left  margin  of the  formatted text  with        
 respect to the physical left margin of the output device.                     

      Ŀ             
      |       |                                                  |             
      |  .PM  |    <0|h|+h|-h <0|h2|+h2|-h2>> <NOBIND>           |             
      |       |                                                  |             
                   


 0|h|+h|-h:  A value  of the form "h" positions the  first character of        
    the output line "h" spaces to the right of the first possible print        
    position of the output device.  A value of the form "+h"" adds "h""        
    spaces to  the current page  margin value and  a value of  the form        
    "-h" subtracts it.                                                         
 0|h2|+h2|-h2:  If a second operand is  specified,  it will be taken as        
    the Page  Margin for all  even-numbered pages.   The  first operand        
    will apply  to all subsequent  odd-numbered pages.   If  the second        
    operand  is omitted,   the  even margin  is  taken  from the  first        
    operand.                                                                   
 NOBIND:  This operand will cause the control word to be ignored if the        
    BIND option has been specified as an invocation parameter.   If the        
    NOBIND operand  is not  specified,  this  control word  will always        
    reset the page margins.                                                    

 This control word  causes a break.   The page margin  values remain in        
 effect for all subsequent output lines  until altered by another ".PM"        
 control word.   If .PM is specified with no operands at all,  the page        
 margin value  is assumed from  the initial  value of the  BIND option,        
 normally zero.                                                                

 NOTES                                                                         
 (1) Specifying Page  Margin values  is something  that should  be done        
     only at the start of the input  file;  in most cases,  they should        
     not be altered thereafter.                                                
 (2) Use of the  NOBIND operand will allow  the page margins to  be set        
     with the BIND option at invocation.                                       
 (3) The Page Margin (.PM)  and ADjust  (.AD)  control words affect the        
     same internal values.                                                     

 EXAMPLES                                                                      
 (1) To set a left page margin value of one and one-half inches:               
       .pm 1.5i                                                                
 (2) To set a page margin of one  inch on odd-numbered pages and a page        
     margin of one-half inch on even-numbered pages:                           
       .pm 1.0i .5i                                                            


                                                                               


                                - 119 -                                        
                                                                               
 Page Numbering                                         Waterloo SCRIPT        


 Ŀ                                                                      
 | .PN  |                                                                      
                                                                       

 PAGE NUMBERING controls  the setting,  incrementing and  formatting of        
 page numbers.                                                                 

      Ŀ             
      |       |                                                  |             
      |       |    <ON|OFF|OFFNO>                                |             
      |  .PN  |    <ARabic|ROman|ALpha>                          |             
      |       |    <PREFIX|SUFFIX <string>>                      |             
      |       |    <FRAC|NORM>                                   |             
      |       |    <n|+n|-n <m|+m|-m>>                           |             
      |       |                                                  |             
                   

 This control word does not cause  a break (with the possible exception        
 of NORM).    The initial and default  value is ON,  which  causes page        
 numbers to be  incremented automatically and displayed  in any running        
 title containing the Page Symbol (.PS) character.  ARABIC and NORM are        
 also in effect at the start of SCRIPT processing.                             

 OFF:  suppresses the display of page numbers in running title lines.          
 OFFNO:  suppresses both  the displaying and automatic  incrementing of        
    page numbers.                                                              
 ARabic:  causes page numbers to be displayed as Arabic numerals.  This        
    is the initial default.                                                    
 ROman <LOWer|UPper>:  causes page numbers to be displayed as lowercase        
    or uppercase roman numerals.                                               
 ALpha <LOWer|UPper>:  causes page numbers to be displayed as lowercase        
    or uppercase  alphabetic numerals.   The  alphabetic representation        
    for page 1 is "a" and for page 88 is "cj".                                 
 <PREFIX|SUFFIX   <string>>:    specifies   an   up-to-eight-characters        
    "string" to be displayed  as a prefix or suffix on  the page number        
    in running titles.   If no "string" is specified, then it nullifies        
    any previous prefix/suffix.                                                
 FRAC:  causes fractional incrementing of  page numbers to occur.   The        
    next page  eject that goes  from an  even-numbered page to  an odd-        
    numbered page  will initiate page  numbering in increments  of ".1"        
    (for example, after page 4 will be pages 4.1, 4.2, and so on).             
 NORM:  If FRAC is  in effect,  a page eject occurs  and normal integer        
    numbering resumes.  If FRAC was not in effect, nothing is done.            
 <n|+n|-n  <m|+m|-m>>:  An  operand of  the  form "n"  will assign  the        
    number of  the current page.    A "+n"  will make the  current page        
    number larger  by "n" and  "-n" will make  it smaller by  "n",  but        
    never zero or less.   A second operand  of the form "m" may option-        
    ally be specified to number the pages in a "n.m" form, incrementing        
    "m" on each page instead of "n".  Thus a chapter or an update to be        
    page-numbered 3,   3.1,  3.2, ...  would  be started  by specifying        
    ".PN 3 0".                                                                 

 If automatic incrementing is suppressed,  the ".PA ODD" and ".PA EVEN"        
 control  words function  exactly  like .PA.    The  "OFF" and  "OFFNO"        

                                - 120 -                                        
                                                                               
 Waterloo SCRIPT                                         Page Numbering        


 operands will suppress the default top  running title of "PAGE %";  in        
 user-defined running top and bottom titles,  the Page Symbol character        
 will print as the null string.                                                


                                                                               
 Ŀ                                                                      
 | .PP  |                                                                      
                                                                       

 PARAGRAPH defines the start of a new paragraph.                               

      Ŀ             
      |       |                                                  |             
      |  .PP  |    <line>                                        |             
      |       |                                                  |             
                   

 This control word causes a break,  and then internally executes a .SK,        
 a .CC 2, and an .IL +3.  The "line" operand starts one blank after the        
 control word.   If the operand is missing,   the text for the start of        
 the paragraph comes from the next input text line.                            

 EXAMPLES                                                                      
 (1) .pp This is the first sentence of the new paragraph.                      
     produces the following output:                                            

        This is the first sentence of the new paragraph.                       


                                                                               
 Ŀ                                                                      
 | .PS  |                                                                      
                                                                       

 PAGE NUMBER SYMBOL  defines the character that SCRIPT  is to recognize        
 in running  titles as  the character  that is  to be  replaced by  the        
 "print-image form" of  the current page number,   including any prefix        
 and/or suffix set by the .PN control word.                                    

      Ŀ             
      |       |                                                  |             
      |  .PS  |    <%|ON|OFF|character>                          |             
      |       |                                                  |             
                   

 This control word  does not cause a break.   The  initial character is        
 the percent  sign (%).   OFF,  or  no operand at all,   will terminate        
 recognition of the  page number symbol.   ON will set  the page number        
 symbol to the initial value of "%".                                           


                                                                               


                                - 121 -                                        
                                                                               
 Page number Symbol                                     Waterloo SCRIPT        


 NOTES                                                                         
 (1) Once a  character is specified,   the previous character  (if any)        
     will no longer have any special significance in running titles and        
     will  just be  treated as  part  of the  title text.    Therefore,        
     running titles may have to be re-defined at the same time.                
 (2) The current Page  Symbol character will be recognized  as a "vari-        
     able" whose  value is the print-image  form of the  current output        
     page number by the .SE control word.                                      
       .se pagenumber = %                                                      
     will assign the  set symbol 'pagenumber' the value  of the current        
     printable page number.                                                    


                                                                               
 Ŀ                                                                      
 | .PT  |                                                                      
                                                                       

 PUT TABLE  OF CONTENTS adds  an input line  (control or text)   to the        
 current table-of-contents workarea.                                           

      Ŀ             
      |       |                                                  |             
      |  .PT  |    <line>                                        |             
      |       |                                                  |             
                   

 This control word does not cause a break.   It provides an alternative        
 and/or a supplement  to the .HL (Head Level)  control  word for adding        
 text and/or  control words to  the table-of-contents  workareas.   The        
 "line" operand starts one blank after the end of the control word.  In        
 this way leading blanks may be part of the text added.   If the "line"        
 operand starts  with the control  word indicator,  normally  ".",  the        
 operand line is  entered "as is".   Otherwise,  the  "line" operand is        
 taken to be  a text input line and  is added with a tab  (hex code 05)        
 and the  current output  page number  appended.   If  used within  the        
 BEGIN/END range  of a  control word  that creates  an in-storage  text        
 block,  the "line" operand is not added to the table-of-contents work-        
 area until  the in-core block  is being output  to the text  area,  to        
 ensure that  it is added  in the proper  sequence and with  the proper        
 page number.   For more information,  see  the examples given with the        
 .TC description.                                                              


                                                                               


                                                                               


                                                                               


                                                                               

                                - 122 -                                        
                                                                               
 Waterloo SCRIPT                                           PUt workfile        


 Ŀ                                                                      
 | .PU  |                                                                      
                                                                       

 PUT WORKFILE writes a line of  information (control or text)  into the        
 specified file.                                                               

      Ŀ             
      |       |                                                  |             
      |  .PU  |    <1|n> <line>                                  |             
      |       |                                                  |             
                   

 This control word does not cause a break.  The first operand specifies        
 which workfile is to be used (from 1 to 9);  if not specified,  "1" is        
 assumed.  The first occurrence of .PU control word for the file causes        
 the file  to be opened.    If the "line"  operand is omitted  then the        
 output file will be closed.   An Imbed  (.IM)  or Append (.AP)  with a        
 numeric  filename  will  close  a workfile  created  with  .PU  before        
 processing the file as input.                                                 

 NOTES                                                                         
 (1) In the OS/VS batch environment, workfiles must be allocated with a        
     DDname of "SYSUSR0n", where "n" ranges from 1 to 9.                       
 (2) In  CMS,  workfiles  are  allocated for  you  with  a "fileid"  of        
     "SYSUSR0n SCRIPT",   but this  may  be  overridden with  your  own        
     FILEDEF with  the PERM option before  invoking SCRIPT,  or  with a        
     FILEDEF in a SYSTEM (.SY) control word within the SCRIPT file.            
 (3) The default file attributes are RECFM=VB, LRECL=136,  BLKSIZE=800.        
     A fixed file may also be created,   in which case the defaults are        
     RECFM=FB, LRECL=80, BLKSIZE=800.                                          
 (4) If  the file  is defined  with a  DISPosition of  MOD then  output        
     records will be added to the end of the file.   If the file is not        
     defined with a DISPosition of MOD then output records will replace        
     the file.                                                                 


                                                                               
 Ŀ                                                                      
 | .PW  |                                                                      
                                                                       

 PAGE WIDTH defines the physical width of the formatted output paper.          

      Ŀ             
      |       |                                                  |             
      |  .PW  |    <0|h|+h|-h>                                   |             
      |       |                                                  |             
                   

 This control word does not cause a break.  If used without an operand,        
 a default value of zero is used instead.   An operand of the form "+h"        
 or "-h" adds  this value algebraically to the current  page width,  so        
 long as the result is not negative and not more than 20 inches.               

                                - 123 -                                        
                                                                               
 Page Width                                             Waterloo SCRIPT        


    The purpose  of Page Width  is to define the  size of the  paper on        
 which the text  will be printed,  so that physical  markers "could" be        
 added to the text  as it is printed.   These markers  would be used to        
 properly align  the pages in the  printing process,  and would  not be        
 seen by  the reader.    The Page Width  control word  is treated  as a        
 comment for most of the supported output devices.                             

 EXAMPLES                                                                      
 (1) .pw 85                                                                    
     This sets the Page Width to 85 characters.                                
 (2) .pw 8.5i                                                                  
     This sets the Page Width to eight and one half inches.  The number        
     of characters would depend on the  value specified for the Charac-        
     ters Per Inch (CPI) option when SCRIPT was invoked.                       


                                                                               
 Ŀ                                                                      
 | .QQ  |                                                                      
                                                                       

 QUIT  QUICKLY  causes  immediate termination  of  all  input-file  and        
 output-file processing for the current pass.                                  

      Ŀ             
      |       |                                                  |             
      |  .QQ  |    <YES|NO>                                      |             
      |       |                                                  |             
                   

 This control word causes a break.   If used without an operand, YES is        
 assumed.   YES causes immediate termination  of all input- and output-        
 file processing for the current pass.  NO causes only a break.                

 NOTES                                                                         
 (1) Because this control word causes  SCRIPT to terminate immediately,        
     the output file may be incomplete.   This is particularly true for        
     output  files that  require  post-processing  before they  can  be        
     printed.                                                                  
 (2) Use the  Quit control  word (.qu)  to  terminate the  current page        
     before terminating.                                                       


                                                                               


                                                                               


                                                                               


                                                                               


                                - 124 -                                        
                                                                               
 Waterloo SCRIPT                                                   QUit        


 Ŀ                                                                      
 | .QU  |                                                                      
                                                                       

 QUIT causes immediate termination of all input-file processing for the        
 current pass.                                                                 

      Ŀ             
      |       |                                                  |             
      |  .QU  |    <YES|NO>                                      |             
      |       |                                                  |             
                   

 This control word causes a break.   If used without an operand, YES is        
 assumed.  NO causes only a break.  YES causes immediate termination of        
 all input-file  processing;  SCRIPT  advances to the  top of  the next        
 page,   outputs any  in-storage text  blocks  that remain  (footnotes,        
 floating keeps,  etc),  and then  terminates input-file processing for        
 the current pass.                                                             


                                                                               
 Ŀ                                                                      
 | .RC  |                                                                      
                                                                       

 REVISION CODE  allows selected input  text lines  to be marked  in the        
 page margins with a user-defined revision code character or string.           

      Ŀ             
      |       |                                                  |             
      |       |    n <char|'string'>                             |             
      |  .RC  |    n <ON|OFF|ON/OFF>                             |             
      |       |    * <char|'string'>                             |             
      |       |    SET <LEFT|RIGHT>                              |             
      |       |                                                  |             
                   

 This control  word does not  cause a break.   It  is used to  define a        
 character or string to mark formatted output and to identify the input        
 text that is to be marked with revisions in the page margins.                 

 n:  defines the revision code number.   It must be specified,  and may        
    range from 1 to  99.   Therefore,  up to 99 revision  levels may be        
    defined and used in a document.                                            
 n <char>:  is the definition of a revision-code character for revision        
    "n" sections.   Only  a single character operand  may be specified.        
    If no character operand is specified, a blank character is assumed.        
 n 'string':  is the definition of  a revision-code string for revision        
    "n" sections.  The string may be up to 10 characters in length, and        
    must be delimited before and after.                                        
 n ON:  marks the  start of a revision "n" section.    All output lines        
    thereafter will have the previously-defined revision-code string or        
    character printed in the page margins, beside the formatted text.          

                                - 125 -                                        
                                                                               
 Revision Code                                          Waterloo SCRIPT        


 n OFF:  terminates the printing of  the revision-section "n" string or        
    character on output lines.                                                 
 n ON/OFF:  indicates both the start and  the end of a revision section        
    "n".   The formatted  output text generated by the  next input text        
    line will be marked with  the corresponding revision code character        
    or string.                                                                 
 * <char|'string'>:  will mark the output from the next input text line        
    with the specified character or string.  If the character or string        
    is omitted,   a blank character will  be used.   It works  like the        
    "ON/OFF" operand except  the revision marker is  specified with the        
    control word.                                                              
 SET <LEFT|RIGHT>:  defines whether revision  markers are to be printed        
    in the left page margin (one blank before the start of output text)        
    or  in the  right page  margin (one  blank after  the current  Line        
    Length).  The default is "LEFT" which may be overridden with a last        
    "LEFT|RIGHT" operand on the revision code definition.  This in turn        
    may be  overridden with  a last "LEFT|RIGHT"  operand in  a control        
    word which begins revised input text.                                      

 NOTES                                                                         
 (1) The  character or  string  of a  revision  code definition  cannot        
     contain the tab character.                                                
 (2) Revision codes will always display in  the font that was in effect        
     when the character or string was defined.                                 
 (3) If a  revision code character or  string has not been  defined for        
     revision section "n"  before an ON,  ON/OFF or "*"  operand can be        
     used for section "n" then a blank revision character is assumed.          
 (4) Revision sections can be nested one within another,  but they must        
     be terminated  in the  reverse order to  which they  were started.        
     Put another way, only the most-recently-begun revision section may        
     be terminated.                                                            

    It is the user's responsibility to set the Page Margin values large        
 enough to  allow for the printing  of any revision-code  characters or        
 strings in the  left margin..   They will be  right-adjusted one blank        
 from the end of  the Page Margin space,  and will  be truncated on the        
 left if insufficient space is available.   If the Page Margin space is        
 less than  2 when a  revision section is  started,  space is  made for        
 revision characters by  shifting all output lines up to  two spaces to        
 the right until the revision section is terminated.                           

 EXAMPLES                                                                      
 (1) .pm 1.0i                                                                  
     .rc 1 'Rev. 1'                                                            
     .rc 2 'Rev. 2'                                                            
     This text is unrevised.                                                   
     .rc 1 on                                                                  
     This text is from the first revision.                                     
     .rc 2 on/off                                                              
     This text is from the second revision.                                    
     And this is the last line from the first revision.                        
     .rc 1 off                                                                 
     This text is again unrevised.                                             


                                - 126 -                                        
                                                                               
 Waterloo SCRIPT                                          Revision Code        


 (2) .pm 1.0i                                                                  
     This text is unrevised.                                                   
     .rc * |                                                                   
     This text is marked in the margin with an Or Bar (|).                     


                                                                               
 Ŀ                                                                      
 | .RD  |                                                                      
                                                                       

 READ TERMINAL reads  input lines from the  terminal,  thereby enabling        
 the user to type lines into the output during SCRIPT processing.              

      Ŀ             
      |       |                                                  |             
      |  .RD  |    <1|n>                                         |             
      |       |                                                  |             
                   

 This control word causes a break.  If the operand is omitted then 1 is        
 assumed.  When the .RD control word is encountered, "n" lines are read        
 from the terminal but are not processed,   other than that they do add        
 to the count of lines on the  output page.   Pressing the ATTENTION or        
 BREAK key terminates the .RD.   It can  also be terminated by typing a        
 "null" line,  but the  null line will count as one  line on the output        
 page.                                                                         

 NOTES                                                                         
 (1) This control word may be useful  to allow addresses to be inserted        
     in form letters or to allow the user to change the typing element.        
 (2) If output is not to the terminal, SCRIPT will insert n blank lines        
     in the output.                                                            
 (3) If output is not to the terminal and the .RD is encountered within        
     n lines  of the bottom margin  and ".LE NO" is in  effect,  spaces        
     will not appear at the top of the next column.  If however, output        
     is to the  terminal and the other two conditions  are met,  spaces        
     will appear at the top of the next column.                                


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                - 127 -                                        
                                                                               
 Restore Environment                                    Waterloo SCRIPT        


 Ŀ                                                                      
 | .RE  |                                                                      
                                                                       

 RESTORE ENVIRONMENT restores the formatting environment that was saved        
 by a previous .SA control word.                                               

      Ŀ             
      |       |                                                  |             
      |  .RE  |    <envname>                                     |             
      |       |                                                  |             
                   

 This control word does not normally  cause a break.   However,  if the        
 number of multiple columns currently in effect is changed by restoring        
 the environment, a break is created.   Also,  if the Format Mode (.FO)        
 or text  alignment (.CE,  .LA,   .RI)  would  be changed,  a  break is        
 created.                                                                      

 envname:   The operand  specifies a  name  for the  environment to  be        
    restored.   The  environment to  be restored  must have  been saved        
    previously by Save  Environment with a matching  "envname" operand.        
    Environments that are  saved with a name may be  restored more than        
    once.   The "envname" may be up to sixteen characters in length and        
    it is treated as if entered in uppercase.                                  
       If the "envname" operand is not specified,  the Restore Environ-        
    ment control  word will restore  the formatting environment  from a        
    push-down stack of up to ten levels created by the most recent Save        
    Environment control word used with no "envname" operand.   An error        
    message will result  if there is no  corresponding Save Environment        
    control word preceding.                                                    

 EXAMPLES                                                                      
 (1) This control word is useful when you wish to preserve the environ-        
     ment because  you are going  to do  something that may  change it,        
     such as imbedding another file about which little is known:               
       .sa;.im unknown;.re                                                     
 (2) Environments can be created by name:                                      
       .fo off;.in .5i;.hy off;.tp 1i 2i                                       
       .sa Heading                                                             
     and restored later:                                                       
       .re Heading                                                             


                                                                               


                                                                               


                                                                               


                                                                               

                                - 128 -                                        
                                                                               
 Waterloo SCRIPT                                           Right Adjust        


 Ŀ                                                                      
 | .RI  |                                                                      
                                                                       

 RIGHT ADJUST  causes the specified  number of  input text lines  to be        
 right-adjusted on output.                                                     

      Ŀ             
      |       |                                                  |             
      |  .RI  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   

 This control word causes a break.    The operands and other considera-        
 tions are identical  to those for the  .CE control word;  see  the .CE        
 description for details.    Note also that any "trailing  blanks" in a        
 text  operand  "line" will  be  counted  for  the purposes  of  right-        
 adjusting on output.  Also, if the "line" is longer than the length of        
 the output line, it will be truncated.                                        

 EXAMPLES                                                                      
 (1) .ri &SYSDATE                                                              
     produces the following output:                                            
                                                       October 18, 1988        


                                                                               
 Ŀ                                                                      
 | .RM  |                                                                      
                                                                       

 REMOTE defines one or more input lines as a "remote sequence" that can        
 be invoked automatically  at a specified line on the  output page,  or        
 under user control.                                                           

      Ŀ             
      |       |                                                  |             
      |       |    <<*|n|name> <m|SAVE|NOSAVE> <SAVE|NOSAVE>>    |             
      |  .RM  |    <<*|n|name> DELETE>                           |             
      |       |    <DELETE>                                      |             
      |       |                                                  |             
                   


 <*|n|name>:   can be  a positive  integer from  1 to  the Page  Length        
    value,  or an asterisk (*),  which specifies "the first line of the        
    text area",   or a  positive integer greater  than the  Page Length        
    value but less than 32767,  or an identifier of eight characters or        
    less.                                                                      
 <*|n|name> <m|SAVE|NOSAVE>:  The input lines between the first .RM and        
    the next .RM are saved by SCRIPT.  The next time an attempt is made        
    to print on line "n" of the  output page,  or when an Execute Macro        
    (.EM .n)  is encountered,  the saved lines are invoked like a macro        
    (see .DM), with the following possible exceptions.                         

                                - 129 -                                        
                                                                               
 ReMote                                                 Waterloo SCRIPT        


       If  NOSAVE  is specified  as  a  second  operand or  assumed  by        
    default, the saved lines are deleted after the first use.   If SAVE        
    is specified,  the  remote sequence is saved and  invoked on output        
    line "n" of every column until  a ".RM n DELETE" is received speci-        
    fying the same line number.   If a number "m" is specified then the        
    remote will be deleted following its "m"th invocation.                     
 <*|n|name>  <m|SAVE|NOSAVE> <SAVE|NOSAVE>:   If  a  second operand  is        
    specified then SAVE or NOSAVE may  be specified as a third operand.        
    The SAVE third operand,  which is  default,  saves the current page        
    formatting options  and sets default  page formatting  options when        
    the remote is entered and then restores these options at the end of        
    remote processing  following an implied  break.   The  NOSAVE third        
    operand prevents current  page formatting options from  being main-        
    tained through the  remote processing and then restored  at the end        
    of the Remote.    This is most useful when used  with Execute Macro        
    (.EM), allowing it to be used like a Local Imbed.                          
 <*|n|name> DELETE:  deletes the specified remote.                             
 DELETE:  deletes  all currently-defined remotes.    This is  also done        
    automatically by SCRIPT between processing PASses.                         

 This control word does not cause a break.  The first operand, the name        
 or number of the remote,  must be specified.   If the first operand is        
 an asterisk "*" then  the value of "n" will be set  to the current Top        
 Margin plus one, i.e.  (n = TM + 1).   A numbered Remote with a number        
 greater than  Page Length  may only  be invoked  with a  Execute Macro        
 (.EM)  control  word.   A named Remote  may be invoked with  a Execute        
 Macro (.EM) or with a user control word of the same name.                     

 NOTES                                                                         
 (1) Any  lines whatever  may  appear within  the  .RM (except  another        
     Remote ".RM")   and are  interpreted when  the remote  sequence is        
     inserted.                                                                 
 (2) Since Remote lines are saved away without interpretation or exami-        
     nation,  it is  necessary that the terminating  ".RM" control word        
     start in column one of an input line.                                     
 (3) Numbered remotes  are invoked automatically  when line "n"  of the        
     output column is about to be printed.   While a remote sequence is        
     being used for input,  no other  remote may be automatically trig-        
     gered.   If two or more remotes  specify the same remote name they        
     are ordered in a last in,  first out order so that only the newest        
     will be triggered.   For numbered  remotes,  they are queued first        
     in, first out order so that the oldest will be triggered first.           
 (4) A ".RM n DELETE" deletes the first sequence to be selected for the        
     specified remote identifier.                                              
 (5) You may write  your own versions of SCRIPT control  words in terms        
     of other  control words  or do  more checking  before issuing  the        
     intended command  by naming a remote  with a control  word.   Note        
     that a control word starting with two control word indicator char-        
     acters will bypass the initial search of named remotes.                   


                                                                               


                                                                               
                                - 130 -                                        
                                                                               
 Waterloo SCRIPT                                                 ReMote        


 EXAMPLES                                                                      
 (1) The following  sequence places  a figure  at the  top of  the next        
     column:                                                                   
       .rm *                                                                   
       .in                                                                     
          (Figure)                                                             
       .ce yes                                                                 
       FIGURE ONE: Water Concentration in Lake Erie                            
       as a Function of GNP.                                                   
       .ce no                                                                  
       .rm                                                                     
 (2) The following remote would define a user control word ADD:                
       .rm ADD                                                                 
       .sk 2;.cc 5                                                             
       .sr COUNT = &COUNT + 1                                                  
       .rm                                                                     
       .ADD;.* this invokes the above remote                                   
       .em .ADD;.* this does the same                                          
 (3) Remotes defined with                                                      
       .rm NAME save nosave                                                    
       body of remote                                                          
       .rm                                                                     
     are identical to macros (see .DM).                                        


                                                                               
 Ŀ                                                                      
 | .RT  |                                                                      
                                                                       

 RUNNING TITLE defines  a three-string title line to be  printed at the        
 top and/or bottom of even- and/or odd-numbered pages.                         

      Ŀ             
      |       |                                                  |             
      |  .RT  |    <TOP    ALL  NOFILL 1> /s1/s2/s3/             |             
      |       |    <BOTTOM EVEN FILL   n>                        |             
      |       |    <       ODD          >                        |             
      |       |                                                  |             
                   


 <TOP|BOTTOM>:  Normally the title is to be printed at the "TOP" of the        
    page in the  Heading Space area,  but "BOTTOM" may  be specified to        
    cause the title to print in the Footing Space area at the bottom of        
    a page.                                                                    
 <ALL|EVEN|ODD>:  Normally the titles apply  to "ALL" pages,  both even        
    and odd.    (An odd-numbered page is  bound on the left,   an even-        
    numbered on the right.)   "EVEN" or "ODD" may be specified to cause        
    the titles to apply to only those pages.                                   
 <NOFILL|FILL>:  The  s2 character  string is  normally centred  on the        
    page between  the s1 string  on the left and  the s3 string  on the        
    right.   If "FILL" is  specified the s2 string is treated  as a tab        
    fill string placed between s1 on the left and s3 on the right.   If        

                                - 131 -                                        
                                                                               
 Running Title                                          Waterloo SCRIPT        


    s2 is omitted, it will be treated as a blank fill string.                  
 <1|n> /s1/s2/s3/:  The value "n" (1,  if omitted)  specifies the title        
    line number in the Heading Space  (.HS)  and/or Footing Space (.FS)        
    area.   Title line number 1 is at  the top of the Heading Space and        
    at the bottom of the Footing Space.   The values of s1, s2,  and s3        
    are character strings  not containing the delimiter  character "/".        
    The delimiter character  can be any character not  contained in any        
    of the three strings.   Any of the strings may be omitted,  but all        
    four delimiters must be included to indicate missing strings,  such        
    as /s1//s3/.                                                               

 When the title lines are printed, the current Page Symbol (.PS)  char-        
 acter in  any title is replaced  with the current page  number.   This        
 control word does not cause a break.  The default TOP running title on        
 all  pages  after  the first  is  ".rt TOP ALL 1 ///PAGE %/"  and  the        
 default BOTTOM running title on all pages is ".rt BOTTOM ALL 1 ////".         
    For  output devices  that support  fonts,  the  running titles  are        
 always displayed  in the  font that  is in  effect when  the title  is        
 defined.                                                                      

 EXAMPLES                                                                      
 (1) The following will define a running  top title that will appear on        
     all pages  hereafter,  provided  that the  Heading Space  value is        
     greater than or equal to one.                                             
       .rt top /SCRIPT Reference Manual//page %/                               
     As long as the .PS character is  "%",  the page number will appear        
     in the top title each time SCRIPT prints it at the top of a page.         


                                                                               
 Ŀ                                                                      
 | .RV  |                                                                      
                                                                       

 READ VARIABLE allows  the user to define  a value for a  Set Symbol by        
 reading the  value from  the terminal or  the next  line of  the input        
 file.                                                                         

      Ŀ             
      |       |                                                  |             
      |  .RV  |    symbol <TERM|FILE>                            |             
      |       |                                                  |             
                   

 This control  word does not  cause a  break.   It first  verifies that        
 "symbol" is a valid Set-Symbol variable name.                                 

 symbol <TERM>:   If TERM has been  specified (or if no  second operand        
    was specified),   it reads one line  of data from the  terminal and        
    uses it as the right-hand side of a Set Reference control line:            
      .sr symbol = line                                                        
    No message is displayed at the  terminal indicating a Read Variable        
    is  being done  (the  user may  do  this with  a  .TY control  word        
    preceding  the  .RV).   If  the  user  responds with  an  immediate        

                                - 132 -                                        
                                                                               
 Waterloo SCRIPT                                          Read Variable        


    Carriage Return  or an immediate Attention  or Break,  then  no Set        
    Symbol assignment is made.                                                 
 symbol FILE:  The next record in the  input stream is read and is used        
    as the right  hand operand of a Set Reference  (.SR)  control line.        
    If the control word is used in a file, the next input record of the        
    file will be  the operand line.   However,  if the  control word is        
    used within a Macro  or Remote,  the next input record  will be the        
    record following the line in the higher-level file that invoked the        
    Macro or Remote.   In either case, the record read is not processed        
    again when input returns to the file.  If there are no more records        
    in the current file then the set symbol will be set to null and the        
    System Variable  Symbol "&SYSRET" is set  to 4.   If that  file was        
    imbedded from  another file then the  next ".RV" control  word will        
    read from the outer file.   When no more records exist on any input        
    file then the  set symbol will also  be set to null  and the System        
    Variable Symbol "&SYSRET" is set to 8.                                     

 EXAMPLES                                                                      
 (1) .rv test TERM                                                             
     If "NONE" were entered at the  terminal then this would be equiva-        
     lent to:                                                                  
       .sr test='NONE'                                                         
 (2) .rv array(1)                                                              
     If "3*99/5" were entered at the terminal then this would be equiv-        
     alent to:                                                                 
       .sr array(1)=3*99/5                                                     


                                                                               
 Ŀ                                                                      
 | .SA  |                                                                      
                                                                       

 SAVE  ENVIRONMENT  saves  the current  formatting  environment  to  be        
 restored later with a Restore Environment.                                    

      Ŀ             
      |       |                                                  |             
      |  .SA  |    <envname>                                     |             
      |       |                                                  |             
                   

 In order to design a modular SCRIPT input file, it may be necessary to        
 alter one or more formatting characteristics for a section or chapter.        
 For  example,  a  new absolute  INDENT  value may  be desired  without        
 knowing  the value  of  the existing  INDENT and  that  value must  be        
 restored before returning control.                                            

 envname:   The operand  specifies a  name  for the  environment to  be        
    saved.   The  saved environment  may be  restored later  by Restore        
    Environment with a matching  "envname" operand.   Environments that        
    are saved  with a name  may be restored more  than once and  may be        
    saved again by specifying the same  name.   The "envname" may be up        
    to sixteen characters in length and it  is treated as if entered in        

                                - 133 -                                        
                                                                               
 SAve environment                                       Waterloo SCRIPT        


    uppercase.                                                                 
       If the "envname" operand is not specified,  the Save Environment        
    control  word will  save the  current formatting  environment in  a        
    push-down stack of up to ten levels,   to be popped up later with a        
    Restore Environment also used with no "envname" operand.  Note that        
    Save Environment does not change any current values.                       

 This control  word does not cause  a break.   Any pending  Indent Line        
 (.IL),  Offset (.OF)  or Undent (.UN)  will be saved.   If this is not        
 desired, you must issue your own Break (.BR) before saving the current        
 status.                                                                       
    The operands  currently in effect  for the following  control words        
 are saved/restored:                                                           
  .AD Adjust                           .TP Tab Position                        
  .BC Balance Columns                  .TR Translate                           
  .BM Bottom Margin                    .UN Undent                              
  .CD Column Definition                                                        
  .CE Centre                                                                   
  .CL Column Length                                                            
  .CO Concatenate                                                              
  .CW Control Word Separator                                                   
  .DC CONT Continuation Character                                              
      CW   Control Word Separator                                              
      PS   Page Number Symbol                                                  
      TB   .TB SET Character                                                   
      TI   .TI SET Character                                                   
  .DS Double Space                                                             
  .FM Footing Margin                                                           
  .FO Format                                                                   
  .FS Footing Space                                                            
  .HI Hanging Indent                                                           
  .HM Heading Margin                                                           
  .HS Heading Space                                                            
  .HY Hyphenation Set                                                          
  .IL Indent Line                                                              
  .IN Indent                                                                   
  .JU Justify                                                                  
  .LA Left Adjust                                                              
  .LE Leading Space                                                            
  .LI Literal                                                                  
  .LL Line Length                                                              
  .LS Line Spacing                                                             
  .OF Offset                                                                   
  .PI Paragraph Indent                                                         
  .PL Page Length                                                              
  .PM Page Margin                                                              
  .PN Page Numbering                                                           
  .PS Page Number Symbol                                                       
  .RI Right Adjust                                                             
  .SS Single Space                                                             
  .SU Substitute Mode                                                          
  .TB Tab Setting                                                              
  .TI Translate on Input                                                       
  .TM Top Margin                                                               

                                - 134 -                                        
                                                                               
 Waterloo SCRIPT                                          Single Column        


 Ŀ                                                                      
 | .SC  |                                                                      
                                                                       

 SINGLE COLUMN  suppresses the current multiple-column  environment (if        
 any) and switches to single-column mode.                                      

      Ŀ             
      |       |                                                  |             
      |  .SC  |                                                  |             
      |       |                                                  |             
                   

 This control word causes a break.  If Multiple Column is not in effect        
 when this control word is encountered, a break will be caused,  and no        
 other action.  If a multiple-column environment was in effect when the        
 .SC  is encountered,   the  output to  that  point  will be  formatted        
 according to the current Column  Definition and Balance Column control        
 words, and the Line Length (.LL) will be restored before proceeding.          

 NOTES                                                                         
 (1) The  previous  multiple-column  environment  may  subsequently  be        
     restored by  a Multiple Column  (.MC)  or Column  Definition (.CD)        
     control word.                                                             
 (2) This control  word is  illegal within the  BEGIN/END range  of any        
     control word that creates an in-storage text block.                       


                                                                               
 Ŀ                                                                      
 | .SE  |                                                                      
                                                                       

 SET SYMBOL allows the user to assign a character or numeric value to a        
 Set Symbol.   It is  an alternate to .SR that will  function even when        
 .SU is OFF.                                                                   

      Ŀ             
      |       |                                                  |             
      |       |           = <character string>                   |             
      |  .SE  |    symbol = <numeric expression>                 |             
      |       |           <OFF>                                  |             
      |       |                                                  |             
                   

 This control word does not cause  a break.   Substitution is automati-        
 cally applied  to the operands to  replace any Set Symbols  with their        
 values,  and the result  is then processed as if the  .SR control word        
 had been used instead.  For details and examples, see the .SR descrip-        
 tion.                                                                         


                                                                               


                                - 135 -                                        
                                                                               
 SKip                                                   Waterloo SCRIPT        


 Ŀ                                                                      
 | .SK  |                                                                      
                                                                       

 SKIP generates the specified number of blank lines.                           

      Ŀ             
      |       |                                                  |             
      |  .SK  |    <1|v>  <A>  <C>                               |             
      |       |                                                  |             
                   

 This control word causes a break.   SKIPs  that occur at the top of an        
 output column or page will not be printed;  this includes SKIPs at the        
 start of any in-storage text block that  prints at the top of a column        
 or page.                                                                      

 <1|n>:  If used without an integer operand,  "1" will be assumed.   An        
    operand of zero (0) is equivalent to the .BR control word.   If the        
    operand is minus one (-1),  the next  input text line will be over-        
    printed  on the  last output  line and  will not  count toward  the        
    number of lines  in the text area.   For values  greater than zero,        
    there will be  "v" blank lines generated if Single  Spacing (.SS or        
    .LS 0) is in effect.   If Multiple Line Spacing (.DS or .LS >0)  is        
    in effect then "v" times the line  spacing plus one blank lines are        
    generated.   For example,  in Double Space mode a ".SK 2" generates        
    four blank lines.                                                          
 <1|v> <A> <C>:  The "A" or "ABS"  operand may be specified to generate        
    only the specified number of blank  lines regardless of the current        
    .LS value.                                                                 
       The "C" or  "COND" operand may be specified to  define a "condi-        
    tional skip".    The effect of a  conditional skip depends  on what        
    follows.  If followed by output lines generated by a SKIP or SPACE,        
    the result will be the larger of the two requests.   If either is a        
    conditional space, then the result will be processed as a SPACE and        
    will generate blank lines even at the top of a column or page.   If        
    followed by a text output line, the "conditional skip" line(s) will        
    be printed before the text output line.  Conditional skips are also        
    ignored at the top of a column or page,  including those that occur        
    at the beginning  of in-storage blocks that  print at the top  of a        
    column or page.   If an in-storage text block ends with conditional        
    skips,  those conditional  skips will be put into  effect after the        
    block has printed, rather than as part of the block.                       

 When .SK -1 is used to generate an overprint line,  the visual appear-        
 ance of the result  is dependent on whether the output  device has the        
 ability to overprint lines.   For output directed to the line printer,        
 and for output to online terminals that have a negative linefeed capa-        
 bility,  the  result will appear  properly.   For output  devices that        
 cannot handle printing  one line on top of another  the overprint line        
 will display on the  subsequent line,  even though it will  not add to        
 SCRIPT's internal counting of the number of lines in the text area for        
 pagination purposes.                                                          


                                - 136 -                                        
                                                                               
 Waterloo SCRIPT                                            Set Leading        


 Ŀ                                                                      
 | .SL  |                                                                      
                                                                       

 SET LEADING is supported only in conjunction with output devices which        
 can  place text  anywhere on  the  page.   It  specifies the  vertical        
 spacing, from baseline to baseline, for subsequent output.                    

      Ŀ             
      |       |                                                  |             
      |  .SL  |    <v|+v|-v>                                     |             
      |       |                                                  |             
                   

 This control word causes a break.   An operand must be specified;  "v"        
 must be  a positive numeric value  representing the number  of "device        
 units" for the vertical leading.   If  specified as "+v" or "-v",  the        
 value will be added to the current value; the result must be positive.        
 The vertical leading operand may also  be specified in absolute units,        
 such as inches or  points.   Any such operand will be  converted to an        
 integral number of device units.                                              

 NOTES                                                                         
 (1) This control word  will immediately send the  new leading informa-        
     tion to the output file.   If  the document is in multiple columns        
     or within  a text block  such as a footnote  at the time  then the        
     change  of leading  will not  occur  at the  desired place.    The        
     leading information is  repeated at the top of  each output "page"        
     so  that information  will  not be  lost  when  using the  FROM/TO        
     options.   This  temporary measure is  merely a means  to transmit        
     leading  information from  the input  document  to the  typesetter        
     post-processor program.                                                   

 EXAMPLES                                                                      
 (1) .sl 10DV                                                                  
     defines the output leading to be 10 points if the output device is        
     PHOTO;  10/300ths of an inch for  IP300,  QMSlaser and X2700;  and        
     10/240ths of an inch for the I3820.                                       
 (2) .sl p12                                                                   
     defines the output leading to be 0  picas and 12 points.   This is        
     the same as 12/72 or 1/6th of an inch for any output device.              


                                                                               


                                                                               


                                                                               


                                                                               


                                - 137 -                                        
                                                                               
 SPace                                                  Waterloo SCRIPT        


 Ŀ                                                                      
 | .SP  |                                                                      
                                                                       

 SPACE generates the specified number of blank output lines.                   

      Ŀ             
      |       |                                                  |             
      |  .SP  |    <1|v> <A> <C>                                 |             
      |       |                                                  |             
                   

 This control word  causes a break.   The operands and  the results are        
 identical to those for the SKIP (.SK)  control word with the exception        
 that SPACE  lines are  never thrown  away at  the top  of the  page or        
 column when .LE YES is in effect.   For details,  see the .SK descrip-        
 tion.                                                                         


                                                                               
 Ŀ                                                                      
 | .SR  |                                                                      
                                                                       

 SET REFERENCE assigns a character or numeric value to a Set Symbol.           

      Ŀ             
      |       |                                                  |             
      |       |           = <character string>                   |             
      |  .SR  |    symbol = <numeric expression>                 |             
      |       |           <OFF>                                  |             
      |       |                                                  |             
                   

 This control word does not cause a break.  The Set Symbol specified as        
 the  first operand  is  assigned the  value  specified  by the  second        
 operand.   If  the second operand is  omitted,  a null string  will be        
 assigned.   If the Set Symbol did not previously exist, it is created.        
 The Symbol name must be followed by  an equal sign "=" with or without        
 intervening blanks.                                                           

 symbol =:  The name  of a Set Symbol may consist of  up to ten charac-        
    ters.   Names may include only  uppercase or lowercase alphabetics,        
    digits, the "$", "#", and "@", and the underscore ("_").   When the        
    UPPER option or ".SU UPPER" is in effect,  all lowercase alphabetic        
    characters in a Set Symbol name are treated as if entered in upper-        
    case.   The Set  Symbol name may optionally be  subscripted with an        
    integer,  signed or unsigned.   A subscript may range from -1000000        
    to +1000000.   A zero subscript is  logically the same as having no        
    subscript.  The subscript value may be implied by specifying a null        
    subscript in the form "()":                                                
      .sr symbol() = ...                                                       
    has the same effect as                                                     
      .sr symbol = &symbol + 1                                                 

                                - 138 -                                        
                                                                               
 Waterloo SCRIPT                                          Set Reference        


      .sr symbol(&symbol) = ...                                                
    because SCRIPT  uses "array position zero"  to retain the  count of        
    the number of elements in the array.                                       
 symbol =  character string:   The string  operand may  be a  delimited        
    string or an undelimited string.   In the first case,  if the first        
    character is a ' (quote), " (double quote), / (slash),  | (or bar),        
    !  (exclamation mark),  ^ (not sign),   or  (cent sign)  then that        
    first character will be treated as  the delimiter if the last char-        
    acter in  the operand  matches the  initial delimiter.    The value        
    assigned will be from the character following the leading delimiter        
    up to  the character  preceding the  final delimiter.    Blanks and        
    embedded  delimiters are  considered  to be  part  of the  assigned        
    value.                                                                     
       If there is  no matching terminating delimiter,   the operand is        
    treated as an undelimited string,   and the value assigned consists        
    of everything up  to and including the last  non-blank character on        
    the input line.                                                            
 symbol 'character string:   The equal sign in a  symbol assignment may        
    be omitted if the  first character of the value is  a single quote.        
    The value  is taken from the  character following the quote  to the        
    end of the record, not including the last character if it also is a        
    single quote.   If  the value is to include trailing  blanks then a        
    terminating quote must be used.                                            
 symbol =  numeric expression:  Numeric  values may consist  of expres-        
    sions (see Examples for details).  Integer decimal terms as well as        
    binary,  character,   and hexadecimal  self-defining terms  (in the        
    ASSEMBLER sense)  are  supported.   Parentheses and unary  plus and        
    minus operators  are fully  supported.   Blanks  between terms  and        
    operators are optional.                                                    
 symbol = %:  The page-number symbol (see .PS)  if entered by itself or        
    symbolically as &SYSPS, will be treated as though the current prin-        
    table  output page  number had  been  specified in  its place  (the        
    System Set Symbol &SYSPPAGE also  provides this ability).   If this        
    form of  the control  word is used  within a Text  Block such  as a        
    Footnote or  Floating Keep,   the value of  the symbol  is actually        
    assigned twice:   once immediately and a second time when the block        
    finally prints.    The page  number string is  always treated  as a        
    character operand, even if the current page number is all numeric.         
 symbol OFF:  Undefines the specified Set Symbol name.                         

 NOTES                                                                         
 (1) If a character string is the assigned value, it must consist of no        
     more characters  than the maximum  allowed by the  SRLength option        
     (default is 240), or the string will be truncated on the right.           
 (2) A  complete list  of  System Set  Symbols  and  their purposes  is        
     provided in an Appendix to this manual.                                   

 EXAMPLES                                                                      
 (1) The following demonstrate valid numeric (integer) expressions:            
       .sr i=5                                                                 
       .sr i= +5                                                               
       .sr i=((+5*3-1)*7)+1                                                    
       .sr i = ((X'F05'+C'A')* B'1111')/16                                     
       .sr i(1+1) = (1+1)                                                      

                                - 139 -                                        
                                                                               
 Set Reference                                          Waterloo SCRIPT        


 (2) The following demonstrate character-string assignments:                   
       .sr x = 3.5                                                             
       .sr c=abcdefg                                                           
       .sr c = 'ABCDEFG'                                                       
       .sr c = "don't be silly"                                                
       .sr string = 'undelimited string                                        
       .sr alpha(1) = 'A'                                                      
       .sr alpha(2) = B                                                        
       .sr pagenum = %                                                         
 (3) The sequence:                                                             
       .sr equno=0                                                             
           .                                                                   
           .                                                                   
       .sr equno = &equno + 1                                                  
       .sr xeqn = &equno                                                       
        (&equno):  x = erfc(a - bc)                                            
       .sr equno = &equno +1                                                   
        (&equno):  y = erfc(a + bc)                                            
        Using Equation &xeqn gives ...                                         
     produces the following results:                                           
        (1):  x = erfc(a - bc)                                                 
        (2):  y = erfc(a + bc)                                                 
        Using Equation 1 gives ...                                             
 (4) The sequence:                                                             
       .sr a = 0                                                               
       .sr b = -5                                                              
       .sr c = a                                                               
       .sr d = 'b'                                                             
       .sr &c = &&d+1                                                          
       The value of "a" is &a..                                                
       The value of "b" is &b..                                                
       The value of "c" is &c..                                                
       The value of "d" is &d..                                                
     produces the following results:                                           
       The value of "a" is -4.                                                 
       The value of "b" is -5.                                                 
       The value of "c" is a.                                                  
       The value of "d" is b.                                                  
 (5) To undefine a Set Symbol:                                                 
       .sr var = first;.* Set Symbol 'var' has a value                         
       .sr var OFF    ;.* Set Symbol 'var' is undefined                        
       .sr var = next ;.* Set Symbol 'var' defined again                       


                                                                               


                                                                               


                                                                               


                                                                               

                                - 140 -                                        
                                                                               
 Waterloo SCRIPT                                           Single Space        


 Ŀ                                                                      
 | .SS  |                                                                      
                                                                       

 SINGLE SPACE causes lines output to the text area to be single-spaced.        

      Ŀ             
      |       |                                                  |             
      |  .SS  |                                                  |             
      |       |                                                  |             
                   

 This control word causes a break.   At the start of SCRIPT processing,        
 single-spacing is in  effect.   The .SS control word  is equivalent to        
 the ".LS 0" control word.                                                     


                                                                               
 Ŀ                                                                      
 | .SU  |                                                                      
                                                                       

 SUBSTITUTE causes Set Symbols in subsequent input lines to be replaced        
 by their values before the lines are processed as text or control-word        
 lines.                                                                        

      Ŀ             
      |       |                                                  |             
      |  .SU  |    <1|n|ON|OFF|line>                             |             
      |       |    <UPPER|NOUPPER>                               |             
      |       |                                                  |             
                   

 This control word does not cause a break.                                     

 ON:  At the start of SCRIPT processing, .SU is ON.  Each logical input        
    line is scanned from left to right for the presence of Set Symbols.        
    A Set Symbol is replaced by its value,  and SCRIPT then resumes the        
    scanning  process  starting  with the  leftmost  character  of  the        
    substituted  result.   This  enables  the  substitution of  Symbols        
    resulting from the substitution of Symbols,  until all Symbols have        
    been substituted.   SCRIPT then examines  the "substituted" line to        
    determine whether it is a text  or control-word line.   This "auto-        
    matic substitution" process continues until a  .SU with an "OFF" or        
    "n" operand is encountered.                                                
 OFF:   suppresses the  substitution scanning-and-replacement  process.        
    This is necessary, for example,  to define a Set Symbol as a string        
    of one or more  other Set Symbols that are not  to be "substituted"        
    until .SU is turned ON again or invoked with a "line" operand.             
 <1|n>:  This is useful when .SU is currently OFF; it causes the "line"        
    operand or the next "n" input lines to be "substituted".  If .SU is        
    currently on, it also causes it to be turned OFF.                          


                                                                               
                                - 141 -                                        
                                                                               
 SUbstitute                                             Waterloo SCRIPT        


 line:  This form  of the control word is particularly  useful when you        
    do not know whether  .SU is currently ON or OFF  and you don't want        
    to change it.    It applies the substitution process  to the "line"        
    operand without  altering the  ON or  OFF state,   and SCRIPT  then        
    processes the result as a text or control line.                            
 <UPPER|NOUPPER>:   UPPER  is   in  effect  at  the   start  of  SCRIPT        
    processing;  all Symbol names are automatically converted to upper-        
    case before replacement  by their values,  so that &X  and &x would        
    refer to the same Symbol.   NOUPPER causes Symbol name to be "case-        
    sensitive", so that &X and &x would be two different Symbols.   The        
    initial condition may  also be established by  specifying the UPPER        
    or NOUPPER options when invoking SCRIPT (UPPER is the default).            

 The Substitution Process                                                      

 Substitution of  a Symbol  is requested by  preceding the  Symbol name        
 with an ampersand (&)  and following the  Symbol name with a blank,  a        
 period, or a special character.  See the ".SR" control word for a list        
 of characters that are valid in a Set Symbol name.                            

 Global and Local Symbols                                                      

 A Set  Symbol name starting with  an asterisk following  the ampersand        
 (&*) implies that the Symbol is local to the current file,  macro,  or        
 remote;  otherwise,  it is a "global" Symbol.   If a global Symbol has        
 never been assigned  a value,  the "&symbol" is left  unchanged in the        
 input line (that is, it is regarded as text).   Otherwise, the current        
 value of  the Set Symbol is  converted (if necessary)  to  a character        
 string and  replaces the "&symbol."  (if a  period is used  for delim-        
 iting)  or  the string "&symbol" (if  a blank or special  character is        
 used).   Within a macro or remote,  a Local Symbol that has never been        
 assigned a value is replaced with the  null string;  in a file,  it is        
 replaced with itself.                                                         

 Subscripted Symbols                                                           

 Certain implied  subscripts for Set  Symbols are also  supported.   An        
 implied subscript of "&A(*)" concatenates all  the entries of that Set        
 Symbol together,   from "A(-1000000)" to "A(+1000000)"  except "A(0)",        
 each separated by a comma and  blank ", ".   Similarly "&A(*-)" refers        
 to  the concatenation  of  all negative-subscript  elements  of A  and        
 "&A(*+)" refers to  all positive-subscript elements.   Both  Local and        
 Global Symbols may be subscripted.                                            

 Substring Operations                                                          

 Substring  facilities on  Set Symbols  are supported  by specifying  a        
 start column and an end column separated  by a colon (:)  following or        
 instead of a subscript.   Thus "&C(j:k)"  refers to columns "j" to "k"        
 of set symbol "C", and "&V(i,j:k)" refers to columns "j" to "k" of set        
 symbol "V(i)".   The value of "j" may  not be omitted,  but "k" may be        
 omitted as it defaults to the end of the Symbol.  Substring operations        
 outside the length of the Symbol return the null string.                      


                                - 142 -                                        
                                                                               
 Waterloo SCRIPT                                             SUbstitute        


    Substring facilities on Symbols are  also supported by specifying a        
 start column and  a length separated by an  "or bar".   Thus "&C(j|k)"        
 refers to  column "j" for length  "k" of Symbol "C",   and "&V(i,j|k)"        
 refers to column "j" for length "k"  of Symbol "V(i)".   The value "j"        
 may not be omitted,  but "k" may be  omitted as it defaults to the end        
 of the Symbol.                                                                

 Values Beginning with the Control Word Separator                              

 When the  value of  a Symbol  begins with  the control  word separator        
 character (normally  ";"),  then the  substitution/replacement process        
 causes the parts of the input line  before and after this character to        
 be treated as two separate input lines.                                       

 Physical Versus Logical Input Lines                                           

 If the  line being  substituted begins with  a control  word indicator        
 (normally ".")   then substitution  of Symbols  will terminate  at any        
 control word separator  (normally ";")  found within the  line and the        
 remainder will  be substituted as part  of the normal processing  as a        
 "next logical input line".  This will not be so if the control word or        
 macro name is preceded with the control word modifier "'".                    

 Attributes and Functions                                                      

 See the Appendices  for the list of Attributes and  Functions that may        
 be applied to Set Symbols and character strings.                              


                                                                               
 Ŀ                                                                      
 | .SV  |                                                                      
                                                                       

 SPELLING VERIFICATION controls which input text  is to be verified for        
 correct spelling if the SPELLCHK option has been specified.                   

      Ŀ             
      |       |                                                  |             
      |  .SV  |    <ON|OFF>                                      |             
      |       |                                                  |             
                   

 All input text that  is added to the text area of  an output page will        
 be verified for correct spelling of words,  if the SPELLCHK option has        
 been specified.   Text in any Running  Titles is never verified.   The        
 definition  of a  "word" is  normally  any alphabetic  character or  a        
 single quote character embedded within the word.   This can be changed        
 with ".DC PUNC".                                                              
    SCRIPT has a  built-in Spelling Dictionary that  contains more than        
 30,000 words.    A word is  considered to  be correctly spelled  if it        
 matches one of the  words in this dictionary,  or if  it matches after        
 prefix and suffix analysis.  The list of valid prefixes includes:             
     in            over          re            under                           

                                - 143 -                                        
                                                                               
 Spelling Verification                                  Waterloo SCRIPT        


     non           pre           sub           un                              
 The list of valid suffixes includes the following.  The data following        
 '/' indicates that a matching suffix is replaced before looking up the        
 word.   If this replacement does not find a word, the search continues        
 with any other matching suffix.                                               
 (1) Possessive -- 's                                                          
 (2) Plurals -- ies/y, es/e, es, s                                             
 (3) Past Tense -- ied/y, ed/e, ed                                             
 (4) Past Participles -- ying/ie, ing/e, ing                                   
 (5) Comparatives -- ier/y, er/e, er                                           
 (6) Superlatives -- iest/y, est/e, est                                        
 (7) Adverbs -- ly/e, ly                                                       
 (8) Other -- ability, ation/e, ance, able, less, ness, ity, ion,  ize,        
     ism, al, ic                                                               

 Note, therefore,  that non-words such as "prerooting" will be accepted        
 by the spelling verifier because "pre" is  a valid prefix,  "ing" is a        
 valid suffix, and "root" is a word in the Spelling Dictionary.                
    This control word  does not cause a break.   The  initial value for        
 Spelling Verification is "ON".   An omitted operand will be treated as        
 "ON".                                                                         

 NOTES                                                                         
 (1) Spelling Verification will  increase the computer time  to process        
     the document.   The  SPELLCHK option would normally  be used after        
     initial input entry to aid with  initial proofing,  and once again        
     before the document is printed in final form.                             
 (2) Each time  SCRIPT detects  a word  that is  not acceptable  to the        
     spelling  verifier,   it adds  that  word  to an  internal  table,        
     together  with the  name of  the  file and  the input-line  record        
     number within that  file.   This information is  then displayed at        
     the end of SCRIPT  processing.   Therefore,  Spelling Verification        
     will increase  the memory  requirements to  process the  document,        
     particularly if the document contains a lot of unverifiable words.        
 (3) The .DU (Dictionary Update)  control word may be used to add addi-        
     tional "root"  words to the  Spelling Verifier dictionary  for the        
     duration of SCRIPT processing.                                            

 EXAMPLES                                                                      
 (1) .SV OFF                                                                   
     input text that follows is never subject to Spelling Verification.        
 (2) .SV ON                                                                    
     following input  will be  checked for spelling,   but only  if the        
     SPELLCHK option has been specified.                                       


                                                                               


                                                                               


                                                                               


                                - 144 -                                        
                                                                               
 Waterloo SCRIPT                                             Split Text        


 Ŀ                                                                      
 | .SX  |                                                                      
                                                                       

 SPLIT  TEXT splits  two  specified text  strings  with  a fill  string        
 between the  margins currently  defined by the  left and  right indent        
 values.                                                                       

      Ŀ             
      |       |                                                  |             
      |  .SX  |    <F|C> /left/fill/right/                       |             
      |       |                                                  |             
                   


 F or  FOLD:  This  form allows the  "left" text  string to  spill onto        
    multiple  output lines,   if necessary.    The  "fill" and  "right"        
    strings will not be folded.                                                
 C or CENTRE:   CENTRE causes "fill" string  to be centred in  the text        
    area.   The  space between  the three text  strings is  filled with        
    blanks.                                                                    
 FILL:  If FOLD or CENTRE is not  specified as the first operand,  then        
    FILL will default.   This form fills with the "fill" string between        
    the "left" and "right" strings within the text area.                       
 /:  The delimiter character for the  three strings is always the first        
    nonblank character following one of the above operands.  The delim-        
    iter character  itself cannot be  part of  any of the  three string        
    operands.                                                                  
 left:  This is the text to be formatted at the current left margin.           
 fill:  If FILL or FOLD is specified,   this is the string that will be        
    repeated between the "left" and "right" text.   If no "fill" string        
    is present,  then blanks will be used.   The "fill" is always sepa-        
    rated from the "left" and "right"  with at least one Required Blank        
    character.                                                                 

    If CENTRE is  specified,  then the "fill" string is  centred in the        
    text area.                                                                 
 right:  This is the text to be formatted at the current right margin.         

 This control  word causes a break.    Any missing "text  strings" will        
 default to null, but if all three are null an error will be given.            

 EXAMPLES                                                                      
 (1) .sx /left/--/right/                                                       
     produces:                                                                 
     left --------------------------------------------- right                  
 (2) .bd .sx /Hilighted Left/--/Right/                                         
     produces:                                                                 
     Highlighted Left --------------------------------- Right                  
 (3) .sx //+*//                                                                
     produces:                                                                 
     +*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*                  


                                                                               
                                - 145 -                                        
                                                                               
 Split Text                                             Waterloo SCRIPT        


 (4) .sx FOLD  /This is  a long title  line ...   next line/.                  
     /page/                                                                    
     produces:                                                                 
     This is a long title line that shows how a long                           
     split text line will continue on the next line  . . page                  
 (5) .of 3                                                                     
     .sx FOLD  /This is  a long title  line ...   next line/.                  
     /page/                                                                    
     produces:                                                                 
     This is a long title line that shows how a long                           
        split text line will continue on the next                              
        line . . . . . . . . . . . . . . . . . . . . . . page                  
 (6) .sx C /Left part/Middle/Right part/                                       
     produces:                                                                 
     Left part               Middle                Right part                  


                                                                               
 Ŀ                                                                      
 | .SY  |                                                                      
                                                                       

 SYSTEM COMMAND passes an operand line to the host operating system for        
 command processing.                                                           

      Ŀ             
      |       |                                                  |             
      |  .SY  |    line                                          |             
      |       |                                                  |             
                   

 This control word does not cause a break.  If no operand is specified,        
 no action  is taken.   The  .SY control  word provides a  facility for        
 imbedding operating-system commands in a  SCRIPT file,  to be executed        
 each time  SCRIPT is invoked.    The System Variable  Symbol "&SYSRET"        
 provides the return code from the last .SY command issued.                    

 NOTES                                                                         
 (1) Currently,  this  control word  is supported  for only  the VM/CMS        
     environment.  In the OS/VS TSO or batch environments, no action is        
     taken.  Under CMS, only CP and CMS SUBSET commands may be issued.         

 EXAMPLES                                                                      
 (1) This example  issues a  CP command  to SPool  the virtual  printer        
     "CONTinuous".   If the command was  not successful,  SCRIPT termi-        
     nates using ".qq":                                                        
       .sy cp spool prt cont                                                   
       .if &SYSRET ne 0 .qq                                                    


                                                                               


                                                                               

                                - 146 -                                        
                                                                               
 Waterloo SCRIPT                                                    TaB        


 Ŀ                                                                      
 | .TB  |                                                                      
                                                                       

 TAB defines tab-stop positions for subsequent output lines, or a user-        
 specified character to be recognized as a  TAB (hex code 05)  in addi-        
 tion to the TAB key on the terminal.                                          

      Ŀ             
      |       |                                                  |             
      |       |    <n1 n2 n3 ...>                                |             
      |  .TB  |    <<'string'|char/>n<L|R|C|'char'> ...>         |             
      |       |    <SET <char>>                                  |             
      |       |                                                  |             
                   

 This control word causes a break.                                             

 SET <char>:  defines  the user-specified single character  "char" that        
    SCRIPT is to  recognize as a TAB character in  addition to hex-code        
    05.   The ".TB" control word itself and ".  ", ".DO", ".EL", ".SU",        
    ".TH" and ".UR" will not have their operands altered.                      
       If used without a "char",  it  terminates the recognition of any        
    previous user-defined TAB character.   (These capabilities are also        
    provided by the ".DC TB" control word.)                                    
 n1 n2 n3 ...:  defines the output-line tab-stop positions, relative to        
    the current left page margin.   The  tab-stop positions "n" must be        
    specified in ascending order.   The "n"  values may be specified as        
    absolute positions, or as "+n" meaning "n positions to the right of        
    the previous tab-stop".   The fill  strings for each tab-stop posi-        
    tion will be the "blank",  and each tab-stop position will be left-        
    aligning (in  the standard typewriter  fashion).   At the  start of        
    SCRIPT processing,  tab-stop positions are  initially defined as 6,        
    11, 16, ..., and 81.   If .TB is specified with no operands,  these        
    initial tab-stop positions are re-instated.                                
 n<L|R|C|'char'>:   specifies the  type of  alignment  desired for  the        
    tab-stop position.   Each tab-stop position  "n" may be followed by        
    an L (left-aligning, the default if the alignment type is not spec-        
    ified), or an R (right-aligning),  or a C (centering),  or a single        
    delimited character (meaning "align on that character").                   
 <'string'|char/>n:  specifies the fill string or character to be used.        
    If no fill string or character is specified, blanks will be used in        
    filling to that tab-stop position.   A single fill character may be        
    specified as a delimited string, in the form                               
      'char'n                                                                  
    or in the form                                                             
      char/n                                                                   
    but a multi-character  fill string must always be  specified in the        
    form                                                                       
      'string'n                                                                
    The characters " and / may also be used to delimit the string.             
 <'string'|char/>n<L|R|C|'char'>:   the  complete  specification  of  a        
    tab-stop position,  including both the fill string or character and        
    the alignment  type.   Each  of the tab-stop  positions on  the .TB        

                                - 147 -                                        
                                                                               
 TaB                                                    Waterloo SCRIPT        


    control line may be specified in this fashion.                             

 Tabs in  Multiple Column  mode are  relative to  the beginning  of the        
 column in which they occur.   Under Concatenate (.CO) or Format (.FO),        
 tabbing beyond the  end of the output line still  produces the desired        
 result.                                                                       

 Fill-String Processing                                                        

 Tab Characters present in text input lines are expanded by SCRIPT into        
 one or more "fill" characters (blanks,  if not specified)  to the next        
 defined tab-stop position  on the output line.    The horizontal space        
 between the end  of the previous text  and the start of  the next text        
 (the tabulation gap)  is "filled" with the fill string.   If this is a        
 single character,  the character is  propagated throughout the tabula-        
 tion gap.  A multi-character fill string is handled as follows.               
    The fill  string is  propagated in an  internal workarea,   and the        
 particular  column bounds  of  the tabulation  gap  are  then used  to        
 extract the portion required to fill the tabulation gap.  For example,        
 a fill string of  "abc" in a tabulation gap from column  5 to 9 inclu-        
 sive will result  in the character string "bcabc"  filling the tabula-        
 tion gap.  If the tabulation gap is smaller than the fill string, only        
 a subset of the  fill string is extracted.   The tabulation  gap for a        
 character-aligning tab-stop is handled by  logically tabbing to column        
 "n" and then searching for the  alignment character,  another TAB,  or        
 end of  the input line;   the length of  the tabulation gap  is subse-        
 quently adjusted so this character will be aligned in column n.               

 NOTES                                                                         
 (1) Upon  encountering a  phrase  which cannot  be  centered or  right        
     justified on  a particular column,  then  the next tab  setting is        
     obtained which allows the desired result.   Thus each phrase under        
     an alignment constraint  is bounded by the previous  and next tab-        
     stop positions specified.                                                 

 EXAMPLES                                                                      
 The "rules" in the examples were generated  by the .BX control word to        
 show column positions.   In each example,   assume that the ">" is the        
 user-defined TAB character.                                                   

 (1) .tb 5 +/15 -/25 */35                                                      
     >a>b>c>d                                                                  
     The above sequence produces the following result:                         

     5        15        25        35                                           
 |||||                                           
     a+++++++++b---------c*********d                                           
                                            

 (2) An equivalent result is produced by:                                      
     .tb 5 +/+10 -/+10 */+10                                                   


                                                                               

                                - 148 -                                        
                                                                               
 Waterloo SCRIPT                                                    TaB        


 (3) .tb 20 'xyza'30                                                           
     12345>123>123                                                             
     The above sequence produces:                                              

                   20        30                                                
 |||                                                
 12345              123zaxyzax123                                              
                                                 

 (4) .tb 1/10 '234'25 "5678"40 /1234567890/50                                  
     this>is a>tab>fill>test.                                                  
     The above sequence produces:                                              

         10             25             40        50                            
 |||||                            
 this11111is a34234234234tab856785678567fill456789test.                        
                             

 (5) .tb 5c 10c                                                                
     >2345678                                                                  
     >234 67890                                                                
     The above sequence produces:                                              

     5   10                                                                    
 |||                                                                    
  2345678                                                                      
      234 67890                                                                
                                                                     

 (6) .tb 15c 25c 33l                                                           
     .uc command>break>default>meaning                                         
     .sk                                                                       
     .tb 15r 25c 33l                                                           
      cw c>no>c=;>control word separator is c                                  
      in n>yes>n=0>indent left margin n spaces                                 
      br>yes>>break                                                            
     The above sequence produces:                                              

              15        25       33                                            
 ||||                                             
 COMMAND     BREAK    DEFAULT    MEANING                                       

  cw c        no        c=;      control word separator is c                   
  in n       yes        n=0      indent left margin n spaces                   
  br         yes                 break                                         
                                              

 (7) .tb 10r 12l '.'70r                                                        
     >sin x =>x - x**3/3! + x**5/5! - > (9)                                    
     >sinh x =>x + x**3/3! - x**5/5! + > (10)                                  
     The above sequence produces:                                              


                                                                               

                                - 149 -                                        
                                                                               
 TaB                                                    Waterloo SCRIPT        


         10 12                                                        70       
 ||||        
    sin x = x - x**3/3! + x**5/5! - ............................... (9)        
   sinh x = x + x**3/3! - x**5/5! + .............................. (10)        
         

 (8) .tb 25'.'                                                                 
     .fo no                                                                    
     CPU charges>$123.45                                                       
     I/O costs>$1.26                                                           
     The above sequence produces:                                              

                        25                                                     
 ||                                                     
 CPU charges         $123.45                                                   
 I/O costs             $1.26                                                   
                                                      


                                                                               
 Ŀ                                                                      
 | .TC  |                                                                      
                                                                       

 TABLE OF CONTENTS causes the  current table-of-contents workarea to be        
 printed.                                                                      

      Ŀ             
      |       |                                                  |             
      |       |    <1|n|* <CONTENTS|line|/>>                     |             
      |  .TC  |    <ADD <m ... >>                                |             
      |       |    <DELETE>                                      |             
      |       |                                                  |             
                   

 This control word causes a break.                                             

 <1|n|* <CONTENTS|line|/>>:   The table-of-contents  workarea indicated        
    by the most recent ".DH SET" is printed.  The "n" operand specifies        
    the number of pages  to be reserved for it.   If  it consumes other        
    than "n" pages,  a gap or overlap in page-numbering will occur.   A        
    default of 1  page is used if  this operand is not  specified.   An        
    operand of "*" causes page numbering to proceed sequentially;  this        
    is the operand that you will probably use most often.                      
       The "line"  operand will  be used  to create  the title  for the        
    table of contents.   If not specified,   the title CONTENTS will be        
    used.   It is handled by SCRIPT  by internally generating a "pseudo        
    .HL 1" control  word with the title  as operand,  and  is therefore        
    printed  with whatever  .HL operands  are in  effect for  level-one        
    headings.   This pseudo  head-level becomes the first  entry in the        
    Table of Contents  and normally causes a page eject  if not already        
    at the top of  the page.   If the "line" operand  is a single slash        
    character '/' then no head-level 1 is processed before printing the        
    table-of-contents workarea.                                                

                                - 150 -                                        
                                                                               
 Waterloo SCRIPT                                      Table of Contents        


 ADD <m  ...  >:  causes  the table-of-contents workareas  specified by        
    <m ... > to be added to the current workarea.   Attempting to chain        
    the current workarea to itself will result in a null operation.            
 DELETE:   deletes  the  current   table-of-contents  workarea  without        
    printing it.                                                               

 The contents of the table-of-contents workarea is printed according to        
 the formatting  environment in effect at  the time the .TC  is encoun-        
 tered,  NOT what was in effect when  lines were added to the workarea.        
 The .TC control word is not allowed  within the BEGIN/END range of any        
 control word that creates an in-storage text block.                           

 EXAMPLES                                                                      
 (1) Since  the Table  of Contents  for  this manual  is created  using        
     table-of-contents workarea "0",  the following example is preceded        
     and followed  by a ".DH SET 9"  and ".DH SET 0"  respectively,  to        
     keep it separate from the manual's Table of Contents.                     

       .dh set 9                                                               
       .dh 4 tc                                                                
       .h1 1.0 This is a level-one heading                                     
       text lines, etc.                                                        
       .h2 1.1 This is a level-two heading                                     
       text lines, etc.                                                        
       .h3 1.1.1 This is a level-three heading                                 
       text lines, etc.                                                        
       .h4 1.1.1.1 This is a level-four heading                                
       text lines, etc.                                                        
       .pt .in                                                                 
       .pt .sk 2                                                               
       .pt . And now:                                                          
       .pt End of Table of Contents                                            
       .tc * Example Contents                                                  
       .dh set 0                                                               

 The above sequence  of control words and text produces  the results on        
 the following  pages.   The  "text lines,   etc." sequences  have been        
 replaced  by descriptions  of  the  appropriate heading-level  control        
 words.                                                                        


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                - 151 -                                        
                                                                               
 Table of Contents                                      Waterloo SCRIPT        


 1.0 THIS IS A LEVEL-ONE HEADING                                               


                                                                               


 A level-one heading has the following default characteristics:                

 -    Starts at the top of a new page.                                         
 -    Is right justified if it falls on an odd-numbered page.                  
 -    Is typed in uppercase and underscored.                                   
 -    Is followed by five spaces.                                              


                                                                               
 1.1 THIS IS A LEVEL-TWO HEADING                                               


 A level-two heading has the following default characteristics:                

 -    Has three line skips before it.                                          
 -    Is typed in uppercase and underscored.                                   
 -    Is followed by two spaces.                                               


                                                                               
 1.1.1 THIS IS A LEVEL-THREE HEADING                                           


 A level-three heading has the following default characteristics:              

 -    Has three line skips before it.                                          
 -    Is typed in uppercase letters.                                           
 -    Is followed by two spaces.                                               


                                                                               
 1.1.1.1 This is a level-four heading                                          


 A level-four heading has the following default characteristics:               

 -    Has three line skips before it.                                          
 -    Is underscored.                                                          
 -    Is followed by two spaces.                                               


                                                                               


                                                                               


                                                                               

                                - 152 -                                        
                                                                               
 Waterloo SCRIPT                                      Table of Contents        


                                                       EXAMPLE CONTENTS        


                                                                               


                                                                               
 1.0 This is a level-one heading . . . . . . . . . . . . . . . . .  152        
 1.1 This is a level-two heading . . . . . . . . . . . . . . . . .  152        
   1.1.1 This is a level-three heading . . . . . . . . . . . . . .  152        
     1.1.1.1 This is a level-four heading  . . . . . . . . . . . .  152        


 And now:                                                                      
 End of Table of Contents  . . . . . . . . . . . . . . . . . . . .  152        


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                - 153 -                                        
                                                                               
 TErminal input                                         Waterloo SCRIPT        


 Ŀ                                                                      
 | .TE  |                                                                      
                                                                       

 TERMINAL INPUT reads and processes input lines from the terminal.  The        
 lines typed in at the terminal may be text or control-word lines.             

      Ŀ             
      |       |                                                  |             
      |  .TE  |    <1|n|ON>                                      |             
      |       |                                                  |             
                   

 This control  word does not cause  a break.   However,   control words        
 input under its control may cause  breaks.   If the operand is omitted        
 then 1  is assumed.   When the  .TE control word is  encountered,  "n"        
 lines are read from the terminal and  processed as if they had been in        
 the input  file.   The  "ON" operand  will read  terminal input  until        
 terminated by the  user.   Pressing the ATTENTION or  BREAK key termi-        
 nates the .TE,  regardless of whether "n" lines have been input or the        
 "ON" operand was specified.   The .TE can also be terminated by typing        
 a "null" line,  but  the null line will be processed  as a blank input        
 line (normally  treated as  a .SK).    Since a  .TE is  treated as  an        
 imbedded file,  terminal input may also be terminated with a .EF,  .QU        
 or .QQ control word.                                                          

 NOTES                                                                         
 (1) The .TE control word takes input from the user and processes it as        
     text or  control words.    Output should not  be to  the terminal,        
     since user input and SCRIPT output will be interspersed.  However,        
     .TE can  be used  effectively before  the "Load paper..."  message        
     with terminal output.                                                     
 (2) If output is also to the  terminal,  the typing element will space        
     but not  print. You should manually  space the carriage  back one        
     line to leave  it properly aligned after the  carriage return that        
     ends the input line.                                                      
 (3) You might wish to use .TE  in order to dynamically specify control        
     words or text, or change the typing element.                              
 (4) The .RD control word  allows you to type on the  terminal but does        
     not process any data entered.                                             
 (5) The input read by  this control word can be processed  from a disk        
     file if the filename "SYSCONS" is allocated to an input file.             

 EXAMPLES                                                                      
 (1) To prompt for up to four records of input:                                
       .ty Enter name and address here:                                        
       .te 4                                                                   
 (2) To prompt for input:                                                      
       .ty Enter formatting environment and variables                          
       .ty and terminate with a Break or Attention:                            
 _______________________                                                       

  The typing  element will print during  the first of  multiple PASSes        
   even if output is to the terminal.                                          

                                - 154 -                                        
                                                                               
 Waterloo SCRIPT                                         TErminal input        


       .te ON                                                                  


                                                                               
 Ŀ                                                                      
 | .TH  |                                                                      
                                                                       

 THEN causes  an input line to  be conditionally included  depending on        
 the truth value of a previous IF control word.                                

      Ŀ             
      |       |                                                  |             
      |  .TH  |    line                                          |             
      |       |                                                  |             
                   

 This control  word does not cause  a break,  although the  "line" may.        
 The "line"  that begins with the  first non-blank character  after the        
 .TH control  word is processed only  if the preceding .IF  was "true".        
 The line may include any control word except another Then (.TH)  or an        
 Else (.EL).   It may be another .IF, and these may be nested up to ten        
 levels.   It may also be an Imbed (.IM)  or Macro Call,  in which case        
 the current .IF status  and its nesting level will be  saved and later        
 restored when the  current file nest level is resumed.    If "line" is        
 omitted then the object of the Then has no effect.                            

 EXAMPLES                                                                      
 (1) This example starts  a new page or skips two  lines,  depending on        
     whether &sptype has the value "page":                                     
       .if &sptype = page                                                      
       .   .th .pa                                                             
       .   .el .sk 2                                                           
 (2) This example will imbed file AFILE if the value of &i is less than        
     or  equal to  one.    Note  that a  .TH  control  word is  assumed        
     following an .IF if the immediately following record is not .TH or        
     .EL:                                                                      
       .if &i le 1                                                             
       .im afile                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                - 155 -                                        
                                                                               
 Translate on Input                                     Waterloo SCRIPT        


 Ŀ                                                                      
 | .TI  |                                                                      
                                                                       

 TRANSLATE ON INPUT allows the user  to specify an escape character and        
 a translate table to be used on input lines.                                  

      Ŀ             
      |       |                                                  |             
      |       |    <SET <char>>                                  |             
      |  .TI  |    <s <s|t>>                                     |             
      |       |    <<s1 t1> <s2 t2> ...>                         |             
      |       |                                                  |             
                   

 This control word does not cause a break.                                     

 SET <char>:  In all subsequent input text and control lines, the char-        
    acter immediately  following the  escape character  "char" will  be        
    translated  according  to  the .TI  translate  table  currently  in        
    effect,  and the escape character removed.   If .TI is used without        
    any operands, the translate table specified by the TRANSLATE option        
    when  SCRIPT was  invoked will  be reinstated  and any  previously-        
    defined escape character  will be nullified.   If  SET is specified        
    without a  "char" operand,   the current  escape character  will be        
    nullified but the  translate table will remain.   When  there is no        
    escape character in effect, no input translations are performed.           
 <s1 t1> <s2  t2> ...:  specifies "source" characters  to be translated        
    to "target" characters.                                                    
 s <s|t>:  This form  of the control word allows a  single source char-        
    acter to  be translated  into itself  if no  "target" character  is        
    specified.                                                                 

 Many of  the commoner uses  of .TI  can be more  conveniently achieved        
 through the use of  the &x' function.   The .TI control  word is occa-        
 sionally of use when output must have  a character set larger than the        
 input character set.   For example, a 029 keypunch lacks the lowercase        
 alphabetics but using .TI and .TR translate tables "$A" could print as        
 uppercase and "A" as lower.   See the Translate control word (.TR) for        
 more information on specifying the input translate table.                     

 EXAMPLES                                                                      
 (1) .ti < AD > BD ( C0 ) D0 . AF                                              
     .ti set                                                                  
     . INDex<-Queues> (<Time=(<mm><,ss>))>                          
     The above sequence produces:                                              
      INDex[-Queues] {[Time=([mm][,ss])}]                                     


                                                                               


                                                                               


                                - 156 -                                        
                                                                               
 Waterloo SCRIPT                                             Top Margin        


 Ŀ                                                                      
 | .TM  |                                                                      
                                                                       

 TOP MARGIN specifies the number of lines to be left between the top of        
 the output page and the first line of the text area.                          

      Ŀ             
      |       |                                                  |             
      |  .TM  |    <6|v|+v|-v>                                   |             
      |       |                                                  |             
                   


 <6|v>:   At the  top of  all  subsequent output  pages (including  the        
    current page,  if empty),  "v" lines will appear between the top of        
    the page and the first line of the text area.  A value of zero will        
    suppress the entire Top Margin area of the page.                           
 <+n|-n>:  This value will modify the current Top Margin value, so long        
    as the resulting value is not negative.                                    

 This control word  causes a break.   If used without  an operand,  the        
 value of the TMargin option will be taken, normally 6.  If the Heading        
 Margin is "hm",  the Heading Space is  "hs",  and the Top Margin "tm",        
 then the top of each page will contain:                                       
 (1) "tm" - "hm" - "hs" blank lines, followed by                               
 (2) "hs" top-title lines, followed by                                         
 (3) "hm" blank lines.                                                         

 The Heading  Margin plus  Heading Space  must always  be less  than or        
 equal to the Top Margin, unless the Top Margin is zero.  Then the text        
 area will extend to the very top of the page.                                 


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                - 157 -                                        
                                                                               
 Tab Position                                           Waterloo SCRIPT        


 Ŀ                                                                      
 | .TP  |                                                                      
                                                                       

 TAB POSITION defines and modifies tab  stops to be used when replacing        
 input tab characters  with an appropriate number  of horizontal spaces        
 or a fill string.                                                             

      Ŀ             
      |       |                                                  |             
      |  .TP  |    SET <'string'>h <Left> ...                    |             
      |       |    ADD       <f/>h <Right> ...                   |             
      |       |    CLR           h <Centre> ...                  |             
      |       |    DEL           h <CHAR <c|'c'> ...             |             
      |       |                                                  |             
                   

 This control word causes a break.                                             

 SET:  All Tab  stops specified in the control word  will replace what-        
    ever tabs are currently in effect.                                         
 ADD:  The  Tab stops  specified will  be added  to the  tabs that  are        
    currently in  effect.   If the "h"  value matches an  existing tab,        
    that tab definition is replaced.                                           
 CLR or  DEL:  The Tab  stops specified will  be deleted from  the tabs        
    that  are currently  in effect.    If this  leaves no  tabs at  all        
    defined, the default tab values are restored.                              
 h ...:  defines  the output-line tab-stop positions,   relative to the        
    current left page margin.  The tab-stop positions "h" must be spec-        
    ified in ascending order.  The "h" values may be specified as abso-        
    lute positions, or as "+h" meaning "h positions to the right of the        
    previous tab-stop".   The  fill strings for each  tab-stop position        
    will be  the "blank",   and each  tab-stop position  will be  left-        
    aligning (in  the standard typewriter  fashion).   At the  start of        
    SCRIPT processing,  tab-stop positions are  initially defined as 6,        
    11, 16, ..., and 81.   If .TP is specified with no operands,  these        
    initial tab-stop positions are re-instated.                                
 h <Left|Centre|Right|CHAR 'c'>  ...:  specifies the type  of alignment        
    desired for the tab-stop position.   Each tab-stop position "h" may        
    be followed by "Left" (left-aligning,  the default if the alignment        
    type  is not  specified),  or  "Right" (right-aligning),   "Centre"        
    (centering), or "CHAR" followed by a single character "c" or delim-        
    ited character  'c' (meaning align the  tab on the  specified char-        
    acter).                                                                    
 <'string'|c/>h ...:   specifies the string  or single character  to be        
    used for tab  fill.   If no fill string or  character is specified,        
    blanks will be used in filling to that tab-stop position.  A single        
    fill character may be specified as a delimited string, in the form         
      'c'h                                                                     
    or in the form                                                             
      c/h                                                                      
    but a multi-character  fill string must always be  specified in the        
    form                                                                       
      'string'h                                                                

                                - 158 -                                        
                                                                               
 Waterloo SCRIPT                                           Tab Position        


    The characters " and / may also be used to delimit the string.             
 <'string'|c/>h <Left|Centre|Right|CHAR 'c'> ...:   the complete speci-        
    fication of a tab-stop position,  including both the fill string or        
    character and the alignment type.    Each of the tab-stop positions        
    on the .TP control line may be specified in this fashion.                  

 Tabs in  Multiple Column  mode are  relative to  the beginning  of the        
 column in which they occur.   Under Concatenate (.co) or Format (.fo),        
 tabbing beyond the  end of the output line still  produces the desired        
 result.                                                                       

 Fill-String Processing                                                        

 Tab Characters present in text input lines are expanded by SCRIPT into        
 one or more "fill" characters (blanks,  if not specified)  to the next        
 defined tab-stop position  on the output line.    The horizontal space        
 between the end  of the previous text  and the start of  the next text        
 (the tabulation gap)  is "filled" with the fill string.   If this is a        
 single character,  the character is  propagated throughout the tabula-        
 tion gap.  A multi-character fill string is handled as follows.               
    The fill  string is  propagated in an  internal workarea,   and the        
 particular  column bounds  of  the tabulation  gap  are  then used  to        
 extract the portion required to fill the tabulation gap.  For example,        
 a fill string of  "abc" in a tabulation gap from column  5 to 9 inclu-        
 sive will result  in the character string "bcabc"  filling the tabula-        
 tion gap.  If the tabulation gap is smaller than the fill string, only        
 a subset of the  fill string is extracted.   The tabulation  gap for a        
 character-aligning tab-stop is handled by  logically tabbing to column        
 "h" and then searching for the alignment character,  another Tab Char-        
 acter,  or end of the input line;  the length of the tabulation gap is        
 subsequently adjusted so this character will be aligned in column n.          

 NOTES                                                                         
 (1) Upon  encountering a  phrase  which cannot  be  centered or  right        
     justified on  a particular column,  then  the next tab  setting is        
     obtained which allows the desired result.   Thus each phrase under        
     an alignment constraint  is bounded by the previous  and next tab-        
     stop positions specified.                                                 
 (2) In addition to the Tab Character (X'05'), a user Tab Character may        
     be defined with the ".DC TB" control word.                                

 EXAMPLES The "rules" in the examples were generated by the .BX control        
 word to show column positions.   In each example,  assume that the ">"        
 is the user-defined Tab Character.                                            

 (1) .tp SET .5i 1.5i (/2.0i )/2.5i                                            
     >a>b>c>d                                                                  
     The above sequence produces the following result:                         

    .5       1.5  2.0  2.5                                                     
 |||||                                                     
     a         b((((c))))d                                                     
                                                      


                                - 159 -                                        
                                                                               
 Tab Position                                           Waterloo SCRIPT        


 (2) An equivalent result is produced by:                                      
       .tp .5i +1.0i (/+.5i )/+.5i                                             

 (3) .tp 20 'xyza'30                                                           
     12345>123>123                                                             
     .tp add 10                                                                
     12345>*>123>123                                                           
     The above sequence produces:                                              

         10        20        30                                                
 ||||                                                
 12345              123zaxyzax123                                              
 12345    *         123zaxyzax123                                              
                                                 

 (4) .tp 1/10 '234'25 "5678"40 /1234567890/50                                  
     this>is a>tab>fill>test.                                                  
     The above sequence produces:                                              

         10             25             40        50                            
 |||||                            
 this11111is a34234234234tab856785678567fill456789test.                        
                             

 (5) .tp 5 Centre 10 Centre                                                    
     >2345678                                                                  
     >234 67890                                                                
     The above sequence produces:                                              

     5   10                                                                    
 |||                                                                    
  2345678                                                                      
      234 67890                                                                
                                                                     

 (6) .tp 15 Centre 25 Centre 33 Left                                           
     .uc command>break>default>meaning                                         
     .sk                                                                       
     .tp 15 Right 25 Centre 33 Left                                            
      cw c>no>c=;>control word separator is c                                  
      in n>yes>n=0>indent left margin n spaces                                 
      br>yes>>break                                                            
     The above sequence produces:                                              

              15        25       33                                            
 ||||                                             
 COMMAND     BREAK    DEFAULT    MEANING                                       

  cw c        no        c=;      control word separator is c                   
  in n       yes        n=0      indent left margin n spaces                   
  br         yes                 break                                         
                                              


                                                                               
                                - 160 -                                        
                                                                               
 Waterloo SCRIPT                                           Tab Position        


 (7) .tp 10 Right 12 Left '.'70 Right                                          
     >sin x =>x - x**3/3! + x**5/5! - > (9)                                    
     >sinh x =>x + x**3/3! - x**5/5! + > (10)                                  
     The above sequence produces:                                              

         10 12                                                        70       
 ||||        
    sin x = x - x**3/3! + x**5/5! - ............................... (9)        
   sinh x = x + x**3/3! - x**5/5! + .............................. (10)        
         

 (8) .tp 2.5i CHAR '.'                                                         
     .fo no                                                                    
     CPU charges>$123.45                                                       
     I/O costs>$1.26                                                           
     The above sequence produces:                                              

                      2.5i                                                     
 ||                                                     
 CPU charges         $123.45                                                   
 I/O costs             $1.26                                                   
                                                      


                                                                               
 Ŀ                                                                      
 | .TR  |                                                                      
                                                                       

 TRANSLATE allows the user to specify a  translate table to be used for        
 output.                                                                       

      Ŀ             
      |       |                                                  |             
      |  .TR  |    <<s1 t1> <s2 t2> ...>                         |             
      |       |    <s <s|t>>                                     |             
      |       |                                                  |             
                   

 This control word does not cause a break.  Unless the TRANSLATE option        
 was specified when SCRIPT was invoked, no output translation will take        
 place until  a .TR table  has been  defined.   Specifying .TR  with no        
 operands eliminates all output translations and reinstates the initial        
 default.                                                                      

 <s1 t1> <s2  t2> ...:  adds the  specified "source-to-target" transla-        
    tions to the translate table.   The "s" and "t" can be single char-        
    acters or two-digit hexadecimal values using uppercase or lowercase        
    letters.   All  subsequent output  lines will  be printed  with all        
    occurrences of "s1" replaced by "t1", etc.                                 
 s <s|t>:  this form  specifies that "s" is to be  translated to itself        
    if a "t" is not specified.                                                 

 Many of the common  uses of .TR can also be achieved  by using the &x'        

                                - 161 -                                        
                                                                               
 TRanslate                                              Waterloo SCRIPT        


 function.    No  translation,   except  uppercase  conversion  if  the        
 TRANSLATE option was specified, will be in effect until .TR is encoun-        
 tered with operands.                                                          

 NOTES                                                                         
 (1) The text of  footnotes and other storage blocks  are translated as        
     they are input.                                                           
 (2) The text of running titles is translated using the translate table        
     current when the title is output.                                         
 (3) SCRIPT control lines are never translated.                                
 (4) Translate pairs remain active until explicitly re-specified.              
 (5) Hexadecimal numbers are recognized by  the presence of two charac-        
     ters (instead of one)  and may  use uppercase or lowercase letters        
     A-F.                                                                      
 (6) The last pair in  a .TR line may consist of  only a "source" char-        
     acter, which indicates that the character is to be translated into        
     itself.                                                                   

 EXAMPLES                                                                      
 (1) .TR 8D ( 9D ) B0 0 ... B9 9                                               
     Causes the superscript parentheses and numbers of the TN character        
     set to display as ordinary parentheses and numbers.                       
 (2) .TR % 7C                                                                  
     Causes occurrences  of the  character "%"  to be  replaced by  the        
     character X'7C', the "@" character, which may not be easy to enter        
     into a file by virtue of being the "character delete" character in        
     some systems.                                                             
 (3) .TR 40 ?                                                                  
     Causes all blanks to appear as "?" on output.                             
 (4) .TR 05 40                                                                 
     This is an unsuccessful attempt to  remove all TAB characters from        
     the input and replace them with blanks.   It will fail because TAB        
     characters are expanded during input processing, not on output.           


                                                                               
 Ŀ                                                                      
 | .TT  |                                                                      
                                                                       

 TOP TITLE defines  a running title to  be printed at the  top of even-        
 and odd-numbered pages.                                                       

      Ŀ             
      |       |                                                  |             
      |  .TT  |    <1|n>  /left/centre/right/                    |             
      |       |                                                  |             
                   

 This  control word  does  not cause  a break.    It  is equivalent  to        
 .RT TOP; see .RT for details.   The title line will only be printed on        
 the current page  if it is currently  empty.   At the start  of SCRIPT        
 processing,   the   top  title  on  each   page  after  page   one  is        
 ".tt ///PAGE %/".   This default may be suppressed  by .PN with an OFF        

                                - 162 -                                        
                                                                               
 Waterloo SCRIPT                                              Top Title        


 or OFFNO operand, or by defining your own .TT line(s).                        

 NOTES                                                                         
 (1) /right/  may overlay  /centre/  if  necessary,  and  /centre/  may        
     overlay /left/ if necessary.                                              
 (2) Setting a null header or setting the Heading Space to zero are the        
     only ways to achieve the effect of an empty Top Margin.                   
 (3) Strings that are omitted in the  operand become null;  they do not        
     retain their previous values.                                             

 EXAMPLES                                                                      
 (1) Sample definition of Top Margin area:                                     
       .tt   /***********************//***************/                        
       .tt 2 /*Department of Alchemy*//*ATN-05-3-70-%*/                        
       .tt 3 /***********************//***************/                        
       .tm 7;.hm 2;.hs 3                                                       


                                                                               
 Ŀ                                                                      
 | .TU  |                                                                      
                                                                       

 TRANSLATE UPPERCASE allows the user to specify a translate table to be        
 used for uppercase conversions.                                               

      Ŀ             
      |       |                                                  |             
      |  .TU  |    <<s1 t1> <s2 t2> ...>                         |             
      |       |    <s <s|t>>                                     |             
      |       |                                                  |             
                   

 This control word  does not cause a break.   The  Uppercase (.UP)  and        
 Uppercase and  Capitalize (.UC)  control  words cause  following input        
 text to be output in uppercase.    In addition the Uppercase Functions        
 &U' and &'upper( will  convert an operand to uppercase as  part of the        
 Set Symbol substitution process.  This control word allows the user to        
 specify how the uppercase translation is to be performed.   Specifying        
 .TU  with  no  operands eliminates  all  previously-defined  uppercase        
 translations and reinstates  the default of all  lowercase alphabetics        
 from 'a' to 'z' translated to 'A' to 'Z'.                                     

 <s1 t1> <s2  t2> ...:  adds the  specified "source-to-target" transla-        
    tions to  the uppercase translate table.    The "s" and "t"  can be        
    single characters  or two-digit hexadecimal values  using uppercase        
    or lowercase letters.   All subsequent output lines will be printed        
    with all occurrences of "s1" replaced by "t1", etc.                        
 s <s|t>:  this form  specifies that "s" is to be  translated to itself        
    if a "t" is not specified.                                                 


                                                                               


                                - 163 -                                        
                                                                               
 Translate Uppercase                                    Waterloo SCRIPT        


 NOTES                                                                         
 (2) Uppercase   translate  pairs   remain   active  until   explicitly        
     re-specified.                                                             
 (3) Hexadecimal numbers are recognized by  the presence of two charac-        
     ters (instead of one)  and may  use uppercase or lowercase letters        
     A-F.                                                                      
 (4) The last pair in  a .TU line may consist of  only a "source" char-        
     acter, which indicates that the character is to be translated into        
     itself.                                                                   

 EXAMPLES                                                                      
 (1) .TU a $                                                                   
     Causes lower case 'a'  to be translated to a dollar  sign '$' when        
     it appears in the text of an Uppercase (.UP) control word.                
 (2) .TU h H H h                                                               
     Causes lowercase 'h' to display uppercase 'H' and an uppercase 'H'        
     to display as a lowercase 'h'.                                            
 (3) .TU a A b B c C ... z Z                                                   
     This is the initial default.                                              


                                                                               
 Ŀ                                                                      
 | .TY  |                                                                      
                                                                       

 TYPE displays a line of information at the terminal.                          

      Ŀ             
      |       |                                                  |             
      |  .TY  |    information                                   |             
      |       |                                                  |             
                   

 This control word does not cause a break.  If used with no operands, a        
 blank line is displayed.   The text  of the line displayed is modified        
 by the .TR (Translate) characters currently in effect.                        

 EXAMPLES                                                                      
 (1) The .TY  control is useful  immediately preceding a  .TE (Terminal        
     Input) or .RV (Read Variable)  control word,  as a prompt for what        
     to type in response:                                                      
       .ty Type Name and Address in five lines or less:                        
       .te 5                                                                   
 (2) Prompt user for an input variable:                                        
       .ty Specify number of output columns:                                   
       .rv ncols                                                               
       .cd set &ncols                                                          


                                                                               


                                                                               

                                - 164 -                                        
                                                                               
 Waterloo SCRIPT                              Underscore and Capitalize        


 Ŀ                                                                      
 | .UC  |                                                                      
                                                                       

 UNDERSCORE AND  CAPITALIZE underscores  and capitalizes  the specified        
 number of input text lines.                                                   

      Ŀ             
      |       |                                                  |             
      |  .UC  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   

 This control word  does not cause a  break.   It applies the  rules of        
 Uppercase (.UP) and Underscore (.US) to subsequent text input lines or        
 to the  "line" operand.    The operands  and other  considerations are        
 identical to those for .BD; see .BD for details.                              


                                                                               
 Ŀ                                                                      
 | .UD  |                                                                      
                                                                       

 UNDERSCORE DEFINITION controls  the characters that are  to be subject        
 to the actions of the control words that emphasize text.                      

      Ŀ             
      |       |                                                  |             
      |       |    <<ON|OFF> c1 <c2 ... >>                       |             
      |  .UD  |                                                  |             
      |       |    <SET|INCLUDE|IGNORE> char                     |             
      |       |                                                  |             
                   


 <ON|OFF> c1 <c2 ... >:  ON specifies the characters (as single charac-        
    ters or as their two-digit hexadecimal representation)  that are to        
    be automatically emphasized in text input lines being acted upon by        
    the .BD, .BI, .UC,  .US,  and .UP control words.   Conversely,  OFF        
    specifies which characters are not to be emphasized.                       
 <SET|INCLUDE|IGNORE> char:  SET defines a  .UD "escape" character that        
    will be  recognized in  text input  lines being  acted upon  by the        
    emphasis control words.   The first  occurrence of the escape char-        
    acter within such a line will  "turn off" the emphasis action,  the        
    next occurrence in the same line will "turn it on again", and so on        
    from left  to right along  the line.   Alternatively,   INCLUDE and        
    IGNORE may be used to define separate escapes.   INCLUDE defines an        
    escape character that "turns on" the emphasizing action, and IGNORE        
    defines an escape character that "turns it off".   The escape char-        
    acter(s) enable selective emphasizing of parts of input lines;  the        
    escape character itself is removed from the input line and does not        
    appear in the output.                                                      


                                - 165 -                                        
                                                                               
 Underscore Definition                                  Waterloo SCRIPT        


 This control word does not cause a  break.   If no operands are speci-        
 fied,  any escape characters currently in effect are nullified and the        
 characters subject to emphasis are reset to the initial defaults.  The        
 SET, INCLUDE, or IGNORE operands without an escape character nullifies        
 the corresponding  escape.   At  the start  of SCRIPT  processing,  no        
 escape  characters  are  in  effect  and  all  characters  except  the        
 following are candidates for emphasis.                                        

  Hex Char       Hex Char  Hex Char  Hex Char                                  
   05 TAB         5A !      6F ?      AD [                                     
   16 BACKSPACE   5D )      7A :      BD ]                                     
   40 BLANK       5E ;      7F "      C0 {                                     
   4B .           6B ,      8B       D0 }                                     
   4D (           6D _      9B                                                

 EXAMPLES                                                                      
 (1) .ud on 40 " ,                                                             
     .us on                                                                    
      ... text ...                                                             
     .ud                                                                       
     produces the following result:   By including a ".UD ON 40" before        
     the Underscore control word,  the text  and the blanks between may        
     be underscored  and the  resulting output  lines justified.    The        
     technique of placing  underscores instead of blanks  between words        
     will not allow the text to be justified.                                  
 (2) .us ,SPACE=(TRK,(1,1,1))                                                  
     produces:  ,SPACE=(TRK,(1,1,1))                                           
 (3) .ud on ( ) ,;.ud off =                                                    
     with the above example produces:  ,SPACE=(TRK,(1,1,1))                    
 (4) .ud set !                                                                 
     .us !,SPACE=(!TRK,(1,1,1)!)                                               
     produces:  ,SPACE=(TRK,(1,1,1))                                           
 (5) Underscore Definition may be used                                         
     .ud set !                                                                 
     .BD !for !BolD,                                                           
     .BI !for !Bold Italic,                                                    
     .UC !for !Underscore and Capitalize,                                      
     .UL !for !UnderLine,                                                      
     .US !for !UnderScore,                                                     
     .UP !and for !UPpercase.                                                  
     The above sequence  produces:   Underscore Definition may  be used        
     for BolD,  for  Bold Italic,  for UNDERSCORE  AND CAPITALIZE,  for        
     UnderLine, for UnderScore, and for UPPERCASE.                             


                                                                               


                                                                               


                                                                               


                                                                               
                                - 166 -                                        
                                                                               
 Waterloo SCRIPT                                                 UNdent        


 Ŀ                                                                      
 | .UN  |                                                                      
                                                                       

 UNDENT causes the  next output line to start  the specified horizontal        
 distance to the left of the current left Indent value.                        

      Ŀ             
      |       |                                                  |             
      |  .UN  |    <0|h|-h|+h>                                   |             
      |       |                                                  |             
                   

 This  control word  causes a  break.   It  produces a  one-output-line        
 effect only.   If  used with no operand,  "zero" will  be assumed.   A        
 relative change  as in "+h" or  "-h" changes the  previously specified        
 Undent or Indent Line (.IL).                                                  
    The Undent remains in effect until the next Undent, Indent (.IN) or        
 Indent Line (.IL) control word.                                               
    The undentation may  not exceed the current  indentation.   The .UN        
 and .OF  control words  achieve the  same visual  effect;  the  choice        
 between the two is largely a matter of personal preference.                   

 EXAMPLES                                                                      
 (1) .in 9                                                                     
     .un 4                                                                     
     text ...                                                                  
     achieves the same results as:                                             
     .in 5                                                                     
     .of 4                                                                     
     text ...                                                                  


                                                                               
 Ŀ                                                                      
 | .UP  |                                                                      
                                                                       

 UPPERCASE converts lowercase  alphabetics to uppercase for  the speci-        
 fied number of input lines.                                                   

      Ŀ             
      |       |                                                  |             
      |  .UP  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   

 This control  word does not  cause a  break.   The operands  and other        
 considerations are identical to those for the other control words that        
 emphasize text.  See .BD for details.                                         


                                                                               


                                - 167 -                                        
                                                                               
 UPpercase                                              Waterloo SCRIPT        


 NOTES                                                                         
 (1) The Translate Uppercase (.TU)  control word may be used to specify        
     how the uppercase translation is to be performed.                         
 (2) See also the Uppercase Functions &U'  and &'upper(,  to convert an        
     operand  to  uppercase as  part  of  the Set  Symbol  substitution        
     process.                                                                  


                                                                               
 Ŀ                                                                      
 | .US  |                                                                      
                                                                       

 UNDERSCORE underscores text in the specified number of input lines.           

      Ŀ             
      |       |                                                  |             
      |  .US  |    <1|n|ON|OFF|line>                             |             
      |       |                                                  |             
                   

 This control  word does not  cause a  break.   The operands  and other        
 considerations are identical to those for the other control words that        
 emphasize text.  See .BD for details.                                         

 NOTES                                                                         
 (1) For output devices  that support multiple fonts,   the output from        
     this control word is not  necessarily underscored.   It often will        
     display in an italic font, for example.                                   
 (2) Text may also be emphasized with the &'italic( function.                  

 EXAMPLES                                                                      
 (1) This is example number                                                    
     .us one.                                                                  
     produces:  This is example number one.                                    
 (2) 1.2 &'italic('Chapter Title')                                             
     produces:  1.2 Chapter Title                                              
 (3) .us on                                                                    
     This is a simple test of underscoring some                                
     input text.                                                               
     .ud on 40                                                                 
     And now we will underscore the interword blanks,                          
     but justification can continue.                                           
     Since the period is not underscored there                                 
     are still blanks between sentences.                                       
     .ud on . ?                                                                
     Now even the sentences will be joined because                             
     the special characters period and question mark                           
     are also underscored.                                                     
     How does it look?                                                         
          Note that leading blanks on a line are not                           
     underscored.                                                              
     The end.                                                                  
     .us off                                                                   

                                - 168 -                                        
                                                                               
 Waterloo SCRIPT                                             UnderScore        


     produces:   This is a simple test of underscoring some input text.        
     And now we will underscore the interword blanks, but justification        
     can continue.  Since the period is not underscored there are still        
     blanks between sentences.   Now even  the sentences will be joined        
     because the special  characters period and question  mark are also        
     underscored.  How does it look?                                           
          Note that leading blanks on a line are not underscored.   The        
     end.                                                                      


                                                                               
 Ŀ                                                                      
 | .UW  |                                                                      
                                                                       

 UNVERIFIED WORD is generated for each  input text record that contains        
 words that are not known to the Spelling Verifier.                            

      Ŀ             
      |       |                                                  |             
      |  .UW  |    word word ...                                 |             
      |       |                                                  |             
                   

 When the SPELLCHK  option has been specified,  input  text is verified        
 against words found in a "dictionary" of correctly spelled words.  Any        
 words in an input record that are  found to be incorrect are passed as        
 operands of an internally generated ".UW" control word.                       
    The  word operands  are  stored  alphabetically in  memory  without        
 regard to the case of the word.   The file name and sequence number of        
 the input record are stored with the word.  At termination, the sorted        
 list of words  with their file names and record  number references are        
 displayed  to the  error  file.   The  references  are displayed  with        
 leading zeros removed and separated with a blank.  Following the orig-        
 inal word,  possible correct spellings  are suggested.   These correc-        
 tions are derived by inserting, deleting and exchanging letters in the        
 problem word.                                                                 
    This control word does not cause a break.   It will be treated as a        
 comment if the SPELLCHK option has  not been specified.   In addition,        
 Spelling Verification is only performed on  the last pass of the input        
 so Unverified  Word is always  treated as  a comment for  input passes        
 other than the last.                                                          

 NOTES                                                                         
 (1) A ".UW" macro  could be written to trap  occurrences of misspelled        
     words in the input.  The macro will be invoked with the misspelled        
     words as operands so one might use the operands for a ".DU ADD" to        
     prevent subsequent errors with the words.    A native ".UW" can be        
     invoked from within this macro with Execute Macro ".EM" or "..UW".        
 (2) Unverified words are maintained in working storage.   Extra memory        
     should be allowed for when the SPELLCHK option is specified.              
 (3) The ".UW" control  word will not be generated if  the control word        
     indicator character  has been disabled  or for text  under Literal        
     control ".LI".  Words found in these circumstances are still added        

                                - 169 -                                        
                                                                               
 Unverified Word                                        Waterloo SCRIPT        


     to the error listing.                                                     


                                                                               
 Ŀ                                                                      
 | .WD  |                                                                      
                                                                       

 WIDOW prevents  the first  and last  lines of  a paragraph  from being        
 split from the rest of the paragraph across a column or page boundary.        

      Ŀ             
      |       |                                                  |             
      |  .WD  |    <ON|OFF>                                      |             
      |       |                                                  |             
                   

 This control word does not cause a  break.   The initial value of this        
 control word is "OFF".  An omitted operand is equivalent to "ON".  The        
 .WD control word will cause a column  eject to occur if the first line        
 of a  multi-line paragraph is  to print on the  last line of  the text        
 area.   It will also cause a  column eject before the second-last line        
 of a  paragraph if the  last line of  a paragraph would  have appeared        
 alone (widowed) at the top of a column.                                       

 NOTES                                                                         
 (1) This control  word is still in  "under study" for a  rewrite.   It        
     sometimes causes a column eject one line prematurely.                     
 (2) If a three-line  paragraph would be printed with its  last line on        
     the next  column,  all  three lines  will be  ejected to  the next        
     column.                                                                   


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                - 170 -                                        
                                                                               
 Appendix A                                              Error Messages        


 Ŀ        
 |                                                                    |        
 |                           ERROR MESSAGES                           |        
 |                                                                    |        
         


                                                                               

 Levels of Errors                                                              

 All messages, whether error or informative,  are written to the user's        
 terminal (via  the DDname  SYSTERM).   An  error-number suffix  of "W"        
 indicates a WARNING only, with a return code of "4".   A suffix of "E"        
 indicates an ERROR, with a return code of "8".   A suffix of "S" indi-        
 cates a SEVERE ERROR and a "T" indicates a TERMINAL ERROR, with return        
 codes "12" and "16" respectively.                                             

 Message Formats                                                               

 ERROR OCCURRED AT LINE nnnnnnnn OF FILE xxxxxxxx:                             
 CALLED FROM LINE nnnnnnnn OF FILE xxxxxxxx:                                   
    Produced by incorrect control lines, followed by zero or more "file        
    traceback"  messages,   followed by  the  line  in error  and,   if        
    possible, an asterisk "*" under the start of the incorrect operand.        

 Messages                                                                      

 SCRW001E  UNRECOGNIZABLE CODES IN PARM FIELD.                                 
    An invalid option has been specified in the options list.                  

 SCRW002E  OUTPUT FILENAME MATCHES INPUT FILENAME.                             
    The name of the formatted output file  on disk is equal to the name        
    of the primary input file.                                                 

 SCRW003E  OMITTED CONTROL WORD PARAMETER.                                     
    No  operand  was provided  for  a  control  word that  requires  an        
    operand.                                                                   

 SCRW004I  UNPROCESSED CONTROL WORD PARAMETER.                                 
    More operands were specified for a  control word than are required.        
    The extra operands are ignored and processing continues.                   

 SCRW005E  UNDEFINED CONTROL WORD PARAMETER.                                   
    An operand of  a control word is invalid.   This  could possibly be        
    caused by a  character being used where only a  numeric argument is        
    acceptable.                                                                

 SCRW006T  OMITTED CONTROL WORD TERMINATION - .xx.                             
    A control word "begin/end" sequence was started but never ended for        
    control word  ".xx".   For  example,  a  footnote was  started with        
    ".FN BEGIN" but no ".FN END" was encountered.                              


                                                                               
                                - 171 -                                        
                                                                               
 Error Messages                                              Appendix A        


 SCRW007E  INVALID SET SYMBOL NAME.                                            
    The name  of a Set  Symbol may be up  to ten characters  in length.        
    Each character of the name must be alphabetic,  numeric,  or one of        
    "$", "#", "@", or "_".                                                     

 SCRW008E  SET SYMBOL VALUE TOO LONG.                                          
    A  Set Symbol  is  being assigned  a  character  string value  that        
    exceeds  the maximum  allowable length.    (See  also the  SRLength        
    option.)                                                                   

 SCRW009E  LOOP IN SET SYMBOL SUBSTITUTION.                                    
    During symbol substitution in an input line, each time a Set Symbol        
    was  substituted its  value contained  another  Set Symbol.    This        
    process was terminated after 100 iterations.                               

 SCRW010E  SET SYMBOL NOT ASSIGNED.                                            
    No  working storage  was available  to create  another Set  Symbol.        
    Increase  the  storage available  or  decrease  the number  of  Set        
    Symbols in the input.                                                      

 SCRW011E  SAVE/RESTORE STATUS STACK ERROR.                                    
    A Save Status  ".SA" request would have exceeded  the maximum push-        
    down stack level,  normally ten,  or a Restore Status ".RE" request        
    was issued when the push-down stack was empty.                             

 SCRW012E  ILLEGAL PLACEMENT OF CONTROL WORD.                                  
    A valid control word was encountered where that control word is not        
    allowed.   Example:   ".FN begin" within a footnote or a Page Eject        
    ".PA" within a conditional keep.                                           

 SCRW013E  CONTROL WORD PARAMETER TOO BIG.                                     
    The argument portion of a control line  is too large to be valid as        
    an argument.  A smaller numeric argument must be specified.                

 SCRW014E  CONTROL WORD PARAMETER TOO SMALL.                                   
    The argument portion of a control line  is too small to be valid as        
    an argument.  A larger numeric argument must be specified.                 

 SCRW015E  MISMATCHED DELIMITER ON STRING.                                     
    A character string starting with a delimiter, normally a quote, was        
    not terminated with the same delimiter.                                    

 SCRW016E  HANGING INDENT INVALID.                                             
    The value  of Hanging  Indent is currently  invalid.   This  may be        
    because the Line  Length has decreased or the  Indent has increased        
    since the Hanging Indent was defined.                                      

 SCRW017E  MACRO/REMOTE NAME UNDEFINED.                                        
    A reference has been made to a macro or remote that does not exist.        
    Either the  name or number  is incorrect or  the call count  of the        
    remote is exhausted and the remote has been automatically deleted.         


                                                                               

                                - 172 -                                        
                                                                               
 Appendix A                                              Error Messages        


 SCRW018E  INSUFFICIENT STORAGE FOR MACRO/REMOTE.                              
    No storage is available to store away the definition of the current        
    macro or remote.   This may be solved by deleting unused macros and        
    remotes or increasing the amount of working storage available.             

 SCRW019E  TOO MANY RECORDS IN ONE MACRO/REMOTE.                               
    More than the maximum records, as defined by the RMSIZE= parameter,        
    are now in one macro or remote definition.   Probable cause of this        
    diagnostic is a failure to close a macro with a ".dm name end" or a        
    remote with a ".rm".                                                       

 SCRW020I  AUTOMATIC TRIGGERING OF NUMBERED  REMOTES NOT SUPPORTED WITH        
    VARIABLE VERTICAL LEADING.                                                 
    Numbered Remotes are not supported  for output devices that support        
    variable vertical leading.                                                 

 SCRW021I  ARCHAIC USE OF CONTROL WORD.                                        
    Use of  a control word  or control word  operand in the  input file        
    will  not be  supported in  future  versions of  SCRIPT.   See  the        
    appendix on Archaic control words.                                         

 SCRW022E  .IF NESTING TOO DEEP.                                               
    A .IF control  word was the object of  a Then or Else  to a nesting        
    level greater than ten.  Restructure the logic of the sequence.            

 SCRW023E  .TH OR .EL NOT AFTER .IF.                                           
    A Then (.TH)  or Else (.EL)  control word did not follow a .IF.   A        
    Then is only valid immediately following an  If and an Else is only        
    valid after a Then or an If.                                               

 SCRW024T  WORKING STORAGE EXHAUSTED.                                          
    No storage is  available for a new item.    Either increase program        
    region or make  less use of such features as  Floating Keep,  Foot-        
    notes, Set Symbols or nested input files.                                  

 SCRW025E  DUPLICATE LABEL.                                                    
    An identical  label exists at a  different input record  within the        
    current input file.   User labels must  be unique within each input        
    file.                                                                      

 SCRW026E  FORWARD .GO TARGET NOT FOUND.                                       
    The target of  a Goto statement was  not known at the  time the .GO        
    control word was interpreted.   The rest  of the current input file        
    was processed without finding the target.                                  

 SCRW027E  BACKWARD .GO TARGET NOT FOUND.                                      
    The target of  a Goto statement was  already known at the  time the        
    .GO control word was interpreted.  However, possibly because of Set        
    Symbol substitution, the Label could not be found within the record        
    which formerly contained the Label.                                        

 SCRW028E  INCORRECT PLACEMENT OF .DO.                                         
    A Do (.DO begin)   control word did not follow a  Then (.TH)  or an        
    Else (.EL).    Alternatively,  an End  (.DO end)  control  word was        

                                - 173 -                                        
                                                                               
 Error Messages                                              Appendix A        


    encountered with no preceding Do (.DO begin).                              

 SCRW029I  MISSING EQUAL SIGN ASSUMED.                                         
    An assignment of a Set Symbol (.SR or .SE) has been made without an        
    equal sign following the Set Symbol name.  Currently, an equal sign        
    is assumed following the name.                                             

 SCRW030E  DELETE WORD/STRING NOT FOUND.                                       
    An attempt was made to delete a  word or string from a control word        
    table  that could  not be  found.   For  the Hyphenation  Exception        
    Dictionary the  word,  including  matching break  points,  was  not        
    found.                                                                     

 SCRW031E  INVALID WORD TO HYPHENATE.                                          
    An  Exception word  contained  characters  other than  alphabetics.        
    This may  also be  caused by  a hyphen at  the start  or end  of an        
    Exception word.                                                            

 SCRW032E  TOO MANY HYPHEN BREAK POINTS.                                       
    An  Exception  word contained  more  than  eight hyphens  or  break        
    points.  This word is considered invalid.                                  

 SCRW033E  HYPHEN WORD TOO LONG.                                               
    An Exception word contained more than thirty-five characters or had        
    one syllable containing more than  fourteen characters.   This word        
    is considered invalid.                                                     

 SCRW034E  TOO MANY QUEUED LINES FOR - .xx.                                    
    More than the  maximum number of lines,  as defined  by the FNSIZE=        
    option, are now queued for a ".xx" control word.  Probable cause of        
    this diagnostic is a failure to  terminate with a ".xx end" control        
    word.  ".xx" may be ".CC", ".CP", ".FB", ".FK", ".FN" or ".HN".            

 SCRW035E  CONTROL WORD PARAMETER SHOULD BE NUMERIC.                           
    The operand of a  control word could not be evaluated  as a numeric        
    or as  a numeric  expression.   Correct  the operand  with a  valid        
    numeric.                                                                   

 SCRW036E  INVALID PAGE PROMPT PARAMETERS.                                     
    A FROM reply  to "Load paper..." or  to a new page  prompt when the        
    STOP option was specified had invalid operands.   The FROM reply is        
    ignored.                                                                   

 SCRW037E  TEXT BLOCK TOO LONG FOR PAGE.                                       
    A Headnote  has been  defined that  is too  long to  appear in  its        
    entirety on the current page.  The text block is not printed.              

 SCRW038E  INVALID SUBSCRIPT.                                                  
    The subscript expression of a Set  Symbol could not be evaluated or        
    the subscript was outside of the range of -1000000 to +1000000.            

 SCRW039E  INVALID SUBSTRING.                                                  
    The first or second substring expression  of a Set Symbol could not        
    be evaluated or the  substring value was outside of the  range of 1        

                                - 174 -                                        
                                                                               
 Appendix A                                              Error Messages        


    to 255.                                                                    

 SCRW040E  INVALID CONDITION OPERATOR IN .IF.                                  
    The condition operator  of an .IF control word has  not been recog-        
    nized.  See the command description for a list of valid operators.         

 SCRW041E  .HM + .HS GREATER THAN .TM.                                         
    The Top  Margin value cannot  be less than  the sum of  the Heading        
    Margin plus the Heading Space.                                             

 SCRW042E  .FM + .FS GREATER THAN .BM.                                         
    The Bottom Margin value cannot be less  than the sum of the Footing        
    Margin plus the Footing Space.                                             

 SCRW043E  ILLEGAL CONTROL WORD WITHIN KEEP OR FOOTNOTE.                       
    A valid control word was placed where it is not allowed.   Example:        
    A multiple column definition within a footnote.                            

 SCRW044W  GENERATED INPUT LINE TOO LONG.                                      
    An input line that has been  modified by SCRIPT exceeds 250 charac-        
    ters in length.   Example:  A "line" operand of UNDERSCORE (.US) is        
    too long.                                                                  

 SCRW045E  .TM + .BM TOO BIG FOR .PL.                                          
    The Page Length setting is too  small for the current definition of        
    Top and Bottom Margins.                                                    

 SCRW046E  .UN OR .IL TOO BIG FOR .IN.                                         
    The current Indent setting will not allow the Undent or Indent Line        
    value specified.   Execution  will continue with the  largest valid        
    Indent.                                                                    

 SCRW047I  NATIVE CONTROL WORD ASSUMED.                                        
    A control word was encountered that was longer than two characters.        
    No  Macro was  defined  that matched  the  control word  specified.        
    Since the first two characters of  the control word were recognized        
    by SCRIPT as a valid control word, execution can continue.                 

 SCRW048E  UNDEFINED CONTROL WORD.                                             
    An  unrecognized control  word has  been encountered  in the  input        
    file.   This error is commonly caused  by an input line that starts        
    with the control word indicator (normally a period) but is intended        
    to be input text.                                                          

 SCRW049I  SPELLCHK DID NOT VERIFY i WORDS WITH j OCCURRENCES.                 
    The SPELLCHK option was specified.  A total of "i" unique question-        
    able spellings were detected at "j"  locations.   The list of words        
    follows with  suggested corrections,  the  file names in  which the        
    words were found and the sequence numbers of the records.                  

 SCRW050?  .ER - <line operand>.                                               
    A user error control word (.ER)   has been used.   The severity "?"        
    and the message "<line operand>" is taken from the user data.              


                                - 175 -                                        
                                                                               
 Error Messages                                              Appendix A        


 SCRW051E  FILE NOT FOUND.                                                     
    Cannot find  a reference to  the file specified  in an ".ap"  or an        
    ".im" control statement.                                                   

 SCRW052E  FILE NOT PARTITIONED, MEMBER NAME IGNORED.                          
    An ".ap"  or ".im" control  statement included a  member reference.        
    The filename specified is not  partitioned so the member specifica-        
    tion is ignored.                                                           

 SCRW053E  BUFFER STORAGE UNAVAILABLE, FILE SKIPPED.                           
    No memory was available to buffer the file specified in an ".ap" or        
    ".im" control statement.  The file will be skipped.   Either reduce        
    the blocksizes of input files or increase the storage size.                

 SCRW054E  RECORD FORMAT NOT SUPPORTED, FILE SKIPPED.                          
    The input  file is not RECFM=F  or RECFM=V or a  WYLBUR EDIT-format        
    file.  The rest of the file will not be processed.                         

 SCRW055E  INVALID INPUT RECORD, FILE SKIPPED.                                 
    The input  file contains a record  that cannot be  processed.   The        
    length of the  record may exceed 250 characters.   The  rest of the        
    file will not be processed.                                                

 SCRW056T  I/O ERROR.                                                          
    An I/O  error occurred while  reading an input  file.   Information        
    about the error follows the diagnostic.  Processing is terminated.         

 SCRW062T  OUTPUT FILE (SYSPRINT) CANNOT BE OPENED.                            
    The file for the formatted output cannot be opened.  All processing        
    is terminated.                                                             

 SCRW063I  SCRIPT -- SYSTERM FAILED TO OPEN.                                   
    The SCRIPT error file could not be opened successfully.  Processing        
    continues  with error  and informational  messages disabled.    The        
    final return code from SCRIPT is  the only indication of success or        
    failure.                                                                   

 SCRW064E  UNABLE TO OPEN WORK FILE.                                           
    An output file for PUT WORKFILE (.PU)  could not be opened success-        
    fully.  The command request is skipped.                                    

 SCRW065E  OUTPUT DEVICE DEFINITION - xxx.                                     
    The  external definition  of the  output device  was incomplete  or        
    invalid.   The .DC  DEVICE BEGIN/END sequence is  normally found in        
    SYSPDEV.                                                                   

 SCRW073E  NUMERIC FUNCTION OPERAND TOO SMALL - xxxxxxxx.                      
    A numeric operand of an built-in function  is too small to be mean-        
    ingful.  The function name and the incorrect operand are displayed.        
    The minimum valid numeric value is assumed.                                

 SCRW067W  .EQ - variable message text.                                        
    An error has been diagnosed within the Formula Processor.                  


                                - 176 -                                        
                                                                               
 Appendix A                                              Error Messages        


 SCRW073E  NUMERIC FUNCTION OPERAND TOO SMALL - xxxxxxxx.                      
    A numeric operand of an built-in function is too small to be               

 SCRW074E  NUMERIC FUNCTION OPERAND TOO LARGE - xxxxxxxx.                      
    A numeric operand of  a built-in function is too large  to be mean-        
    ingful.  The function name and the incorrect operand are displayed.        
    The maximum valid numeric value is assumed.                                

 SCRW075E  TOO FEW FUNCTION OPERANDS - xxxxxxxx.                               
    A built-in function  has fewer operands specified  than the minimum        
    required.   See the individual built-in function description in the        
    Appendices.                                                                

 SCRW076E  TOO MANY FUNCTION OPERANDS - xxxxxxxx.                              
    A built-in  function has more  operands specified than  the maximum        
    allowed.   for the individual built-in  function description in the        
    Appendices.                                                                

 SCRW077E  FUNCTION OPERAND MUST BE NUMERIC - xxxxxxxx.                        
    A non-numeric operand has been specified for a built-in function in        
    a position that requires a numeric operand.   The function name and        
    the incorrect operand are displayed.  The default for the incorrect        
    operand is assumed.                                                        

 SCRW078E  RIGHT PARENTHESIS MISSING IN FUNCTION - xxxxxxxx.                   
    The list of operands for a  built-in function was not terminated on        
    the right with a closing right parenthesis.  The start of the func-        
    tion in error is displayed.                                                

 SCRW079E  FUNCTION OPERAND UNDEFINED - xxxxxxxx.                              
    An unrecognized operand has been specified for a built-in function.        
    The function  name and the  incorrect operand are  displayed.   The        
    default for the incorrect operand is assumed.                              

 SCRW080E  NAME ALREADY EXISTS.                                                
    An attempt has been made to define a GML tag,  attribute,  or value        
    that already exists.                                                       

 SCRW081E  NAME NOT FOUND.                                                     
    An attempt has been made to define  an attribute for a GML tag that        
    does not exist, or to define a value for an attribute that does not        
    exist.                                                                     

 SCRW082E  ILLEGAL CHARACTER IN NAME.                                          
    The name of the GML tag,   attribute,  or value contains an invalid        
    character.                                                                 

 SCRW083E  NO NAME CURRENTLY ACTIVE.                                           
    The "*" notation has  been used to specify the name  of the tag for        
    which the attribute  is being defined,  and/or the name  of the tag        
    and attribute for which the value is being defined, but the control        
    word does not directly  follow one in which the name  of the tag or        
    attribute has been explicitly defined.                                     


                                - 177 -                                        
                                                                               
 Error Messages                                              Appendix A        


 SCRW084E  NAME TOO LONG.                                                      
    The name of the tag,  attribute,  value,  or "value to use" exceeds        
    the maximum number of characters for that item.                            

 SCRW085E  OPERAND CONFLICTS WITH EXISTING INFORMATION.                        
    An attempt has been made to define an attribute,  or a value for an        
    attribute,  in a manner that is in direct conflict with information        
    that has already been defined for that tag or attribute.                   

 SCRW086E  ILLEGAL GML SYNTAX.                                                 
    An attempt has been  made to use a GML tag,  but  the syntax of the        
    attribute list or tagtext is not correct.                                  

 SCRW087E  ATTRIBUTE NOT VALID.                                                
    The attribute name that has been specified  with the GML tag is not        
    among the list of attributes that has been defined for this tag.           

 SCRW088E  VALUE NOT VALID.                                                    
    The value that has been specified for this attribute of this tag is        
    not among the list of values that  has been defined for this attri-        
    bute.                                                                      

 SCRW089E  REQUIRED ATTRIBUTE NOT SPECIFIED - xxxxxxxxx.                       
    This tag requires that the user specify the indicated attribute.           

 SCRW090E  UNEXPECTED ERROR DURING GML PROCESSING.                             
    Some event  has occurred during  the processing  of a GML  tag that        
    should never occur.  (If you encounter this situation, please bring        
    it to  the attention  of the individual  responsible for  SCRIPT at        
    your computing installation, so that the problem can be referred to        
    the developers of SCRIPT.)                                                 

 SCRW091E  TAGTEXT IS REQUIRED.                                                
    The tag has been specified without tagtext.                                

 SCRW092E  TAGTEXT IS NOT ALLOWED.                                             
    The tag has been specified with tagtext.                                   

 SCRW093E  PREVIOUS TAG MUST BE FOLLOWED BY ANOTHER TAG.                       
    A line of text has been detected at a place in the document where a        
    GML tag is expected.                                                       

 SCRW100E  NO FONT IS DEFINED.                                                 
    An output  device option with  multiple font capabilities  has been        
    specified.    No font  definitions have  been made.    See the  .PH        
    control word.                                                              

 SCRW101E  CHARACTER UNDEFINED IN FONT - (X'??' IN xxxxxxxx).                  
    A character (X'??') has been found in an input record that does not        
    occur  in the  normal,  italic,   bold  or bold  italic font  being        
    requested (xxxxxxxx).                                                      


                                                                               

                                - 178 -                                        
                                                                               
 Appendix A                                              Error Messages        


 SCRW102E  UNDEFINED FONT NAME.                                                
    The font name specified as a control word argument is not known.           

 SCRW103E  INVALID FONT NAME.                                                  
    The font name  specified is numeric.   A  valid font name is  up to        
    twelve characters long and is treated as if entered in uppercase.          

 SCRW104E  UNDEFINED FONT IDENTIFIER.                                          
    A font  identifier has  been specified that  has not  been declared        
    with the Define Font (.DF) control word.                                   

 SCRW105E  INVALID FONT IDENTIFIER.                                            
    A font identifier  has been specified as a numeric.    A valid font        
    identifier  may  consist of  up  to  thirty-two characters  and  is        
    treated as if entered in uppercase.                                        

 SCRW106E  UNDEFINED POINTSIZE FOR FONT.                                       
    The font  pointsize specified  is too  large or  too small  for the        
    specified font name.                                                       

 SCRW108E  UNDEFINED CODEPAGE NAME.                                            
    A Codepage Identifier has been specified that has not been declared        
    with the ".PH CODEPAGE" control word.                                      

 SCRW109E  INVALID CODEPAGE NAME.                                              
    A Codepage  Identifier has been specified  as a numeric.    A valid        
    Codepage may consist of up to  thirty-two characters and is treated        
    as if entered in uppercase.                                                

 SCRW110E  UNABLE TO LOAD FONT DEFINITION INTERFACE.                           
    The external routine  containing the physical font  definitions for        
    the output device cannot be loaded.                                        

 SCRW111E  BEGIN FONT STACK IS FULL.                                           
    The use of fonts  may be nested up to twenty  levels with the Begin        
    Font (.BF) control word.  More than twenty Begin Font control words        
    are in effect.                                                             

 SCRW112E  PREVIOUS FONT STACK IS EMPTY.                                       
    The use of fonts  may be nested up to twenty  levels with the Begin        
    Font (.BF)   control word.   More  fonts have been  terminated with        
    Previous Font (.PF) than were begun.                                       

 SCRW119W  TEXT OVERLAP IGNORED.                                               
    Two pieces of  formatted text are overlapping.    The output device        
    cannot support  the overstriking  of two text  strings in  the same        
    position on the page.   The second  string is placed immediately to        
    the right of the first.                                                    

 SCRW120W  IMPROPER USE OF BACKSPACE.                                          
    The current input  text line has backspace  characters that attempt        
    to backspace before the start of  the record,  or backspace over an        
    escape sequence.  These backspaces will be ignored.                        


                                - 179 -                                        
                                                                               
 Error Messages                                              Appendix A        


 SCRW121W  IMPROPER PLACEMENT OF ESCAPE SEQUENCE.                              
    The  current  input text  line  contains  an escape  sequence  that        
    follows more  than a  single backspace  over preceding  text.   The        
    escape sequence  will be placed  following the last  processed text        
    character.                                                                 

 SCRW122W  NULL XTEXT ESCAPE GENERATED.                                        
    The current input text line contains  an Xtext escape sequence that        
    occurs at  the end of  a record or does  not have a  matching Xtext        
    delimiter.  The escape and Xtext characters will be ignored.               

 SCRW123W  UNDEFINED ESCAPE FUNCTION.                                          
    The current input  text line contains an  escape character followed        
    by an unknown escape function.  The escape character is ignored and        
    the following characters are treated as text.                              

 SCRW124W  TEXT LINE EXCEEDS PAGE WIDTH.                                       
    The total number of characters on the output text line would exceed        
    the maximum  print width of the  output device.   The text  line is        
    suppressed.                                                                

 SCRW998T  A LOGIC ERROR HAS BEEN DETECTED.                                    
    This message indicates an error in the SCRIPT command module.   The        
    appearance  of this  message  should  be reported  to  Installation        
    personnel and a copy of the input  file(s)  should be saved for use        
    in diagnosing the  difficulty.   Usually,  the user  can bypass the        
    problem by  changing the input file.    This error cannot  occur if        
    DEBUG or NOSPIE has been specified as an option.   A Program Inter-        
    rupt will result instead.                                                  

    Code Number      Meaning                                                   
      1001     ---   Negative spacing error.                                   
      1002     ---   Non-integral number of blanks.                            
      1003     ---   Footnote print error.                                     
      1005     ---   Freecell error.                                           
      1006     ---   Remote imbed call error.                                  
      1007     ---   Bad Floating/Conditional Keep.                            
      1008     ---   Output buffer overflow.                                   
      1009     ---   Tab Fill Verification error.                              
      1015     ---   Multi-column print mismatch.                              
      1016     ---   Multi-column line save error.                             
      1017     ---   Multi-column line count mismatch.                         
      1018     ---   Substitution error.                                       
      1020     ---   Page Parm error.                                          

 SCRW999T  A PROGRAM CHECK HAS OCCURRED.                                       
    This message  indicates an  execution error  in the  SCRIPT command        
    module.    The appearance  of this  message should  be reported  to        
    Installation personnel and  a copy of the input  file(s)  should be        
    saved for their  use in diagnosing the  difficulty.   Usually,  the        
    user can bypass the problem by changing the input file.  This error        
    cannot occur  if DEBUG or NOSPIE  has been specified as  an option;        
    instead, a system abend will result.                                       


                                - 180 -                                        
                                                                               
 Appendix B                                       Archaic Control Words        


 Ŀ        
 |                                                                    |        
 |                       ARCHAIC CONTROL WORDS                        |        
 |                                                                    |        
         


                                                                               
 There exists  a growing  set of  "old" SCRIPT  control words  that are        
 supported  but  are  undocumented because  they  are  special-purpose,        
 redundant, or no longer useful.  Most such control words exist in this        
 version of SCRIPT for compatibility with other versions of SCRIPT, but        
 some are  intended for  use only  by programmers  debugging a  program        
 function.                                                                     
    These control words  have been omitted from the body  of this docu-        
 ment in order to make the beginner less overwhelmed by the quantity of        
 material to  be learned.   The objective  is a smaller set  of control        
 words with common operands that are easier to remember and thus easier        
 to use effectively.                                                           
    An example of a redundant and obsolete control word is ".OP", which        
 ejects  to the  top of  the  next odd-numbered  page.   The  ".PA ODD"        
 control word provides this function in a more "obvious" manner.               
    The undocumented control words are listed  here with a brief expla-        
 nation of their function.   No commitment can be made to support these        
 control words forever.   It is  suggested that the "preferred" control        
 words be used instead.                                                        
    This  document may  be formatted  to include  ALL existing  control        
 words by invoking SCRIPT with '+TYPE=ALL'  in the options list.   This        
 copy of the document was formatted with TYPE='NOTall'.                        

 .AR <LOWER|UPPER>                                                             
     ARABIC causes  pages to be  numbered using Arabic  numerals.   Use        
     ".PN ARABIC" instead.                                                     

 .BS char <HJOIN|NOHJOIN>                                                      
     The "hex  join" function  of the  user backspace  character is  no        
     longer default.  Use the "Hexadecimal Function" instead.                  

 .EB <1|n> /left/centre/right/                                                 
     EVEN BOTTOM defines a running title to be printed at the bottom of        
     even-numbered pages.  Use ".RT BOTTOM EVEN" instead.                      

 .EP                                                                           
     EVEN PAGE positions  output to the next  even-numbered page.   Use        
     ".PA EVEN" instead.                                                       

 .ET <1|n> /left/centre/right/                                                 
     EVEN TOP defines a running title to be printed at the top of even-        
     numbered pages.  Use ".RT TOP EVEN" instead.                              

 .FE <1|n> <S1|'S1'S2'S3'>                                                     
     FOOTING defines  a running title  to be  printed at the  bottom of        
     even- and odd-numbered pages.  Use ".RT BOTTOM" instead.                  


                                - 181 -                                        
                                                                               
 Archaic Control Words                                       Appendix B        


 .FI <ON|OFF|LEFT|RIGHT|CENTRE|INSIDE|OUTSIDE|HALF>                            
     FILL combines the  effect of Concatenate and  Justify.   Use ".FO"        
     instead.                                                                  

 .HE <1|n> <S1|'S1'S2'S3'>                                                     
     HEADING defines a running title to be  printed at the top of even-        
     and odd-numbered pages.  Use ".RT TOP" instead.                           

 .NC <ON|OFF>                                                                  
     NO CONCATENATE stops words from shifting to or from the next line.        
     Use ".CO NO" instead.                                                     

 .NF <ON|OFF>                                                                  
     NO FORMAT causes lines to be output as they appear in the input by        
     negating the  effect of  Concatenate and  Justify.   Use  ".FO NO"        
     instead.                                                                  

 .NJ <ON|OFF>                                                                  
     NO JUSTIFY stops justification of text  to the right margin.   Use        
     ".JU NO" instead.                                                         

 .OB <1|n> /left/centre/right/                                                 
     ODD BOTTOM defines a running title to  be printed at the bottom of        
     odd-numbered pages.  Use ".RT BOTTOM ODD" instead.                        

 .OP                                                                           
     ODD  PAGE EJECT  positions  output to  the top  of  the next  odd-        
     numbered page.  Use ".PA ODD" instead.                                    

 .OT <1|n> /left/centre/right/                                                 
     ODD TOP defines a  running title to be printed at  the top of odd-        
     numbered pages.  Use ".RT TOP ODD" instead.                               

 .PR information                                                               
     PRINT displays  one line  of information  at the  user's terminal.        
     Use ".TY" instead.                                                        

 .RA <1|n|ON|OFF|line>                                                         
     RIGHT ADJUST  causes the next input  line to be  right-adjusted in        
     the output line.  Use ".RI" instead                                       

 .RC n SET string                                                              
     REVISION CODE SET  defines a Revision Code string  to mark revised        
     input text.   Use ".RC n 'string'" instead, with a delimiter char-        
     acter surrounding the Revision Code string.                               

 .RO <LOWER|UPPER>                                                             
     ROMAN numbers pages in Roman numerals.  Use ".PN ROMAN" instead.          

 .SI <name|n|*> <args>                                                         
     SIGNAL invokes  the specified Macro  or Remote.   Use  ".EM .macro        
     <args>" instead.                                                          


                                                                               
                                - 182 -                                        
                                                                               
 Appendix B                                       Archaic Control Words        


 .UL <1|n|ON|OFF|line>                                                         
     UNDERLINE causes alphanumeric characters  in subsequent text lines        
     to be overstruck  with a BACKSPACE and an  underscore.   Use ".US"        
     instead.                                                                  

 .ZC <char|ON|OFF|n> <c1 ...>                                                  
     char/<ON|OFF|n> <c1 ...>                                                  
     OVERLAY  CHARACTER causes  characters in  input text  lines to  be        
     overlaid with  a backspace and  user-defined character  or itself.        
     Use ".US <ON|line>" or ".TR _ char;.US <ON|line>" instead.                


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                - 183 -                                        
                                                                               
 Sample Input to SCRIPT                                      Appendix C        


 Ŀ        
 |                                                                    |        
 |                       SAMPLE INPUT TO SCRIPT                       |        
 |                                                                    |        
         


 "Oh nuts!  I have to type this whole page again".                             
 That complaint is probably heard many times over                              
 in the course of typing reports, papers, and                                  
 other documents from hand-written manuscripts.                                
 Then there is the problem of making multiple                                  
 .us original;copies -- on a typewriter!                                       
 .pp                                                                           
 When you use an ordinary typewriter,                                          
 document composition, as the process is called,                               
 can be a time-consuming and error-prone task.                                 
 SCRIPT, which operates under CMS(*),                                          
 .fn begin                                                                     
 * Also under other operating systems.                                         
 .fn end                                                                       
 handles the process for you.                                                  
 You use a program called an "editor" to create a                              
 computer file containing the first version of your                            
 text, together with the SCRIPT "control words"                                
 to define the layout style required,                                          
 and make any necessary corrections later.                                     
 When you invoke SCRIPT to process that file,                                  
 the computer prints out as many "original" copies as you                      
 wish, with margins, spacing, indentation, etc., performed                     
 in accordance with your control words.                                        
 .pp                                                                           
 One of the most useful features of SCRIPT is right-margin                     
 justification, as in book and newspaper printing.                             
 This means that your text is spaced as evenly as possible                     
 between the margins of your printed page, filling in with                     
 blanks where necessary.  The output line is                                   
 under control of a "line length" (.LL) control word;                          
 SCRIPT puts as many words on each output line as                              
 will fit.  This is the ordinary (or default)                                  
 "formatting" mode.  You can, however, have lines printed                      
 exactly as you type them in, with no justification                            
 performed by SCRIPT, by using a control word that                             
 "turns off" the formatting mode.                                              
 This is useful for typing figures and charts.                                 
 You can also use a control word that instructs SCRIPT                         
 to attempt to hyphenate a word if it is too long to                           
 fit on a formatted output line.                                               


                                                                               


                                                                               

                                - 184 -                                        
                                                                               
 Appendix D                                   Sample Output from SCRIPT        


 Ŀ        
 |                                                                    |        
 |                     SAMPLE OUTPUT FROM SCRIPT                      |        
 |                                                                    |        
         


 "Oh nuts!   I have to type this whole page again".   That complaint is        
 probably  heard many  times  over in  the  course  of typing  reports,        
 papers, and other documents from hand-written manuscripts.  Then there        
 is the problem of making multiple original copies -- on a typewriter!         

    When you use an ordinary typewriter,  document composition,  as the        
 process  is called,   can be  a time-consuming  and error-prone  task.        
 SCRIPT, which operates under CMS(*), handles the process for you.  You        
 use a program called an "editor"  to create a computer file containing        
 the first  version of  your text,  together  with the  SCRIPT "control        
 words" to  define the layout style  required,  and make  any necessary        
 corrections later.   When you invoke SCRIPT to process that file,  the        
 computer  prints out  as many  "original"  copies as  you wish,   with        
 margins, spacing, indentation, etc., performed in accordance with your        
 control words.                                                                

    One of the most useful features  of SCRIPT is right-margin justifi-        
 cation, as in book and newspaper printing.   This means that your text        
 is spaced  as evenly as possible  between the margins of  your printed        
 page,  filling  in with blanks where  necessary.   The output  line is        
 under control of a "line length"  (.LL)  control word;  SCRIPT puts as        
 many words on each output line as will fit.   This is the ordinary (or        
 default)  "formatting" mode.   You can,   however,  have lines printed        
 exactly  as you  type them  in,   with no  justification performed  by        
 SCRIPT,  by using a control word that "turns off" the formatting mode.        
 This is  useful for typing  figures and charts.    You can also  use a        
 control word that  instructs SCRIPT to attempt to hyphenate  a word if        
 it is too long to fit on a formatted output line.                             


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

 _______________________                                                       

 * Also under other operating systems.                                         

                                - 185 -                                        
                                                                               
 The Output Page                                             Appendix E        


 Ŀ        
 |                                                                    |        
 |                          THE OUTPUT PAGE                           |        
 |                                                                    |        
         


                                                                               
 The outer rectangle of "*"s in the diagram below indicate the physical        
 dimensions of a  sheet of paper.   The inner rectangle  of "*"s repre-        
 sents the text area (that part of  the physical page into which SCRIPT        
 formats the input text).                                                      

      ************************************************************             
      *--.PM--->|------------------.LL------------------>        *             
      *    |    |                                                *             
      *    |    |---------------------------------------+        *             
      *    |    |     |                                 |        *             
      *    |    |    .HS    (for Top Titles, if any)    |        *             
      *    |   .TM    |                                 |        *             
      *    |    |---------------------------------------+        *             
      *    |    |     |                                          *             
      *    |    |    .HM                                         *             
      *    |    |     |                                          *             
      *    |    *****************************************        *             
      *    |    *                                       *        *             
      *    |    *                                       *        *             
      *    |    *            The Text Area              *        *             
      *    |    *                                       *        *             
      *    |    *                                       *        *             
      *   .PL   *--.IN--->                     <---.IR--*        *             
      *    |    *         --.OF-->                      *        *             
      *    |    *                                       *        *             
      *    |    *                                       *        *             
      *    |    *                                       *        *             
      *    |    *                                       *        *             
      *    |    *****************************************        *             
      *    |    |     |                                          *             
      *    |    |    .FM                                         *             
      *    |    |     |                                          *             
      *    |    |---------------------------------------+        *             
      *    |   .BM    |                                 |        *             
      *    |    |    .FS (for Bottom Titles, if any)    |        *             
      *    |    |     |                                 |        *             
      *    |    |---------------------------------------+        *             
      *    |    |                                                *             
      ************************************************************             


                                                                               


                                                                               


                                - 186 -                                        
                                                                               
 Appendix E                                             The Output Page        


 The default values for the control words shown above are as follows:          

     .BM 6   (Bottom Margin)            .IR 0   (Indent Right)                 
     .FM 1   (Footing Margin)           .LL 60  (Line Length)                  
     .FS 1   (Footing Space)            .OF 0   (Offset)                       
     .HM 1   (Heading Margin)           .PL 66  (Page Length)                  
     .HS 1   (Heading Space)            .PM 0   (Page Margin)                  
     .IN 0   (Indent)                   .TM 6   (Top Margin)                   


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                - 187 -                                        
                                                                               
 Notes on the Organization of this Manual                    Appendix F        


 Ŀ        
 |                                                                    |        
 |              NOTES ON THE ORGANIZATION OF THIS MANUAL              |        
 |                                                                    |        
         


                                                                               

 SCRIPT Input Files                                                            

 Modularity is a great asset to  the maintainability of any large docu-        
 ment, and the SCRIPT Reference Manual is certainly no exception.   The        
 following provides  an overview of the  input files that  comprise the        
 SCRIPT source for this manual:                                                

 SCRIPTRF:  The "driver" file; it directly or indirectly imbeds all the        
    other files, including:                                                    
 rfENVIRO:   defines the  page-layout environment  for  the manual  and        
    assigns  defaults for  all  of the  Set  Symbols  that control  its        
    formatting,  including the values that  may be supplied when SCRIPT        
    is invoked to format the manual (COLUMNS, TYPE, and UPDATE).               
 rfMACROS:   contains all  of the  macros that  are used  by the  other        
    files.                                                                     
 rfPDEV:  defines the fonts to be used, depending on the output device.        
 rfHEADER, rfPREF, rfPURPOS,  rfOPTION,  ...:  The source for the title        
    page, the Preface, the Purpose,  the Options,  and all of the other        
    major sections of the manual.                                              
 rfCWLIST:  Imbeds all of the  control-word description files,  such as        
    AD, AP, BC, BX, etc.                                                       

 Headings and Table of Contents                                                

 Major headings  (the ones  in the  large boxes)   are automated  via a        
 ".HEAD1" macro that  performs the appropriate "top of  column or page"        
 positioning, re-defines the running titles via .RT control words,  and        
 places  the title  of  the  heading into  one  of  SCRIPT's "table  of        
 contents" workareas via  ".PT" control words.   Headings  like the one        
 that started the section you are currently reading are automated via a        
 ".HEAD2" macro.   The Table of  Contents is thus created automatically        
 from all  of the titles  used as the operands  of the HEAD1  and HEAD2        
 macros, and is printed via the ".TC" control word.                            
    If SCRIPT is  invoked in multi-pass mode (the  PASses option),  the        
 Table of Contents will print following the "Purpose".   In single-pass        
 mode, however, the Table of Contents will be printed at the end of the        
 output and should be manually removed and re-located to its logically-        
 correct  position  after "Purpose".    This  copy  of the  manual  was        
 SCRIPTed with 2 as the value of the PASses option.                            


                                                                               


                                                                               

                                - 188 -                                        
                                                                               
 Appendix F                    Notes on the Organization of this Manual        


 Footnotes and Footnote Numbering                                              

 To automate the numbering of footnotes and to take advantage of super-        
 script characters on output devices  that support them,  the following        
 SCRIPT code is used:                                                          

    .sr nfn = 0                                                                
    .su off                                                                    
    .su .if &SYSPDEV eq TERM                                                   
    .'  .'th .'sr fnconv = ".sr *sym="<&nfn.>";.sr *of=2"                      
    .'  .'el .'sr fnconv = ".sr *sym="&S'&nfn.";.sr *of=0"                     
    .su on                                                                     
    .fn set 2                                                                  
    .fn set 1 /&'copies('_',&SYSCL/3)///                                       
    .fn set 2 ////                                                             
    .dm FOOTNOTE begin                                                         
    .sr nfn = &nfn + 1;&fnconv;.ct &*sym                                       
    .fn begin                                                                  
    .if &SYSFNC gt 0 .sk;.in;.of 1+&*of+&L'&nfn                                
    &*sym                                                                      
    .dm FOOTNOTE end                                                           
    .dm FOOTEND /.fn end/                                                      

 This code accomplishes the following things:                                  
 (1) The Symbol "nfn" (next footnote number) is initialized to zero.           
 (2) The Symbol "fnconv"  (footnote conversion)  defines the  method by        
     which the "nfn" value is to be  converted to its display format in        
     Local Symbol  "*sym".   For output  devices for  which superscript        
     characters do not exist (or for  which they are not desired),  the        
     footnote number will appear inside "angle brackets"; otherwise, it        
     will appear in  superscript form.   The value of  the local Symbol        
     *of is set to 2 (to account for the brackets) or 0 respectively.          
 (3) The footnote separator  area is defined to be 2  lines (instead of        
     SCRIPT's default  of 3).    The first of  these is  set to  be the        
     string of left-aligned "underscores", one-third the column length,        
     and the second is set to "null" (to override SCRIPT's default).           
 (4) The FOOTNOTE and FOOTEND macros are  used throughout the manual to        
     indicate  the start  and end  of  footnote text.    Each time  the        
     FOOTNOTE macro is invoked it adds 1 to the value of "nfn", and the        
     substitution of  "fnconv" results in  the control words  needed to        
     convert the  value of  "nfn" into  the proper  form in  "*sym" and        
     assign the proper offset to "*of".   The converted footnote number        
     is then concatenated to the end of  the last word of text prior to        
     the invocation of the FOOTNOTE macro, the footnote block is begun,        
     a .SK is generated if there are already outstanding footnote lines        
     (&SYSFNC),  an offset  is calculated to include the  length of the        
     converted footnote symbol plus a blank, and the converted footnote        
     symbol is placed into the first output line of the footnote block.        
     Text from  subsequent input lines  is formatted into  the footnote        
     block, and the footnote block is terminated when the FOOTEND macro        
     is encountered.                                                           


                                                                               

                                - 189 -                                        
                                                                               
 Notes on the Organization of this Manual                    Appendix F        


 Automatic Dating with the Current Version of SCRIPT                           

 The date that appears on the title page is generated from the value of        
 System Set Symbol &SYSVERSION in input  file rfHEADER,  to ensure that        
 the date  always reflects the  version of  SCRIPT to which  the manual        
 corresponds.                                                                  

 Formatting for Single- or Double-Sided Printing                               

 The formatting of the manual for publication on one side or both sides        
 of the page is dependent on whether  DUPLEX was specified as an option        
 when SCRIPT was invoked.   If DUPLEX  was specified the manual will be        
 formatted for printing on both sides of each page.  Otherwise, it will        
 be formatted for one-side-only publication.    This copy of the manual        
 was formatted with the DUPLEX option.                                         

 Single- or Multiple-Column Format                                             

 The formatting of the manual in single or multiple columns of text per        
 page can be controlled by specifying the desired number of columns per        
 page as the value of +COLUMNS as  an option when invoking SCRIPT.   If        
 not specified  or specified  as 1,   the manual  will be  formatted in        
 single-column mode.  If the value 2 is specified, it will be formatted        
 in two-column mode.  Higher values are NOT recommended.   This copy of        
 the manual was formatted by specifying '1' for +COLUMNS.                      

 Generating Update Pages for the Manual                                        

 If the manual is  formatted by specifying a date in  the form "yymmdd"        
 as the value of +UPDATE as an option when invoking SCRIPT,  only those        
 components of the manual that have been  changed on or after that date        
 will be printed.   The output pages will not be numbered ...  it is up        
 to the user to insert them at the appropriate locations in an existing        
 Reference Manual.                                                             
    NOTE:   Update pages are  always produced in single-column-per-page        
 mode.   This  copy of  the manual was  formatted without  specifying a        
 +UPDATE value.                                                                


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               
                                - 190 -                                        
                                                                               
 Appendix G                               System Set Symbols and Macros        


 Ŀ        
 |                                                                    |        
 |                   SYSTEM SET SYMBOLS AND MACROS                    |        
 |                                                                    |        
         


                                                                               
 A set  of SCRIPT  System Set Symbols  exist to  provide access  to the        
 current formatting environment.   The value  of these symbol names may        
 not be changed with a Set Symbol operation (.SE or .SR).                      
    There  are  System  Set  Symbols that  are  initialized  to  values        
 describing the SCRIPT  environment and information about  the date and        
 time.   The following first table shows  the symbols (they all must be        
 in uppercase if the NOUPPER option was specified)  and describes their        
 initial values.   All System Set Symbols  begin with "SYS" or "$",  so        
 that "&SYSDATE" and "&$DATE" return the same value.  The current value        
 of each Symbol is shown in parentheses after its description.                 

 Date and Time                                                                 

 SYSYEAR:  The rightmost two digits of the current year.  (88)                 
 SYSPYEAR:  The current year.  (1988)                                          
 SYSMONTH:  The two-digit number of the current month.  (10)                   
 SYSPMONTH:  The name of the current month.  (October)                         
 SYSDAYOFY:  The three-digit number of the day in the year.  (292)             
 SYSDAYOFM:  The two-digit number of the day in the month.  (18)               
 SYSDAYOFW:  The number  of the day in the week;   Sunday is considered        
    the first day.  (3)                                                        
 SYSPDAYOFW:  The name of the day of the week.  (Tuesday)                      
 SYSDATE:  The current month, day, and year.  (October 18, 1988)               
 SYSHOUR:  The two-digit hour of the day on the twenty-four hour clock.        
    (15)                                                                       
 SYSMINUTE:  The two-digit minute of the hour.  (56)                           
 SYSSECOND:  The two-digit second of the minute.  (41)                         
 SYSTIME:  The current time, 24-hour clock.  (15:56:41)                        

 Current Computing Environment                                                 

 SYSVERSION:  The  Version of Script  being used.   (Waterloo  SCRIPT -        
    Version 88.1 (87DEC11))                                                    
 SYSSYS:   The name  of the  host operating  system.   Possible  values        
    include: CMS, TSO, MVS, SVS, VS1.  (TSO)                                   
 SYSUSERID:  Current userid (CMS only).  ()                                    
 SYSNODEID:  Current system node name (CMS only).  ()                          

 Input File Processing                                                         

 SYSFILE:  The name of the current input file.  (SCRIPLIB)                     
 SYSFLNEST:  The current file nesting level  of input files as a result        
    of file imbeds and invocations of  Macros.   The lowest value is 1,        
    the SYSIN level.  (3)                                                      


                                                                               
                                - 191 -                                        
                                                                               
 System Set Symbols and Macros                               Appendix G        


 SYSFNAM:  The  name of the  current real  input file,  never  a macro.        
    (APSETSM)                                                                  
 SYSFNUM:  The  line number of  the current  real input file,   never a        
    macro.  (94)                                                               
 SYSLNUM:  The  current line number within  the current file  or macro.        
    (97)                                                                       
 SYSMEMBER:  The  current input member  within SYSFILE.   This  will be        
    null if there is no member.  (APSETSM)                                     
 SYSRECNO:  The current record number within the current file or macro.        
    (104)                                                                      
 SYSRMNEST:  The current file nesting level  of Macros and Remotes as a        
    result of automatic and invoked Macros and Remotes.  (1)                   
 SYSSEQNO:  The eight-digit sequence number,   actual or generated,  on        
    the current input record.  (00000112)                                      

 The Output Page                                                               

 SYSCDCOUNT:  The current column number on the page.  (1)                      
 SYSDPAGE:  The current decimal portion for the page number of the page        
    now being  formatted;  will  be null  if the  page numbers  are all        
    integer.  ()                                                               
 SYSLC:   The  Number  of  lines   remaining  in  the  current  column.        
    Unprinted footnotes and keeps are ignored.   Value is '0' at top of        
    page.  (31)                                                                
 SYSLINE:   The  current output  line  number  on  the page  now  being        
    formatted.  (32)                                                           
 SYSLST:  Output Line Started switch.  (1)                                     
 SYSAPAGE:  The current absolute page number, an integer, starting from        
    1.  (206)                                                                  
 SYSPAGE:  The current page number, as an integer.  (192)                      
 SYSPPAGE:  The  current page number  as it  would appear in  a Running        
    Title line if .PN is not OFF.  (192)                                       
 SYSPN:  The current page number, as an integer.  (192)                        

 The Output Device                                                             

 SYSPDEV:  The current physical output device.    The value of this set        
    symbol is  assigned by the output  device specified in the  list of        
    options.   Possible values include:   "PRINT",  "TERM",  "POSTS" or        
    "X2700".  (PRINT)                                                          
 SYSTERMT:  If the output device is a "terminal",  this set symbol will        
    return  the actual  terminal  type.   If  the  output  device is  a        
    "printer" it will return null.  ()                                         
 SYSSCREEN:  "Y" if SCREEN was specified, else "N".  (N)                       
 SYSOUT:  "TERM" if output is online, "PRINT" otherwise.  (PRINT)              
 SYSONLINE:  "Y" if output is online, "N" otherwise.  (N)                      
 SYSOFFLINE:  "Y" if output is offline, "N" otherwise.  (Y)                    

 Font Information                                                              

 SYSBFONTS:  ".BF" fontnames that are currently stacked.  ()                   
 SYSCPAGES:  ".PH" codepage names that have been defined.  ()                  


                                                                               
                                - 192 -                                        
                                                                               
 Appendix G                               System Set Symbols and Macros        


 SYSDFONTS:  ".DF" fontnames that have been defined.  ()                       
 SYSFONTS:  ".PH" font identifiers that have been defined.  ()                 

 Error-Condition Indicators                                                    

 SYSRETCODE:   The  largest  error-level  value   since  the  start  of        
    processing;   will  be used  as  the  return  code  at the  end  of        
    processing.  Error-level values are set by SCRIPT when error condi-        
    tions are detected; they can also be set by the user with the ".ER"        
    control word.  (0)                                                         
 SYSRET:  The return code from the last .SY control word.  (0)                 

 Current Value of Control Words                                                

 SYSAD:  ".AD" Adjust value.  (1)                                              
 SYSADEVEN:  ".AD EVEN" Even Page Adjust value.  (0)                           
 SYSADODD:  ".AD ODD" Odd Page Adjust value.  (0)                              
 SYSBC:  ".BC" Balance Column switch.  (N)                                     
 SYSBE:  ".PM" Even Page Margin value.  (1)                                    
 SYSBM:  ".BM" Bottom Margin value.  (6)                                       
 SYSBO:  ".PM" Odd Page Margin value.  (1)                                     
 SYSBS:  ".DC BS" User Backspace character.                                    
 SYSBX:  ".BX" Box in progress switch.  (N)                                    
 SYSCC:  ".CC" Conditional Column switch.  (N)                                 
 SYSCCC:  ".CC"  Number of  formatted output  lines in  the Conditional        
    Column area.  (0)                                                          
 SYSCD:  ".CD" Column Definition count.  (1)                                   
 SYSCL:  ".CL" Column Length value.  (70)                                      
 SYSCO:  ".CO" Concatenation value.  (ON)                                      
 SYSCONT:  ".DC CONT" input line CONTinuation character.  ( )                  
 SYSCP:  ".CP" Conditional Page switch.  (N)                                   
 SYSCPC:  ".CP"  Number of  formatted output  lines in  the Conditional        
    Page area.  (0)                                                            
 SYSCW:  ".DC CW" Control Word separator character.  (;)                       
 SYSDHSET:  ".DH" Table of Contents number.  (0)                               
 SYSENV:  Active  formatting environment.    Values include  BODY,  IBP        
    (in-between page), CC, CP, FB, FK, FN.  (BODY)                             
 SYSFB:  ".FB" Floating Block switch.  (N)                                     
 SYSFBC:  ".FB" Floating Block line count.  (0)                                
 SYSFBF:  ".FB" First Floating Block line count.  (0)                          
 SYSFK:  ".FK" Floating Keep switch.  (N)                                      
 SYSFKC:  ".FK" Floating Keep line count.  (0)                                 
 SYSFM:  ".FM" Footing Margin value.  (1)                                      
 SYSFN:  ".FN" Footnote switch.  (N)                                           
 SYSFNC:  ".FN" Number of formatted output  lines in the Footnote area.        
    (0)                                                                        
 SYSFNCOUNT:  ".FN" Footnote number count.  (10)                               
 SYSFS:  ".FS" Footing Space value.  (1)                                       
 SYSGML:  ".DC GML" Generalized Markup Language character.  ( )                
 SYSGUTTER:  ".CD" First Multi Column Gutter Width.  (0)                       
 SYSHI:  ".HI" Hanging Indent value.  (0)                                      
 SYSHM:  ".HM" Heading Margin value.  (2)                                      


                                                                               
                                - 193 -                                        
                                                                               
 System Set Symbols and Macros                               Appendix G        


 SYSHN:  ".HN" Headnote Switch.  (N)                                           
 SYSHNC:  ".HN" Headnote line count.  (0)                                      
 SYSHS:  ".HS" Heading Space value.  (1)                                       
 SYSHY:  ".HY" Hyphenation mode.  (ON)                                         
 SYSHYC:  ".HY" Exception Dictionary word count.  (1)                          
 SYSHYPH:  ".HY" Built-in Exception Dictionary switch.  (Y)                    
 SYSHYRULES:  ".HY SET RULES" value.  (ON)                                     
 SYSIN:  ".IN" Left Indent value.  (0)                                         
 SYSINR:  ".IN" Right Indent value.  (0)                                       
 SYSIR:  ".IR" Indent Right value.  (0)                                        
 SYSIXJ:  ".DC IXJ" Index reference Join character.                            
 SYSJU:  ".JU" Justification value.  (ON)                                      
 SYSLI:  ".DC LI" control word indicator character.  (.)                       
 SYSLINB:  ".DC LINB" No-Break control word character.  ( )                    
 SYSLL:  ".LL" Line Length value.  (70)                                        
 SYSLS:  ".LS" Line Spacing value.  (0)                                        
 SYSMC:  ".CD" or ".MC" Multiple Column switch.  (N)                           
 SYSMCS:  ".DC MCS" GML markup/contents separator character.  (.)              
 SYSOF:  ".OF" Offset value.  (3)                                              
 SYSOOC:  ".OO" Output Overlay queued line count.  (0)                         
 SYSPI:  ".PI" Paragraph Indent value.  (0)                                    
 SYSPIX:  ".DC PIX" Primary Index character.  (*)                              
 SYSPL:  ".PL" Page Length value.  (66)                                        
 SYSPLS:  Index Page List Separator string.  (, )                              
 SYSPRS:  Index Page Range Separator string.  (-)                              
 SYSPS:  ".DC PS" Page number Symbol.  (%)                                     
 SYSPW:  ".PW" Page Width value.  (0)                                          
 SYSRB:  ".DC RB" Required Blank.  ( )                                         
 SYSSC:  ".SC" Single Column switch.  (N)                                      
 SYSSL:  ".SL" Set Leading value.  (1)                                         
 SYSSKCOND:  ".SK C" pending Conditional Skip lines.  (0)                      
 SYSSPCOND:  ".SP C" pending Conditional Space lines.  (0)                     
 SYSTAB:  ".DC TB" User Tab character, see also SYSTB.                         
 SYSTB:  ".DC TB" User Tab character.                                          
 SYSTISET:  ".DC TI" Translate on Input escape character.                      
 SYSUDINC:  ".UD INCLUDE" escape character.                                    
 SYSUDIGN:  ".UD IGNORE" escape character.                                     
 SYSTM:  ".TM" Top Margin value.  (6)                                          
 SYSWD:  ".WD" Widow switch.  (N)                                              
 SYSXTEXT:  ".DC XTEXT" Transparent Text delimiter character.  ( )             

 SCRIPT Option Values and Indicators                                           

 SYSERRCONT:  The error CONTINUE count.  (99)                                  
 SYSCPI:  The Characters Per Inch (CPI) value.  (10)                           
 SYSDUPLEX:  "ON" if DUPLEX was specified, else "OFF".  (ON)                   
 SYSLAYOUT:  "ON" if LAYOUT was specified, else "OFF".  (OFF)                  
 SYSPARM:   The complete  options list.    (CONTINUE(100)  DUPLEX  FILE        
    OFFLINE TWOPASS)                                                           
 SYSPASSNO:  The current PASS number.  (2)                                     
 SYSPASSOF:  The total number of PASSes to be made.  (2)                       
 SYSPRT:  The current  page print status.   Always 'OFF'  if other than        
    last pass and will reflect FROM/TO page ranges.  (ON)                      


                                - 194 -                                        
                                                                               
 Appendix G                               System Set Symbols and Macros        


 SYSQUIET:  "ON" if QUIET was specified, else "OFF".  (OFF)                    

 Automatic Macros                                                              

 If the  user chooses  to define  a macro with  a name  that is  in the        
 following list,  then SCRIPT will automatically invoke the Macro when-        
 ever the event occurs.                                                        

 SYSEOF:  will be invoked  when SCRIPT has no more input  to read.   It        
    will  be invoked  once  and only  once  per  processing pass.    If        
    multiple SYSEOF macros are defined,  they  will be invoked in "last        
    defined, first invoked" order.                                             
 SYSERROR:  will be invoked after a level  W,  E,  or S error condition        
    has occurred and been diagnosed by SCRIPT.   The error level (W, E,        
    or S)  will be  passed to SYSERROR as the value  of Set Symbol &*1.        
    Termination  based on  the value  of  the CONTinue  option will  be        
    by-passed.   The macro may terminate processing via .QQ,  if appro-        
    priate.                                                                    

 The following macros  may not include any control  words that generate        
 text  or cause  page-spacing actions,   or else  SCRIPT will  continue        
 processing the current page with the event that caused the signal.            

 SYSTOP:  is invoked before printing the Top Margin area.                      
 SYSTM:  is invoked after printing the Top Margin area.                        
 SYSBM:  is invoked before printing the Bottom Margin area.                    
 SYSBOT:  is invoked after printing the Bottom Margin area.                    


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                - 195 -                                        
                                                                               
 Functions                                                   Appendix H        


 Ŀ        
 |                                                                    |        
 |                             FUNCTIONS                              |        
 |                                                                    |        
         


                                                                               

 Attributes of a Symbol                                                        

 SCRIPT supports several attribute functions that may be applied to Set        
 Symbols  or  string operands.    These  take  the form  &f'&symbol  or        
 &f'string where "f" is a single letter denoting the name of the attri-        
 bute.   The  attribute operand may be  terminated on the right  with a        
 blank or with a period that will be deleted after substitution.               
    The following attribute  functions are available.   In  those cases        
 where there is no difference,  the "letter" may be specified in either        
 uppercase or lowercase.                                                       

 &a':   The LOWERCASE  LETTER  attribute takes  a  numeric operand  and        
    converts it  to a  lowercase "number" using  the characters  "a" to        
    "z".   &a'1 is equal to "a", &a'26 is equal to "z",  &a'27 is equal        
    to "aa" and &a'28 is equal to "ab".  A non-numeric operand or unde-        
    fined Set Symbol operand will return "0".                                  
 &A':  The UPPERCASE LETTER attribute operates the same as "&a'" except        
    it uses the characters "A" to "Z".                                         
 &b':  The BINARY attribute takes a  numeric operand and converts it to        
    a bit string of  "0" and "1".   &b'255 is equal  to "11111111".   A        
    non-numeric or undefined Set Symbol operand will return "0".               
 &c':   The  GRAPHIC  SYMBOL  attribute takes  a  numeric  operand  and        
    converts it to  the corresponding EBCDIC character.    &c'193 would        
    return "A".                                                                
 &e':  The EXISTENCE attribute takes a Set Symbol operand and returns a        
    "1" if the Set Symbol is defined and "0" if the Set Symbol is unde-        
    fined.                                                                     
 &h':  The HEXADECIMAL  attribute takes a numeric  operand and converts        
    it to a hex number with digits '0' to 'F'.  &h'255 returns "FF".  A        
    non-numeric or undefined Set Symbol will always return "0".                
 &l':  The LENGTH attribute of a Set Symbol returns the length in char-        
    acters of the  value of the Set  Symbol.   If the Set  Symbol has a        
    numeric value the length is the  number of characters to format the        
    number including the sign if negative.    If the Set Symbol operand        
    is undefined then  the length in characters of the  Set Symbol name        
    itself is returned.                                                        
 &r':   The  LOWERCASE ROMAN  attribute  takes  a numeric  operand  and        
    returns  a  lowercase  roman  numeral.    &r'8  equals  "viii"  and        
    &r'&SYSPYEAR equals mcmlxxxviii.  A non-numeric operand will return        
    "0".                                                                       
 &R':  The UPPERCASE ROMAN attribute operates in the same manner as &r'        
    except the result is in uppercase.                                         
 &s':  The  SUBSCRIPT attribute  will convert  a Set  Symbol or  string        
    operand to  its subscript equivalent.   If  output is to  a printer        
    only the numerics, '+', '-', '(' and ')' are converted to their ALA        

                                - 196 -                                        
                                                                               
 Appendix H                                                   Functions        


    print train subscript equivalents.  This may be altered or extended        
    with the Define Character (.DC SUB) control word.   If output is to        
    a terminal  with half-line shift  capabilities then  all characters        
    may be processed.                                                          
 &S':  The  SUPERSCRIPT attribute will convert  a Set Symbol  or string        
    operand to its superscript equivalent.  It operates the same as &s'        
    except for  printer output it uses  the TN print  train superscript        
    characters.   This may be altered or extended with the Define Char-        
    acter (.DC SUP) control word.                                              
 &t':  The  TYPE attribute returns a  character or numeric value  for a        
    Set  Symbol operand.    'C' is  returned  if character  and 'N'  is        
    returned if numeric.                                                       
 &u':  The  UPPERCASE attribute converts the  value of a Set  Symbol or        
    string operand to  uppercase.   Only the alphabetic  characters are        
    converted.                                                                 
 &v':  The IMMEDIATE VALUE attribute returns the current assigned value        
    for a Set Symbol, suppressing repetitive substitution.   If the Set        
    Symbol is undefined the null string is returned.   An undefined Set        
    Symbol would normally substitute as itself.                                
 &w':   The WIDTH  attribute returns  the  total width  of a  character        
    string in Character Per Inch units.   The returned width is rounded        
    up if the actual width is not an exact multiple of a CPI unit.   If        
    a Set Symbol  operand is undefined then the width  in characters of        
    the Set Symbol name itself is returned.                                    
 &x':   The HEXADECIMAL  TO CHARACTER  attribute takes  pairs of  hexa-        
    decimal digits as an operand and converts them to character.  &X'C1        
    returns "A".   If  the operand is not  specified in pairs or  if an        
    invalid hexadecimal digit  is used then the  invalid operand itself        
    will result.                                                               

 Built-in Functions                                                            

 SCRIPT supports an  alternate form of attributes  with "Built-in Func-        
 tions" that may be applied to Set Symbols, character strings,  numeric        
 values and  other functions.    These take  the form  &'func(operands)        
 where "func"  denotes the name of  the function,  in upper-  or lower-        
 case.   The function  operands must be terminated on the  right with a        
 right  parenthesis and  individual  operands  must be  separated  with        
 commas.   The operand delimiters are  scanned "before" substitution is        
 performed,  so  the commas  and final right  parenthesis may  never be        
 omitted.                                                                      
    The following built-in functions are available:                            

 &'abbrev(information,info<,length>):    The    Abbreviation   function        
    returns 0 if  the 'info' string does not match  the leading charac-        
    ters of 'information' or  if the length of 'info' is  less than the        
    minimum 'length'.   Otherwise 1 is returned.   The minimum 'length'        
    defaults to the length of 'info'.                                          
      &'abbrev('Keyword','Key') ==> 1                                          
      &'abbrev('KEYWORD','Key') ==> 0                                          
      &'abbrev('KEYWORD','KEY',2) ==> 1                                        
      &'abbrev('KEYWORD','KEY',3) ==> 1                                        
      &'abbrev('KEYWORD','KEY',4) ==> 0                                        
      &'abbrev('KEYWORD','KEZ') ==> 0                                          

                                - 197 -                                        
                                                                               
 Functions                                                   Appendix H        


      &'abbrev('KEYWORD','') ==> 1                                             
      &'abbrev('KEYWORD','',1) ==> 0                                           
 &'abs(number):  The Absolute Value function returns the absolute value        
    of the single numeric operand.                                             
      &'abs(5) ==> 5                                                           
      &'abs(-5) ==> 5                                                          
      &'abs(0) ==> 0                                                           
      &'abs(abc) ==> error, non-numeric                                        
 &'bitalic(string):   The Bold  Italic function  returns  the bold  and        
    italic equivalent of the one 'string' operand.  It performs a func-        
    tion equivalent to the Bold Italic (.BI) control word.                     
      &'bitalic(abc) ==> abc                                                   
      &'bitalic('Now is the time') ==> Now is the time                         
      &'bitalic(one,two,three) ==> too many operands                           
 &'bold(string):  The Boldface function returns  the bold equivalent of        
    the one 'string' operand.  It performs a function equivalent to the        
    Bold (.BD) control word.                                                   
      &'bold(abc) ==> abc                                                      
      &'bold('Now is the time') ==> Now is the time                            
      &'bold(one,two,three) ==> too many operands                              
 &'center(string,length<,pad>):                                                
 &'centre(string,length<,pad>):   To  generate a  character  string  of        
    'length' characters with  'string' in its centre.    If 'length' is        
    longer than 'string' then 'pad' the result.                                
      &'centre(abc,7) ==> "  abc  "                                            
      &'centre(abc,7,'-') ==> "--abc--"                                        
      &'centre('The blue sky',8,'.') ==> "e blue s"                            
      &'centre('The blue sky',7,'.') ==> "e blue "                             
 &'compare(string1,string2<,pad>):  To return the position of the first        
    character  that does  not match  in 'string1'  and 'string2'.    If        
    required, the shorter string will be padded on the right with 'pad'        
    which defaults to a blank.   If the strings are identical then zero        
    is returned.                                                               
      &'compare('ABC','ABC') ==> 0                                             
      &'compare(ABC,AP) ==> 2                                                  
      &'compare('AB ','AB') ==> 0                                              
      &'compare('AB ','AB',' ') ==> 0                                          
      &'compare('AB ','AB','X') ==> 3                                          
      &'compare('AB-- ','AB','-') ==> 5                                        
 &'copies(string,n):  To generate 'n'  concatenated copies of 'string'.        
    If 'n' is zero then a null  string is generated.   The value of 'n'        
    may not be negative.                                                       
      &'copies('123',3) ==> "123123123"                                        
      &'copies('123',0) ==> ""                                                 
      &'copies('abcdefghij',99) ==> error, result too long                     
      &'copies('123') ==> error, missing 'n'                                   
 &'c2d(string<,n>):  To  convert the binary  representation of  a char-        
    acter 'string'  to a decimal number.    The 'string' is  treated as        
    signed when the length 'n' is included.                                    
      &'c2d($) ==> 91                                                          
      &'c2d(a) ==> 129                                                         
      &'c2d(AA) ==> 49601                                                      
      &'c2d('a',1) ==> -127                                                    
      &'c2d('a',2) ==> 129                                                     

                                - 198 -                                        
                                                                               
 Appendix H                                                   Functions        


      &'c2d('0a',2) ==> -3967                                                  
      &'c2d('0a',1) ==> -127                                                   
      &'c2d('X',0) ==> 0                                                       
 &'c2x(string):  To convert  a 'string' to its  hexadecimal representa-        
    tion.                                                                      
      "&'c2x(abc)" ==> "818283"                                                
      "&'c2x('1 A')" ==> "F140C1"                                              
      "&'c2x('')" ==> ""                                                       
      "&'c2x('X',2)" ==> too many operands                                     
 &'delstr(string,n<,length>):  The  Delete String function  deletes the        
    part of 'string' starting at character  number 'n'.   The number of        
    characters can be specified in 'length' and defaults from character        
    'n' to the end of the string.  If 'string' is less than 'n' charac-        
    ters long, then nothing is deleted.                                        
      &'delstr('abcdef',3) ==> ab                                              
      &'delstr('abcdef',3,2) ==> abef                                          
      &'delstr('abcdef',10) ==> abcdef                                         
 &'delword(string,n<,length>):  To  Delete part of a  'string' starting        
    at word 'n' for 'length' blank delimited words.  If 'length' is not        
    specified then all words from word 'n' to the end of the string are        
    deleted.   The value of 'n' must be  positive and if it exceeds the        
    number of words in the string, no action is performed.                     
      &'delword('The quick brown  fox',2,2) ==> "The fox"                      
      &'delword('The quick brown fox ',3) ==> "The quick "                     
      &'delword('The quick brown  fox',5) ==> "The quick brown  fox"           
      &'delword(' The quick brown fox',0) ==> error, not positive              
      &'delword(' The quick brown fox',1) ==> " "                              
      &'delword('The quick brown fox') ==> error, missing number               
      &'delword('',1) ==> ""                                                   
 &'d2c(number<,n>):  To  convert a  decimal 'number'  to its  character        
    representation of length 'n'.  The 'number' can be negative only if        
    the length 'n' is specified.                                               
      "&'d2c(129)" ==> "a"                                                     
      "&'d2c(129,1)" ==> "a"                                                   
      "&'d2c(129,2)" ==> " a"                                                  
      "&'d2c(-127,1)" ==> "a"                                                  
      "&'d2c(-127,2)" ==> "a"                                                 
      "&'d2c(12,0)" ==> ""                                                     
 &'d2x(number<,n>):  To convert  a decimal 'number' to  its hexadecimal        
    representation of length 'n'.  The 'number' can be negative only if        
    the length 'n' is specified.                                               
      "&'d2x(5)" ==> "05"                                                      
      "&'d2x(129)" ==> "81"                                                    
      "&'d2x(129,1)" ==> "81"                                                  
      "&'d2x(129,2)" ==> "0081"                                                
      "&'d2x(129,4)" ==> "00000081"                                            
      "&'d2x(257,2)" ==> "0101"                                                
      "&'d2x(-127,1)" ==> "81"                                                 
      "&'d2x(-127,2)" ==> "FF81"                                               
      "&'d2x(-127,4)" ==> "FFFFFF81"                                           
      "&'d2x(12,0)" ==> ""                                                     
 &'find(string,phrase):  The Find function returns the word position of        
    the words in 'phrase' within the words of 'string'.   All interword        
    blanks are treated  as a single blank.   If the  'phrase' cannot be        

                                - 199 -                                        
                                                                               
 Functions                                                   Appendix H        


    found the result is zero.                                                  
      &'find('The quick brown fox','quick brown fox') ==> 2                    
      &'find('The quick  brown fox','quick    brown') ==> 2                    
      &'find('The quick  brown fox','quick  fox ') ==> 0                       
      &'find('The quick  brown fox','xyz') ==> 0                               
      &'find('The quick brown fox') ==> error, missing phrase                  
 &'index(haystack,needle<,start>):   The  Index  function  returns  the        
    character position of the string 'needle' in the string 'haystack'.        
    If not found, the function returns zero.  The first character posi-        
    tion to be searched in 'haystack' may be specified with the 'start'        
    number and  it defaults to the  first character position  in 'hays-        
    tack'.                                                                     
      &'index('abcdef','c') ==> 3                                              
      &'index('abcdef','cd') ==> 3                                             
      &'index('abcdef','yz') ==> 0                                             
      &'index('ab','abcdef') ==> 0                                             
      &'index('ababab','ab',2) ==> 3                                           
      &'index('ababab','ab',6) ==> 0                                           
 &'insert(new,target<,<n><,<length><,pad>>>):   To  Insert   the  'new'        
    string with  length 'length' into  the 'target' string  after char-        
    acter 'n'.   If 'n' is omitted then  'new' is inserted at the start        
    of 'target'.   The 'pad' character may  be used to extend the 'tar-        
    get' string to length 'n' or the 'new' string to length 'length'.          
      "&'insert(' ','abcdef',3)" ==> "abc def"                                 
      "&'insert('123','abc',5,6)" ==> "abc  123   "                            
      "&'insert('123','abc',5,6,'+')" ==> "abc++123+++"                        
      "&'insert('123','abc')" ==> "123abc"                                     
      "&'insert('123','abc',5,,'-')" ==> "abc--123"                            
      "&'insert('123','abc',,,'-')" ==> "123abc"                               
 &'italic(string):  The  Italic function returns the  italic equivalent        
    of the one 'string' operand.   It performs a function equivalent to        
    the Underscore (.US) control word.                                         
      &'italic(abc) ==> abc                                                    
      &'italic('Now is the time') ==> Now is the time                          
      &'italic(one,two,three) ==> too many operands                            
 &'lastpos(needle,haystack<,start>):    The  Last   Position   function        
    returns the starting  character of the last  occurrence of 'needle'        
    in 'haystack'.  The first position to search from in 'haystack' may        
    be specified  with 'start' and  this defaults  to the start  of the        
    'haystack' string.  If no match for 'needle' can be found in 'hays-        
    tack' then zero is returned.                                               
      &'lastpos('c','abcde') ==> 3                                             
      &'lastpos(x,abcde) ==> 0                                                 
      &'lastpos(abcde,abcde) ==> 1                                             
      &'lastpos(a,aaaaa) ==> 5                                                 
      &'lastpos('a','aaaaa') ==> 5                                             
      &'lastpos(a,aaaaa,3) ==> 5                                               
      &'lastpos(a,aaaaa,10) ==> 0                                              
      &'lastpos(a) ==> error, too few operands                                 
 &'left(string,length<,pad>):   To  generate  a   character  string  of        
    'length' characters  with 'string' in  its start.   If  'length' is        
    longer than 'string' then 'pad' the result.                                
      &'left('ABC D',8) ==> "ABC D   "                                         
      &'left('ABC D',8,'.') ==> "ABC D..."                                     

                                - 200 -                                        
                                                                               
 Appendix H                                                   Functions        


      &'left('ABC  DEF',7) ==> "ABC  DE"                                       
 &'length(string):  The Length function returns  the length of 'string'        
    in characters.   The  'string' may be null,  in which  case zero is        
    returned.                                                                  
      &'length(abc) ==> 3                                                      
      &'length('Time Flies') ==> 10                                            
      abc&'length(time flies)xyz ==> abc10xyz                                  
      +&'length(one)*&'length(two) ==> +3*3                                    
      &'length(one,two,three) ==> too many operands                            
 &'lower(string<,n<,length>>):   The  Lowercase  function  returns  the        
    lowercase equivalent of the 'string' operand.   The first character        
    to be lowercased may be specified  by 'n' and the 'length' defaults        
    to the  end of the string.    The conversion to  lowercase includes        
    only the alphabetic characters.                                            
      &'lower(ABC) ==> abc                                                     
      &'lower('Now is the time') ==> now is the time                           
      ABC&'lower(TIME FLIES)890 ==> ABCtime flies890                           
      &'lower(ABC)...&'lower(890) ==> abc...890                                
      &'lower(ABCDEFG,3) ==> ABcdefg                                           
      &'lower(ABCDEFG,3,2) ==> ABcdEFG                                         
      &'lower(ONE,TWO,THREE) ==> invalid operands                              
 &'max(number<,number ...>):  The Maximum  function returns the largest        
    in a list of numbers.                                                      
      &'max(5,6,7,8) ==> 8                                                     
      &'max(-5,(5*5),0) ==> 25                                                 
      &'max('5','6','7') ==> 7                                                 
      &'max(1,&'max(2,&'max(3,4))) ==> 4                                       
      &'max(1) ==> 1                                                           
      &'max() ==> error, too few operands                                      
      &'max(5,10,a) ==> error, non-numeric operand                             
      &'max (5,5,5 ==> error, missing right parenthesis                        
 &'min(number<,number ...>):  The Minimum function returns the smallest        
    in a list of numbers.                                                      
      &'min(5,6,7,8) ==> 5                                                     
      &'min(-5,(5*5),0) ==> -5                                                 
      &'min('5','6','7') ==> 5                                                 
      &'min(1,&'min(2,&'min(3,4))) ==> 1                                       
 &'overlay(new,target<,<n><,<length><,pad>>>):   To Overlay  the  'new'        
    string with  length 'length' onto  the 'target' string  starting at        
    the 'n'th character.   If 'n' is  omitted then 'new' is overlaid at        
    the start of 'target'.   The 'pad'  character may be used to extend        
    the 'target'  string to length  'n' or  the 'new' string  to length        
    'length'.                                                                  
      "&'overlay(' ','abcdef',3)" ==> "ab def"                                 
      "&'overlay('123','abc',5,6)" ==> "abc 123   "                            
      "&'overlay('123','abc',5,6,'+')" ==> "abc+123+++"                        
      "&'overlay('123','abc')" ==> "123"                                       
      "&'overlay('123','abc',5,,'-')" ==> "abc-123"                            
      "&'overlay('123','abc',,,'-')" ==> "123"                                 
 &'pos(needle,haystack<,start>):   The  Position function  returns  the        
    character position  of the first  occurrence of 'needle'  in 'hays-        
    tack'.   The  search for a  match starts  at the first  position of        
    'haystack' but  may be  overridden by  adding a  'start' column  in        
    'haystack'.    If the  'needle' string  is  not found,   a zero  is        

                                - 201 -                                        
                                                                               
 Functions                                                   Appendix H        


    returned.                                                                  
      &'pos('c','abcde') ==> 3                                                 
      &'pos(x,abcde) ==> 0                                                     
      &'pos(abcde,abcde) ==> 1                                                 
      &'pos(a,aaaaa) ==> 1                                                     
      &'pos('a','aaaaa') ==> 1                                                 
      &'pos(a,aaaaa,3) ==> 3                                                   
      &'pos(12345678,abc) ==> 0                                                
      &'pos(a) ==> error, too few operands                                     
      &'pos(a,abcd,junk) ==> error, 'start' not numeric                        
      &'pos(a,abcd,3,'.') ==> error, too many operands                         
 &'reverse(string):  The Reverse function inverts the 'string' from end        
    to start.  The string operand may be null.                                 
      &'reverse(abc) ==> cba                                                   
      &'reverse('time flies') ==> seilf emit                                   
      ABC&'reverse(time flies)XYZ ==> ABCseilf emitXYZ                         
      &'reverse(321)...&'reverse(987) ==> 123...789                            
      &'reverse(one,two,three) ==> too many operands                           
 &'right(string,length<,pad>):   To  generate  a  character  string  of        
    'length'  characters with  'string' at  the end.    If 'length'  is        
    longer than 'string' then 'pad' the  result,  if less then truncate        
    on the left.                                                               
      &'right('ABC D',8) ==> "   ABC D"                                        
      &'right('ABC D',8,'.') ==> "...ABC D"                                    
      &'right('ABC  DEF',7) ==> "BC  DEF"                                      
 &'sign(number):   The Sign  function  returns the  sign  of a  numeric        
    operand, '-1' for negative, '0' for zero and '1' for positive.             
      &'sign(5) ==> 1                                                          
      &'sign('5') ==> 1                                                        
      &'sign(0) ==> 0                                                          
      &'sign(-5) ==> -1                                                        
      &'sign(-2)&'sign(0)&'sign(5) ==> -101                                    
      &'sign(a) ==> error, non-numeric operand                                 
      &'sign(5 ==> error, missing right parenthesis                            
      &'sign() ==> error, missing operand                                      
 &'space(string<,<n><,pad>>):   To insert  exactly 'n'  spaces (or  pad        
    characters) between each word of 'string'.  The value of 'n' cannot        
    be  negative.   If  'n'  is 0  then all  spaces  between words  are        
    removed.   The  default value for  'n' is  1 and the  default 'pad'        
    character is a blank.                                                      
      "&'space('cat  dog  ')" ==> "cat dog"                                    
      "&'space('  cat dog',3)" ==> "cat   dog"                                 
      "&'space('cat  dog  ',1)" ==> "cat dog"                                  
      "&'space('cat  dog  ',0)" ==> "catdog"                                   
      "&'space('cat  dog  ',2,'+')" ==> "cat++dog"                             
 &'spread(string<,<n><,pad>>):  To  insert exactly  'n' spaces  (or pad        
    characters)  between each character of 'string'.   The value of 'n'        
    cannot be  negative.   If  'n' is  0 then  no extra  characters are        
    inserted and the result is the original string.   The default value        
    for 'n' is 1 and the default 'pad' character is a blank.                   
      "&'spread('aaa bbb')" ==> "a a a   b b b"                                
      "&'spread('aaa bbb',1)" ==> "a a a   b b b"                              
      "&'spread('aaa bbb',3)" ==> "a   a   a       b   b   b"                  
      "&'spread('aaa bbb',0)" ==> "aaa bbb"                                    

                                - 202 -                                        
                                                                               
 Appendix H                                                   Functions        


      "&'spread('aaa bbb',2,'+')" ==> "a++a++a++ ++b++b++b"                    
 &'strip(string<,<type><,char>>):   To remove  leading and/or  trailing        
    'char's from a 'string'.  The 'type' specified may be 'L' to remove        
    leading characters,  'T' for trailing  characters,  or 'B' for both        
    leading and trailing characters.   If omitted the default 'type' is        
    'B'.   All leading  or trailing characters matching  'char' will be        
    removed, the default 'char' being a blank.                                 
      "&'strip('  the dog  ')" ==> "the dog"                                   
      "&'strip('  the dog  ','L')" ==> "the dog  "                             
      "&'strip('  the dog  ','t')" ==> "  the dog"                             
      "&'strip('a-b--',,'-')" ==> "a-b"                                        
      "&'strip(--a-b--,,-)" ==> "a-b"                                          
 &'sub(string):  The subscript equivalent of the 'string'.   The opera-        
    tion of this function may be restricted by the output device.              
      &'sub(123) ==>                                                        
      &'sub(1.1) ==> .                                                       
      &'sub(abc) ==> abc                                                       
 &'substr(string,n<,length<,pad>>):  The Substring function returns the        
    portion of 'string' starting at  character number 'n'.   The number        
    of  characters  to return  may  be  specified  in 'length'  and  it        
    defaults from  character 'n' to the  end of the 'string'.    If the        
    'length' is  present and it  would exceed  the total length  of the        
    'string' then  string is  extended with  blanks or  the user  'pad'        
    character.                                                                 
      "&'substr('123456789*',5)" ==> "56789*"                                  
      "&'substr('123456789*',5,9)" ==> "56789*   "                             
      "&'substr('123456789*',5,9,'.')" ==> "56789*..."                         
      "&'substr('123456789*',1,3,':')" ==> "123"                               
      .se alpha = 'abcdefghijklmnopqrstuvwxyz'                                 
      "&'substr(&alpha,24)" ==> "xyz"                                          
      "&'substr(&alpha,24,1)" ==> "x"                                          
      "&'substr(&alpha,24,5)" ==> "xyz  "                                      
      "&'substr(&alpha,24,5,':')" ==> "xyz::"                                  
      "&'substr(&alpha,30,5,':')" ==> ":::::"                                  
      "&'substr(abcde,0,5)" ==> start column too small                         
      "&'substr(abcde,1,-1)" ==> length too small                              
 &'subword(string,n<,length>):  The Subword function  returns the words        
    of 'string' starting at word number 'n'.   The value of 'n' must be        
    positive.  If 'length' is omitted, it will default to the remainder        
    of the string.  The result will include all blanks between selected        
    words and all leading and trailing blanks are not included.                
      &'subword('The quick brown  fox',2,2) ==> "quick brown"                  
      &'subword('The quick brown  fox',3) ==> "brown  fox"                     
      &'subword('The quick brown  fox',5) ==> ""                               
      &'subword('The quick brown  fox',0) ==> error, number too small          
      &'subword('The quick brown  fox') ==> error, missing number              
      &'subword('',1) ==> ""                                                   
 &'sup(string):  The superscript equivalent of the 'string'.  The oper-        
    ation of this function may be restricted by the output device.             
      &'sup(123) ==>                                                        
      &'sup(1.1) ==> .                                                       
      &'sup(abc) ==> abc                                                       


                                                                               
                                - 203 -                                        
                                                                               
 Functions                                                   Appendix H        


 &'translate(string<,<tableo><,<tablei><,pad>>>):      To     Translate        
    'string' with characters  in 'tablei' to the  corresponding charac-        
    ters in  'tableo'.   The  'pad' character  will extend  'tableo' to        
    equal the length of 'tablei',  if  required.   If both 'tableo' and        
    'tablei' are omitted then 'string' is converted to uppercase.              
      &'translate('abcdef') ==> ABCDEF                                         
      &'translate('abbc','&','b') ==> a&&c                                     
      &'translate('abcdef','12','ec') ==> ab2d1f                               
      &'translate('abcdef','12','abcd','.') ==> 12..ef                         
      &'translate('4321','abcd','1234') ==> dcba                               
      &'translate('123abc',,,'$') ==> $$$$$$                                   
 &'upper(string<,n<,length>>):   The  Uppercase  function  returns  the        
    uppercase equivalent of the 'string' operand.   The first character        
    to be uppercased may be specified  by 'n' and the 'length' defaults        
    to the end of the string.    The conversion to uppercase is defined        
    by the Translate Uppercase (.TU) control word.                             
      &'upper(abc) ==> ABC                                                     
      &'upper('Now is the time') ==> NOW IS THE TIME                           
      abc&'upper(time flies)xyz ==> abcTIME FLIESxyz                           
      &'upper(abc)...&'upper(xyz) ==> ABC...XYZ                                
      &'upper(abcdefg,3) ==> abCDEFG                                           
      &'upper(abcdefg,3,2) ==> abCDefg                                         
      &'upper(one,two,three) ==> invalid operands                              
 &'veclastpos(needle,haystack<,<start><,case>>):  The Vector Last Posi-        
    tion function returns  the subscript number of  the last occurrence        
    of 'needle'  in 'haystack'  set symbol.    The search  for a  match        
    starts at the first element of  'haystack' but may be overridden by        
    adding a 'start' subscript in 'haystack'.   The default case of 'M'        
    or 'Mixed' searches for an element which matches exactly, a case of        
    'U' or  'Upper' will match the  'needle' and 'haystack'  element in        
    uppercase.    If the  'needle'  string is  not  found,   a zero  is        
    returned.                                                                  
 &'vecpos(needle,haystack<,<start><,case>>):  The Vector Position func-        
    tion returns the subscript number of  the first occurrence of 'nee-        
    dle' in 'haystack'  set symbol.   The search for a  match starts at        
    the first element  of 'haystack' but may be overridden  by adding a        
    'start'  subscript in  'haystack'.    The default  case  of 'M'  or        
    'Mixed' searches for  an element which matches exactly,   a case of        
    'U' or  'Upper' will match the  'needle' and 'haystack'  element in        
    uppercase.    If the  'needle'  string is  not  found,   a zero  is        
    returned.                                                                  
      .se rodent(1) = 'Gerbil'                                                 
      .se rodent(2) = 'Hamster'                                                
      .se rodent(3) = 'Mouse'                                                  
      .se rodent(4) = 'Rabbit'                                                 
      &'vecpos('Hamster',rodent) ==> 2                                         
      &'vecpos(Dog,rodent) ==> 0                                               
      &'vecpos(Hamster,rodent,3) ==> 0                                         
      &'vecpos(HAMSTER,rodent) ==> 0                                           
      &'vecpos(HAMSTER,rodent,1,U) ==> 2                                       
      &'vecpos(Mouse) ==> error, too few operands                              
 &'verify(string,ref<,<"Match"><,start>>):   To  return  the  character        
    position of the first character in 'string' that cannot be found in        
    'ref'.  If all the 'string' characters are found in 'ref' then 0 is        

                                - 204 -                                        
                                                                               
 Appendix H                                                   Functions        


    returned.   If "Match" is specified then  the position of the first        
    character in 'string' that can be  found in 'ref' is returned.   If        
    none of the 'string' characters exist  in 'ref' then 0 is returned.        
    The 'start'  value specifies  the first  character position  in the        
    'string' to be searched for, and it defaults to 1.                         
      &'verify('abc','abcdefghij') ==> 0                                       
      &'verify('a9c',abcdefghij) ==> 2                                         
      &'verify('12d4','abcdefghij','M') ==> 3                                  
      &'verify('1234','abcdefghij','M') ==> 0                                  
      &'verify('a2c8d','abcdefghij',,3) ==> 4                                  
      &'verify(12c34e,abcdefghij,M,4) ==> 6                                    
 &'width(string<,type>):   The  Width function  returns  the  formatted        
    width of 'string' in units based  on the current Character Per Inch        
    setting.   The returned width is rounded  up if the actual width is        
    not an  exact multiple of a  CPI unit.   An optional  second 'type'        
    operand may be specified to define the  units in which the width is        
    to be  defined:   a  'type' of  "C" or  "CPI" is  default,  "N"  or        
    "Number" is the number of  characters not including overstrikes and        
    escape sequences,  and  "U" or "Units" returns the  width in output        
    Device Units.                                                              
      &'width(abc) ==> 3                                                       
      &'width('A&SYSBS._') ==> 1                                               
      &'width(ABCDEFG,C) ==> width in CPI units                                
      &'width(ABCDEFG,N) ==> number of characters                              
      &'width(ABCDEFG,U) ==> width in Device Units                             
      &'width(AAA,X) ==> invalid 'type' operand                                
 &'word(string,n):  The  Word function returns  only the 'n'th  word in        
    'string'.   The value of 'n' must be positive.   If there are fewer        
    than 'n' blank delimited words in the 'string' then the null string        
    is returned.                                                               
      &'word('The quick brown fox',3) ==> "brown"                              
      &'word('The quick brown fox',5) ==> ""                                   
      &'word('The quick brown fox',0) ==> error, too small                     
      &'word('The quick brown fox') ==> error, missing number                  
      &'word('',1) ==> ""                                                      
 &'wordindex(string,n):  The Word Index  function returns the character        
    position in 'string' where the 'n'th word begins.  The value of 'n'        
    must be positive.  If there are fewer than 'n' words in 'string', 0        
    is returned.                                                               
      &'wordindex('The quick brown fox',3) ==> 11                              
      &'wordindex('The quick brown fox',5) ==> 0                               
      &'wordindex('The quick brown fox',0) ==> error, too small                
      &'wordindex('The quick brown fox') ==> error, missing number             
      &'wordindex('',1) ==> 0                                                  
 &'wordlength(string,n):  The  Word Length function returns  the length        
    of the 'n'th word in 'string'.   The value of 'n' must be positive.        
    If there are fewer than 'n' words in 'string', 0 is returned.              
      &'wordlength('The quick brown fox',3) ==> 5                              
      &'wordlength('The quick brown fox',5) ==> 0                              
      &'wordlength('The quick brown fox',0) ==> error, too small               
      &'wordlength('The quick brown fox') ==> error, missing number            
      &'wordlength('',1) ==> 0                                                 


                                                                               
                                - 205 -                                        
                                                                               
 Functions                                                   Appendix H        


 &'wordpos(phrase,string<,start>):  The Word  Position function returns        
    the word  position of  the words  in 'phrase'  within the  words of        
    'string'.   The  search begins with the  first word of  'string' by        
    default which may be changed by  specifying a positive 'start' word        
    number.   All interword blanks are treated  as a single blank.   If        
    the 'phrase' cannot be found the result is zero.                           
      &'wordpos('quick brown fox','The quick brown fox') ==> 2                 
      &'wordpos('quick    brown','The quick  brown fox') ==> 2                 
      &'wordpos('quick  fox ','The quick  brown fox') ==> 0                    
      &'wordpos('xyz','The quick  brown fox') ==> 0                            
      &'wordpos('The quick brown fox') ==> error, missing string               
 &'words(string):  The Words function returns the number of words found        
    in 'string'.                                                               
      &'words('The quick brown fox') ==> 4                                     
      &'words(' ') ==> 0                                                       
      &'words('') ==> 0                                                        
      &'words('cat dot',1) ==> too many operands                               
 &'x2c(hex-string):   Hexadecimal 'hex-string'  is  converted to  char-        
    acter.                                                                     
      "&'x2c(f1f2f3)" ==> "123"                                                
      "&'x2c(' F1F2F3 F4F5F6 ')" ==> "123456"                                  
      "&'x2c('')" ==> ""                                                       
      "&'x2c('FF',2)" ==> too many operands                                    
 &'x2d(hex-string<,n>):  Hexadecimal  'hex-string' is  converted to  an        
    integer.  The number is unsigned unless the length 'n' is included.        
      &'x2d(5B) ==> 91                                                         
      &'x2d(81) ==> 129                                                        
      &'x2d(C1C1) ==> 49601                                                    
      &'x2d('81',1) ==> 1                                                      
      &'x2d('81',2) ==> -127                                                   
      &'x2d('81',3) ==> 129                                                    
      &'x2d('81',4) ==> 129                                                    
      &'x2d('f081',1) ==> 1                                                    
      &'x2d('f081',2) ==> -127                                                 
      &'x2d('f081',3) ==> 129                                                  
      &'x2d('f081',4) ==> -3967                                                
      &'x2d('f081',5) ==> 61569                                                
      &'x2d('FF',0) ==> 0                                                      


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                - 206 -                                        
                                                                               
 Appendix I                                                Print Trains        


 Ŀ        
 |                                                                    |        
 |                            PRINT TRAINS                            |        
 |                                                                    |        
         


                                                                               
 The following  table depicts  the hexadecimal  representations of  the        
 characters and symbols on the current print train.                            

         0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F                        
       Ŀ                      
     0 |                             
     | 0                    
     1 |           
                     | 1                    
     2 |           
                     | 2                    
     3 |                                | 3                    
     4 |                        .  <  (  +  | | 4                    
     5 | &                    !  $  *  )  ;  ^ | 5                    
     6 | -  /                    ,  %  _  >  ? | 6                    
     7 |                   `  :  #  @  '  =  " | 7                    
     8 |   a  b  c  d  e  f  g  h  i             | 8                    
     9 |   j  k  l  m  n  o  p  q  r             | 9                    
     A |   ~  s  t  u  v  w  x  y  z        [     | A                    
     B |                           ]     | B                    
     C | {  A  B  C  D  E  F  G  H  I             | C                    
     D | }  J  K  L  M  N  O  P  Q  R             | D                    
     E | \    S  T  U  V  W  X  Y  Z             | E                    
     F | 0  1  2  3  4  5  6  7  8  9             | F                    
                             
         0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F                        


 The following tables show the special characters and their hexadecimal        
 equivalents as defined at the University of Waterloo.  Only characters        
 that cannot directly be input on a 2741 terminal are listed.                  

 Subscripts and Superscripts              XB0  superscript 0                  
     X80  subscript 0                    XB1  superscript 1                  
     X51  subscript 1                    XB2  superscript 2                  
     X52  subscript 2                    XB3  superscript 3                  
     X53  subscript 3                    XB4  superscript 4                  
     X54  subscript 4                    XB5  superscript 5                  
     X55  subscript 5                    XB6  superscript 6                  
     X56  subscript 6                    XB7  superscript 7                  
     X57  subscript 7                    XB8  superscript 8                  
     X58  subscript 8                    XB9  superscript 9                  
     X59  subscript 9                    X8D  superscript (                  
     XDC  subscript (                    X9D  superscript )                  
     XCC  subscript )                    X8E  superscript +                  
     XCA  subscript +                    XA0  superscript -                  
     XCB  subscript -                                                         


                                                                               
                                - 207 -                                        
                                                                               
 Print Trains                                                Appendix I        


 Box Characters                           XED  copyright                      
     X8F  cross hair                     X9A  dagger, double                 
     XBF  horizontal line                XAA  dagger, single                 
     XAB  lower left corner              X90  degree (TN only)               
     XBB  lower right corner             X3D  delta                          
     XAC  upper left corner              XDE  dot, lower                     
     XBC  upper right corner             XDF  dot, lower double              
                                          X49  dot, middle                    
 Accents and Letters                      X41  flat                           
     X74  accent acute                   XFC  foot, minutes of arc           
     X70  accent angstrom (ring)         X3C  gamma                          
     X77  accent breve                   XAE  greater or equal               
     X76  accent cedilla                 XFB  inch, seconds of arc           
     X71  accent circumflex              X3F  integral                       
     X75  accent dot                     X8C  less or equal                  
   `  X79  accent grave                   X9C  lozenge                        
     X73  accent macron, over bar        XBE  not equal                      
     X78  accent hacek (Czech)           X9E  plus minus                     
     XCF  accent ognek (Polish)          X6A  pound sterling                 
     X68  accent tilde                   XFE  quote, close double            
     X72  accent umlaut                  XEE  quote, close single            
     X66  aesch, lower                   XFD  quote, open double             
     X46  aesch, upper                   XCE  quote, open single             
     X63  barred O, lower                XCD  registered                     
     X43  barred O, upper                X3E  sigma, upper                   
     XEF  chandrabindu                 ~  XA1  tilde                          
     X64  edh, lower                     XE1  underscore, double             
     X33  edh, lower (variant)                                                
     X44  edh, upper                                                          
     X37  glottal stop                                                        
     X62  hard (Polish) L, lower                                              
     X42  hard (Polish) L, upper                                              
     X67  oesch, lower                                                        
     X47  oesch, upper                                                        
     XDB  spanish exclamation                                                 
     XDA  spanish question                                                    
     X65  thorn (Icelandic), lower                                            
     X45  thorn (Icelandic), upper                                            
     X31  thorn (Olde Eng), lower                                             
     X32  thorn (Olde Eng), upper                                             
     X8A  undotted i                                                          
     XEA  vocalic circle                                                      

 Special Symbols                                                               
     X3A  alpha                                                               
     X36  apostrophe                                                          
   \  XE0  backslash                                                           
     X3B  german double s, beta                                               
   {  XC0  brace, left                                                         
   }  XD0  brace, right                                                        
   [  XAD  bracket, left                                                       
   ]  XBD  bracket, right                                                      
     XAF  bullet, round                                                       
     X9F  bullet, square                                                      

                                - 208 -                                        
                                                                               
 Appendix J                 Control Word Summary, in Alphabetical Order        


 Ŀ        
 |                                                                    |        
 |            CONTROL WORD SUMMARY, IN ALPHABETICAL ORDER             |        
 |                                                                    |        
         


                                                                               
                                 Break Control Words indicated by --  *        

 .   <line>  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23        
     NULL takes a line operand to be treated as input, either text or          
     control word.                                                             

 ... <ident|n> <line>  . . . . . . . . . . . . . . . . . . . . . . . 24        
     SET LABEL specifies an identifier that  is to be associated with          
     the current input record for a .GO operation.                             

 .* <information>  . . . . . . . . . . . . . . . . . . . . . . . . . 45        
     COMMENT,  alternate form of .CM in  which the control word sepa-          
     rator is treated as text.                                                 

 .AD <EVEN|ODD> <0|h|+h|-h>  . . . . . . . . . . . . . . . . . .  24  *        
     ADJUST causes all output  to be moved to the right  of the phys-          
     ical left print margin.                                                   

 .AP Filename <args> . . . . . . . . . . . . . . . . . . . . . . . . 25        
     APPEND allows an additional file to be appended to the file just          
     printed.                                                                  

 .BC <ON|OFF>  . . . . . . . . . . . . . . . . . . . . . . . . . . . 27        
     BALANCE  COLUMNS  enables  or   disables  column  balancing  for          
     multiple column output.                                                   

 .BD <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . . . . 27        
     BOLD overlays an input line with itself for a boldface effect.            

 .BF <fontname ... <=>>  . . . . . . . . . . . . . . . . . . . . . . 29        
     BEGIN FONT begins  a new font name for following  text and saves          
     the current font name.                                                    

 .BI <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . . . . 30        
     BOLD ITALIC boldfaces and underscores input text.                         

 .BL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  30  *        
     BLANK LINE is generated each time  a blank input line is encoun-          
     tered.                                                                    

 .BM <6|v|+v|-v> . . . . . . . . . . . . . . . . . . . . . . . .  31  *        
     BOTTOM MARGIN specifies  the number of lines to  be left between          
     the bottom  of the  output page and  the last  line of  the text          
     area.                                                                     


                                                                               
                                - 209 -                                        
                                                                               
 Control Word Summary, in Alphabetical Order                 Appendix J        


 .BR <line>  . . . . . . . . . . . . . . . . . . . . . . . . . .  32  *        
     BREAK prints the current output line (if any) whether it is full          
     or not and without justification (if on).                                 

 .BS <char>  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33        
     BACKSPACE  specifies the  input  character to  be  treated as  a          
     logical backspace character.                                              

 .BT <1|n> </left/centre/right/> . . . . . . . . . . . . . . . . . . 33        
     BOTTOM TITLE defines a running title to be printed at the bottom          
     of even- and odd-numbered pages.                                          

 .BX <NEW|ON|OFF|SET> <h1 </> ... hn>                                          
     <CANCEL>                                                                  
     <CHAR name> . . . . . . . . . . . . . . . . . . . . . . . .  34  *        
     BOX  creates the  horizontal rules  and  initiates the  vertical          
     rules that will surround user text.                                       

 .CB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  38  *        
     COLUMN BEGIN positions the output to the top of the next column.          

 .CC <v|BEGIN|INLINE|END <0|w>>  . . . . . . . . . . . . . . . .  39  *        
     CONDITIONAL COLUMN causes a .CB  if insufficient lines remain in          
     the current column, or if not already at the top of a column.             

 .CD SET n <gmin <gmax>>                                                       
     n <h1 <h2 ... h9>>  . . . . . . . . . . . . . . . . . . . .  40  *        
     COLUMN DEFINITION defines  how many columns of output  are to be          
     formatted on each page and where each column is to start.                 

 .CE <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . .  42  *        
     CENTRE will  centre an operand  line or following  lines between          
     the current left and right indents.                                       

 .CH /string1/string2/<n> ...                                                  
     DELETE </string1/....>  . . . . . . . . . . . . . . . . . . . . 43        
     CHANGE defines strings of text to be replaced in following input          
     records.                                                                  

 .CL <0|h|+h|-h> . . . . . . . . . . . . . . . . . . . . . . . .  45  *        
     COLUMN  LENGTH defines  the width  of each  column in  multiple-          
     column mode.                                                              

 .CM <information> . . . . . . . . . . . . . . . . . . . . . . . . . 45        
     COMMENT information, has no effect on SCRIPT processing.                  

 .CO <ON|OFF>  . . . . . . . . . . . . . . . . . . . . . . . . .  46  *        
     CONCATENATE  causes the  output lines  to be  formed by  concat-          
     enating input  lines to get as  many words as possible  onto the          
     output lines.                                                             

 .CP <v|BEGIN|INLINE|END <0|w>>  . . . . . . . . . . . . . . . .  47  *        
     CONDITIONAL  PAGE causes  a  page  eject if  insufficient  lines          
     remain on the current page for text.                                      

                                - 210 -                                        
                                                                               
 Appendix J                 Control Word Summary, in Alphabetical Order        


 .CS <n <ON|OFF>|<INCLUDE|IGNORE>> . . . . . . . . . . . . . . . . . 47        
     CONDITIONAL SECTION causes  only selected portions of  the total          
     document to be printed by associating a conditional section code          
     with selected portions of the document.                                   

 .CT <line>  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48        
     CONTINUED TEXT  continues following text without  an intervening          
     blank.                                                                    

 .CW <;|character> . . . . . . . . . . . . . . . . . . . . . . . . . 49        
     CONTROL  WORD SEPARATOR  defines the  delimiter between  control          
     words so that multiple control words may be entered on one line.          

 .DC parameter <char ...|OFF>  . . . . . . . . . . . . . . . . . . . 50        
     DEFINE  CHARACTER defines  characters  of  special meaning  when          
     found in input and produced  as output.   Some character options          
     that might be defined include:                                            
     BS <char|OFF> -- the user Backspace character                             
     CONT <char|OFF> -- the Continue input character                           
     GML <char|OFF> -- the GML tag indicator character                         
     PS <char|OFF> -- the Page Symbol character in titles                      
     RB <char|OFF> -- the Required Blank character                             
     TB <char|OFF> -- the user Tab character                                   

 .DF <fontname definitions>  . . . . . . . . . . . . . . . . . . . . 53        
     DEFINE  FONT defines  a user  font name  to represent  a set  of          
     logical font identifiers.                                                 

 .DH <SET m> n < options >                                                     
     DEFINE HEADING  defines the  formatting conditions  for all  the          
     heading levels generated with the .Hn control words.                      

 .DM name /line1/.../linen</>                                                  
     name <BEGIN|END>                                                          
     name DELETE . . . . . . . . . . . . . . . . . . . . . . . . . . 58        
     DEFINE MACRO defines a sequence of  input lines to be invoked by          
     "name" as a user-defined control word.                                    

 .DO <BEGIN|END> . . . . . . . . . . . . . . . . . . . . . . . . . . 59        
     DO may be  used following a THEN  or ELSE control word  to allow          
     multiple input lines to be conditionally included.                        

 .DS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  59  *        
     DOUBLE  SPACE causes  a  line to  be  skipped  between lines  of          
     output.                                                                   

 .DU <ADD|DEL> word ...  . . . . . . . . . . . . . . . . . . . . . . 60        
     DICTIONARY UPDATE  defines correctly spelled  words in  a user's          
     spelling dictionary.                                                      

 .EC .xx <operands>  . . . . . . . . . . . . . . . . . . . . . . . . 61        
     EXECUTE CONTROL treats the operand line as a native control word          
     even if a macro is defined with the same name.                            


                                - 211 -                                        
                                                                               
 Control Word Summary, in Alphabetical Order                 Appendix J        


 .EF <YES|NO|CLOSE|NOCLOSE>                                                    
     <SET <CLOSE|NOCLOSE>> . . . . . . . . . . . . . . . . . . . . . 61        
     END OF  FILE causes immediate  termination of the  current input          
     file and resumption of the higher-level file if any, or termina-          
     tion of processing if none.                                               

 .EL line  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62        
     ELSE causes an input line to be conditionally included depending          
     on the truth value of a previous IF control word.                         

 .EM <YES|NO|OFFNO>  . . . . . . . . . . . . . . . . . . . . . . . . 63        
     EMPTY PAGE controls print suppression of entirely empty pages.            

 .EM .macro <args> . . . . . . . . . . . . . . . . . . . . . . . . . 63        
     EXECUTE MACRO  treats the operand line  as a macro name  even if          
     macro substitution is off.                                                

 .EQ <ON|OFF|line|SET options> . . . . . . . . . . . . . . . . . . . 64        
     EQUATION marks the input that is to be processed as a formula.            

 .ER <n|*> <line>  . . . . . . . . . . . . . . . . . . . . . . . . . 65        
     ERROR  sets  a program  return  code  and/or displays  an  error          
     message.                                                                  

 .FB <BEGIN|END <0|w>>                                                         
     <DUMP <n>>  . . . . . . . . . . . . . . . . . . . . . . . . . . 66        
     FLOATING BLOCK  allows the user  to enter  a block of  text that          
     will print later in the document.                                         

 .FK <BEGIN|END <0|w>>                                                         
     <DUMP <n>>  . . . . . . . . . . . . . . . . . . . . . . . . . . 67        
     FLOATING KEEP  enables the user  to enter  a block of  text that          
     will print together immediately or at the top of the next page.           

 .FM <1|v|+v|-v> . . . . . . . . . . . . . . . . . . . . . . . .  68  *        
     FOOTING MARGIN specifies  the number of blank lines  that are to          
     be left  between the  bottom of formatted  text and  any footing          
     line.                                                                     

 .FN <BEGIN|END>                                                               
     <THRESH ON|OFF|v>                                                         
     <SET n>                                                                   
     <SET n /left/centre/right//>                                              
     <SUP BEGIN|END|n> . . . . . . . . . . . . . . . . . . . . . . . 68        
     FOOTNOTE  allows the  user  to enter  a  footnote  that will  be          
     printed at the end of the current page.                                   

 .FO <ON|OFF|Left|Right|Centre|INSIDE|OUTSIDE|HALF>  . . . . . .  70  *        
     FORMAT combines the effect of CONCATENATE and JUSTIFY.                    

 .FS <1|n|+n|-n> . . . . . . . . . . . . . . . . . . . . . . . .  71  *        
     FOOTING  SPACE  specifies the  number  of  footing lines  to  be          
     printed at the bottom of both even- and odd-numbered pages.               


                                - 212 -                                        
                                                                               
 Appendix J                 Control Word Summary, in Alphabetical Order        


 .GA tagname|* attname|* <opA> <opV> . . . . . . . . . . . . . . . . 71        
     GML ATTRIBUTE defines an attribute of a GML tag.   Multiple uses          
     of the control word are needed to define the list of values that          
     this attribute accepts.                                                   

 .GO <ident|n|+n|-n> . . . . . . . . . . . . . . . . . . . . . . . . 74        
     GOTO specifies that the next input  record is to be selected out          
     of normal sequence.                                                       

 .GT tagname ADD macro <tagopts> . . . . . . . . . . . . . . . . . . 75        
     tagname CHAnge macro                                                      
     tagname OFF|ON                                                            
     tagname|* DELete|PRint                                                    
     GML TAG defines a GML tag.                                                

 .HI <0|h|+h|-h|ON|OFF>  . . . . . . . . . . . . . . . . . . . .  79  *        
     HANGING INDENT specifies an offset  of additional spaces in each          
     line of a paragraph after the first.                                      

 .HL <0|n> line  . . . . . . . . . . . . . . . . . . . . . . . .  80  *        
     HEADING LEVEL  adds a level  "n" entry  to the current  Table of          
     Contents.                                                                 

 .HM <1|v|+v|-v> . . . . . . . . . . . . . . . . . . . . . . . .  81  *        
     HEADING MARGIN specifies  the number of blank lines  that are to          
     be left between the heading line and the first line of text.              

 .HN <EVEN|ODD> <BEGIN|END>                                                    
     <EVEN|ODD> <PURGE|DUMP> . . . . . . . . . . . . . . . . . . . . 81        
     HEADNOTE defines a block of formatted  text to appear at the top          
     of all pages.                                                             

 .HS <1|n|+n|-n> . . . . . . . . . . . . . . . . . . . . . . . .  82  *        
     HEADING  SPACE  specifies the  number  of  heading lines  to  be          
     printed at the top of both even- and odd-numbered pages.                  

 .HW text-line . . . . . . . . . . . . . . . . . . . . . . . . . . . 83        
     HYPHENATE WORD  allows a user  to specify text  with conditional          
     hyphenation break points.                                                 

 .HY parameters  . . . . . . . . . . . . . . . . . . . . . . . . . . 84        
     HYPHENATE is used to set the automatic hyphenation function,  to          
     set  the level  of hyphenation  required and  to manipulate  the          
     Hyphenation Exception Dictionary.                                         

 .Hn line  . . . . . . . . . . . . . . . . . . . . . . . . . . .  87  *        
     HEADING LEVEL  adds a level  "n" entry  to the current  Table of          
     Contents.  The value of "n" may range from 0 to 9.                        

 .IE <H character>                                                             
     <1|2|3 <string>>  . . . . . . . . . . . . . . . . . . . . . . . 88        
     INDEX  ENTRY controls  the formatting  of the  entries for  each          
     level of headers in an index structure.                                   


                                - 213 -                                        
                                                                               
 Control Word Summary, in Alphabetical Order                 Appendix J        


 .IF <<'S1' op 'S2'|n1 op n2> <line>>  . . . . . . . . . . . . . . . 89        
     IF  sets a  truth value  to determine  processing of  subsequent          
     input lines.                                                              

 .IL <0|h|+h|-h> . . . . . . . . . . . . . . . . . . . . . . . .  91  *        
     INDENT LINE  forces the  next output line  to start  a specified          
     number of  columns to  the right  of the  current indent  and/or          
     offset.                                                                   

 .IM Filename <args> . . . . . . . . . . . . . . . . . . . . . . . . 91        
     IMBED is  used to insert the  contents of a specified  file into          
     the printout of another file.                                             

 .IN <0|h|+h|-h|*> <0|i|+i|-i|*> . . . . . . . . . . . . . . . .  92  *        
     INDENT  causes the  logical  left and/or  right  margins of  the          
     printout to be indented a specified number of spaces.                     

 .IR <0|h|+h|-h> . . . . . . . . . . . . . . . . . . . . . . . .  93  *        
     INDENT RIGHT causes the logical right  margin of the printout to          
     be indented.                                                              

 .IT <ON|OFF>                                                                  
     <MAC|SUB|GML|ALL> <ON|OFF>                                                
     <SNAP>  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94        
     INPUT TRACE displays trace information about the input records.           

 .IX <1|n> 'S1' <'S2' <'S3'>> <<.> <ref>>                                      
     <1|n> . <DUMP|PURGE>  . . . . . . . . . . . . . . . . . . . . . 95        
     INDEX  builds an  index structure  with  up to  three levels  of          
     headers with references, or prints the index structure.                   

 .JU <ON|OFF|Left|Right|Centre|INSIDE|OUTSIDE|HALF>  . . . . . .  97  *        
     JUSTIFY pads output lines with extra blanks to the right margin.          

 .LA <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . .  98  *        
     LEFT ADJUST  causes the next input  line to be left  adjusted in          
     the output line, as if under FORMAT NO.                                   

 .LB <line>  . . . . . . . . . . . . . . . . . . . . . . . . . .  98  *        
     LEADING BLANK is generated to create a break for each input line          
     that starts with a blank.                                                 

 .LE <ON|OFF>  . . . . . . . . . . . . . . . . . . . . . . . . . . . 99        
     LEADING SPACE allows printing of .SP blank lines at the top of a          
     page or column.                                                           

 .LI <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . . .  100        
     LITERAL causes  following input  records to  be treated  as text          
     lines even if they begin with the control word indicator.                 

 .LL <60|h|+h|-h>  . . . . . . . . . . . . . . . . . . . . . . . 101  *        
     LINE LENGTH specifies  the number of horizontal  character posi-          
     tions which are to be printed in subsequent output lines.                 


                                - 214 -                                        
                                                                               
 Appendix J                 Control Word Summary, in Alphabetical Order        


 .LN <v|+v|-v> . . . . . . . . . . . . . . . . . . . . . . . . . 101  *        
     LINE  IMMEDIATE causes  output  to resume  at  an absolute  line          
     number down on the current page or up on the next page.                   

 .LS <0|n|+n|-n|ON|OFF>  . . . . . . . . . . . . . . . . . . . . 102  *        
     LINE  SPACING causes  "n" conditional  SKIPs  after each  output          
     line.                                                                     

 .LT <line>  . . . . . . . . . . . . . . . . . . . . . . . . . . 103  *        
     LEADING TAB is  generated to create a break for  each input line          
     that starts with a tab character.                                         

 .MC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104  *        
     MULTIPLE COLUMN restores  multi-column output after it  has been          
     suppressed by .SC (SINGLE COLUMN).                                        

 .ME <line>  . . . . . . . . . . . . . . . . . . . . . . . . . . .  104        
     MACRO EXIT  causes immediate  termination of  the current  input          
     file.  The higher-level file may be given a line to execute.              

 .MS <ON|OFF>  . . . . . . . . . . . . . . . . . . . . . . . . . .  105        
     MACRO SUBSTITUTION prevents user-defined  macros (see .DM)  from          
     being invoked.                                                            

 .NF <ON|OFF>  . . . . . . . . . . . . . . . . . . . . . . . . . 105  *        
     See .FO NO.                                                               

 .NL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  106        
     NULL LINE  is generated each time  a null input line  is encoun-          
     tered.                                                                    

 .OC <information> . . . . . . . . . . . . . . . . . . . . . . . .  106        
     OUTPUT  COMMENT  causes  one  line of  unformatted  text  to  be          
     inserted into the formatted output document as a comment.                 

 .OF <0|h|+h|-h <ON|OFF>>  . . . . . . . . . . . . . . . . . . . 107  *        
     OFFSET causes all but  the first line of a section  to be offset          
     to the right of the current indent.                                       

 .OJ <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . . 108  *        
     OUT JUSTIFY  causes the  specified lines  to be  aligned to  the          
     outside of the page.                                                      

 .OO <1|n|ON <string>> . . . . . . . . . . . . . . . . . . . . . .  109        
     <OFF|DELETE>                                                              
     OUTPUT OVERLAY causes  output lines to be overlaid  with a user-          
     defined string.                                                           

 .OV <1|n|ON <string>>                                                         
     <OFF|DELETE>  . . . . . . . . . . . . . . . . . . . . . . . .  110        
     OVERLAY causes following input text lines  to be overlaid by the          
     contents of the text line following this command.                         


                                                                               
                                - 215 -                                        
                                                                               
 Control Word Summary, in Alphabetical Order                 Appendix J        


 .PA <n|+n|-n <m|+m|-m>> . . . . . . . . . . . . . . . . . . . . 111  *        
     <NOSTART>                                                                 
     <ODD|EVEN>                                                                
     PAGE EJECT causes an output page eject and optionally resets the          
     page number.                                                              

 .PE <1|n|ON|OFF|DELETE> . . . . . . . . . . . . . . . . . . . . .  112        
     PERFORM causes repeated execution of the next input line.                 

 .PF       . . . . . . . . . . . . . . . . . . . . . . . . . . . .  113        
     PREVIOUS FONT returns following text to  the font saved by Begin          
     Font.                                                                     

 .PH <character definitions> . . . . . . . . . . . . . . . . . . .  113        
     PHOTO  FONT defines  character  sets  and font  identifiers  for          
     output devices with multiple font capabilities.                           

 .PL <66|v|+v|-v>  . . . . . . . . . . . . . . . . . . . . . . . 118  *        
     PAGE LENGTH specifies  the physical size of  the physical output          
     page.                                                                     

 .PM <0|h1|+h1|-h1 <0|h2|+h2|-h2>> <NOBIND>  . . . . . . . . . . .  119        
     PAGE MARGIN positions the left margin of the formatted text with          
     respect to the physical left margin of the output device.                 

 .PN <ON|OFF|OFFNO>  . . . . . . . . . . . . . . . . . . . . . . .  120        
     <ARabic|ROman|ALpha>                                                      
     <PREFIX|SUFFIX <string>>                                                  
     <FRAC|NORM>                                                               
     <n|+n|-n <m|+m|-m>>                                                       
     PAGE NUMBER controls the setting, incrementing and formatting of          
     page numbers.                                                             

 .PP <line>  . . . . . . . . . . . . . . . . . . . . . . . . . . 121  *        
     PARAGRAPH START defines the beginning of a new paragraph.                 

 .PS <%|ON|OFF|character>  . . . . . . . . . . . . . . . . . . . .  121        
     PAGE NUMBER SYMBOL defines the  character in running titles that          
     will be replaced on output by the current page-number value.              

 .PT <line>  . . . . . . . . . . . . . . . . . . . . . . . . . . .  122        
     PUT  TABLE OF  CONTENTS  adds  an input  line  to  the Table  of          
     Contents.                                                                 

 .PU <1|n> <line>  . . . . . . . . . . . . . . . . . . . . . . . .  123        
     PUT WORKFILE writes a record to an output file.                           

 .PW <0|h|+h|-h> . . . . . . . . . . . . . . . . . . . . . . . . .  123        
     PAGE WIDTH  defines the physical  width of the  formatted output          
     paper.                                                                    

 .QQ <YES|NO>  . . . . . . . . . . . . . . . . . . . . . . . . . 124  *        
     QUIT  QUICKLY causes  immediate termination  of  all input-  and          
     output-file processing.                                                   

                                - 216 -                                        
                                                                               
 Appendix J                 Control Word Summary, in Alphabetical Order        


 .QU <YES|NO>  . . . . . . . . . . . . . . . . . . . . . . . . . 125  *        
     QUIT causes immediate termination of all input-file processing.           

 .RC n <char|'string'>                                                         
     n <ON|OFF|ON/OFF>                                                         
     * <char|'string'>                                                         
     SET <LEFT|RIGHT>  . . . . . . . . . . . . . . . . . . . . . .  125        
     REVISION CODE allows  selected input text lines to  be marked in          
     the page margins with a  user-defined revision code character or          
     string.                                                                   

 .RD <1|n> . . . . . . . . . . . . . . . . . . . . . . . . . . . .  127        
     READ TERMINAL reads a line typed at the terminal.                         

 .RE <envname> . . . . . . . . . . . . . . . . . . . . . . . . . .  128        
     RESTORE ENVIRONMENT  restores the  formatting environment  saved          
     with a .SA (Save Environment).                                            

 .RI <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . . 129  *        
     RIGHT ADJUST causes the next input  line to be right-adjusted in          
     the output line.                                                          

 .RM <*|n|name <m|SAVE|NOSAVE> <SAVE|NOSAVE>>                                  
     <*|n|name DELETE>                                                         
     <DELETE>  . . . . . . . . . . . . . . . . . . . . . . . . . .  129        
     REMOTE defines  one or  more input  lines to  be processed  at a          
     specific place on the current page, the next page, or subsequent          
     pages automatically,   or to be  used as a  user-defined control          
     word.                                                                     

 .RT <TOP|BOTTOM>                                                              
     <ALL|EVEN|ODD>                                                            
     <NOFILL|FILL>                                                             
     <1|n> /left/centre/right/ . . . . . . . . . . . . . . . . . .  131        
     RUNNING TITLE defines  a running title to be printed  at the top          
     and/or bottom of even- and/or odd-numbered pages.                         

 .RV symbol <TERM|FILE>  . . . . . . . . . . . . . . . . . . . . .  132        
     READ VARIABLE  allows the user  to set  the value of  a variable          
     symbol from the terminal or from the input file.                          

 .SA <envname> . . . . . . . . . . . . . . . . . . . . . . . . . .  133        
     SAVE ENVIRONMENT saves the current  formatting environment to be          
     restored later with a .RE (Restore Environment).                          

 .SC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135  *        
     SINGLE COLUMN temporarily suppresses multi-column output.                 

 .SE symbol = <character string> . . . . . . . . . . . . . . . . .  135        
            = <numeric expression>                                             
            <OFF>                                                              
     SET SYMBOL assigns a character or  numeric value to a set symbol          
     (see also .SR).                                                           


                                - 217 -                                        
                                                                               
 Control Word Summary, in Alphabetical Order                 Appendix J        


 .SK <1|v> <A> <C> . . . . . . . . . . . . . . . . . . . . . . . 136  *        
     SKIP generates a specified number of blank lines before the next          
     output line, except at the top of a column or page.                       

 .SL <v|+v|-v> . . . . . . . . . . . . . . . . . . . . . . . . . 137  *        
     SET LEADING  specifies the vertical  spacing,  from  baseline to          
     baseline for subsequent output, for some devices only.                    

 .SP <1|v> <A> <C> . . . . . . . . . . . . . . . . . . . . . . . 138  *        
     SPACE  generates  a  specific  number   of  blank  lines  before          
     processing continues.                                                     

 .SR symbol = <character string> . . . . . . . . . . . . . . . . .  138        
            = <numeric expression>                                             
            <OFF>                                                              
     SET REFERENCE allows  the user to assign a  character or numeric          
     value to a set symbol (see also .SE).                                     

 .SS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141  *        
     SINGLE SPACE  reverts to single-spaced  output after  a previous          
     .DS or .LS control word.                                                  

 .SU <1|n|ON|OFF|line>                                                         
     <UPPER|NOUPPER> . . . . . . . . . . . . . . . . . . . . . . .  141        
     SUBSTITUTE SYMBOL causes subsequent input text and control lines          
     to be reformatted  by substituting the current  values of speci-          
     fied set symbols  in the line and  to be processed as  if it had          
     been in the input.                                                        

 .SV <ON|OFF>  . . . . . . . . . . . . . . . . . . . . . . . . . .  143        
     SPELLING VERIFICATION controls  which input text is  to be veri-          
     fied for correct spelling if the SPELLCHK option has been speci-          
     fied.                                                                     

 .SX <F|C> /left/fill/right/ . . . . . . . . . . . . . . . . . . 145  *        
     SPLIT  TEXT will  split  text with  a  fill  string between  the          
     current left and right indents.                                           

 .SY <line>  . . . . . . . . . . . . . . . . . . . . . . . . . . .  146        
     SYSTEM passes a command to the  host operating system for execu-          
     tion.                                                                     

 .TB <n1 n2 n3 ...>                                                            
     <<'string'|char/>n<L|R|C|'char> ...>                                      
     <SET <char>>  . . . . . . . . . . . . . . . . . . . . . . . 147  *        
     TAB SETTING  specifies tab  stops to be  used in  converting tab          
     characters in  the input  into the  appropriate number  of hori-          
     zontal spaces or fill string.                                             

 .TC <1|n|* <CONTENTS|line|/>>                                                 
     <ADD <m ... >>                                                            
     <PURGE> . . . . . . . . . . . . . . . . . . . . . . . . . . 150  *        
     TABLE  OF CONTENTS  formats and  prints the  specified Table  of          
     Contents.                                                                 

                                - 218 -                                        
                                                                               
 Appendix J                 Control Word Summary, in Alphabetical Order        


 .TE <1|n|ON>  . . . . . . . . . . . . . . . . . . . . . . . . . .  154        
     TERMINAL INPUT  allows the user to  enter control words  or text          
     lines during processing of the input file.                                

 .TH line  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  155        
     THEN causes an input line to be conditionally included depending          
     on the truth value of a previous IF control word.                         

 .TI <s <s|t>>                                                                 
     <<s1 t1> <s2 t2> ...>                                                     
     <SET <char>>  . . . . . . . . . . . . . . . . . . . . . . . .  156        
     TRANSLATE ON  INPUT allows the user  to specify an  escape char-          
     acter and the contents of a translate  table to be used on input          
     lines.                                                                    

 .TM <6|v|+v|-v> . . . . . . . . . . . . . . . . . . . . . . . . 157  *        
     TOP MARGIN  specifies the number of  lines to be  placed between          
     the physical top  of the output page  and the first line  of the          
     text area.                                                                

 .TP SET <'string'>h <Left>  . . . . . . . . . . . . . . . . . . 158  *        
     ADD       <f/>h <Right>                                                   
     CLR           h <Centre>                                                  
     DEL           h <CHAR <c|'c'>                                             
     TAB POSITION  defines and  modifies tab  stops to  be used  when          
     replacing input  tab characters  with an  appropriate number  of          
     horizontal spaces or a fill string.                                       

 .TR <s <s|t>>.                                                                
     <<s1 t1> <s2 t2> ...> . . . . . . . . . . . . . . . . . . . .  161        
     TRANSLATE ON OUTPUT  allows the user to specify  the contents of          
     the translate table used for output.                                      

 .TT <1|n> </left/centre/right/> . . . . . . . . . . . . . . . . .  162        
     TOP TITLE defines  a running title to  be printed at the  top of          
     both even- and odd-numbered pages.                                        

 .TU <s <s|t>>                                                                 
     <<s1 t1> <s2 t2> ...> . . . . . . . . . . . . . . . . . . . .  163        
     TRANSLATE UPPERCASE allows  the user to specify  the contents of          
     the translate table used for uppercase characters.                        

 .TY <information> . . . . . . . . . . . . . . . . . . . . . . . .  164        
     TYPE ON TERMINAL displays a line of information at the terminal.          

 .UC <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . . .  165        
     UNDERSCORE AND  CAPITALIZE underscores and capitalizes  an input          
     line.                                                                     

 .UD <<ON|OFF> c1 <c2 ... >>                                                   
     <SET|INCLUDE|IGNORE> char . . . . . . . . . . . . . . . . . .  165        
     UNDERSCORE DEFINITION  specifies the characters to  be subjected          
     to emphasis by control words such as .BD, .BI, .UC, and .US.              


                                - 219 -                                        
                                                                               
 Control Word Summary, in Alphabetical Order                 Appendix J        


 .UN <0|h|+h|-h> . . . . . . . . . . . . . . . . . . . . . . . . 167  *        
     UNDENT forces  the next output line  to start "h" spaces  to the          
     left of the current INDENT.                                               

 .UP <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . . .  167        
     UPPERCASE capitalizes an input line.                                      

 .US <1|n|ON|OFF|line> . . . . . . . . . . . . . . . . . . . . . .  168        
     UNDERSCORE underscores an input line.                                     

 .UW word ...  . . . . . . . . . . . . . . . . . . . . . . . . . .  169        
     UNVERIFIED WORD  is generated  for each  input text  record that          
     contains words that are not known to the Spelling Verifier.               

 .WD <ON|OFF>  . . . . . . . . . . . . . . . . . . . . . . . . . .  170        
     WIDOW prevents  the first  and last  lines of  a paragraph  from          
     being split  from the rest of  the paragraph across a  column or          
     page boundary.                                                            


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               


                                                                               

                                - 220 -                                        
