Re: Advice on low level file handling.



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.


.



Relevant Pages

  • Advice on low level file handling.
    ... basis and examine bit fields and do bitwise shifting in some of these ... I can define a 64 bit modular type and that seems to work ... portability, but I'd rather not sacrifice it for no reason. ...
    (comp.lang.ada)
  • Re: Sockets
    ... Let's say that I would like to write an Ada program that uses sockets and compile and run it on my Linux box. ... The advantage is that it will be portable to other platforms (as long as GNAT and its library is portable there). ... So using Florist does not give you more portability than using ...
    (comp.lang.ada)