comp.lang.ada
 help / color / mirror / Atom feed
* Wrong Asignment
@ 2014-05-23 23:15 Cedric
  2014-05-23 23:28 ` Adam Beneschan
  2014-05-23 23:34 ` Cedric
  0 siblings, 2 replies; 3+ messages in thread
From: Cedric @ 2014-05-23 23:15 UTC (permalink / raw)


Hi All,

I am learning Ada since a few days. In my book is a simple excercise to write a program. It looks like this:

with Text_IO;
with My_Int_IO;
with My_Flt_IO;
----------------------------------------------------------------------
procedure chapter2_programming_projects_1 is
   Celsius    : float := 0.0;
   Fahrenheit : float := 0.0;

begin
   -- Input
   Text_IO.Put("Please put in the temperature in Fahrenheit: ");
   My_Flt_IO.Get(Item => Fahrenheit);
   
   -- Processing
   Celsius := (5/9) x (Fahrenheit - 32);
   
   -- Output
   Text_IO.Put(Item => "The temperature in Celsius is ");
   My_Flt_IO.Put(Item => Celsius, Fore => 10, After => 2);
   
end chapter2_programming_projects_1;

The compiler says:

Celsius := (5/9) x (Fahrenheit - 32); -- binary operator expected

Why does this statement result in an binary object?

Kind regards

Cedric




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-23 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-23 23:15 Wrong Asignment Cedric
2014-05-23 23:28 ` Adam Beneschan
2014-05-23 23:34 ` Cedric

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