First Test with reals

General discussion on mikroPascal for AVR.
Post Reply
Author
Message
Herbert
Posts: 1
Joined: 09 Mar 2008 12:27

First Test with reals

#1 Post by Herbert » 09 Mar 2008 12:31

Hi,

please see this code and the mystery results.

Code: Select all

program test1;

var  rr : real;

begin
     rr := 10.0;       //= 1.000000E+001 = correct
     rr := rr + 0.9;   //= 1.360000E+001 = ?
     rr := rr * 10.0;  //= 1.598672E-036 = ??
     rr := rr / 10.0;  //= 1.360000E+001 = ???
end.
What is wrong?

Best regards
Herbert

Post Reply

Return to “mikroPascal for AVR General”