home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zephyr.ens.tek.com!psgrain!qiclab!leonard
- From: leonard@qiclab.scn.rain.com (Leonard Erickson)
- Newsgroups: comp.lang.pascal
- Subject: Re: xxx.ndx reading
- Message-ID: <1992Sep8.184536.11078@qiclab.scn.rain.com>
- Date: 8 Sep 92 18:45:36 GMT
- References: <1992Sep1.1009.8464@dosgate> <5ukJqB1w164w@bowker.com>
- Reply-To: 70465.203@compuserve.com
- Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
- Lines: 33
-
- jnicholson@bowker.com (Jim Nicholson) writes:
-
- >Here's a fragment from that program. I've not tested this yet . . .
-
- >function MStoIEEE (MS : MSSingle) : real;
-
- >{ Converts a 4 byte Microsoft format single precision real variable as }
- >{ used in earlier versions of QuickBASIC and GW-BASIC to IEEE 6 byte real }
-
- >var
- > r : real;
- > ieee : array[0..5] of byte absolute r;
-
- >begin
- > FillChar(r,sizeof(r),0);
- > ieee[0] := MS[3];
- > ieee[3] := MS[0];
- > ieee[4] := MS[1];
- > ieee[5] := MS[2];
- > MStoIEEE := r;
- >end; { MStoIEEE }
-
- One comment. The TP 6-byte "real" format is *not* IEEE! Otherwise the
- code looks ok. I had to do the opposite... read TP "reals" in Turbo
- BASIC. :-)
-
-
- >jnicholson@bowker.com
- --
- Leonard Erickson leonard@qiclab.scn.rain.com
- CIS: [70465,203] 70465.203@compuserve.com
- FIDO: 1:105/51 Leonard.Erickson@f51.n105.z1.fidonet.org
- (The CIS & Fido addresses are preferred)
-