comp.lang.ada
 help / color / mirror / Atom feed
From: Cedric <Cedric.Lannock@gmx.net>
Subject: Wrong Asignment
Date: Fri, 23 May 2014 16:15:26 -0700 (PDT)
Date: 2014-05-23T16:15:26-07:00	[thread overview]
Message-ID: <ba57f917-1fcf-46cc-8326-ec3917f44ccf@googlegroups.com> (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




             reply	other threads:[~2014-05-23 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 23:15 Cedric [this message]
2014-05-23 23:28 ` Wrong Asignment Adam Beneschan
2014-05-23 23:34 ` Cedric
replies disabled

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