comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier <gautier.demontmollin@maths.unine.ch>
Subject: Re: Pointer function parameter
Date: 2000/10/17
Date: 2000-10-17T00:00:00+00:00	[thread overview]
Message-ID: <39EC12B6.A9285EFD@maths.unine.ch> (raw)
In-Reply-To: iotnusc13ulppptc433i83o4n2ld672eof@4ax.com

Mary:

> How can you handle address-of-operator (&) in Ada.
> 
> ie.
> 
> float calculation(float &num2, float num1)

Good news: you can do everything with in/in out/out
parameters, almost no need of 'address or 'access.
"Bad" news: if you are trying to affect num2 (are you ?),
you can't do it in a function: a bug-prone side-effect. Do it as:

procedure calculation( num1: float; num2: in out float; result: out float ) is...

HTH
______________________________________________________
Gautier  --  http://members.nbci.com/gdemont/gsoft.htm




  reply	other threads:[~2000-10-17  0:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-16  0:00 Pointer function parameter Mary
2000-10-17  0:00 ` Gautier [this message]
2000-10-17  0:00 ` Mario Amado Alves
2000-10-18  0:00   ` Florian Weimer
2000-10-18  0:00   ` Robert Dewar
2000-10-17  0:00 ` tmoran
  -- strict thread matches above, loose matches on Subject: below --
2000-10-19  0:00 Mario Amado Alves
2000-10-19  0:00 ` Marin David Condic
2000-10-19  0:00 ` tmoran
2000-10-19  0:00   ` Ted Dennison
2000-10-21  0:00   ` Robert Dewar
2000-10-23  0:00     ` Alejandro Villanueva
2000-10-24  0:00       ` Robert A Duff
2000-10-24  0:00         ` Alejandro Villanueva
2000-10-24  0:00           ` Ted Dennison
2000-10-24  0:00             ` Lutz Donnerhacke
2000-10-24 22:32           ` Mats Weber
2000-10-30 15:24           ` Robert A Duff
2000-10-30 15:44             ` Ken Garlington
2000-10-30 18:53               ` Florian Weimer
2000-10-31  1:48                 ` Robert Dewar
2000-10-31 12:40                   ` Ken Garlington
2000-10-31 14:08                     ` Larry Kilgallen
2000-11-01 17:59             ` Mats Weber
2000-11-03  0:00               ` Florian Weimer
2000-10-21  0:00 ` Robert Dewar
replies disabled

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