Re: Advice on low level file handling.
- From: Georg Bauhaus <bauhaus@xxxxxxxxxxxxx>
- Date: Sun, 02 Apr 2006 12:55:17 +0200
Peter C. Chapin wrote:
Also I need to count the number of bytes I process and the quantity may
exceed 2**32. I can define a 64 bit modular type and that seems to work
fine on gnat. Is that portable? I'm not extremely worried about
portability, but I'd rather not sacrifice it for no reason.
That's nice to hear when someone at least thinks about
portability :-)
package More is
type Count is range 0 .. 2**50;
end More;
with More;
procedure More.try_it is
x: Count;
begin
x := 2**40;
end;
Using similar front ends (first is ObjectAda for Windows native,
second is AppletMagic), but different backends,
....\> adamake more.try_it
more.ada: Error: line 3 col 26 LRM:3.5.4(6),
subtype bounds must be between System.Min_Int and System.Max_Int,
returning plastic subtype
(etc, failing)
.... \> adajava more.try_it
Front end of ..\more.ads succeeded with no errors.
.
- References:
- Advice on low level file handling.
- From: Peter C. Chapin
- Advice on low level file handling.
- Prev by Date: Advice on low level file handling.
- Next by Date: Re: Cross-Compiling Ada to Netware with GNAT
- Previous by thread: Advice on low level file handling.
- Next by thread: Re: Advice on low level file handling.
- Index(es):
Relevant Pages
|