Google
 

Trailing-Edge - PDP-10 Archives - BB-5543F-BM_1981 - documentation/bas21.doc
There are no other files named bas21.doc in the archive.
BAS21.DOC -- Changes from V2(252) to V2.1(320)                    Page 1
September 1981


































COPYRIGHT (C) 1977, 1979, 1981  BY
DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.


THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
TRANSFERRED.

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.

DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
BAS21.DOC -- Changes from V2(252) to V2.1(320)                  Page 2
September 1981


        1.0     SUMMARY  . . . . . . . . . . . . . . . . . . . . . . 3
        2.0     EXTERNAL CHANGES . . . . . . . . . . . . . . . . . . 3
        2.1       Record Management System . . . . . . . . . . . . . 3
        2.2       Error And Warning Messages . . . . . . . . . . . . 3
        2.2.1       Command Errors . . . . . . . . . . . . . . . . . 4
        2.2.2       Compiler Errors  . . . . . . . . . . . . . . . . 4
        2.2.3       Run Time Errors And Warnings . . . . . . . . . . 4
        3.0     KNOWN BUGS AND DEFICIENCIES  . . . . . . . . . . . . 4
        3.1       BASIC-PLUS-2/20 Restrictions . . . . . . . . . . . 4
        3.2       Operating System Deficiencies  . . . . . . . . . . 5
        3.3       Documentation Deficiencies . . . . . . . . . . . . 5
        4.0     INSTALLATION INSTRUCTIONS  . . . . . . . . . . . . . 6
        4.1       Files Included On This Tape  . . . . . . . . . . . 6
        4.2       Installation . . . . . . . . . . . . . . . . . . . 6
        5.0     INTERNAL CHANGES . . . . . . . . . . . . . . . . . . 6
        6.0     SUGGESTIONS  . . . . . . . . . . . . . . . . . . . . 8
        6.1       Output To Files  . . . . . . . . . . . . . . . . . 8
        6.2       Array References . . . . . . . . . . . . . . . . . 9
BAS21.DOC -- Changes from V2(252) to V2.1(320)                  Page 3
SUMMARY


1.0  SUMMARY

     BASIC-PLUS-2/20  is  a  powerful  implementation  of  the   BASIC
programming  language  for  the  DECSYSTEM-20.   This  release  of the
product is a maintenance release which  utilizes  the  newly  released
stand  alone  version  of RMS.  RMS is now an unbundled product and is
used by BASIC-PLUS-2 V2.1 for file management.

     BASIC-PLUS-2/20 runs on a KS or KL-20 processor under  release  4
of  the  TOPS-20  MONITOR.   It  supercedes  all  previous versions of
BASIC-PLUS-2/20.  During execution, BASIC-PLUS-2/20 requires the BASIC
run-time  system, BASOTS.EXE which is included on this tape.  RMS.EXE,
the record  management  system,  included  on  a  different  tape,  is
required for all record file operations.

     Documentation errors and shortcomings found since  version  2  of
BASIC-PLUS-2/20 are described in section 3.0 (BAS21.DOC).  The current
documentation is the BASIC-PLUS-2 Language Manual (AA-H654A-TM).  This
.DOC file together with the RMS20.DOC file and the current manual will
be more than adequate for most users of the product to make use of all
the facilities.



2.0  EXTERNAL CHANGES

     The  section  below  describes  the  external  changes  made   to
BASIC-PLUS-2/20 version 2.1(320).




2.1  Record Management System

     The file system, RMS,  has  previously  been  distributed  as  an
integral  part  of  BASIC-PLUS-2.  Recently, this file system was made
available as  a  separate  piece  of  software  distributed  with  the
operating system.

     RMS should have been received on a different tape  with  its  own
documentation    and    utilities.     There   are   no   changes   in
BASIC-PLUS-2/20's   functionality   because   of   this   change    in
distribution.



2.2  Error And Warning Messages

     The  following  section  describes  the  new  error  and  warning
messages  added  as  a  result of bugs found in version 2(252).  Also,
some messages have been corrected.  These are also  described  in  the
following section.
BAS21.DOC -- Changes from V2(252) to V2.1(320)                  Page 4
EXTERNAL CHANGES


2.2.1  Command Errors -

None.



2.2.2  Compiler Errors -

None.



2.2.3  Run Time Errors And Warnings -

% 444 BUCKETSIZE greater than maximum  at  line  nn  of  MAIN  PROGRAM
-Where the maximum is currently seven.

     The ' Invalid character  in  input  stream  '  error  message  is
correctly  documented  as  error 411 however, it actually produced the
number 41.  This has been corrected.

     ?  449 Existing file created with non 7 bit ASCII strings

     This  error  message  has  been  added  to  BASIC.   When   BASIC
encounters  an existant RMS file that is not in 7 bit ASCII, the error
will occur.  No accesses of the file will be allowed.



3.0  KNOWN BUGS AND DEFICIENCIES

     This section  is  divided  into  three  subsections.   The  first
section  describes the known deficiencies which are design related and
will therefore remain restrictions.  The second section describes  the
deficiencies  due  to  TOPS-20 release 4 which affect BASIC-PLUS-2/20.
The third section clarifies and corrects the current documentation.




3.1  BASIC-PLUS-2/20 Restrictions


     1.  It is not possible to continue a BASIC program in  the  BASIC
         environment after typing a control-C (^C).  Due to the design
         of BASIC-PLUS-2, this behavior cannot be implemented  without
         a major rewrite of the compiler.

     2.  MAP buffers larger  than  256K  are  not  detected  and  will
         produce unpredictable results.

     3.  STREAM  files  by  definition  are  a   sequence   of   ASCII
         characters.  For this reason, it is not possible to specify a
         MAP which contains numeric fields.  Currently BASIC does  not
         detect  the  condition  as  an  error and erroneous data will
BAS21.DOC -- Changes from V2(252) to V2.1(320)                  Page 5
KNOWN BUGS AND DEFICIENCIES


         result.

     4.  MAP statements must not appear on the same line as any  other
         MAP  or COMMON statement.  The compiler will not flag this as
         an  error  but  the  results  of  using  the  MAP   will   be
         unpredictable.

     5.  Reading an element of a  virtual  array  that  has  not  been
         defined and for which no page exists will generate an illegal
         memory read if the file is opened with access read.





3.2  Operating System Deficiencies


     1.  The following deficiences are due  to  the  FLIN  JSYS  which
         BASIC  uses  to  read  all floating point numbers and convert
         them into a machine representation.

         1.  The letter "D" will be accepted as a substitute  for  "E"
             in  the  exponent  field of a floating point number.  The
             lowercase letter "e" however, will not be accepted.

         2.  Numbers whose  magnitude  is  greater  than  the  largest
             floating  point number representable in the hardware, but
             less than 10^64 will not give any error and  will  result
             in  the largest representable floating point number.  For
             numbers larger than 10^64, FLIN and therefore BASIC, will
             give  an  error  and result in the largest floating point
             number.

         3.  'Nines disease':  A single bit of precision is  sometimes
             lost when a floating point number is read.





3.3  Documentation Deficiencies


     1.  Version 2 of BASIC implemented a new  facility  which  allows
         the  system  manager to create a file which can contain BASIC
         commands  and  immediate  mode  statements  which   will   be
         processed  each  time  a  user runs BASIC.  This file, called
         BASIC.INI,  must  be  placed  on  device  SYS:   along   with
         BASIC.EXE, BASOTS.EXE and RMS.EXE.

              If BASIC.INI does not exist, then BASIC will  behave  as
         it  should  with  its  normal  defaults.   This  facility  is
         optional and need only be used if the system  manager  wishes
         BASIC to do something special upon startup.
BAS21.DOC -- Changes from V2(252) to V2.1(320)                  Page 6
KNOWN BUGS AND DEFICIENCIES


              An example of a possible use for this command  would  be
         to  change the default syntax checking feature of BASIC to be
         disabled since this can cause BASIC to put a  heavy  load  on
         the  system  if there are many BASIC users.  This can be done
         by creating a  BASIC.INI  file  which  contains  the  command
         "QUIET  CHECK".   If  any  user then wishes to use the syntax
         checking feature, the user would issue  the  "VERBOSE  CHECK"
         command  which  would  enable  syntax  checking for just that
         user.

     2.  The format of the PRINT USING statement  when  writing  to  a
         file is PRINT [#] expression, USING ....

     3.  When updating a record to an INDEXED  file,  the  new  record
         size  must  be the same as that of the record being replaced.
         This is documented for the sequential file, but not  for  the
         INDEXED file.




4.0  INSTALLATION INSTRUCTIONS


4.1  Files Included On This Tape

     This tape contains three savesets  which  contain  the  following
files:

     1.  <DOCUMENTATION>
          o  BAS21.BWR  - The beware file
          o  BAS21.DIR  - The directory of this tape
          o  BAS21.DOC  - This file


     2.  <BINARIES>
          o  BASIC.EXE  - The BASIC-PLUS-2/20 compiler
          o  BASOTS.EXE - The BASIC-PLUS-2/20 run time system


     3.  <AUTOPATCH>
          o  B20CMA.LNK - LINK command file  for  AUTOPATCH  build  of
             BASIC+2/20 compiler
          o  B20CMA.REL - LINK library file  for  AUTOPATCH  build  of
             BASIC+2/20 compiler
          o  B20OTA.LNK - LINK command file  for  AUTOPATCH  build  of
             BASIC+2/20 OTS
          o  B20OTA.REL - LINK library file  for  AUTOPATCH  build  of
             BASIC+2/20 OTS
BAS21.DOC -- Changes from V2(252) to V2.1(320)                  Page 7
INSTALLATION INSTRUCTIONS


4.2  Installation

     The .EXE files should be placed on <SUBSYS>.  BASIC will look for
its  run  time system BASOTS.EXE and its record file system RMS.EXE on
logical device SYS:, so you should make  sure  your  installation  has
<SUBSYS> as its system-wide definition of SYS:.

     The files in  saveset  <AUTOPATCH>  are  for  the  use  of  those
facilities using the AUTOPATCH utility for updating software.

     It is recommended that the system  manager  make  this  DOC  file
available to all BASIC users and that they read this file.




5.0  INTERNAL CHANGES


Edit    Description
----    -----------


253     DELETE command does not invalidate the lower fork so START will work
        and RUN won't compile.

254     If a stack overflow occurs an Illegal Instruction may be generated.

255     Printing a NULL (ASCII value 0) with PRINT USING generates the error:
        '? 410 Illegal character in output stream'.

256     MARGIN without a filespec generates error 9 for channel -1 in immediate
        mode, or channel 42775 when restarting .EXE that has already been run.

257     An Internal error may be produced when attempting to RUN a program
        containing a user defined function which has a local variable list.

260     When paging output, the formfeed added to the output gets counted,
        causing the rest of the line to be off by 1 character.

261     The PAGE statement does not do paging (output a formfeed, reset
        counters, etc.) as specified in the documentation.

262     Errors produced in immediate will be handled by any error handler left
        enabled in the code fork.

263     Run time file specification recognition worked in versions thru 1A.
        Now the error: '? 2 Illegal filename...' occurs.

264     The error '% 56 Cannot invert matrix' may be generated when attempting
        to invert a matrix which does actually have an inverse.

265     Using TRM$ on MAPped strings can corrupt other random strings in the
        program.
BAS21.DOC -- Changes from V2(252) to V2.1(320)                  Page 8
INTERNAL CHANGES


266    Update DDT start page number to version 41 value, to allow debugging to
        work properly. Otherwise an Illegal Instruction occurs.

267     End of file is not properly detected by IFEND when the last byte of
        a file appears in the last byte of the 512th word of the last page in
        the file. Also, EOF is falsely detected when one byte remains in the
        input buffer at end of file. Also, RESTORE and IFEND do not work
        properly for device NUL:.

270     CRYSTL, the BSTL pre-processor no longer works due to some duplicately
        defined opcodes.

271     When an EXE is running under control of the compiler (i.e. CHAIN), no
        check is made for compatible versions of the compiled code and the OTS.
        Generate a warning.

272     When MONITOR v.4 is installed, a 'JFN not assigned' error is printed
        after the commands: MLIST, DO, and BUILD or when BASIC is invoked and
        BASIC.INI is present.

273     An extra comma at the end of a DATA statement can cause the error:
        '? 52 Invalid floating point number ' if the read is of a numeric
        DATA item.  Extraneous characters can appear if it is a string read.

274     PAGE outputs CR LF FF when it should only output CR FF (e.g. PAGE 60
        for normal LPT would cause line 60 to be written, then a CR and a LF
        would then bring us to the new top-of-page. A FF would then bring us
        to the next top-of-page thereby skipping a whole page).

275     VAL% did not work for negative numbers.

276     Concat for strings (&) spewed junk when passed numerics.

277     BUCKETSIZE is now allowed to be from one to MAXBUCKETSIZE (currently
        eight). Modified error message 444.

300     One too many items can get popped off the stack causing problems
        with continuable errors.

301     Error 41 should actually be error 411. This is because 41 is reserved
        for errors that also occur in BASICs on other systems. The documentation
        correctly describes error 411.

302     Added error message 449 and the code to check for non 7 bit ASCII
        RMS files.

303     When an OPENF fails and the error is trapped, the END routine will release
        the JFN for which the OPENF failed. Then the END routine closes (and releases)
        all files for which a file block exists (including the file block from
        the open failure). This causes error '442- Cannot CLOSE file' because
        of the attempt of closing the non existent file.

304     Increase the BASOTS patching area, OTSPAT, to 2 pages instead of 1.

305     Development edit.
BAS21.DOC -- Changes from V2(252) to V2.1(320)                  Page 9
INTERNAL CHANGES



306     Development edit.

307     Development edit.

310     Append does not work for SEQUENTIAL STREAM files.

311     RELATIVE and SEQUENTIAL files with a RECORDSIZE > 520 and no MAP
        statement can fail with various internal errors.

312     An uninformative error is produced if RMS.EXE is not on logical SYS:.

313     String DEF* functions do not work properly.

314     INVALID clause of OPEN statement ignored when illegal character
        is found in filename.

315     Edit 310 broke the use of the COUNT clause in sequential stream
        PUTs.

316     New BASIC/RMS interface does not allow use of ACCESS READ without
        FOR clause in OPEN statement.

317     Correct the value of MAXBUCKETSIZE from eight to seven.

320     Development edit





6.0  SUGGESTIONS


6.1  Output To Files

     Because of the BASIC-PLUS-2/20 buffering scheme, I/O  being  done
to  more  than  one file at a time is faster when all the outputs to a
particular file are done together before the next file is  output  to.
For example:

        00010 OPEN 'DATA1' FOR OUTPUT AS FILE #1
        00020 OPEN 'DATA2' FOR OUTPUT AS FILE #2
        00030 PRINT #1, 'A record'; I% FOR I% = 1% TO 1000%
        00040 PRINT #2, 'A record'; I% FOR I% = 1% TO 1000%
        00050 CLOSE
        00060 END

        Is much faster than:

        00010 OPEN 'DATA1' FOR OUTPUT AS FILE #1
        00020 OPEN 'DATA2' FOR OUTPUT AS FILE #2
        00030 FOR I% = 1% TO 1000%
        00040  PRINT #1, 'A record'; I%
        00050  PRINT #2, 'A record'; I%
BAS21.DOC -- Changes from V2(252) to V2.1(320)                 Page 10
SUGGESTIONS


        00060 NEXT I%
        00050 CLOSE
        00060 END




6.2  Array References

     References to array elements of arrays which are  not  in  a  MAP
buffer  or  a  COMMON  will  be  about  40%  faster  if  the  array is
dimensioned before the reference.  This means that it is good practice
to dimension all arrays prior to any array reference.