home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / disks / disk470.lzh / BCF / fortran.doc < prev    next >
Text File  |  1991-03-10  |  15KB  |  440 lines

  1. /* This translation of 'lies.txt' was done by Markus Buchhorn                */
  2. /* (markus@mso.anu.edu.au) in the interests of spreading PD/similar software.*/
  3. /* I accept no responsibility whatsoever for errors in the translation of the*/
  4. /* document. If you don't trust me, get someone else to translate it for you.*/
  5. /* A point of clarification: I have used the term 'subroutine' liberally in  */
  6. /* the translation. More correct translation would be 'sub-program', yet I   */
  7. /* think subroutine is usually intended.                                     */
  8. /*                                                                           */
  9. /* I apologise for the disjointedness of some of the sentences, but sometimes*/
  10. /* I just translated the sentence as it stood, or had to make up words that  */
  11. /* approximated the intent of the sentence/caption.    Markus Buchhorn 4Feb91*/
  12.  
  13.  
  14.     -------------------------------------------------
  15.     |             BC-FORTRAN77 Vers.1.3C            |
  16.     |  Copyright: Andre Köstli                      |
  17.     |     1990    Martin-Luther-Str.63              |
  18.     |             D7000 Stuttgart 50                |
  19.     |-----------------------------------------------|
  20.     | The Version "C" of  BC-FORTRAN77, consisting  |
  21.     | of the (later described) 5 Parts,             |
  22.     | was totally programmed by myself.  I          |
  23.     | allow free usage-rights to  Vers.C for        |
  24.     | noncommercial applications, all rights though |
  25.     | remain with me, in particular, the sale of    |
  26.     | Vers.C, even in the accompaniment of other    |
  27.     | Products, is not permitted. Every copy        |
  28.     | of this distribution must contain this        |
  29.     | textfile (uneditted) [NB-German version -MB]  |
  30.     | For commercial aplications there exists       |
  31.     | Vers.P of this programme, which has a         |
  32.     | licensing requirement.                        |
  33.     | The use of these programmes for military      |
  34.     | purposes, and related research, is forbidden !|
  35.     | March 1990                          A.Köstli  |
  36.     -------------------------------------------------
  37.  
  38.  
  39. BC-FORTRAN77 Version C is a part of an extensive 
  40. development system, Version P (see below). Vers.C
  41. is intended to provide, in a simple way, a compiler for
  42. programming courses. To meet this intent, this software
  43. runs almost identically on AMIGAs, ATARI STs and
  44. MS-DOS computers.
  45.  
  46.  
  47. BC-FORTRAN77 Vers.P
  48. -------------------
  49.  
  50. BC-FORTRAN77 Vers.P is an extensive development system, 
  51. that combines, besides a compiler and linker, also an editor,
  52. precompiler and version-management-system under a single
  53. User-interface. The system is designed so that in the
  54. development-cycle only the modified subroutines need
  55. to be recompiled; even with programmes with several hundred
  56. subroutines, each development-cycle (edit, compile, link and run)
  57. takes only a few seconds. Mathematical coprocessors are supported 
  58. in Version P, as well as 68020-processor specific commands.
  59.  
  60. Version P contains a user-friendly debugger with source-code
  61. interface, to enable interactive testing, as well as several
  62. libraries which (among other things) allow the use of the
  63. Amiga libraries: Exec, Dos, Graphics and Intuition.
  64.  
  65. Together with a 150 page manual, BC-FORTRAN77 Vers.P
  66. costs DM 350.- and can be ordered from the above address.
  67. (Please indicate AMIGA or ATARI ST. The MS-DOS version of Version P.
  68. does not exists at this time.)
  69.  
  70.  
  71.  
  72. BC-FORTRAN77 Vers.C
  73. -------------------
  74.  
  75. BC-FORTRAN77 Vers.C, to which the rest of this text pertains,
  76. consists of the following files:
  77.  
  78.     LIES.TXT    This Text (German version -MB)
  79.     BCF         Compiler
  80.     BCL         Linker
  81.     BCRTSY      Runtimesystem
  82.     MATHLIB.B   Library with standard functions
  83.  
  84. If you make a copy, all of these files must be included unchanged.
  85.  
  86. To run BC-FORTRAN77 on the AMIGA you need 1MB RAM, and it
  87. will run from the CLI or the shell.
  88.  
  89.  
  90.  
  91. Installation.
  92. -------------
  93.  
  94. The easiest way to use this is attained if you work
  95. only from one directory, in which all of the parts of
  96. BC-FORTRAN77 are.
  97.  
  98. Should you want to use several directories, one can 
  99. install it with the following CLI commands:
  100.  
  101.     COPY BC? C:
  102.     COPY BCRTSY S:
  103.     COPY MATHLIB.B S:
  104.  
  105.  
  106. Compiler
  107. --------
  108.  
  109. The Compiler is executed with 
  110.  
  111.     BCF [-Option...] Datafile...
  112.  
  113. If <Datafile> contains no period '.' then a .F extension is assumed.
  114. The compiled version of the program is written to Datafile.B
  115.  
  116. Example:
  117.  
  118.     BCF -D TEST.F
  119.  
  120. compiles TEST.F with the debug-option into TEST.B
  121.  
  122.     BCF TEST SUB
  123.  
  124. compiles TEST.F to TEST.B and SUB.F to SUB.B
  125.  
  126.     BCF TEST.X.Y
  127.  
  128. compiles TEST.X.Y to TEST.B (Careful!).
  129.  
  130.  
  131. Compiler Options
  132. -----------------
  133.  
  134.     -D      Debug, combines -BVL
  135.  
  136.     -B      deBugcode, implies -H and produces 
  137.                 as well code for the Debug-call,
  138.                 to check array-bounds and
  139.                 substrings.
  140.  
  141.     -H      parcHeck, code to check  parameter-
  142.                 lists and Stackoverflow is generated.
  143.  
  144.     -V      Varlist: Variablelist for the Debugger.
  145.  
  146.     -L      Lineslist: Line-number-list for the Debugger.
  147.  
  148.     -U      Uppercase: convert lower- to uppercase
  149.                 (except in character-constants and
  150.                 Formats). If this option is omitted then
  151.                 xy, XY, Xy and xY are four different
  152.                 variables!
  153.  
  154.     -F      Freeinput: Sourcecode is not in FORTRAN
  155.                 format. non-standard!
  156.  
  157.     -P      Protocol: Printout of compiled lines.
  158.  
  159.  
  160. Language-coverage
  161. ------------------
  162.  
  163. BC-FORTRAN77 compiles the complete set of the ANSI/ISO standard 
  164. The standard is however 'damaged' by several unusual [local -MB] features
  165. (which are most commonly described as 'extensions').
  166. I strongly recommend that local dialectic constructs are
  167. not used, as they are not standardised and are thus not
  168. defined exactly.
  169.  
  170. The most important variations [non-standard features -MB]:
  171.  
  172.     INTEGER*1       8 bit INTEGER
  173.     INTEGER*2      16 bit INTEGER
  174.     INTEGER*4      same as INTEGER
  175.     LOGICAL*1       8 bit LOGICAL
  176.     LOGICAL*2      16 bit LOGICAL
  177.     LOGICAL*4      same as LOGICAL
  178.     IMPLICIT NONE  turn off implicit typing of variables
  179.     COMMON /%adr/  Absolute Common, adr is a constant
  180.                         or similar variable.
  181.     EQUIVALENCE()  between Character and other types
  182.                    as well as mixing in common-blocks.
  183.     Recursive subroutine-calling.
  184.     Names with max. 8 characters (Standard: 6).
  185.  
  186.  
  187. The most important limitations are:
  188.  
  189.     32kB Code per subroutine
  190.     32kB SAVE/DATA per subroutine or datablock
  191.     700  subroutines per <datafile> [i.e. main program -MB]
  192.     500  different common-blocks per main-program.
  193.  
  194. As well, there are a set of limitations that lead to error-messages,
  195. due to unreasonably large subroutines, however in most cases the 
  196. above 32kB code-size limit would have been exceeded by that stage.
  197.  
  198.  
  199. Linker
  200. ------
  201.  
  202. The Linker is executed by:
  203.  
  204.     BCL [-Options...] Datafile...
  205.  
  206. If <datafile> has no period '.', then a .B extension is assumed.
  207. The programme data is then put in the file with name <datafile>, with no
  208. .B extension. If standard mathematical functions are used then the file
  209. MATHLIB.B has to be included in the link. The Runtimesystem BCRTSY is
  210. automatically loaded.
  211.  
  212. example:
  213.  
  214.     BCL -S16 TEST SUB MATHLIB
  215.  
  216. or
  217.  
  218.     BCL -S16 TEST.B SUB.B MATHLIB.B
  219.  
  220. will link the files TEST.B und SUB.B and will put the executable result in
  221. TEST, which will use a stacksize of 16kB.
  222.  
  223.  
  224. Linker Options
  225. ---------------
  226.  
  227.     -Sn     Stacksize of the resulting Programme
  228.                 will be set to n kB . If this option is omitted, 
  229.                 then a very large stack will be assumed.
  230.                 All local-variables and subroutine-variable-storage
  231.                 will be placed on the stack.
  232.  
  233.     -O      Optimized Linking: subroutines which are never called
  234.                 are omitted.
  235.  
  236.     -P      Protocol: List of Commonblocks and
  237.                 Programme-modules.
  238.  
  239.  
  240. Limitations
  241. --------------
  242.  
  243. The most important limitation is due to RAM: availability: 
  244. The executable to be generated (without common-blocks and stack)
  245. can only be as large as the largest free memory-chunk after the
  246. loading of BCL. Otherwise, if one has a large common-block or stack, 
  247. one can generate an executable that can't be run in the available RAM.
  248.  
  249. The number of subroutines is limited to 3000, the number of common-blocks
  250. is limited to 1500.
  251.  
  252.  
  253. Runtimesystem
  254. --------------
  255.  
  256. The runtimesystem BCRTSY contains routines that are needed by FORTRAN77
  257. programmes, and is always automatically linked in with every programme.
  258.  
  259. BCRTSY contains:
  260.  
  261.     Arithmetic-routines:
  262.         32 bit INTEGER Multiplication/Division
  263.         REAL Arithmetic
  264.         DOUBLE PRECISION Arithmetic
  265.         A personal Floating-point-format is used, which is
  266.         more oriented towards speed than precision.
  267.         REAL: 6 Decimal-places, 32 bit
  268.          1 bit sign, 23 bit Mantissa, 8 bit Exp.
  269.         DOUBLE PRECISION: 13 Decimal-places, 6 bit
  270.          1 bit sign, 47 bit Mantissa, 16 bit Exp.
  271.         A mathematics coprocessor is not 
  272.         supported in Vers.C.
  273.  
  274.     CHARACTER Routines
  275.  
  276.     I/O Routines
  277.  
  278.     Debugger:
  279.         A simple Debugger to aid the search for errors.
  280.         When a programme, that had been compiled with -D or -B,
  281.         is executed, a debug-window is opened. After a run-time error
  282.         a message is printed there and it then waits for input.
  283.         The Debugger can also be activated with input in this window, 
  284.         to interrupt the program execution. The following keys are
  285.         recognised as commands by the debugger:
  286.  
  287.             S   Printout of the Subroutine-Call Stack
  288.                 With line-numbers, if the -L Option was used
  289.                 in the compilation.
  290.  
  291.             V   (printout of) Variables of the current subroutine
  292.                 with current contents, if the -V Option was used
  293.                 in the compilation.
  294.  
  295.             Z   Stop the program (quit).
  296.  
  297.             Spacebar  Continue execution, if no run-time 
  298.                       error ocurred.
  299.  
  300.             U   Continue execution until change of subroutine
  301.  
  302.             L   continue with continual display of Subroutine+Line number.
  303.  
  304.             P   continue, with display at every 200 steps.
  305.  
  306.             T   Continue one step (to the next label,
  307.                 subroutine, ELSE, ENDIF oder DO).
  308.  
  309.  
  310. Library
  311. ----------
  312.  
  313. MATHLIB.B contains the full mathematical functions
  314. as described in the standard mentioned above.
  315. If you get an error-message similar to:
  316.  
  317.     External nicht gefunden: f_SQRT          [External not found: -MB]
  318.  
  319. during the linking, then MATHLIB.H must be explicitly included in
  320. the call to BCL.
  321.  
  322.  
  323. Programme execution
  324. --------------------
  325.  
  326. A programme generated by BCL can be executed like any other 
  327. from the CLI. As each programme has its own stacksize (-S option
  328. in BCL), the CLI command STACK is not needed.
  329. If the programme needs input from the keyboard
  330. ( READ(*,... ) ) one mustn't forget to reactivate the window
  331. if the debug-window was also opened.
  332.  
  333.  
  334. Error messages
  335. ---------------
  336.  
  337. The error-messages from the Compiler, linker and
  338. runtimesystem should be, with the following exception,
  339. self-explanatory. The complete listing (26 pages in
  340. the Vers.P manual) would exceed the framework of 
  341. this description.
  342.  
  343.  [Of course, this could be a problem for the non-German speakers, as I'm
  344.   not sure whether the error messages are numeric, German, English.... 
  345.   I suggest posting error messages to the net, there are enough German
  346.   speakers out there. Failing that, send me a mail message -MB]
  347.  
  348.    IO-Error: Nummer     [I/O-error: number]
  349.         input/output-error; can be caught by putting
  350.         the IOSTAT= parameter in the IO statement. The
  351.         number is the same value as is then returned
  352.         into the IOSTAT variable.
  353.  
  354. [Note that 'Format-element' is usually described as 'Format-descriptor' -MB]
  355.  
  356.     Number
  357.  
  358.     -1   Datafile-end.
  359.     -2   Datafile-end in the middle of a record.
  360.     1    Datafile-number already used (OPEN).
  361.     2    Too many datafiles (OPEN). Max. 32 Datafiles.
  362.     3    Datafilename too long (OPEN).Max. 31 characters.
  363.     5    Datafile-number not opened. Only units
  364.            5 and 6 can be used without being OPENed.
  365.     6    Formatted/unformatted conflict.
  366.     7    REC-Parameter for Datafile with ACCESS='SEQUENTIAL'
  367.     8    BACKSPACE, REWIND, ENDFILE for this Datafile are
  368.          not possible (AUX: und PRN:).
  369.     10   Internal I/O only formatted.
  370.     20   INTEGER overflow during input.
  371.     21   Dataerror during list-driven input,
  372.          e.g. missing apostrophe on a character-string.
  373.     22   Unexpected datafile-end.
  374.     23   Record too long.
  375.     24   Readerror with UNFORMATTED SEQUENTIAL.
  376.     30   Format-element and I/O-List-element don't match
  377.            INTEGER requires the  I-Format-element,
  378.            REAL, DOUBLE PRECISION (COMPLEX) one (two)
  379.              F-, G-, E- or D-Format-elements,
  380.            LOGICAL an L-Format-element,
  381.            CHARACTER an A-Format-element.
  382.     31   Format-element L: T or F expected (input)
  383.     32   Format-element I: unexpected character (input)
  384.            space,sign and numbers permitted.
  385.     33   Format-element E, F or D: unexpected
  386.            character (input).
  387.            space, sign, numbers,
  388.            decimalpoint, E, e, D or d (for exponent)
  389.            permitted.
  390.     34   Too many ( in Format.
  391.     35   Too many ) in Format.
  392.     36   numeric-sequence not in permitted place in format description.
  393.     37   Format-element not recognised.
  394.     38   . missing in F, E, G or D Format-element.
  395.     39   4Htext or 'text' in Format for READ.
  396.            In FORTRAN66 one could include text in a Format
  397.            in this way; no longer permitted
  398.            in FORTRAN77.
  399.     40   Exponent too large for indicated format.
  400.     42   Format-element too long. Max. Length of the internal
  401.            Recordbuffer (80 characters).
  402.     43   Internal I/O, Record too long.
  403.     44   TL, Record too long. If a Record is longer than
  404.            the internal Recordbuffer, one can no
  405.            longer tabulate to the left.
  406.     45   Fieldlength of 0 with I,L,F,E,G,D Format-element.
  407.  
  408.     1000+n  Amiga-Dos Error n
  409.             See Amiga-Dos Handbook, Appendix A.
  410.  
  411.     1202 Datafile in use.
  412.     1203 Datafile exists already.
  413.     1204 Directory not found.  [I think.. -MB]
  414.     1205 Datafile not found.
  415.     1206 Invalid Window-Parameter
  416.     1209 Function is not possible on this device.
  417.     1210 Invalid Datafilename.
  418.     1212 Confusion Datafilename/Directoryname.
  419.     1213 Disk not validated.
  420.     1214 Disk write-protected.
  421.     1218 No Disk present.
  422.     1221 Disk full.
  423.     1222 Datafile delete-protected.
  424.     1223 Datafile write-protected.
  425.     1224 Datafile read-protected.
  426.     1225 Not an Amiga-Dos Disk.
  427.     1226 No disk present.
  428.     1232 No space for entry.
  429.  
  430.  
  431. Problems
  432. --------
  433.  
  434. If someone believes that the compiler, linker or library 
  435. contains an error, please let me know in writing.
  436. Please understand that for this product (as opposed to
  437. Version P.) there is no updateservice nor telephone
  438. assistence possible.
  439.  
  440.