Microsoft KB Archive/106527
PSS ID Number: 106527
Article Last Modified on 3/24/2000
The information in this article applies to:
- Microsoft FORTRAN PowerStation for MS-DOS 1.0
This article was previously published under Q106527
Data corruption may occur after a call to GETFILEINFOQQ due to the NAME field of /FILE$INFO/ in FLIB.FI and FLIB.FD being declared character*13 instead of character*255. In some cases the following error:
may be produced.
Page 313 of the FORTRAN PowerStation "Language Guide" shows the structure of /FILE$INFO/, which is used to return information about the file that matches the search criteria. The NAME (of file) field is declared as character*255. However, the NAME field is declared only as character*13 in FLIB.FD and FLIB.FI. Therefore, using /FILE$INFO/ from FLIB.FD with GETFILEINFOQQ will cause data corruption because the character*13 field overflows.
In F32\INCLUDE\FLIB.FI and F32\INCLUDE\FLIB.FD change
CHARACTER*13 NAME ! Filename
to the following:
CHARACTER*255 NAME ! Filename
Microsoft has confirmed this to be a problem in FORTRAN PowerStation version 1.0. This problem was corrected in FORTRAN PowerStation version 1.0a.
To demonstrate the problem (before making the above correction):
- In the Visual Workbench (VWB), build F32\SAMPLES\RUNTIME\RUNTIME.FOR with the project in debug mode.
Set a breakpoint on line 166:
length = GETFILEINFOQQ(files, info, handle)
- "GO" (F5), and then enter *.FOR in the "F32 DEBUG" window.
- Open the Locals window (choose Locals from the Windows menu). Note the values of some integers such as IMIN (should be zero).
- Single step (F10). Note that IMIN now equals 8224 (hexadecimal 2020).
- In F32\INCLUDE\FLIB.FI and F32\INCLUDE\FLIB.FD, change NAME from CHARACTER*13 to CHARACTER*255.
7 Repeat steps 1-5. This time IMIN will remain zero.
Additional query words: 1.00 kbdocerr
Keywords: kbbug KB106527
Technology: kbAudDeveloper kbFORTRANPower100DOS kbFortranSearch kbZNotKeyword3