home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / opllint / MANUAL.TXT next >
Text File  |  1992-09-16  |  77KB  |  2,283 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                       OPLLINT
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                                      USER GUIDE
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.                       ADVANCED CHECKING UTILITY FOR OPL PROGRAMS
  30.  
  31.  
  32.  
  33.                                      Version 2.20
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.             Copyright PSION UK plc 1990,1991,1992.
  48.  
  49.             The information contained within this document is the property
  50.             of PSION UK PLC and may not be copied or disclosed in whole or
  51.             part, except with the prior permission of PSION UK PLC.
  52.  
  53.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  54.        ----------------------------------------------------------------------
  55.             Psion endeavours  to  ensure  that  the  information  in  this
  56.             document is  correct, but  does not  accept liability  for any
  57.             omissions or errors.
  58.  
  59.             Specifications  and   statements  as  to  performance  in  the
  60.             document are estimates only, provided for guidance.
  61.  
  62.             Statements in  the document  are not  part of  a  contract  or
  63.             product licence  insofar  as  they  are  incorporated  into  a
  64.             contract or  licence  by  express  reference.  Issue  of  this
  65.             document does  not entitle  the recipient  to access or use of
  66.             the products  described, such  access or  use being subject to
  67.             separate contracts or licences.
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.                                   OPLLINT User Guide
  77.  
  78.                                      Issue: V1.20
  79.                               Date: 15th September 1992
  80.  
  81.                         Copyright PSION UK plc 1990,1991,1992.
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.             Trademarks
  99.  
  100.             Psion and  the Psion  logo are  registered  trademarks.  Psion
  101.             Mobile Computer,  Psion MC,  Psion Organiser  II, Datapak  and
  102.             Rampak are trademarks of PSION plc.
  103.  
  104.             IBM PC,  IBM XT  and IBM  AT are  trademarks of  International
  105.             Business Machines Corp.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.        ----------------------------------------------------------------------
  113.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              ii
  114.  
  115.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  116.        ----------------------------------------------------------------------
  117.  
  118.  
  119.             CONTENTS
  120.  
  121.  
  122.  
  123.             1   INTRODUCTION                                             1
  124.               1.1   WHAT IS A LINT?                                      1
  125.               1.2   WHY DOES OPL NEED A LINT?                            1
  126.  
  127.             2   WHAT OPLLINT CHECKS FOR                                  2
  128.               2.1   TYPES OF OPL                                         2
  129.               2.2   CHECKS ON VARIABLES                                  2
  130.               2.3   FILE RECORD FIELDS                                   3
  131.               2.4   PROCEDURE CALL CHECKS                                3
  132.               2.5   REDUNDANCY CHECKS                                    4
  133.               2.6   PROGRAM EFFICIENCY                                   4
  134.  
  135.             3   INSTALLING OPLLINT                                       5
  136.  
  137.             4   USING OPLLINT                                            6
  138.               4.1   INVOKING OPLLINT                                     6
  139.               4.2   GETTING THE HELP SCREEN                              6
  140.               4.3   INPUT FILES, -i FLAG                                 6
  141.                 4.3.1   Using An OLL Input File                          7
  142.                 4.3.2   Using A BLDPACK Input File                       7
  143.                 4.3.3   Using An MC-OPL, OPL/g or OPL/w Module           8
  144.               4.4   SELECTING OPL OR PPO FILES: -f FLAG                  8
  145.               4.5   SETTING OPL PATHS: -d FLAG                           8
  146.               4.6   HOW OPLLINT PROCESSES FILES                          8
  147.               4.7   PRODUCE OUTPUT BLD FILES: -b FLAG                    9
  148.               4.8   SET A NEW ODB THRESHOLD: -T FLAG                     9
  149.               4.9   INCLUDE A LANG EXTENSION FILE: -l FLAG              10
  150.               4.10   SET A LANG EXTENSION PATH: -s FLAG                 10
  151.               4.11   DISABLE/ENABLE WARNINGS: -w FLAG                   10
  152.               4.12   SPECIFY A START POINT: -r FLAG                     11
  153.               4.13   PRODUCE A POPULARITY LIST: -p FLAG                 11
  154.               4.14   RIGOUROUS GLOBAL CHECKS: -g FLAG                   11
  155.               4.15   SPECIFY THE TARGET MACHINE: -t FLAG                12
  156.                 4.15.1   Specific Target Machines                       12
  157.                 4.15.2   Finding Compatible Machines                    12
  158.                 4.15.3   Number Conflict When Using The -t? Flag        13
  159.               4.16   CALLING STRUCTURE FLAGS: -c AND -o                 13
  160.               4.17   PREPROCESSOR FLAGS: -D, -I, -U                     14
  161.               4.18   SOME EXAMPLE COMMAND LINES                         14
  162.               4.19   THE OL ENVIRONMENT VARIABLE                        14
  163.               4.20   OPLLINT FLAG SUMMARY                               15
  164.  
  165.             5   ERRORS AND WARNINGS                                     17
  166.               5.1   ERROR MESSAGES                                      17
  167.               5.2   WARNINGS                                            25
  168.               5.3   EXIT CODES                                          27
  169.  
  170.             6   LANGUAGE EXTENSION FILES                                28
  171.               6.1   STANDARD FILES                                      28
  172.               6.2   MAKING YOUR OWN LANGUAGE EXTENSION FILES            29
  173.  
  174.        ----------------------------------------------------------------------
  175.        COPYRIGHT, PSION UK PLC 1990,1991,1992                             iii
  176.  
  177.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  178.        ----------------------------------------------------------------------
  179.             7   ORDERING PROCEDURES                                     30
  180.  
  181.             8   CUSTOMISING OPLLINT                                     31
  182.  
  183.             9   THE PREPROCESSOR                                        32
  184.  
  185.             10   FEATURES NEW TO V2.00                                  33
  186.               10.1   CHANGES FROM V1.12 TO V2.00                        33
  187.               10.2   FEATURES ADDED TO OPLLINT V2.00                    33
  188.               10.3   FEATURES ADDED TO OPLLINT V2.10                    33
  189.               10.4   FEATURES ADDED TO OPLLINT V2.20                    33
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.        ----------------------------------------------------------------------
  237.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              iv
  238.  
  239.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  240.        ----------------------------------------------------------------------
  241.  
  242.  
  243.  
  244.           1   INTRODUCTION
  245.  
  246.  
  247.  
  248.           1.1   WHAT IS A LINT?
  249.  
  250.             LINT was  a program  written to  run on  UNIX systems.  It was
  251.             developed to  help debug  programs written  in  C.  LINT  read
  252.             through the sources for a program and performed a whole set of
  253.             checks on the code, reporting potential errors.
  254.  
  255.  
  256.  
  257.           1.2   WHY DOES OPL NEED A LINT?
  258.  
  259.             When  an   OPL  procedure  is  translated  error  checking  is
  260.             performed only on that procedure. For instance when a variable
  261.             name is  encountered: if it is not defined as a local variable
  262.             then it  is assumed  to be a global variable. The variable may
  263.             simply not exist or be spelt wrong. Such an error will only be
  264.             found at  run time with an UNDEFINED EXTERNAL message. Similar
  265.             errors can occur with procedure calls.
  266.  
  267.             The only  way of  fully testing the code is by carrying out an
  268.             exhaustive test  of every  line of  code in the program. Where
  269.             there are  several errors  in different procedures it may take
  270.             several translate-build cycles to complete the testing.
  271.  
  272.             These problems  are all  syntax errors  that can  be  detected
  273.             before the  program is  run on  the  target  machine.  OPLLINT
  274.             carries out  a variety  of checks  on an entire OPL system. It
  275.             provides early  detection of  errors and significantly reduces
  276.             program debugging and test time.
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.        ----------------------------------------------------------------------
  299.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               1
  300.  
  301.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  302.        ----------------------------------------------------------------------
  303.           2   WHAT OPLLINT CHECKS FOR
  304.  
  305.  
  306.  
  307.           2.1   TYPES OF OPL
  308.  
  309.             Psion produces two type of machines:
  310.  
  311.                þ    The  Organiser  II.    Several  models  are  available
  312.                     including the XP, CM, LZ and LZ64.
  313.  
  314.                þ    SIBO machines.   SIBO  is a  generic  name  for  Psion
  315.                     machines that  run the  Psion EPOC  operating  system.
  316.                     The following  machines are  all SIBO machines: MC200,
  317.                     MC400, HC100, HC110, HC120 and the Series 3.
  318.  
  319.             There are currently 5 variants of the OPL language:
  320.  
  321.                þ    XP-OPL  running   on  Organiser   IIs  (Model  XP  and
  322.                     compatibles).
  323.  
  324.                þ    LZ-OPL  running   on  Organiser   IIs  (Model  LZ  and
  325.                     compatibles). Contains some enhancements to XP-OPL.
  326.  
  327.                þ    MC-OPL running  on  older  SIBO  machines  (MC200  and
  328.                     MC400).  Contains many enhancements over LZ-OPL.
  329.  
  330.                þ    OPL/g running  on recent  SIBO machines (MC200, MC400,
  331.                     HC100, HC110,  HC120).    OPL/g  includes  all  MC-OPL
  332.                     enhancements plus commands to draw graphics.
  333.  
  334.                þ    OPL/w running  currently only  on the  Series 3. OPL/w
  335.                     includes  all   OPL/g  enhancements   plus  new   WIMP
  336.                     commands.
  337.  
  338.             OPLLINT will  work with  all these type of OPL. In addition it
  339.             will warn  you if  you are  using a  variable name  that is  a
  340.             keyword in  another type  of OPL (thus allowing you to produce
  341.             portable OPL).   OPLLINT will also determine what types of OPL
  342.             a program is compatible with.
  343.  
  344.  
  345.  
  346.           2.2   CHECKS ON VARIABLES
  347.  
  348.             OPL has  dynamic scope.  There may  be  many  variables  in  a
  349.             program. Not  all these variables can be accessed at once. The
  350.             variables that  the program  can actually  access at any given
  351.             point are said to be "in scope" at that point.
  352.  
  353.             Thus if  a variable  is in scope the program can reference it.
  354.             If the  variable is  not in  scope the  program  will  not  be
  355.             allowed to reference it.
  356.  
  357.  
  358.  
  359.  
  360.        ----------------------------------------------------------------------
  361.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               2
  362.  
  363.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  364.        ----------------------------------------------------------------------
  365.             In an  OPL procedure  you can  define variables  as  LOCAL  or
  366.             GLOBAL. While you are inside a procedure all the variables you
  367.             defined in  it are  available to  you: they are in scope. When
  368.             you return  from the  procedure all of these variables will be
  369.             discarded: they will all go out of scope.
  370.  
  371.             The difference  between LOCAL and GLOBAL variables occurs when
  372.             a second  procedure is called from inside the first one. LOCAL
  373.             variables defined  in the first procedure are not available in
  374.             the second. However, the GLOBAL variables defined in the first
  375.             procedure ARE  in scope  in the  second  procedure.  The  same
  376.             applies for a third procedure called from the second.
  377.  
  378.             This means that the variables in scope in a function depend on
  379.             where the  function was called from. All the variables defined
  380.             as GLOBAL  in the  functions that  lead to this function being
  381.             called are in scope. This is how dynamic scope is defined.
  382.  
  383.             OPLLINT will  check that  all variables  used exist  as either
  384.             local variables or global variables that are in scope.
  385.  
  386.             OPLLINT will  also check  that a  global is  not in scope more
  387.             than once.  This would  happen if  for instance  a global  was
  388.             declared  with  the  same  name  in  two  procedures.  If  one
  389.             procedure called  the other  there would be two globals of the
  390.             same name in scope.
  391.  
  392.             Whilst this  is legal OPL code, it is bad programming practice
  393.             and could lead to obscure bugs that are difficult to detect.
  394.  
  395.  
  396.  
  397.           2.3   FILE RECORD FIELDS
  398.  
  399.             In OPL  file records  are treated as a set of variables with a
  400.             prefix (a,b,c  or d  and a  dot): one variable for each field.
  401.             These present a problem because the variables available depend
  402.             on the  file currently  open. OPLLINT  has no  way of  telling
  403.             which file  will be  open at  a given point in the program and
  404.             can perform  no checking on these variables. OPLLINT therefore
  405.             ignores them.
  406.  
  407.  
  408.  
  409.           2.4   PROCEDURE CALL CHECKS
  410.  
  411.             OPLLINT checks that when a procedure is used it is called with
  412.             the correct  number of  arguments and that each argument is of
  413.             the correct  type. A  type in  OPL is  either  an  integer,  a
  414.             floating point number or a string. For MC-OPL, OPL/g and OPL/w
  415.             a type can also be a long integer.
  416.  
  417.             OPLLINT will  not check  calls to built in OPL functions since
  418.             OPLTRAN (or  TRAN for the MC/HC) will report these errors. All
  419.             the  code   given  to  OPLLINT  must  have  been  successfully
  420.             translated.
  421.  
  422.        ----------------------------------------------------------------------
  423.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               3
  424.  
  425.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  426.        ----------------------------------------------------------------------
  427.             When a  procedure call  is found  the language  extensions are
  428.             checked first,  followed by  the OPL procedures defined in the
  429.             system. The  type and  number of arguments to an OPL procedure
  430.             must match  exactly the arguments listed when the procedure is
  431.             defined.
  432.  
  433.             Language  extensions  are  more  flexible.  They  can  have  a
  434.             variable numbers  of arguments and arguments of no fixed type.
  435.             Up to  16 files  listing language  extensions can be included.
  436.             See chapter 6 for more information on how to make these files.
  437.  
  438.             Language extensions  are used to define the arguments expected
  439.             by machine  code procedures  for XP-OPL and LZ-OPL and library
  440.             procedures for OPL on SIBO machines.
  441.  
  442.             Note that if you use the "call procedure by name" feature (the
  443.             @ operator  in OPL/g  and OPL/w)  OPLLINT will not perform any
  444.             checking on  the procedure  call since  it will not know which
  445.             procedure is being called.
  446.  
  447.  
  448.  
  449.           2.5   REDUNDANCY CHECKS
  450.  
  451.             OPLLINT will warn you if any variables or procedures have been
  452.             declared and  never used.  Although they do no harm they are a
  453.             waste of memory.
  454.  
  455.  
  456.  
  457.           2.6   PROGRAM EFFICIENCY
  458.  
  459.             On the  Organiser II  procedures at  the top  of a datapak are
  460.             found and  loaded  much  faster  than  those  lower  down  the
  461.             datapak. OPLLINT  keeps a  count of  the  number  of  times  a
  462.             procedure is  called. This  gives an  indication of how widely
  463.             used a procedure is.
  464.  
  465.             This information  can be used by OPLLINT to order the position
  466.             of procedures  on a  pack. The program can produce output .BLD
  467.             files that  can be  used by  BLDPACK to build the program pack
  468.             ordered in  this way  (for Organisers only). See chapter 7 for
  469.             more information about ordering procedures.
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.        ----------------------------------------------------------------------
  485.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               4
  486.  
  487.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  488.        ----------------------------------------------------------------------
  489.           3   INSTALLING OPLLINT
  490.  
  491.             The disk  supplied contains  the  OPLLINT  program  plus  some
  492.             language extension files. To copy the program onto your system
  493.             follow these instructions:
  494.  
  495.             Put the disk into drive A and type:
  496.  
  497.               MD c:\opllint
  498.  
  499.               XCOPY a:*.* c:\opllint /s /e
  500.  
  501.             OPLLINT is  now installed  into a  directory on your hard disk
  502.             called c:\opllint.  If  you  wish  to  use  another  drive  or
  503.             directory name  you will  need to  change the  supplied  batch
  504.             files that run OPLLINT for you.
  505.  
  506.             The two  batch files  that run  OPLLINT are  called OL.BAT and
  507.             OLR.BAT. In  order for  the  system  to  work  the  c:\opllint
  508.             directory has to be put into the system path.
  509.  
  510.             To do  this modify  your AUTOEXEC.BAT  file. This  is the file
  511.             that starts  up your  computer. Somewhere  in this  file there
  512.             will be  a PATH  command that  sets  the  paths  the  computer
  513.             searches when  you type  a  command.  You  will  need  to  add
  514.             c:\opllint to this path. For instance a path that searches the
  515.             c:\dos directory  as well  as the  opllint directory will look
  516.             like this:
  517.  
  518.               PATH=c:\dos;c:\opllint;
  519.  
  520.             Once you  have changed  AUTOEXEC.BAT and  rebooted your system
  521.             you will  be able  to run OPLLINT from anywhere on your system
  522.             by typing OL or OLR.
  523.  
  524.             For  more   information  on   the  PATH  command  and  writing
  525.             AUTOEXEC.BAT files see you MS-DOS manual.
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.        ----------------------------------------------------------------------
  547.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               5
  548.  
  549.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  550.        ----------------------------------------------------------------------
  551.           4   USING OPLLINT
  552.  
  553.  
  554.  
  555.           4.1   INVOKING OPLLINT
  556.  
  557.             OPLLINT is  started by typing OL at the MS-DOS prompt followed
  558.             by some  filenames and  flags. These  filenames and  flags are
  559.             covered in  the next  few sections. This is the syntax for the
  560.             command line:
  561.  
  562.               OL infile [infile1] [flags]
  563.  
  564.             OPLLINT can  produce a  lot of  errors. Sometimes  it is  more
  565.             convenient to  put these  in a  file that  you can refer to or
  566.             print out.  For this  reason we have provided a second command
  567.             called OLR.  Use it  in just  the same  way as  OL:  the  only
  568.             difference is  that all  the output  from OPLLINT  will be put
  569.             into a file called ERR.OUT which you can then inspect.
  570.  
  571.             OL and  OLR are  in fact batch files that run the main OPLLINT
  572.             program. These  batch files  can be  customised  to  your  own
  573.             requirements. For more information see chapter 8.
  574.  
  575.  
  576.  
  577.           4.2   GETTING THE HELP SCREEN
  578.  
  579.             If you type OL with no filenames or you include a ? or a -? on
  580.             the command  line you  will get  a help screen. It gives you a
  581.             summary of  the flags  used by  OPLLINT and  what they do. The
  582.             examples bellow will all produce a help screen:
  583.  
  584.               OL
  585.  
  586.               OL ?
  587.  
  588.               OL -?
  589.  
  590.  
  591.  
  592.           4.3   INPUT FILES, -i FLAG
  593.  
  594.             In order  to work  OPLLINT needs  a complete list of OPL files
  595.             used by your OPL system. You can give OPLLINT one or two input
  596.             filenames on  the command  line that  give this  list  of  OPL
  597.             files.
  598.  
  599.             Three different types of input file can be used by OPLLINT. To
  600.             show which  type of  file you  are using  you must  use the -i
  601.             flags shown below on the command line.
  602.  
  603.             If you  do not  add an extension to the filename you give, the
  604.             appropriate  one   (shown   in   brackets   below)   will   be
  605.             automatically added for you.
  606.  
  607.                -ioll     OPLLINT list file (.OLL)
  608.        ----------------------------------------------------------------------
  609.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               6
  610.  
  611.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  612.        ----------------------------------------------------------------------
  613.                -ibld     BLDPACK format file (.BLD)
  614.  
  615.                -imc MC-OPL, OPL/g  or OPL/w  Module (.OPL or .PPO : see -f
  616.             flag)
  617.  
  618.             NOTE: all  input files  used by OPLLINT are preprocessed: even
  619.             the BLD and OLL files. See section 9 for more details.
  620.  
  621.  
  622.  
  623.           4.3.1   Using An OLL Input File
  624.  
  625.             The simplest  option is  the OPLLINT  list file.  This is  the
  626.             default input  file type.  The file  is just  a  list  of  the
  627.             filenames (one  per line). The path given for each file is the
  628.             one that is used to access the file.
  629.  
  630.             Data files  and binary  files can  be included  in this list -
  631.             they are  not processed  by OPLLINT  but are  included in  the
  632.             output BLDPACK file if one is selected (see -b flag below).
  633.  
  634.             Filenames  given   in  this  file  may  contain  the  standard
  635.             wildcards *  and ?.  Thus to  include all  the OPL  files in a
  636.             directory called  c:\source you would add this line to the OLL
  637.             input file:
  638.  
  639.               c:\source\*.OPL
  640.  
  641.             Command line  options can  also be  given in  the OLL  file by
  642.             using the  special directive OL: followed by a list of command
  643.             line flags.  It is therefore possible to put all the flags you
  644.             normally type  in on  the command  line into the OLL file. For
  645.             example:
  646.  
  647.               OL: -rstart -lcomslink -p+
  648.  
  649.             Since the  OLL if the default input file it is possible to put
  650.             all the command line flags you need into the OLL file. Then to
  651.             run OPLLINT  you just  need to type OL followed by the name of
  652.             the OLL file:
  653.  
  654.               ol test
  655.  
  656.  
  657.  
  658.           4.3.2   Using A BLDPACK Input File
  659.  
  660.             The BLDPACK  file  is  slightly  more  complicated  since  the
  661.             BLDPACK file  actually lists  OB3 files.  OPLLINT assumes that
  662.             files with  an OB3  extension refer  to an  OPL (or PPO see -f
  663.             flag) file.  OPLLINT will  search for  this OPL/PPO file using
  664.             first the  path given in the BLDPACK file, and then the set of
  665.             paths given with the -d flag (see below).
  666.  
  667.             Files  with  other  extensions  are  not  processed,  but  the
  668.             filenames are used to produce the output BLDPACK files (see -b
  669.             flag below).
  670.        ----------------------------------------------------------------------
  671.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               7
  672.  
  673.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  674.        ----------------------------------------------------------------------
  675.           4.3.3   Using An MC-OPL, OPL/g or OPL/w Module
  676.  
  677.             The third  input file type applies only to OPL running on SIBO
  678.             machines: MC-OPL,  OPL/g or  OPL/w. The name of the top module
  679.             of the  program is  given. These modules contain commands that
  680.             load in  other modules  (the LOADM  command). OPLLINT can look
  681.             for these commands and build up its own list of files to use.
  682.  
  683.             For this  system to  work the  filename must  be  included  in
  684.             quotes after the LOADM command (if the filename is in a string
  685.             OPLLINT will not be able to extract it). Every module included
  686.             this way  will also  be searched  for LOADM commands and these
  687.             files will also be loaded. Duplicated filenames are ignored.
  688.  
  689.             The path given is stripped of the filename and the paths given
  690.             with the  -d flag (see below) are used to find the file. If no
  691.             extension is  given  the  extension  .OPL  or  .PPO  is  added
  692.             (depending on the -f flag - see below).
  693.  
  694.             Note that OPLLINT will given no error if the source file could
  695.             not be found.
  696.  
  697.  
  698.  
  699.           4.4   SELECTING OPL OR PPO FILES: -f FLAG
  700.  
  701.             The -f  flag simply selects the default extension added to OPL
  702.             files when  no extension  is given.  The default is to use the
  703.             extension OPL  (-fopl flag).  To use the PPO extension instead
  704.             put the -fppo flag on the command line.
  705.  
  706.  
  707.  
  708.           4.5   SETTING OPL PATHS: -d FLAG
  709.  
  710.             The -d  flag is used to specify a path for OPLLINT to find OPL
  711.             or PPO  files. Up  to 8  of these  paths can be specified. For
  712.             instance to  use the  paths c:\test\src1  and c:\test\src2 you
  713.             would add to the command line:
  714.  
  715.               -dc:\test\src1 -dc:\test\src2
  716.  
  717.  
  718.  
  719.           4.6   HOW OPLLINT PROCESSES FILES
  720.  
  721.             Having obtained  a list  of OPL or PPO files OPLLINT will read
  722.             through the  files in  two passes  and then check the scope of
  723.             variables in the system.
  724.  
  725.             OPLLINT does  not repeat  checks made  by OPLTRAN (or TRAN for
  726.             the MC/HC).  It is  assumed that  all the  OPL files have been
  727.             successfully translated.
  728.  
  729.  
  730.  
  731.  
  732.        ----------------------------------------------------------------------
  733.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               8
  734.  
  735.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  736.        ----------------------------------------------------------------------
  737.             OPLLINT works  in several  stages. If  errors occurred  in the
  738.             previous stage  the program  will not  continue. OPLLINT  will
  739.             report if  it completed successfully or if there were too many
  740.             errors for it to complete all its tests.
  741.  
  742.  
  743.  
  744.           4.7   PRODUCE OUTPUT BLD FILES: -b FLAG
  745.  
  746.             This flag  has no  meaning for  code running on SIBO machines.
  747.             The -b  flag is  used to  produce output  BLDPACK (.BLD) files
  748.             with the  OPL procedures in the most efficient order. The same
  749.             number of  input and output files are needed. Following the -b
  750.             is the filename of the output file. The extension .BLD will be
  751.             automatically added if one is not given. To produce the output
  752.             file OUT.BLD you would include this on the command line:
  753.  
  754.               -bout
  755.  
  756.             If you  are using  two input files, you need two output files.
  757.             The second  output file is given in the same way as the first.
  758.             For example to produce output files called ONE.BLD and TWO.BLD
  759.             you would use:
  760.  
  761.               -bone -btwo
  762.  
  763.             The order  of the  OB3 files  is determined  by the  number of
  764.             calls made  to each procedure. BIN files are put at the top of
  765.             the file.
  766.  
  767.             All other  files are  assumed to  be ODB  or data files. These
  768.             files will  be placed above all procedures that have less than
  769.             10 calls.  This value  of 10  is a  default and can be changed
  770.             with the -T flag (see below).
  771.  
  772.             See  chapter  7  for  more  information  on  the  ordering  of
  773.             procedures on a pack.
  774.  
  775.  
  776.  
  777.           4.8   SET A NEW ODB THRESHOLD: -T FLAG
  778.  
  779.             This flag  allows the  default threshold  value of  10 for ODB
  780.             files to  be replaced  with the value given after the -T flag.
  781.             This value  determines the position of ODB files in the output
  782.             BLD files if the -b flag is used.
  783.  
  784.             The ODB  files are  placed above  all the procedures that have
  785.             less than this popularity value. To set the threshold value to
  786.             23 you would use:
  787.  
  788.               -T23
  789.  
  790.             All the  procedures that  were only  called 23  or less  times
  791.             would be  placed below  the ODB  files  in  the  output  files
  792.             produced by the -b flag. See chapter 7 for more information.
  793.  
  794.        ----------------------------------------------------------------------
  795.        COPYRIGHT, PSION UK PLC 1990,1991,1992                               9
  796.  
  797.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  798.        ----------------------------------------------------------------------
  799.           4.9   INCLUDE A LANG EXTENSION FILE: -l FLAG
  800.  
  801.             Language extensions  can be used to define calls to procedures
  802.             to which  you have  no source  code (for  instance  a  set  of
  803.             library procedures provided by a third party).
  804.  
  805.             Language extensions are also used on Organisers to add special
  806.             features to  OPL. OPLLINT  needs to  know what arguments these
  807.             extensions expect so that it can check calls made to them.
  808.  
  809.             The -l flag must be followed by a filename. The extension .LEX
  810.             will be  automatically be  added to  this  name.  The  current
  811.             directory will  be searched  first. If  the file was not found
  812.             the standard  directories (set  with the -s flag) will then be
  813.             searched.
  814.  
  815.             The LEX  file should  contain a  list of  procedures with  the
  816.             arguments these  procedures expect  defined in  full.  OPLLINT
  817.             uses the  data in  this file  to check  the arguments given to
  818.             language extensions. For more information see chapter 6.
  819.  
  820.             Up to 16 language extension files can be included in this way.
  821.             For example  to include  the language extension files comslink
  822.             and myexts you would use:
  823.  
  824.               -lcomslink -lmyexts
  825.  
  826.  
  827.  
  828.           4.10   SET A LANG EXTENSION PATH: -s FLAG
  829.  
  830.             The -s  flag must  be followed  by a  path (not  ending  in  a
  831.             backslash). This path is used to find language extension files
  832.             not found in the current directory (see above).
  833.  
  834.             There are  several standard  language extension files provided
  835.             with OPLLINT  for various  devices like  the CommsLink  on the
  836.             Organiser as well as the definitions of the library procedures
  837.             used on  SIBO machines.  All these  files can  be put  in  one
  838.             directory and  the -s  flag can  be used to tell OPLLINT where
  839.             this  directory  is.  This  example  would  set  the  standard
  840.             directory to c:\std\langexts :
  841.  
  842.               -sc:\std\langexts
  843.  
  844.             The  batch  files  that  runs  OPLLINT,  OL.BAT  and  OLR.BAT,
  845.             actually use  this flag  to set the standard directory, so you
  846.             should only need to use it if you are customising the system.
  847.  
  848.  
  849.  
  850.           4.11   DISABLE/ENABLE WARNINGS: -w FLAG
  851.  
  852.             The -w  flag disables  or  enables  warning  messages.  It  is
  853.             advised that  warnings are left enabled since they can provide
  854.             a lot  of useful  information about potential problems with an
  855.             OPL program (they are on by default).
  856.        ----------------------------------------------------------------------
  857.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              10
  858.  
  859.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  860.        ----------------------------------------------------------------------
  861.             To disable warnings include this flag on the command line:
  862.  
  863.               -w-
  864.  
  865.             To enable them include this flag:
  866.  
  867.               -w+  or  -w
  868.  
  869.  
  870.  
  871.           4.12   SPECIFY A START POINT: -r FLAG
  872.  
  873.             The -r  flag is  followed by  the name  of a  procedure.  This
  874.             procedure name  is used  as a start point for the program. The
  875.             start points are needed for OPLLINT to be able to work through
  876.             the calling  structure of  the OPL program when it is checking
  877.             that globals are in scope.
  878.  
  879.             OPLLINT requires at least one start point to be specified.
  880.  
  881.             You may  give up  to 8  start points. For example to give boot
  882.             and debug as start points you would use:
  883.  
  884.               -rboot -rdebug
  885.  
  886.  
  887.  
  888.           4.13   PRODUCE A POPULARITY LIST: -p FLAG
  889.  
  890.             The flag  -p+ (or  -p) will produce an output file of the same
  891.             name as  the input  file but with the extension .POP. The list
  892.             will show  the number  of times  each procedure  is called and
  893.             will be  sorted into  order with  the most  popular  procedure
  894.             first.
  895.  
  896.             The flag  -p-  disables  the  production  of  this  list  (the
  897.             default).
  898.  
  899.  
  900.  
  901.           4.14   RIGOUROUS GLOBAL CHECKS: -g FLAG
  902.  
  903.             When this flag is set to -g- (the default) globals of the same
  904.             name can  be defined  in several  procedures. This  allows for
  905.             procedures that  need to  return several  variables to  do  so
  906.             using globals.
  907.  
  908.             If this  flag is set to -g+ (or -g) on the command line a more
  909.             rigourous approach  is taken:  globals can  only  be  declared
  910.             once. Globals with duplicated names will be flagged as errors.
  911.             This would  remove the  possibility of  mixing up which global
  912.             was being used. When this scheme is used the globals are often
  913.             all defined in the topmost procedure.
  914.  
  915.  
  916.  
  917.  
  918.        ----------------------------------------------------------------------
  919.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              11
  920.  
  921.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  922.        ----------------------------------------------------------------------
  923.           4.15   SPECIFY THE TARGET MACHINE: -t FLAG
  924.  
  925.  
  926.  
  927.           4.15.1   Specific Target Machines
  928.  
  929.             OPL works  on several  different machines.  The  keywords  and
  930.             syntax for  each machine  differ slightly.  You can use the -t
  931.             flag to specify which of the machines you wish it to run on:
  932.  
  933.                -txp      Organiser XP or CM
  934.  
  935.                -tlz      Organiser LZ or LZ64
  936.  
  937.                -tmc      Mobile Computer with standard OPL
  938.  
  939.                -tmcg          Mobile Computer with graphics (OPL/g)
  940.  
  941.                -tmcw          Mobile Computer with WIMP (OPL/w)
  942.  
  943.             OPLLINT will  warn you  of you are using a variable name which
  944.             is a keyword on another type of machine.
  945.  
  946.  
  947.  
  948.           4.15.2   Finding Compatible Machines
  949.  
  950.             If you  specify the  flag -t?  (which is  the default) OPLLINT
  951.             will work  out which  versions of  OPL your code is compatible
  952.             with. Note  that  you  cannot  use  variable  names  that  are
  953.             keywords in any of the OPL versions if you use this flag.
  954.  
  955.             For this  test OPLLINT  is only  looking  at  the  syntax  and
  956.             keywords you  are using  in  your  program.  This  feature  is
  957.             provided to  give you  an idea  of how portable the OPL itself
  958.             is. It does not guarantee that the program will run on all the
  959.             machines it  specifies, but  that the  OPL used  is consistent
  960.             with the version of OPL used on that particular machine.
  961.  
  962.             For instance  to port  a program  from an  Organiser to a SIBO
  963.             machine will  require putting  all the OPL procedures in a few
  964.             module files  and adding the PROC and ENDP keywords round each
  965.             procedure as well as allowing for different filing systems and
  966.             displays. Even  though the  OPL may  be compatible  with  both
  967.             machines it is unlikely to work without modification.
  968.  
  969.             The keywords  PROC, ENDP,  LOADM and  UNLOADM  are  considered
  970.             intrinsic to SIBO OPL modules and are ignored for these tests.
  971.             They would  have to be removed anyway if the system was ported
  972.             to an  Organiser version  of  OPL  that  does  not  use  these
  973.             keywords.
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.        ----------------------------------------------------------------------
  981.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              12
  982.  
  983.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  984.        ----------------------------------------------------------------------
  985.           4.15.3   Number Conflict When Using The -t? Flag
  986.  
  987.             When using  the -t?  flag OPLLINT converts all literal numbers
  988.             given in the program to types used by the Mobile Computer OPL.
  989.             Numbers that  are bigger  than the  integer limit  and smaller
  990.             than the long integer limit are taken to be long integers. The
  991.             OPL used by Organisers however does not support long integers,
  992.             so a conflict can occur. Here is an example:
  993.  
  994.               test:(32768)
  995.  
  996.             The number given is just bigger than the limit for an integer,
  997.             so OPLLINT  regards this  as a  long integer. If the procedure
  998.             test was  expecting a  floating point  value an error would be
  999.             produced since  a long  value cannot  be passed  to a floating
  1000.             point argument.
  1001.  
  1002.             To resolve this problem put a .0 on the end of the number: the
  1003.             number is then forced to a floating point value.
  1004.  
  1005.               test:(32768.0)
  1006.  
  1007.             This problem  does not occur when using the -txp or -tlz flags
  1008.             since OPLLINT  will only  convert numbers  to long integers if
  1009.             the Mobile Computer OPL is being used.
  1010.  
  1011.  
  1012.  
  1013.           4.16   CALLING STRUCTURE FLAGS: -c AND -o
  1014.  
  1015.             OPLLINT will  produce a printout of the calling structure used
  1016.             by the  OPL program.  To produce the calling structure include
  1017.             the flags  -o or  -o+ on  the command  line.  To  disable  the
  1018.             calling structure output put the flag -o- on the command line.
  1019.  
  1020.             Since the  calling structure  can be  nested up to many levels
  1021.             the output is split up into several output files. These output
  1022.             files can then be printed out and joined together to given the
  1023.             complete structure.
  1024.  
  1025.             The output files produced by OPLLINT use the name of the first
  1026.             input file  given on  the command  line. The  output files are
  1027.             given the extensions .P00 to .P15. Thus OPLLINT might produce,
  1028.             for a fairly complex program, two output files called TEST.P00
  1029.             and TEST.P01.
  1030.  
  1031.             The output  files are  split up  according to the size of your
  1032.             printer. The  default size  is 80  columns. If you have a wide
  1033.             carriage printer or are printing in condensed mode you can set
  1034.             the column  width with  the -c  flag. For  instance to set the
  1035.             width to 132 columns you would use:
  1036.  
  1037.               -c132
  1038.  
  1039.  
  1040.  
  1041.  
  1042.        ----------------------------------------------------------------------
  1043.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              13
  1044.  
  1045.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1046.        ----------------------------------------------------------------------
  1047.           4.17   PREPROCESSOR FLAGS: -D, -I, -U
  1048.  
  1049.             The -D  flag defines  a manifest  constant. If  an equal  sign
  1050.             follows the  constant name  then the text after the equal sign
  1051.             is used  as the  constants definition. If no text is given the
  1052.             constant is  defined to  be 1. Up to 16 -D flags can be put on
  1053.             the command line. Here are some examples:
  1054.  
  1055.               -DVERSION=V1.00 -DDEBUG
  1056.  
  1057.             The -U  flag undefines a previously defined constant. Up to 16
  1058.             -U flags can be put on the command line. For example:
  1059.  
  1060.               -UDEBUG -UVERSION
  1061.  
  1062.             The -I  flag sets  the paths  where the preprocessor looks for
  1063.             include files.  Up to  16 of  these paths  may be given on the
  1064.             command line. For example:
  1065.  
  1066.               -Ic:\test\include -Ic:\std\include
  1067.  
  1068.             These defines,  undefines and include paths are used for every
  1069.             preprocessed file  OPLLINT reads,  including the  BLD, OLL and
  1070.             language extension files. See section 9 for more details.
  1071.  
  1072.             The manifest constant _OPLLINT is defined by OPLLINT each time
  1073.             it runs.  This provides  a way  of inserting  OPLLINT specific
  1074.             code into a program.
  1075.  
  1076.  
  1077.  
  1078.           4.18   SOME EXAMPLE COMMAND LINES
  1079.  
  1080.               ol test -ioll -lext1 -lext2 -rboot
  1081.  
  1082.             This command  line tells  OPLLINT to  read the  file TEST.OLL.
  1083.             Language extension  file EXT1.LEX and EXT2.LEX are read in and
  1084.             the procedure boot is used as a starting point.
  1085.  
  1086.               ol test test1 -ibld -bout -bout1 -lcomslink -rboot
  1087.  
  1088.             This command  line uses TEST.BLD and TEST1.BLD as input files.
  1089.             Output files  OUT.BLD and  OUT1.BLD are produced. The language
  1090.             extension file  COMSLINK.LEX will be read in from the standard
  1091.             directory (set by OL.BAT) assuming there is no COMSLINK.LEX in
  1092.             the current directory. The starting procedure is boot.
  1093.  
  1094.  
  1095.  
  1096.           4.19   THE OL ENVIRONMENT VARIABLE
  1097.  
  1098.             OPLLINT also  reads an  environment variable  called OL.  This
  1099.             variable is  set with  the MS-DOS  command SET. It can contain
  1100.             any flag  or filename  that you would put on the command line.
  1101.             See your MS-DOS manual for more information on the SET command
  1102.             and environment variables.
  1103.  
  1104.        ----------------------------------------------------------------------
  1105.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              14
  1106.  
  1107.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1108.        ----------------------------------------------------------------------
  1109.             Note that  OPLLINT uses  the last value of a flag it is given.
  1110.             The OL  variable is  read first, followed by the command line,
  1111.             followed by  the command line in the OLL file (if one is being
  1112.             used). If you put a -p- in the OL variable, then putting a -p+
  1113.             on the command line would override it.
  1114.  
  1115.  
  1116.  
  1117.           4.20   OPLLINT FLAG SUMMARY
  1118.  
  1119.             The following flags are accepted by OPLLINT:
  1120.  
  1121.  
  1122.  
  1123.                ? or -?        Produce a help screen
  1124.  
  1125.                -bout          Produce a .BLD output file (Max 2)
  1126.  
  1127.                -cnn      Set width of printer to nn columns
  1128.  
  1129.                -dpath         Set a path for OPL sources (Max 16)
  1130.  
  1131.                -Dname         Define a preprocessor manifest constant (Max
  1132.                          16)
  1133.  
  1134.                -fopl          Use OPL as default extension
  1135.  
  1136.                -fppo          Use PPO as default extension
  1137.  
  1138.                -g+ or -g Enable rigourous global checks
  1139.  
  1140.                -g-       Disable rigourous global checks
  1141.  
  1142.                -ibld          Use BLDPACK format input file
  1143.  
  1144.                -ioll          Use OPLLINT list file format input file
  1145.  
  1146.                -imc      Use an  MC-OPL, OPL/g  or OPL/w  module and  find
  1147.                          other module names
  1148.  
  1149.                -Ipath         Add an  include path for the preprocessor to
  1150.                          find include files (Max 16)
  1151.  
  1152.                -lfile         Include language extension file (Max 16)
  1153.  
  1154.                -o+ or -o Produce calling structure of OPL system.
  1155.  
  1156.                -o-       Produce no calling structure
  1157.  
  1158.                -p+ or -p Produce popularity lists
  1159.  
  1160.                -p-       Produce no popularity lists
  1161.  
  1162.                -rname         Set starting procedure (Max 8)
  1163.  
  1164.                -spath         Set path for language extensions (Max 16)
  1165.  
  1166.        ----------------------------------------------------------------------
  1167.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              15
  1168.  
  1169.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1170.        ----------------------------------------------------------------------
  1171.                -t?       Find machines  compatible with  the OPL  used  in
  1172.                          this system
  1173.  
  1174.                -tlz      Target is an Organiser LZ or LZ64
  1175.  
  1176.                -tmc      Target is a Mobile Computer (MC-OPL)
  1177.  
  1178.                -tmcg          Target is  a Mobile Computer (with graphics:
  1179.                          OPL/g)
  1180.  
  1181.                -tmcw          Target is  a  Mobile  Computer  (with  WIMP:
  1182.                          OPL/w)
  1183.  
  1184.                -txp      Target is an Organiser XP or CM
  1185.  
  1186.                -Tnn      Set new ODB threshold level
  1187.  
  1188.                -Uname         Undefine a  preprocessor  manifest  constant
  1189.                          (Max 16)
  1190.  
  1191.                -w+ or -w Enable warnings
  1192.  
  1193.                -w-       Disable warnings
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.        ----------------------------------------------------------------------
  1229.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              16
  1230.  
  1231.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1232.        ----------------------------------------------------------------------
  1233.           5   ERRORS AND WARNINGS
  1234.  
  1235.             OPLLINT produces  several error  and  warning  messages.  Each
  1236.             message is explained below.
  1237.  
  1238.  
  1239.  
  1240.           5.1   ERROR MESSAGES
  1241.  
  1242.             All error message lines have this format:
  1243.  
  1244.               Error  FFFF  LL: message
  1245.  
  1246.             where FFFF  is the  name of  the file  and LL  the line number
  1247.             where the  error occurred.  Only the  error message  is  given
  1248.             below. Error  messages produced  by the  preprocessor are  not
  1249.             repeated here. For details of these messages see the TRAN user
  1250.             guide.
  1251.  
  1252.  
  1253.  
  1254.           A maximum of xx 'xxxx' flags may be given
  1255.  
  1256.                Too many  flags of  this type  have been put on the command
  1257.                line, the OL environment variable or in an OLL file.
  1258.  
  1259.  
  1260.  
  1261.           Argument NN in call to RRRR wrong type
  1262.  
  1263.                Argument number  NN in  the call  to procedure RRRR was the
  1264.                wrong type.
  1265.  
  1266.  
  1267.  
  1268.           Argument too long
  1269.  
  1270.                An argument  given on  the  command  line  (or  in  the  OL
  1271.                environment variable or OLL file) is too long.
  1272.  
  1273.  
  1274.  
  1275.           Character expected after % sign
  1276.  
  1277.                A character  is required  after the % sign to give an ASCII
  1278.                value. Check OPL files have been successfully translated.
  1279.  
  1280.  
  1281.  
  1282.           Could not convert number following 'xxxx' flag
  1283.  
  1284.                The number  following this  flag  could  not  be  converted
  1285.                successfully.
  1286.  
  1287.  
  1288.  
  1289.  
  1290.        ----------------------------------------------------------------------
  1291.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              17
  1292.  
  1293.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1294.        ----------------------------------------------------------------------
  1295.           Could not find name of language extension
  1296.  
  1297.                Invalid name given in language extension definition.
  1298.  
  1299.  
  1300.  
  1301.           Could not open file FFFF
  1302.  
  1303.                The file FFFF could not be opened.
  1304.  
  1305.  
  1306.  
  1307.           Different number of input and output files
  1308.  
  1309.                The number  of output  files given with the -b flag must be
  1310.                the same as the number of input files.
  1311.  
  1312.  
  1313.  
  1314.           Duplicated global VVVV
  1315.  
  1316.                The global  VVVV has  been declared  more that  once.  This
  1317.                error will only be produced if the -g flag is enabled.
  1318.  
  1319.  
  1320.  
  1321.           Expected + or - sign after 'xxxx' flag
  1322.  
  1323.                This type of flag requires a + or - sign after it to switch
  1324.                the option on or off respectively.
  1325.  
  1326.  
  1327.  
  1328.           Global VVVV defined as both an array and a non-array
  1329.  
  1330.                The global given has been declared as an array in one place
  1331.                and a  normal variable in another. This is legal in OPL but
  1332.                means that  OPLLINT can  not check if the variable is being
  1333.                used as  an array  or a  normal variable. Thus OPLLINT will
  1334.                not allow globals of the same name to be declared as arrays
  1335.                and normal variables.
  1336.  
  1337.  
  1338.  
  1339.           Global VVVV does not exist
  1340.  
  1341.                This global VVVV has never been declared within the system.
  1342.  
  1343.  
  1344.  
  1345.           Global VVVV in scope more than once (called by RRRR line LL)
  1346.  
  1347.                The global  VVVV is in scope more than once: i.e. more than
  1348.                one  procedure   has  declared  this  as  a  global  before
  1349.                returning. This  procedure was called by the procedure RRRR
  1350.                at line LL.
  1351.  
  1352.        ----------------------------------------------------------------------
  1353.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              18
  1354.  
  1355.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1356.        ----------------------------------------------------------------------
  1357.           Global VVVV not in scope (called by RRRR line LL)
  1358.  
  1359.                The global  VVVV is  not in  scope at  this  point  of  the
  1360.                program. This procedure was called by the procedure RRRR at
  1361.                line LL.
  1362.  
  1363.  
  1364.  
  1365.           Global VVVV not in scope (this is a starting procedure)
  1366.  
  1367.                The global  VVVV is  not in  scope.  This  procedure  is  a
  1368.                starting procedure  and so  was  never  called  by  another
  1369.                procedure first.
  1370.  
  1371.  
  1372.  
  1373.           Identifier 'xxxx' too long
  1374.  
  1375.                This variable or procedure name has too many characters.
  1376.  
  1377.  
  1378.  
  1379.           Insufficient memory to continue
  1380.  
  1381.                There is  not enough memory to allow the program to run. If
  1382.                there are  any memory  resident programs  installed on your
  1383.                machine remove them and try again.
  1384.  
  1385.  
  1386.  
  1387.           Invalid hexadecimal number 'xxxx' given
  1388.  
  1389.                The number given is not a valid hexadecimal number.
  1390.  
  1391.  
  1392.  
  1393.           Invalid number 'xxxx' given
  1394.  
  1395.                The number given is not a valid decimal number.
  1396.  
  1397.  
  1398.  
  1399.           Invalid number of columns given: nn
  1400.  
  1401.                The number  given after  a -c flag is not a valid number of
  1402.                columns for a printer.
  1403.  
  1404.  
  1405.  
  1406.           Invalid ODB file threshold of xx given
  1407.  
  1408.                An invalid  number was  given as  a threshold  with the  -T
  1409.                flag.
  1410.  
  1411.  
  1412.  
  1413.  
  1414.        ----------------------------------------------------------------------
  1415.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              19
  1416.  
  1417.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1418.        ----------------------------------------------------------------------
  1419.           Invalid procedure argument 'xxxx' given
  1420.  
  1421.                An invalid argument has been given for this procedure.
  1422.  
  1423.  
  1424.  
  1425.           Invalid procedure name 'RRRR' given
  1426.  
  1427.                An invalid procedure name has been given.
  1428.  
  1429.  
  1430.  
  1431.           Invalid variable name 'VVVV' given
  1432.  
  1433.                An invalid variable name has been given.
  1434.  
  1435.  
  1436.  
  1437.           Language extension RRRR redeclared with different arguments
  1438.  
  1439.                The language  extension RRRR  has been  declared more  than
  1440.                once, with a different set of arguments.
  1441.  
  1442.  
  1443.  
  1444.           Line too complex to parse
  1445.  
  1446.                The  line   given  is   too  complicated   for  OPLLINT  to
  1447.                understand.
  1448.  
  1449.  
  1450.  
  1451.           Local variable VVVV redeclared
  1452.  
  1453.                The local  name given  has been  used more than once. It is
  1454.                legal in OPL to use the same name for an array and a normal
  1455.                variable. This  is however  bad practice  and OPLLINT  will
  1456.                treat it  as an  error. This  allows OPLLINT  to check that
  1457.                variables declared as arrays are always used as arrays.
  1458.  
  1459.  
  1460.  
  1461.           Mismatched ')' in line
  1462.  
  1463.                Closing  bracket   has  been  given  without  corresponding
  1464.                opening bracket.
  1465.  
  1466.  
  1467.  
  1468.           Mismatched PROC and ENDP statements
  1469.  
  1470.                A PROC or ENDP statement is missing.
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.        ----------------------------------------------------------------------
  1477.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              20
  1478.  
  1479.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1480.        ----------------------------------------------------------------------
  1481.           Missing " in line
  1482.  
  1483.                The ending  quote mark  (") surrounding a literal string is
  1484.                missing from this line.
  1485.  
  1486.  
  1487.  
  1488.           Missing ENDV statement
  1489.  
  1490.                An ENDV  command has  been found  without a matching VECTOR
  1491.                command.
  1492.  
  1493.  
  1494.  
  1495.           No ENDP found before end of file
  1496.  
  1497.                The end of a file has been reached before an ENDP statement
  1498.                was found.
  1499.  
  1500.  
  1501.  
  1502.           No extension given for file 'FFFF'
  1503.  
  1504.                The filename  given did  not have  an extension. In the OLL
  1505.                input file all filenames must have an extension.
  1506.  
  1507.  
  1508.  
  1509.           No start point given: use -r flag
  1510.  
  1511.                At least  one starting  point must be specified with the -r
  1512.                flag before OPLLINT can commence.
  1513.  
  1514.  
  1515.  
  1516.           No text given after 'xxxx' flag
  1517.  
  1518.                The command  line flag  shown requires  a text string after
  1519.                it.
  1520.  
  1521.  
  1522.  
  1523.           Procedure RRRR does not exist
  1524.  
  1525.                The procedure  RRRR has  never  been  declared  within  the
  1526.                system. You  many have forgotten to include the file in the
  1527.                input BLD file.
  1528.  
  1529.  
  1530.  
  1531.           Procedure RRRR redeclared
  1532.  
  1533.                The procedure RRRR has been declared more than once.
  1534.  
  1535.  
  1536.  
  1537.  
  1538.        ----------------------------------------------------------------------
  1539.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              21
  1540.  
  1541.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1542.        ----------------------------------------------------------------------
  1543.           Starting procedure RRRR not found
  1544.  
  1545.                The starting  procedure RRRR given with the -r flag was not
  1546.                declared in the system.
  1547.  
  1548.  
  1549.  
  1550.           String and numeric types mixed
  1551.  
  1552.                String and  numeric types found in an expression. Check OPL
  1553.                files have been successfully translated.
  1554.  
  1555.  
  1556.  
  1557.           Syntax error in declaration of variable VVVV
  1558.  
  1559.                An invalid  variable name  has been  given in  a GLOBAL  or
  1560.                LOCAL declaration.  Check OPL  files have been successfully
  1561.                translated.
  1562.  
  1563.  
  1564.  
  1565.           Syntax error in language extension definition
  1566.  
  1567.                There is  a syntax  error in  the definition  of a language
  1568.                extension.
  1569.  
  1570.  
  1571.  
  1572.           Syntax error in procedure call from string
  1573.  
  1574.                An error  was found  in a function call from a string using
  1575.                the @ command.
  1576.  
  1577.  
  1578.  
  1579.           Syntax error in procedure definition
  1580.  
  1581.                There is  a syntax  error in the definition of a procedure.
  1582.                Check OPL files have been successfully translated.
  1583.  
  1584.  
  1585.  
  1586.           Syntax error in variable declaration list
  1587.  
  1588.                GLOBAL or  LOCAL declaration  is invalid.  Check OPL  files
  1589.                have been successfully translated.
  1590.  
  1591.  
  1592.  
  1593.           Text following 'xxxx' flag is too long
  1594.  
  1595.                The text  given after  the command  line flag shown was too
  1596.                long.
  1597.  
  1598.  
  1599.  
  1600.        ----------------------------------------------------------------------
  1601.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              22
  1602.  
  1603.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1604.        ----------------------------------------------------------------------
  1605.           Too many arguments given
  1606.  
  1607.                Too many  filenames were  specified on the command line (or
  1608.                in the OL environment variable or OLL file).
  1609.  
  1610.  
  1611.  
  1612.           Too many arguments in language extension definition
  1613.  
  1614.                Too many  arguments were  given  in  the  definition  of  a
  1615.                language extension.
  1616.  
  1617.  
  1618.  
  1619.           Unexpected character 'xx' in line
  1620.  
  1621.                An invalid character was found whilst reading a line. Check
  1622.                OPL code has been successfully translated.
  1623.  
  1624.  
  1625.  
  1626.           Unexpected characters after 'xxxx' flag
  1627.  
  1628.                Invalid characters  followed the  flag given on the command
  1629.                line (or in the OL environment variable or OLL file).
  1630.  
  1631.  
  1632.  
  1633.           Unexpected separator ':' in line
  1634.  
  1635.                A colon  was found  in an invalid position whilst reading a
  1636.                line. Check OPL code has been successfully translated.
  1637.  
  1638.  
  1639.  
  1640.           Unknown flag 'xxxx'
  1641.  
  1642.                This  flag  given  on  the  command  line  (or  in  the  OL
  1643.                environment variable  or OLL  file) is  not  recognised  by
  1644.                OPLLINT.
  1645.  
  1646.  
  1647.  
  1648.           Variable VVVV was declared as an array
  1649.  
  1650.                You have  used a  variable that was declared as an array as
  1651.                if it were a normal variable.
  1652.  
  1653.  
  1654.  
  1655.           Variable VVVV was not declared as an array
  1656.  
  1657.                You have  used a  normal variable  as if  it were  an array
  1658.                variable.
  1659.  
  1660.  
  1661.  
  1662.        ----------------------------------------------------------------------
  1663.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              23
  1664.  
  1665.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1666.        ----------------------------------------------------------------------
  1667.           Wrong number of arguments in call to RRRR
  1668.  
  1669.                The wrong  number of  arguments were  used  in  a  call  to
  1670.                procedure RRRR.
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.        ----------------------------------------------------------------------
  1725.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              24
  1726.  
  1727.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1728.        ----------------------------------------------------------------------
  1729.           5.2   WARNINGS
  1730.  
  1731.             All warning lines have this format
  1732.  
  1733.               Warning  FFFF  LL: message
  1734.  
  1735.             where FFFF  is the  name of  the file  and LL  the line number
  1736.             where the  warning occurred. Only the warning message is given
  1737.             below.
  1738.  
  1739.  
  1740.  
  1741.           VVVV is a keyword in other OPL versions
  1742.  
  1743.                The variable  name VVVV is used as a keyword in a different
  1744.                OPL version  on another  machine. This  just warns you that
  1745.                your OPL  code is  not portable  if you  use this  variable
  1746.                name.
  1747.  
  1748.  
  1749.  
  1750.           Global VVVV declared in procedure RRRR but never used
  1751.  
  1752.                This global  VVVV is  declared in  procedure RRRR but never
  1753.                used.
  1754.  
  1755.  
  1756.  
  1757.           Local VVVV has same name as a global
  1758.  
  1759.                This local  VVVV has  the same  name as  a global variable.
  1760.                This is  bad programming  practice and  should  be  avoided
  1761.                since it is easy to confuse the two variables.
  1762.  
  1763.  
  1764.  
  1765.           Local VVVV has same name as a global array
  1766.  
  1767.                This local  VVVV has  the  same  name  as  a  global  array
  1768.                variable. Moreover  the global  is  declared  as  an  array
  1769.                whilst the  local is  not.   Although it is legal in OPL to
  1770.                have a  array and a non-array with the same name, it is bad
  1771.                programming practice.
  1772.  
  1773.  
  1774.  
  1775.           Local VVVV has same name as a global non-array
  1776.  
  1777.                This local  VVVV has  the same  name as  a global variable.
  1778.                Moreover the  local is  declared as  an  array  whilst  the
  1779.                global is  not. Although it is legal in OPL to have a array
  1780.                and a  non-array with  the same name, it is bad programming
  1781.                practice.
  1782.  
  1783.  
  1784.  
  1785.  
  1786.        ----------------------------------------------------------------------
  1787.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              25
  1788.  
  1789.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1790.        ----------------------------------------------------------------------
  1791.           Local VVVV never used in procedure RRRR
  1792.  
  1793.                The local  VVVV is  declared in  procedure RRRR  but  never
  1794.                used.
  1795.  
  1796.  
  1797.  
  1798.           Parameter VVVV never used in procedure RRRR
  1799.  
  1800.                This formal parameter is declared but never used.
  1801.  
  1802.  
  1803.  
  1804.           Procedure RRRR declared but never called
  1805.  
  1806.                This procedure  RRRR is  declared but never called anywhere
  1807.                within the system.
  1808.  
  1809.  
  1810.  
  1811.           Procedure RRRR declared but never reached
  1812.  
  1813.                The procedure has been declared and calls have been made to
  1814.                it from within the code, yet these calls are never actually
  1815.                reached when the system is run.
  1816.  
  1817.  
  1818.  
  1819.           Procedure name RRRR is different from file name
  1820.  
  1821.                This file  contains a  procedure which has a different name
  1822.                to that  of the file. This is not an error, but usually the
  1823.                filenames and procedure names match.
  1824.  
  1825.                OPLLINT uses the procedure name to identify a procedure. If
  1826.                the procedure name and the filename are different it can be
  1827.                confusing. This  message will  warn you if the names do not
  1828.                match up.
  1829.  
  1830.  
  1831.  
  1832.           Procedure RRRR has been renamed to RRRR with a BLDPACK alias
  1833.  
  1834.                The alias  field in  the a  BLDPACK file  has been  used to
  1835.                rename a  procedure. The  alias name  is now  used  in  all
  1836.                references to  the procedure.  This message is just to warn
  1837.                that this  change has occurred since it can only be seen by
  1838.                looking at the input BLD file.
  1839.  
  1840.  
  1841.  
  1842.           Unknown preprocessor command 'xxxx'
  1843.  
  1844.                The preprocessor  command given  is not  recognised by  the
  1845.                system and has been ignored.
  1846.  
  1847.  
  1848.        ----------------------------------------------------------------------
  1849.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              26
  1850.  
  1851.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1852.        ----------------------------------------------------------------------
  1853.           5.3   EXIT CODES
  1854.  
  1855.             Exit codes  can be  used by  other programs  to see if OPLLINT
  1856.             completed successfully or not. The following codes are set:
  1857.  
  1858.                     0    Program completed  successfully OR  only warnings
  1859.                          occurred.
  1860.  
  1861.                     2    Errors occurred.
  1862.  
  1863.             The environment  pseudo-variable ERRORLEVEL  will be given one
  1864.             of these  values upon the termination of OPLLINT. See your MS-
  1865.             DOS manual  for more  information about  ERRORLEVEL and how to
  1866.             use it.
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.        ----------------------------------------------------------------------
  1911.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              27
  1912.  
  1913.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1914.        ----------------------------------------------------------------------
  1915.           6   LANGUAGE EXTENSION FILES
  1916.  
  1917.  
  1918.  
  1919.           6.1   STANDARD FILES
  1920.  
  1921.             There are  several  language  extension  files  supplied  with
  1922.             OPLLINT that  define the  language extensions used in standard
  1923.             PSION  products.   These   files   are   all   kept   in   the
  1924.             c:\opllint\langexts directory. If you use the OL batch file it
  1925.             will  automatically   set  the   standard  directory  to  this
  1926.             directory for you.
  1927.  
  1928.             To use  any of these files you simply use the -l flag when you
  1929.             run OPLLINT.  For instance  to use the comslink file you would
  1930.             add the following to your command line:
  1931.  
  1932.               -lcomslink
  1933.  
  1934.             The following files are supplied:
  1935.  
  1936.                LIBRARY   Definitions for  all the  procedures used  in the
  1937.                          SIBO OPL library.
  1938.  
  1939.                COMSLINK  Standard Organiser ComsLink language extensions.
  1940.  
  1941.                BARCODE   For Organiser bar code readers.
  1942.  
  1943.                PARALLEL  Organiser parallel printer interface.
  1944.  
  1945.                MAGSWIPE  Organiser magnetic card swipe.
  1946.  
  1947.                PRINTER   Organiser Printer extensions.
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.        ----------------------------------------------------------------------
  1973.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              28
  1974.  
  1975.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  1976.        ----------------------------------------------------------------------
  1977.           6.2   MAKING YOUR OWN LANGUAGE EXTENSION FILES
  1978.  
  1979.             OPLLINT reads  in language extension definitions from language
  1980.             extension files.  These files  have the  extension .LEX.  They
  1981.             contain a  list of  procedures with  the arguments  that  they
  1982.             expect.
  1983.  
  1984.             These files are preprocessed. See section 9 for more details.
  1985.  
  1986.             The types of the arguments are important. A type in OPL can be
  1987.             an integer,  a long  (for SIBO  machines),  a  floating  point
  1988.             number or  a string. OPLLINT will check that all calls made to
  1989.             this extension use the correct type for each argument.
  1990.  
  1991.             For example  to define  the language extension XTSEND the file
  1992.             would contain a line like this:
  1993.  
  1994.               XTSEND:(remote$,local$,type%)
  1995.  
  1996.             The names  of the variables used to give the arguments are not
  1997.             important: they  are just  used to  determine the type of each
  1998.             argument, but  they must not be keywords. Thus if the variable
  1999.             name does  not end  in a  %, &,  or $ sign it is taken to be a
  2000.             floating point value.
  2001.  
  2002.             In addition  to the  standard OPL  data types the asterisk (*)
  2003.             symbol can  be used  to denote  an argument  of no fixed type.
  2004.             OPLLINT will  not check  the type  of this  argument when  the
  2005.             procedure is called.
  2006.  
  2007.             An ellipsis  (...) denotes a variable number of arguments to a
  2008.             procedure. OPLLINT  will only  check the  arguments  specified
  2009.             before the ellipsis.
  2010.  
  2011.             For a  language extension  with a variable number of arguments
  2012.             and one argument of no fixed type the file might contain:
  2013.  
  2014.               STRANGE:(string$,notfixed*,number%,...)
  2015.  
  2016.             Calls to this language extension would then be allowed to have
  2017.             3 or  more arguments,  and the second argument could be of any
  2018.             type.
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.        ----------------------------------------------------------------------
  2035.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              29
  2036.  
  2037.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  2038.        ----------------------------------------------------------------------
  2039.           7   ORDERING PROCEDURES
  2040.  
  2041.             If you are using an Organiser OPLLINT has two features to help
  2042.             you order  your procedures  on a datapak in the most efficient
  2043.             way. Procedures at the top of the datapak run faster, and thus
  2044.             should be those most frequently used.
  2045.  
  2046.             OPLLINT keeps  a count of how many times a procedure is called
  2047.             in a  program.  This  count  can  be  seen  as  a  procedures'
  2048.             popularity. This  popularity count  does not take account of a
  2049.             call made  within a  loop: it  is just the number of times the
  2050.             procedure call appears in the program text.
  2051.  
  2052.             OPLLINT will  produce a  list of all the procedures use in the
  2053.             system along  with the  popularity count  for each  procedure.
  2054.             This is done by using the -p flag.
  2055.  
  2056.             OPLLINT can  also take  your original  BLD or OLL file and re-
  2057.             order  it  using  the  popularity  counts.  The  most  popular
  2058.             procedures will  go to  the top  of the BLD file and hence the
  2059.             datapak.
  2060.  
  2061.             Data files  such as  ODB files  will  be  given  an  arbitrary
  2062.             popularity count.  This value is by default 10, but can be set
  2063.             using the  -T flag.  With a  value of  10 the  ODB files  will
  2064.             usually be put in the middle of the pak.
  2065.  
  2066.             The best  place to  put the  data files depends on the program
  2067.             and how often the files are used.
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.        ----------------------------------------------------------------------
  2097.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              30
  2098.  
  2099.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  2100.        ----------------------------------------------------------------------
  2101.           8   CUSTOMISING OPLLINT
  2102.  
  2103.             As mentioned  earlier OPLLINT  is actually  run from two batch
  2104.             files OL.BAT and OLR.BAT.
  2105.  
  2106.             These batch  files simply  call the  OPLLINT program  with the
  2107.             command line they are given, except that they add a -s flag to
  2108.             tell OPLLINT  where the  standard language extension files are
  2109.             kept.
  2110.  
  2111.             If you  require different  defaults for  your system  you  can
  2112.             simply add flags to this batch file.
  2113.  
  2114.             The OL  environment variable  is also  useful for setting up a
  2115.             new set  of defaults  or commonly  used flags  (for instance a
  2116.             commonly used language extension file).
  2117.  
  2118.             OLR.BAT is  exactly the  same as  OL.BAT except that output is
  2119.             redirected to  a file called ERR.OUT (redirection commands are
  2120.             not passed when batch files are called).
  2121.  
  2122.             Note that  a maximum of 16 arguments can be given to OL or OLR
  2123.             due to limits in the number of arguments that can be passed to
  2124.             batch files.
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.        ----------------------------------------------------------------------
  2159.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              31
  2160.  
  2161.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  2162.        ----------------------------------------------------------------------
  2163.           9   THE PREPROCESSOR
  2164.  
  2165.             All files  that OPLLINT  reads are  passed through  a C  style
  2166.             preprocessor. The preprocessor provides C style comments using
  2167.             the /*  */ characters:
  2168.  
  2169.               PRINT A$      /* this is a comment */
  2170.  
  2171.             The preprocessor  supports all  the  standard  C  preprocessor
  2172.             directives like  #define, #include  etc.  For instance you can
  2173.             define symbolic  constants which are then replaced in the main
  2174.             text of the program:
  2175.  
  2176.               #define FALSE -1
  2177.  
  2178.                 ...
  2179.  
  2180.               if A = FALSE
  2181.                  PRINT "it was false"
  2182.               endif
  2183.  
  2184.             For more  information on  the preprocessor  see the  TRAN user
  2185.             guide in the OPL development kit.
  2186.  
  2187.             OPLLINT defines  a symbolic constant _OPLLINT when it runs the
  2188.             preprocessor.  This allows you to put OPLLINT specific code in
  2189.             your programs:
  2190.  
  2191.               #ifdef _OPLLINT
  2192.  
  2193.                   LOADM "one"      /* so that OPLLINT can get the names */
  2194.                   LOADM "two"
  2195.  
  2196.               #else
  2197.  
  2198.                   LOADM A$         /* the real program */
  2199.  
  2200.               #endif
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.        ----------------------------------------------------------------------
  2221.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              32
  2222.  
  2223.        PSION CORPORATE GROUP                               OPLLINT USER GUIDE
  2224.        ----------------------------------------------------------------------
  2225.           10   FEATURES NEW TO V2.00
  2226.  
  2227.  
  2228.  
  2229.           10.1   CHANGES FROM V1.12 TO V2.00
  2230.  
  2231.                þ    The -x flag has now been replaced by the -txp flag.
  2232.  
  2233.  
  2234.  
  2235.           10.2   FEATURES ADDED TO OPLLINT V2.00
  2236.  
  2237.                þ    All OPL  input files  are now  preprocessed, including
  2238.                     the OLL, BLD and language extension files.
  2239.  
  2240.                þ    Multiple OPL  and language  extension  paths  are  now
  2241.                     supported.
  2242.  
  2243.                þ    Exact redefinitions  of language  extensions  are  now
  2244.                     supported.
  2245.  
  2246.                þ    Portability warnings are now produced.
  2247.  
  2248.                þ    OPLLINT can  now determine  which  target  machines  a
  2249.                     system is compatible with.
  2250.  
  2251.                þ    A simple  list file  input, the  OLL file, can be used
  2252.                     instead of a BLD file.
  2253.  
  2254.                þ    SIBO OPL  modules can  be  automatically  located  and
  2255.                     loaded given the first module.
  2256.  
  2257.                þ    OPLLINT now  supports MC-OPL  and OPL/g in addition to
  2258.                     the Organiser OPLs.
  2259.  
  2260.                þ    The number  of language  extension files  allowed  has
  2261.                     been increased to 16.
  2262.  
  2263.  
  2264.  
  2265.           10.3   FEATURES ADDED TO OPLLINT V2.10
  2266.  
  2267.                þ    OPLLINT will produce a calling structure of a program.
  2268.  
  2269.  
  2270.  
  2271.           10.4   FEATURES ADDED TO OPLLINT V2.20
  2272.  
  2273.                þ    Support for OPL/w added.
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.        ----------------------------------------------------------------------
  2283.        COPYRIGHT, PSION UK PLC 1990,1991,1992                              33