comp.lang.ada
 help / color / mirror / Atom feed
* Glut 3.7 and Ada Float_Text_IO package
@ 1999-10-20  0:00 Matt LeBlanc
  0 siblings, 0 replies; only message in thread
From: Matt LeBlanc @ 1999-10-20  0:00 UTC (permalink / 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






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-10-20  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-20  0:00 Glut 3.7 and Ada Float_Text_IO package Matt LeBlanc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox