From: "Jeff C r e e.m" <jcreem@yahoo.com>
Subject: Re: newbie - OOP in Ada Set and Get Methods
Date: Tue, 28 Dec 2004 13:36:54 GMT
Date: 2004-12-28T13:36:54+00:00 [thread overview]
Message-ID: <WjdAd.650272$D%.214433@attbi_s51> (raw)
In-Reply-To: 1104237673.373489.128290@z14g2000cwz.googlegroups.com
You probably need to step back and read a few of the Ada tutorials rather
than trying to hack-and-whack
C++ in Ada.
First, I hate to plug this website because it is old and unmaintained and
should be shutdown....But this
tutorial is short and is a very good starting point
http://www.adahome.com/Ammo/cpp2ada.html
A few tips to think about
1) Packages are closer to namespaces than classes.
Your "field" variable is essentially just a stand alone 'global' value
that is in no way tied to your class
2) Tagged records are closer to "classes"
3) There is no "this" in Ada so if you want an object to be visible within a
subprogram it needs to be a parameter.
4) There is no special notation for OO calls v.s. non-OO calls in Ada and
therefore (currently) you do not call a subprogram
with object.method style but rather package.subprogram just as you would
do for non-OO code. Ada 2005 will (probably)
be adding object.method mostly because it really seems to be a hard
thing for people from other programming lanaguages
to swallow (my opinion. I have not seen any really strong technical
argument for the feature..but perhaps there is one)
After reading a few of the articles at adahome, you can ignore it and start
using www.adapower.com
and www.adaworld.com which are actually up to date.
next prev parent reply other threads:[~2004-12-28 13:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-28 12:41 newbie - OOP in Ada Set and Get Methods R
2004-12-28 13:36 ` Jeff C r e e.m [this message]
2004-12-28 16:26 ` R
2004-12-28 17:01 ` Jeff C r e e.m
2004-12-28 17:30 ` R
2004-12-28 17:20 ` Martin Dowie
2004-12-28 17:36 ` R
2004-12-28 19:47 ` Mark Lorenzen
2004-12-28 19:48 ` Adrien Plisson
2004-12-28 19:58 ` Georg Bauhaus
2004-12-28 21:17 ` Martin Dowie
2004-12-29 10:06 ` R
2004-12-29 12:33 ` Martin Dowie
2004-12-29 17:35 ` Georg Bauhaus
2004-12-29 19:12 ` Martin Krischik
2004-12-30 12:14 ` Georg Bauhaus
2004-12-29 19:11 ` Martin Krischik
2004-12-28 13:39 ` Martin Krischik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox