Sat, 4 Nov 2000 12:40:15 -0600
|
Your problem is that Ada.Text_IO has no Put procedure
for the types in Ada.Real_Time;
You can convert the time span to duration type, using the
function in the real_time package, then display the 'image
attribute of the duration value.
----- Original Message -----
From: "Stephane Richard" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Saturday, November 04, 2000 12:06 PM
Subject: What could be wrong with this sample
> Hello everyone.
>
> Here's a sample I am working on. Everything compiles well when I comment
> out the display of the variables Time_Start, Time_End, Time_Difference
near
> the end.
>
>
>
>
> with Ada.Real_Time; use Ada.Real_Time;
> with Ada.Text_Io; use Ada.Text_Io;
>
> procedure TestTime is
>
> -- ----------------------------------------------------------
> -- GET THE STARTING TIME, LOOP, GET THE END TIME, SUBSTRACT
> -- ----------------------------------------------------------
>
> Time_Start : Ada.Real_Time.Time;
> Time_End : Ada.Real_Time.Time;
> Time_Difference : Ada.Real_Time.Time_Span;
>
> begin
>
> Time_Start := Ada.Real_Time.Clock;
> for I in 1..17400 loop
> delay 0.003448275862;
> end loop;
> Time_End := Ada.Real_Time.Clock;
> Time_Difference := Time_End - Time_Start;
>
> Ada.Text_Io.Put("Start Time: ");
> Ada.Text_Io.Put(Time_Start);
> Ada.Text_Io.New_Line;
> Ada.Text_Io.Put("Start Time: ");
> Ada.Text_Io.Put(Time_End);
> Ada.Text_Io.New_Line;
> Ada.Text_Io.Put("Time Difference: ");
> Ada.Text_Io.Put(Time_Difference);
>
> delay 30.0;
>
> end TestTime;
>
> * NOW Based on other sample code I've looked, other samples make use if
> the Real_Time Library, and seem to display fine from what I've noticed,
using
> the same display techniques.
>
> But when I compile this code as is. it gives me the following error
> message
>
> "Invalid Parameter List In Call." for the 3 lines that display the three
> Time variables. Can anyone tell me what is missing in this I just want
to
> display these values (regardless of formatting for now).
>
> Thank you all in advance for your help.
>
> Stephane Richard
> Software Developer
>
>
> --
> Stephane Richard
> Software Developer
> [log in to unmask]
>
> Sent through GMX FreeMail - http://www.gmx.net
|
|
|