From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, WEIRD_QUOTING,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bee36da321a69cd5,start X-Google-Attributes: gid103376,public From: "J�r�me Haguet" Subject: Float_text_io.put (10.0) -> 0.0 ! Date: 2000/03/27 Message-ID: #1/1 X-Deja-AN: 602891169 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: abuse@proxad.net X-Trace: nnrp4.proxad.net 954151762 212.27.41.44 (Mon, 27 Mar 2000 12:09:22 MEST) Organization: Guest of ProXad - France X-MSMail-Priority: Normal NNTP-Posting-Date: Mon, 27 Mar 2000 12:09:22 MEST Newsgroups: comp.lang.ada Date: 2000-03-27T00:00:00+00:00 List-Id: Hello Does anybody know why the following code give on SOME PCs (not all) the following outpout : Wrong result with gnat 3.12p for Windows NT on some PCs Next output should be "10.00" : 10.00 Next output should be "10.00" : 0.00 If you also have ideas to avoid this problem, you are welcome. with Ada.Text_Io; with Ada.Float_Text_Io; with Win32.Windef; with Win32.Wingdi; with Win32.Winuser; procedure Gnat_032 is pragma Linker_Options("-lopengl32"); begin Ada.Text_Io.Put_Line ("Wrong result with gnat 3.12p for Windows NT on some PCs"); --- Ada.Text_Io.Put ("Next output should be ""10.00"" : "); Ada.Float_Text_Io.Put (10.0, Aft => 2, Exp => 0); Ada.Text_Io.New_Line; --- declare Maindc : Win32.Windef.Hdc := Win32.Winuser.Getdc (Win32.Winuser.Hwnd_Top); Pfd : aliased Win32.Wingdi.Pixelformatdescriptor := (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); Ipixelformat : Win32.Int := Win32.Wingdi.Choosepixelformat (mainDc, Pfd'Unchecked_Access); B : Win32.Bool := Win32.Wingdi.Setpixelformat (mainDc, Ipixelformat, Pfd'Unchecked_Access); Glrc : Win32.Windef.Hglrc := Win32.Wingdi.Wglcreatecontext (mainDc); begin null; end; --- Ada.Text_Io.Put ("Next output should be ""10.00"" : "); Ada.Float_Text_Io.Put (10.0, Aft => 2, Exp => 0); Ada.Text_Io.New_Line; end;