From: Trogdor <bgates@aol.com>
Subject: Global scope for instantiated generic package?
Date: Mon, 30 Aug 2010 08:12:19 -0500
Date: 2010-08-30T08:12:19-05:00 [thread overview]
Message-ID: <5vWdnTd5Lf6uM-bRnZ2dnUVZ_oidnZ2d@giganews.com> (raw)
I wish to manipulate very large integers with values in the
trillions. This would require a 64 bit integer type, so to maintain
portability I specify a new type using range and let the compiler do
the right thing.
type BigInt is range 1..10_000_000_000_000;
I then wish to get and put these values, so I instantiate
Integer_IO.
package BigInt_IO is new integer_IO(BigInt);
My program consists of three parts: the main body, a package spec
and a package body (the package containing all the subprograms and
functions).
1) Is this the way to do it, or is there a preffered way?
2) Where, speciffically, do I place the above two lines (and the
associated "with" line) so that I can BigInt_io.get from the main
body and the package subprograms as well?
So far, every place I have tried has offended the compiler. And my
text books have been of little help (I have more on order).
Thanks for the help!
--
--------------------------------- --- -- -
Posted with NewsLeecher v3.9 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -
next reply other threads:[~2010-08-30 13:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 13:12 Trogdor [this message]
2010-08-30 13:25 ` Global scope for instantiated generic package? Jacob Sparre Andersen
2010-08-30 13:28 ` Georg Bauhaus
2010-08-30 13:30 ` Ludovic Brenta
2010-08-30 13:47 ` Dmitry A. Kazakov
2010-08-30 18:49 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox