Board index » delphi » format for 'real'

format for 'real'

I need a var 'real' format

Re:format for 'real'

On 31 Jul 2001 12:12:16 GMT, Zzhenyi sez:

>I need a var 'real' format

I can sell you one, almost new in the box, for $21.95 USD + shipping.

Peter B. Steiger
Cheyenne, WY
If you reply by email, send it to pbs at com dot
canada (or vice-versa).  All adverti{*word*224}ts will be
returned to your postmaster, eh!

Re:format for 'real'

"Zzhenyi" <> wrote in message

> I need a var 'real' format

8 bits exponent
followed by 39 bits mantissa
then 1 bit sign

Value is defined to be
  0 if exponent=0
  (-1)**s  *  2**(exponent) * (1.mantissa)

see chapter 21 of the Language guide.

If you are writing a conversion program, consider writing the program
in TP and letting TP do the conversion...

  r : real;
  s : single;
  s := r;

Then you don't need to know the format yourself.


Other Threads