From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: How to include vector operators?
Date: Mon, 6 Dec 2010 18:53:34 -0800 (PST)
Date: 2010-12-06T18:53:34-08:00 [thread overview]
Message-ID: <a77fd704-153e-4230-b1f6-aa588f4e283d@s5g2000yqm.googlegroups.com> (raw)
In-Reply-To: 1ba74849-bafa-499f-a448-661dff1f60bd@c39g2000yqi.googlegroups.com
> with Ada.Numerics.Generic_Real_Arrays;
Since it's generic, you can't use it directly. It's why you have:
> package Vectors is new Ada.Numerics.Generic_Real_Arrays(Float);
>
> How to include the vector operators like "+" and "-" ?
I guess you want to write things like (i):
u+v
whereas now you need to write (ii)
Vectors."+"(u,v)
To be able to write the form (i), you can put
use Vectors;
after the above definition (package Vectors is new ...)
and you'll be happy.
______________________________________________________________
Gautier's Ada programming -- http://gautiersblog.blogspot.com/
NB: follow the above link for a working e-mail address
prev parent reply other threads:[~2010-12-07 2:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 21:03 How to include vector operators? tolkamp
2010-12-06 21:37 ` Adam Beneschan
2010-12-07 11:11 ` tolkamp
2010-12-07 2:53 ` Gautier write-only [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox