From: "Matt LeBlanc" <matt.leblanc@gtri.gatech.edu>
Subject: Glut 3.7 and Ada Float_Text_IO package
Date: 1999/10/20
Date: 1999-10-20T19:22:20+00:00 [thread overview]
Message-ID: <7ul4pc$nif$1@news-int.gatech.edu> (raw)
Here is my setup:
Windows NT
Gnat 3.11p
Glut 3.7NT ada bindings (from http://stad.dsl.nl/~jvandyk/packages.html)
I have a larger program that is running into some problems printing out some
float strings (using Ada.Float_Text_IO). I have been able to reproduce the
problem with the simple program below.
Anyone know why the second Ada.Float_Text_IO.Put in this program doesn't
print out the correct number?
-----------------------------------------------
with Glut; --use Glut;
with Text_IO;
with Ada.Float_Text_IO;
procedure float_test is
foobar : Integer;
Temp_Str : String(1..5) := (others => ' ');
begin
Text_IO.Put_Line("Before glutCreateWindow: ");
Ada.Float_Text_IO.Put
(To => Temp_Str(1..5),
Item => 12.34,
Aft => 2, Exp => 0);
Text_IO.Put_Line(Temp_Str); --<< BEFORE glutCreateWindow: OK,
prints out 12.34 >>
foobar := Glut.glutCreateWindow ("Anything");
Text_IO.Put_Line("After glutCreateWindow: ");
Ada.Float_Text_IO.Put
(To => Temp_Str(1..5),
Item => 12.34,
Aft => 2, Exp => 0);
Text_IO.Put_Line(Temp_Str); --!!!!!!!!!!!!!! AFTER glut
CreateWindow: This doesn't print out 12.34 (prints out
20.47)!!!!!!!!!!!!!!!!
end float_test;
-----------------------------------------------
??????
matt.leblanc@gtri.gatech.edu
reply other threads:[~1999-10-20 0:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox