home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / fortran / 3016 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  12.0 KB

  1. Path: sparky!uunet!mcsun!uknet!brunel!mtpgpdh
  2. From: Peter.Hammond@brunel.ac.uk (Peter D Hammond)
  3. Newsgroups: comp.lang.fortran
  4. Subject: BCF77 Document in English
  5. Message-ID: <BsxJ6n.Aq7@brunel.ac.uk>
  6. Date: 13 Aug 92 16:01:35 GMT
  7. Organization: Brunel University, Uxbridge, UK
  8. Lines: 278
  9. X-Newsreader: Tin 1.1 PL3
  10.  
  11. Hi.
  12.  
  13. I worked out one way to do it; copy the file to .article while in vi,
  14. quit vi without saving, then go back in to add this bit. Seems to
  15. work, but there must be a better way?
  16.  
  17. This is the requested documentation for BCF77 translated into English.
  18. I did not do the translation, so dont blame me if its wrong. It looks
  19. OK to me though.
  20. ------------:<------------Begin manual------------:<-------------------
  21.  
  22. BC-FORTRAN77 Version 1.3b
  23.  
  24. The version b of BC-FORTRAN77, consisting of the following five
  25. programs (Note: I'm not so sure about this word--"Datei" ) has been
  26. completely programmed by me.  I grant the right to use version b for non-
  27. commercial purposes, but retain the right to sell this version, also
  28. together with other products.  Each copy must be attached to this text.  The
  29. use of this version for military purposes or related research is forbidden !
  30. July, 1990                                      A. Koestli
  31.  
  32.  
  33. BC-FORTRAN77 Version b consists of a compiler, linker, module library and a
  34. resident timing system, which contains among other things a simple debugger.
  35. This version runs on an MS-DOS system with 640kB RAM.  A hard disk is not
  36. necessary.  This allows a compiler to be used simply for programming
  37. courses.  It is also true that such compilers exist for ATARI ST and AMIGA.
  38.  
  39. Inquiries about another or newer version will only be answered if 20 DM
  40. (note: currently about $13) cash or check are sent to cover my costs.  I
  41. only send 3.5" diskettes.
  42.  
  43. BC-FORTRAN77 Vers. b consists of the following programs:
  44.  
  45.      LIES.TXT  This text
  46.      BCF.EXE   Compiler
  47.      BCL.EXE   Linker
  48.      BCRTSY.EXE Resident timing system
  49.      LIB.B     Library with standard functions
  50.  
  51. If a copy is made, all programs must be adopted without changes.
  52.  
  53.                                 Installation
  54. BEFORE the Compiler, Linker or a related program is started, the resident
  55. timing system MUST be loaded.  This is done using the program BCRTSY.EXE.
  56. If BC_FORTRAN77 is used regularly, it is recommended that BCRTSY.EXE is
  57. started in AUTOEXEC.BAT.  The *.EXE programs are copied into a dictionary
  58. which is included in PATH, the program LIB.B belongs in an APPEND dictionary
  59. (see the MS_DOS commands PATH and APPEND).
  60.  
  61.                                   Compiler
  62. The compiler is started with:
  63.           BCF [-option...] Data Base...
  64. If the data base does not contain any points, then .F is added.  The
  65. translated form of the programs are included in Data Base.B .
  66.  
  67. Example:
  68.           BCF -D TEST.F
  69. Translates TEST.F with debug option to TEST.B
  70.           BCF TEST SUB
  71. Translates TEST.F to TEST.B and SUB.F to SUB.B
  72.           BCF TEST.X
  73. translates TEST.X to TEST.B
  74.  
  75.                               Compiler Options
  76. /Option may also be used rather than -Option.
  77.  
  78.      -D   Debug, summarizes -BVL
  79.      -B   debug code, implies -H and also creates a code for debugging
  80.           messages, to test boundaries and substrings.
  81.      -H   parcheck, code to test parameter lists and to create stack
  82.           overflow.
  83.      -V   varlist: variable list for debugger.
  84.      -L   lineslist: Lists lines for debugger.
  85.      -U   Uppercase: Changes lower to upper case (except for character
  86.           constants and formats)  If this option is lacking, xy, XY, Xy and
  87.           xY are different variables!
  88.      -F   Freeinput: Source program not in FORTRAN format. Not standard!
  89.      -P   Protocol: Gives the translated lines.
  90.      -S   Short protocol: one line per module with larger stack frame and
  91.           code (bytes).
  92.      -O   one: Only creates one output file with the name of the first input
  93.           file.
  94.  
  95.                              Language Standard
  96. BC-FORTRAN77 translates the full standard using ANSI/ISO.  The language
  97. standard is breached by several exceptions (most of these are considered
  98. extensions).  I strongly recommend against using these dialect
  99. constructions, since they are not standardised and therefore not exactly
  100. defined.
  101.  
  102. The most important of these are:
  103.  
  104.      INTEGER*1   8 bit INTEGER
  105.      INTEGER*2  16 bit INTEGER
  106.      INTEGER*4   as INTEGER
  107.      LOGICAL*1   8 bit LOGICAL
  108.      LOGICAL*2  16 bit LOGICAL
  109.      LOGICAL*4   as LOGICAL
  110.      IMPLICIT NONE excludes the implicit Typdef.
  111.      COMMON /%adr/ Absolute common, adr is the constant or simple variable
  112.                    which gives the simple segment address.
  113.      EQUIVALENCE () between character and other types as well as
  114.                     combinations in the common.
  115.      Recursive subprogram commands
  116.      Names with a maximum of 8 characters (standard: 6)
  117.  
  118. The most important restrictions are:
  119.  
  120.      32kB Code+SAVE/DATA per subprogram
  121.      32kB local data per subprogram (stack frame)
  122.      32kB per common (actually 64kB, but the address of the last field must
  123.           be less than 32kB.
  124.      700  subprograms per data base.
  125.      500  different commons per data base.
  126.  
  127. In addition there are a number of restrictions which lead to false messages
  128. when unusually large subprograms are used, but in most cases the 32kB code
  129. limit has been exceeded.
  130.  
  131.                                    Linker
  132. The linker is started with:
  133.           BCL [-options...] Data base...
  134. If there are no data points, the .B is included.  The program data base is
  135. saved using the name of the first data base, but with .EXE rather than .B .
  136. The data base LIB.B must also be included to link the standard functions and
  137. the I/O routines to the program.
  138.  
  139. Example:
  140.           BCL -S16 TEST SUB LIB
  141. or:
  142.           BCL -S16 TEST.B SUB.B LIB.B
  143. links the data bases TEST.B and SUB.B and saves the usable program TEST.EXE,
  144. which uses a stack size of 16kB.
  145.  
  146.                                Linker Options
  147.      -Sn  Stack size for the program to be created is set to n kB (max: 64).
  148.           If this option is not used, a 64kB size stack will be assumed.
  149.           All local variables and fields of a subprogram routine will be
  150.           included in the stack.
  151.      -O   optimized linking: Unused subprograms are excluded.
  152.      -P   protocol: lists common blocks and program modules.
  153.  
  154.  
  155.  
  156.                                 Restrictions
  157. The most important restriction is the RAM size--the program data base to be
  158. created (without commons and stack) can be no larger than the largest
  159. available memory block after BCL is loaded.  On the other hand, given large
  160. commons and stack, a program may also be created which cannot be started in
  161. the given RAM.
  162.  
  163. The number of subprograms is limited to 3000, the number of common blocks to
  164. 1500. (The ridiculous 640kB restriction of MS-DOS would take precedence.)
  165.  
  166.                                Timing System
  167. The timing system BCRTSY.EXE contains routines which are necessary for a
  168. FORTRAN77 program and must be loaded before the program is started.
  169. BCRTST includes:
  170.      Arithmetic routines:
  171.           32 bit INTEGER multiplication/division
  172.           REAL arithmetic
  173.           DOUBLE PRECISION arithmetic
  174.           The IEEE accompanying comma format is used,
  175.           REAL: 7 decimal places, 32 bit
  176.           1 bit sign, 8 bit exp., 24 bit mantissa (?)
  177.           DOUBLE PRECISION: 14 decimal places, 64 bit
  178.           1 bit sign, 11 bit exp., 52 bit mantissa
  179.           A mathematical coprocessor is not supported. ( A 80x87/version
  180.           exists, but cannot be tested, since I don't have the hardware.)
  181.  
  182.                              CHARACTER Routines
  183. Debugger:
  184.      A simple debugger to search for errors.  After a timing error, an error
  185. message is given and input expected.  The debugger may also be activated by
  186. pressing a key to interrupt the program if the program is translated with
  187. the B-option.  The following keys are recognized by the debugger as
  188. commands:
  189.      T    Traceback-Follows the subroutine call stacks back, gives the next
  190.           highest Progunit by line number, if -L is used when compiled.
  191.      U    Untrace-Makes all traceback actions retroactive.  This also occurs
  192.           implicitly before the program is reactivated.
  193.      V    Variables of the actual subprogram are given actual values, if it
  194.           is translated with the V-option.  This relates to the last
  195.           Prog.unit if T is pressed.
  196.      Z    End program.
  197.      Space  Continue if no timing error has occurred.
  198.      S    program step (to the next label, subprogram, ELSE, ENDIF, DO)
  199.      C    subprogram step (to the next CALL or RETURN).
  200.  
  201. LIB.B includes the mathematical functions to the full extent of the
  202. standard.  If error messages arise during linking such as:
  203.           External not found: f_SORT
  204. the LIB.B must be included when BCL is called up.
  205.  
  206.  
  207.                                Program Start
  208. A program data base created using BCL may be started as any other using a
  209. desktop or a shell.
  210.  
  211.                                Error Messages
  212. The error messages from the compiler, linker and timing system should be
  213. self-explanatory except for the following.  A complete listing (26 pages in
  214. the Version P handbook) is not possible in this short description.
  215.  
  216.      IO-Error: Number
  217.           In/Output error; can be caught, since the IOSTAT=parameter is
  218.           given in the IO statement.  The number is the same value as given
  219.           in the IOSTAT variable.
  220.  
  221. Numbers:
  222.  
  223.      -1   End of data base.
  224.      -2   End of data in the middle of a record.
  225.      1    Data base number already in use (OPEN)
  226.      2    Too many data bases (OPEN) Max. 32
  227.      3    Data base name too long (OPEN) Max. 31 characters
  228.      5    Data base number not open. only 5 and 6 may be used without OPEN.
  229.      6    Formatted/unformatted contradiction.
  230.      7    REC parameter for data base with ACCESS='SEQUENTIAL'
  231.      8    BACKSPACE, REWIND, ENDFILE for this data base not possible (AUX:
  232.           and PRN:)
  233.      10   Internal I/O only formatted.
  234.      20   Integer overflow during input.
  235.      21   data errors during input by list, for example: missing apostrophe
  236.           for string of characters.
  237.      22   Unexpected end of data.
  238.      23   record too long.
  239.      24   Reading error using UNFORMATTED SEQUENTIAL.
  240.      30   Format element and I/O elements incompatible.
  241.           INTEGER requires an I-format element
  242.           REAL, DOUBLE PRECISION (COMPLEX) a F-, G-, E-, or D- format
  243.           element,
  244.           LOGICAL an L-format element, CHARACTER an A-format element.
  245.  
  246.      31   format element L: T or F expected (input)
  247.      32   format element I: unexpected character (input)
  248.           space, sign or number allowed.
  249.      33   format element E, F or D: unexpected character (input)
  250.           space, sign, number, decimal point, E, e, D or d (exponent)
  251.           allowed.
  252.      34   Too many ( in format
  253.      35   Too many ) in format.
  254.      36   Number order in the wrong place in format.
  255.      37   Format element not recognized.
  256.      38   . lacking in F, E, G or D format element.
  257.      39   4H text or 'text' in format for READ.
  258.           In FORTRAN66 this text could be read in in one format; this is no
  259.           longer allowed in FORTRAN77.
  260.      40   Exponent too large for given format
  261.      42   Format element too long.  Max. length of the internal record (80
  262.           characters).
  263.      43   Internal I/O, record too long.
  264.      44   TL, record too long.  If a record is longer than the internal
  265.           record, it is not possible to tabulate to the left.
  266.      45   Length of field 0 with I,L,F,E,G,D format element.
  267.  
  268. 1000+n    MS-DOS error n
  269. 1002      Data base not found.
  270. 1003      Directory step not found.
  271. 1004      Too many data bases
  272. 1005      Access not allowed.
  273. 1008      Not enough RAM available.
  274. 1012      Access not possible.
  275. 1015      Incorrect procedural identification.
  276.  
  277.                                   Problems
  278.  
  279. The 80x87 Version is not tested and therefore not included.
  280.  
  281. All errors should be reported by mail.
  282. -- 
  283. BFN, Pete.
  284.  
  285.  Dept. Materials Technology | Disclaimer: SERC pay me | You sometimes have to  
  286.  Brunel University          | to report my opinions,  |    listen to
  287.  Uxbridge                   | not for theirs or the   | A lot of useless talk.
  288.  Middx, UB8 3PH, UK.        | the university's.       |         N. Peart. (RUSH)
  289.