Talk About Network

Google





Programming > Ada > Re: How to exte...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 11 Topic 5742 of 6006
Post > Topic >>

Re: How to extend packages

by =?ISO-8859-1?Q?S=E9bastien_Morand?= <seb.morand@[EMAIL PROTECTED] > Jun 6, 2008 at 05:45 PM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

snoopysalive@[EMAIL PROTECTED]
 a écrit :
> Hi, Ada-folks!
> 
> I'd like to extend the GNAT.Regpat a little bit, so that it contains
> additional operations like Split (the same as in Perl or Ruby) or Join
> (dito).
> 
> When speaking of "extending" I mean it in the sense of e.g. Java where
> extending a class means that the child class contains all the public
> or protected operations and attributes as the super class. Perhaps you
> know now, what I want to achieve. I want to have an extended "child"
> package of GNAT.Regpat. In the end it should have an own name like
> e.g. "Mine.Regex" and contain all operation etc. of its "super"
> package plus the operations I'll additionally implement.
> 
> I've been trying for hours now, so I'm passing this question to you.
> How to extend package?

Try this:

with GNAT.Regpat; use GNAT.Regpat;

package GNAT.Regpat.Extended is
end GNAT.Regpat.Extended;

Then when you use GNAT.Regpat.Extended, GNAT.Regpat is available too.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)

iD8DBQFISXer+zV9xm4PlDQRAg3JAJ9C0PKClnt6uc1Tjl85b1zvZfQrmgCfcQgm
1tLnIgHiSGjifzvMyBvwOgc=
=JX0R
-----END PGP SIGNATURE-----
 




 11 Posts in Topic:
How to extend packages
"snoopysalive@[EMAIL  2008-06-06 10:00:02 
Re: How to extend packages
witmer <witmer@[EMAIL   2008-06-06 10:24:49 
Re: How to extend packages
=?ISO-8859-1?Q?S=E9bastie  2008-06-06 17:45:15 
Re: How to extend packages
Stephen Leake <Stephe.  2008-06-07 10:21:30 
Re: How to extend packages
Simon Wright <simon.j.  2008-06-07 17:04:57 
Re: How to extend packages
Georg Bauhaus <rm.tsoh  2008-06-06 20:16:33 
Re: How to extend packages
"snoopysalive@[EMAIL  2008-06-07 14:50:07 
Re: How to extend packages
Simon Wright <simon.j.  2008-06-08 12:09:35 
Re: How to extend packages
"snoopysalive@[EMAIL  2008-06-09 15:38:30 
Re: How to extend packages
Simon Wright <simon.j.  2008-06-10 06:40:40 
Re: How to extend packages
"snoopysalive@[EMAIL  2008-06-14 01:45:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 12:54:24 PST 2009.