home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / pascal / 5210 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  1.6 KB

  1. Path: sparky!uunet!usc!rpi!scott.skidmore.edu!psinntp!psinntp!bepcp!jnicholson
  2. From: jnicholson@bowker.com (Jim Nicholson)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: xxx.ndx reading
  5. Message-ID: <5ukJqB1w164w@bowker.com>
  6. Date: Thu, 03 Sep 92 16:17:03 EDT
  7. References: <1992Sep1.1009.8464@dosgate>
  8. Organization: Bowker Electronic Publishing, New Providence NJ
  9. Lines: 40
  10.  
  11. andrew.makiejewski@canrem.com (andrew makiejewski) writes:
  12.  
  13. >
  14. > Well trying to further my education and get into other TP programming areas
  15. > for myself I decided I would like to try and write my own QWK packet mail
  16. > utilities. Sure there are all sorts out there, but I want to make my own
  17. > and learn in the process.
  18.  
  19. Good idea.  If you get stuck, I can post source to a TP program that reads
  20. .QWK packets.
  21.  
  22. >
  23. > Well I started with trying to read in the index files for a conference
  24. > and used the program examples that are all around for converting the
  25. > microsoft basic format to Turbo Pascal Real format. Well I am not sure
  26. > if it is working correctly, but the values I get are in an increasing
  27. > order.
  28.  
  29. Here's a fragment from that program.  I've not tested this yet . . .
  30.  
  31. function MStoIEEE (MS : MSSingle) : real;
  32.  
  33. { Converts a 4 byte Microsoft format single precision real variable as    }
  34. { used in earlier versions of QuickBASIC and GW-BASIC to IEEE 6 byte real }
  35.  
  36. var
  37.     r      : real;
  38.     ieee   : array[0..5] of byte absolute r;
  39.  
  40. begin
  41.     FillChar(r,sizeof(r),0);
  42.     ieee[0] := MS[3];
  43.     ieee[3] := MS[0];
  44.     ieee[4] := MS[1];
  45.     ieee[5] := MS[2];
  46.     MStoIEEE  := r;
  47. end;  { MStoIEEE }
  48.  
  49.  
  50. jnicholson@bowker.com
  51.