Microsoft Floating Point Versus IEEE

Product Version(s): 3.2 3.3x 4.0x
Operating System:   MS-DOS
Flags: enduser |
Last Modified:  2-MAY-1988    ArticleIdent: Q10866

Question:
   I have created files containing floating point values in BASIC and
would like to use these files in FORTRAN. How would I accomplish this?

Response:
   Since Basic uses Microsoft floating point binary format to store
real values and FORTRAN uses the IEEE format, you would have to
convert your real values from Microsoft floating point binary to IEEE.
   To accomplish this procedure using single precision, please see
Page 167 of the FORTRAN user's guide.
   To accomplish this procedure using double precision numbers, you
would have to do the following:

   1. Write a BASIC program to read the numerical data files, and then
create an output file in text (ASCII) format.
   2. Write a FORTRAN program to read the text file, and then write a
binary file that contains the double precision numbers in the IEEE
floating point format (FORTRAN-readable format).
