home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Fortran.51 / DISK1 / README.DOC < prev    next >
Text File  |  1991-05-17  |  16KB  |  450 lines

  1.                             README.DOC File
  2.               Release notes for the Microsoft(R) FORTRAN
  3.              Professional Development System, Version 5.1
  4.  
  5. This document contains release notes for version 5.1 of the Microsoft
  6. FORTRAN Professional Development System for MS-DOS(R) and the Microsoft
  7. Operating System/2 (MS(R) OS/2).  The information in this document is
  8. more up-to-date than that in the manuals and the Microsoft Advisor
  9. (online help).
  10.  
  11. Microsoft improves its languages documentation at the time of reprinting,
  12. so some of the information in this file may already be in your manuals.
  13.  
  14.  
  15.  
  16. =================================< Contents >==================================
  17.  
  18.  
  19. This file has 5 parts:
  20.  
  21.       Part    Contents
  22.       ----    --------
  23.       1       The SETUP Program
  24.       2       FORTRAN Programming with Microsoft Windows
  25.       3       Additions to the Microsoft FORTRAN Reference
  26.       4       Additions to the Microsoft FORTRAN Environment and Tools
  27.       5       Miscellaneous
  28.  
  29.  
  30.  
  31. =============================< The SETUP Program >=============================
  32.  
  33.  
  34. Disk Space for Additional Libraries
  35. -----------------------------------
  36.  
  37. Each library for a different combination of memory model and floating-
  38. point arithmetic requires a minimum of 220K of disk space. If you intend
  39. to create more than one library when running SETUP, be sure to take into
  40. account the additional disk space required.
  41.  
  42.  
  43. DECOMP.EXE
  44. ----------
  45.  
  46. The files on the FORTRAN 5.1 disks are compressed. SETUP uses a utility
  47. called DECOMP.EXE to decompress the files before copying them to your hard
  48. disk. Normally you should use SETUP to copy files, and they will be
  49. decompressed automatically.
  50.  
  51. Occasionally, however, you may want to copy a file from the SETUP disks
  52. directly to your hard disk without using the SETUP program. In that case,
  53. you will have to use the DECOMP.EXE utility to decompress the file. The
  54. syntax for DECOMP.EXE is:
  55.  
  56.      DECOMP filename.ab$ filename.abc
  57.  
  58. where filename.abc is the decompressed filename.
  59.  
  60. All compressed files end with $. If the filename extension is three
  61. characters long, the final character will be replaced with a $. If the
  62. extension is two characters, the two characters will be retained and a
  63. $ will be placed in the third position. If the extension has one
  64. character, then that character will be retained and followed by a $. If
  65. there is no extension, then the filename will be given a suffix of a
  66. single $.
  67.  
  68. For example:
  69.  
  70.      f1.ex$      ->  f1.exe
  71.      source.do$  -> source.doc
  72.      flib.fd$    -> flib.fd
  73.      mulmix.c$   -> mulmix.c
  74.      makefile.$  -> makefile
  75.  
  76.  
  77.  
  78. ================< FORTRAN Programming with Microsoft Windows >================
  79.  
  80.  
  81. Requirement for Windows Dynamic-Link Libraries
  82. ----------------------------------------------
  83.  
  84. All FORTRAN 5.1 dynamic-link libraries (DLLs) must explicitly export the
  85. symbol WEP. To do this, the statement
  86.  
  87.      EXPORTS
  88.          WEP
  89.  
  90. should be added to the DLL's module definition file. The WEP routine is
  91. included in the FORTRAN 5.1 startup code. If a DLL already has a user-
  92. defined WEP routine (for example, in a mixed-language DLL with existing C
  93. code), the WEP routine should be renamed _WEP. The FORTRAN 5.1 startup
  94. code will call _WEP, if present, during DLL termination. For additional
  95. information concerning the WEP function, see the Windows 3.0 SDK
  96. documentation.
  97.  
  98.  
  99. Close All Files Before Exiting a Windows DLL
  100. --------------------------------------------
  101.  
  102. When a Windows DLL written in FORTRAN terminates, any information
  103. left in a file output buffer will be lost. This is a result of how DLLs
  104. are terminated in Windows. To insure that all data is written to a 
  105. file, explicitly CLOSE any open files in a DLL before the DLL is terminated.
  106. One way of doing this is by adding a function to the DLL code that closes all
  107. files, and calling this function just before the application terminates.
  108.  
  109.  
  110. MessageBox Support
  111. -------------------
  112.  
  113. FORTRAN supports two modes of MessageBox for QuickWin applications,
  114. TASKMODAL and SYSTEMMODAL.  TASKMODAL requires that you respond to the
  115. message box before the application will perform any further calculations;
  116. however, all other applications currently running will not be affected.
  117. SYSTEMMODAL requires you to respond before any application may run.
  118.  
  119.  
  120. Maximizing Windows
  121. ------------------
  122.  
  123. To maximize the frame window of a QuickWin application, place the 
  124. following statement in the WIN.INI file:
  125.  
  126.      [<appname>]
  127.      QWINMaximized=1
  128.  
  129. where <appname> is the base name of your executable file. For example, if
  130. the executable file is called PROGRAM.EXE, the value for <appname> would
  131. be PROGRAM.
  132.  
  133.  
  134. Windows DLLs and Subprograms with String Arguments
  135. --------------------------------------------------
  136.  
  137. Don't pass char*(*) arguments to a subprogram residing in a Windows DLL.
  138. This is because the runtime in the calling DLL or EXE cannot communicate
  139. the length of the string with the runtime in the called DLL.
  140.  
  141.  
  142.  
  143. ==============< Additions to the Microsoft FORTRAN Reference >=================
  144.  
  145. /Gt option
  146. ----------
  147.  
  148. The /Gt, or data threshold, compiler option can remedy a number of link-
  149. time and run-time errors in FORTRAN 5.1.  The /Gt option sets a threshold
  150. value that determines where data items are stored in memory. Data items
  151. that are greater in size than the threshold value, and that would normally
  152. be stored in the default data segment, or DGROUP, are moved to a far
  153. segment of data.  This frees up more room in DGROUP for variables less
  154. than the threshold value and for other uses, such as the program STACK
  155. and NEAR HEAP.
  156.  
  157. Using the /Gt switch can often help eliminate the LINK errors:
  158.  
  159.      L1070: 'segment name':Segment exceeds 64K
  160.  
  161. where segment can be _BSS or _DATA
  162.  
  163.      L2041: Stack Plus Data exceeds 64K
  164.  
  165. and the run-time error:
  166.  
  167.      F6700: Heap Space Limit Exceeded
  168.  
  169. In each of these cases, too much data is being stored in DGROUP, and using
  170. the /Gt switch may free up the required space.  See Section 7.6 of the
  171. FORTRAN 5.1 Reference for more information.
  172.  
  173.  
  174. /Oc Option
  175. ----------
  176.  
  177. When you use the /Oc (default common subexpression optimization), the
  178. compiler examines only short sections of code for common subexpressions.
  179. You can disable default common subexpression optimization with the /Od
  180. option.
  181.  
  182.  
  183. Special Device Names
  184. --------------------
  185.  
  186. The list of special device names in the FORTRAN Reference Manual is
  187. incomplete.  The complete list of special device names is:
  188.  
  189.      Device Name              Comments
  190.      ===========              ========
  191.      CON                      stdout, stdin
  192.      USER                     stdout, stdin
  193.      COM1                     COM1 port
  194.      AUX                      COM1 alias
  195.      LINE                     COM1 alias
  196.      LPT1                     stdprn
  197.      PRN                      stdprn
  198.      LPT2
  199.      LPT3
  200.      LPT4
  201.      ERR                      stderr
  202.      NUL                      null device
  203.  
  204. Note that COM2, COM3, and COM4 are not special device names in FORTRAN 
  205. 5.1.
  206.  
  207. To access these devices, use an OPEN statement of the form:
  208.  
  209.       OPEN (10, FILE='lpt1')
  210.  
  211. For connections to LPT2 or COM2, you are also required to specify
  212. STATUS='old'.  These two devices are not treated as standard devices
  213. like LPT1 and COM1.  Output to these devices is of the same form as to a
  214. file, i.e. the output is buffered and carriage control characters in 
  215. column 1 are ignored.
  216.  
  217.  
  218. /ND Option
  219. ----------
  220.  
  221. When using the /ND option in a module, you must also set the loadds
  222. attribute on all subprograms called from outside the module.
  223.  
  224.  
  225. Restrictions on String Assignment
  226. ---------------------------------
  227.  
  228. The right and left sides of a string assignment may not reference the
  229. same memory location.  For example, the following may fail because the
  230. generated code overlays the input as it produces the output:
  231.  
  232.      character *10 string/'0123456789'
  233.      string = '#' // string
  234.      write (*,*) 'string = ' string
  235.      end
  236.  
  237.  
  238. IBM VS Extensions in Microsoft FORTRAN
  239. -----------------------------------------
  240.  
  241. Microsoft FORTRAN supports only the following IBM VS FORTRAN
  242. extensions:
  243.  
  244. - 31-character names
  245. - Allowing integer arrays to contain FORMAT specifications
  246. - DO statements without specified labels
  247. - DO WHILE statement
  248. - END DO statement
  249. - Equivalence of character and non character items
  250. - Mixing of character and non-character items in COMMON
  251. - NAMELIST
  252. - Specification of common block items in DATA outside block data
  253.     subprograms
  254. - Initialization on the declaration line
  255. - IMPLICIT NONE
  256. - INCLUDE
  257. - Length specification within declarations
  258. - Noninteger array subscripts
  259. - Z edit descriptor
  260. - ! comments
  261. - $ and _ in identifiers
  262.  
  263.  
  264. $NOTRUNCATE Metacommand
  265. -----------------------
  266.  
  267. $NOTRUNCATE is now the default. As a result, it is possible to create
  268. variable names, common block names, and function or subroutine names that
  269. are longer than the 26-character space allotted in a .LST file. If these
  270. identifiers do not differ in the first 26 characters, the .LST file shows
  271. them with the same name.
  272.  
  273.  
  274. New NINT Functions
  275. ------------------
  276.  
  277. Three NINT intrinsic functions have been added: NINT1, NINT2, and NINT4.
  278. These return integer values of one, two, and four bytes respectively.
  279.  
  280.  
  281. The /4I2 Switch and the INT and NINT Functions
  282. ----------------------------------------------
  283.  
  284. The length of the value returned by the INT and NINT intrinsic functions
  285. is determined by the integer storage switch: two bytes if /4I2 is used,
  286. four bytes if /4I4 (the default) is used.
  287.  
  288. If you want these functions to return a value with a length different
  289. from the length set by the integer storage switch, use INT1, INT2, or
  290. INT4 instead of INT, and use NINT1, NINT2, or NINT4 instead of NINT.
  291.  
  292.  
  293. 80387 Coprocessor Instructions
  294. ------------------------------
  295.  
  296. The run-time libraries recognize the presence of an 80387 coprocessor. If
  297. you are not using the alternate math package, the library uses the 80387
  298. SIN and COS instructions, rather than deriving sines and cosines from the
  299. FPTAN instruction.
  300.  
  301.  
  302. Array Conformity in Functions and Subroutines
  303. ---------------------------------------------
  304.  
  305. A formal array argument in a subroutine or function does not have to have
  306. the same number of dimensions or total size as the actual array argument
  307. passed to it. This permits the procedure to contain a formal array that
  308. is as large as you think you will ever need; the calling program can then
  309. pass any array of the same size or smaller.
  310.  
  311. Note, however, that if the formal and actual dimensions do not match in
  312. quantity and size, the formal array elements do not point to the same
  313. memory locations as the actual array elements with the same subscripts.
  314. In this case, your program has to calculate the correct subscripts.
  315.  
  316.  
  317. "Out of Memory" Error Message
  318. -----------------------------
  319.  
  320. This compiler error does not have an error number. It occurs when the FL
  321. program does not have sufficient memory, as in the following cases:
  322.  
  323. 1. You used wildcard characters to specify the files to be compiled (for
  324. example, FL *.FOR) and there were too many files. The exact number of
  325. files that can be handled depends on the amount of system memory.
  326.  
  327. 2. The computer did not have enough free memory. This may occur when
  328. other processes are running under Microsoft Windows or OS/2.
  329.  
  330.  
  331. Additional Compiler Error Messages
  332. ----------------------------------
  333.  
  334. F2399: <name> : COMMON (or EQUIVALENCE) : automatic variable illegal.
  335.  
  336. A variable previously declared as AUTOMATIC cannot appear in a COMMON
  337. block or an EQUIVALENCE statement.
  338.  
  339.  
  340. F4187: Debugging information exceeds 64K - extra ignored.
  341.  
  342. There was more debugging information than could fit in the allotted 64K
  343. space. The additional information (which is usually symbols) was
  344. discarded.
  345.  
  346.  
  347. Revised Compiler Error Message
  348. ------------------------------
  349.  
  350. The <attribute> in error message F2384 can be "common block" or
  351. "equivalenced," in addition to ALLOCATABLE, EXTERN, FAR, or HUGE.
  352.  
  353.  
  354. Linker Path Specification
  355. -------------------------
  356.  
  357. The /link option does not allow you to specify the linker's path. FL
  358. assumes the linker is in the same directory as the compiler.
  359.  
  360.  
  361. FL Switch Default Values
  362. ------------------------
  363.  
  364. If no switches appear in the FL command line, the source code is compiled
  365. with the following defaults:
  366.  
  367. 1. The Large memory model is used
  368. 2. The 8086/8088 instruction set is used
  369. 3. 8087/287/387 in-line instructions are used for floating-point
  370.    calculations
  371. 4. Variable, subroutine, or function names are not truncated
  372. 5. All integer and single-precision floating-point numbers are four bytes
  373. 6. All Microsoft extensions to FORTRAN are enabled
  374. 7. FORTRAN 66-style DO statements are disabled
  375. 8. Full optimization is performed
  376. 9. Debugging (extended run-time error handling) is disabled
  377.  
  378. Any metacommands in a source code file override these defaults.
  379.  
  380.  
  381. Compiling Extremely Large Programs
  382. ----------------------------------
  383.  
  384. This release contains the file F1L.EXE, which is an alternate form of the
  385. Compiler Pass 1 disk if you need it.
  386.  
  387. This compiler pass is used to compile programs that receive error message
  388. "F1901: program too large for memory." The F1L.EXE pass is invoked by
  389.  adding the /B1 option to the FL command line, as follows:
  390.  
  391.      FL  /B1  F1L.EXE  <sourcefile>.FOR
  392.  
  393. where <path> is the path (including drive and directory) where F1L.EXE
  394. resides, and <sourcefile> is the name of the FORTRAN source file you are
  395. compiling. Alternatively, you can rename F1L.EXE to F1.EXE to make the
  396. high-capacity version the default.
  397.  
  398.  
  399. Compiler Errors and Warnings Generated by $DEBUG and /4Yb
  400. ---------------------------------------------------------
  401.  
  402. In addition to the expanded run-time error handling and testing
  403. that $DEBUG and /4Yb enable, there are a number of compiler errors and
  404. warnings that appear if $DEBUG or /4Yb are used. They are:
  405.  
  406. Error F2367: INTEGER : range error
  407. Error F2533: lower substring bound exceeds upper bound
  408. Error F2534: upper substring bound exceeds string length
  409. Error F2535: lower substring bound not positive
  410. Error F2536: subscript out of range
  411. Warning F4501: subscript out of range (array argument)
  412.  
  413.  
  414.  
  415. ======< Additions to the Microsoft FORTRAN Environment and Tools >======
  416.  
  417.  
  418. Displaying FORTRAN Arrays in CodeView
  419. -------------------------------------
  420.  
  421. CodeView allows you to expand arrays and examine the individual elements
  422. of an array.  This feature, however, only works on one-dimensional arrays.
  423. Arrays of two dimensions or more cannot be expanded in CodeView.
  424.  
  425. Another limitation of CodeView is that it cannot keep track of elements
  426. of HUGE arrays beyond the first 64K, or first segment, of the array.  An
  427. attempt to display an array element beyond the first segment will fail to
  428. give the proper value.
  429.  
  430.  
  431. TXTONLY.OBJ
  432. -----------
  433.  
  434. TXTONLY.OBJ is useful for programs that may use _clearscreen, _outtext,
  435. _settextcolor, _settextwindow, and so on, but do not use graphics. If you
  436. have a program that never has to work in or switch into graphics modes and
  437. never changes the palette, linking TXTONLY.OBJ into your DOS .EXE file (in
  438. the .OBJ field) will save about 12K of .EXE size.
  439.  
  440.  
  441.  
  442. ================================< Miscellaneous >=============================
  443.  
  444. APPEND.EXE
  445. ----------
  446.  
  447. Do not use the APPEND.EXE utility (shipped with DOS 4.01 and later
  448. versions) with FORTRAN applications.  FORTRAN 5.1 does not set the
  449. APPEND path and the results are unpredictable.
  450.