comp.lang.ada
 help / color / mirror / Atom feed
* Global scope for instantiated generic package?
@ 2010-08-30 13:12 Trogdor
  2010-08-30 13:25 ` Jacob Sparre Andersen
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Trogdor @ 2010-08-30 13:12 UTC (permalink / 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
------------------- ----- ---- -- -




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-30 18:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 13:12 Global scope for instantiated generic package? Trogdor
2010-08-30 13:25 ` 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

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