home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TOOL_INC.ZIP / STOF.INC < prev    next >
Encoding:
Text File  |  1988-01-29  |  444 b   |  26 lines

  1.  
  2. function stof(B: single): real;
  3.    {convert 4 byte single to real}
  4. var
  5.    PasReal:  real;
  6.    R: array [0..5] of byte absolute PasReal;
  7. begin
  8.    R[0] := B[3];
  9.    R[1] := 0;
  10.    R[2] := 0;
  11.    move(B[0],R[3],3);
  12.    stof := PasReal;
  13. end;
  14.  
  15.  
  16. procedure ftos(PasReal: real; var B: single);
  17.    {convert real to 4 byte single}
  18. var
  19.    R: array [0..5] of byte absolute PasReal;
  20. begin
  21.    B[3] := R[0];
  22.    move(R[3],B[0],3);
  23. end;
  24.  
  25.  
  26.