[M3devel] files larger than 2gig

Jay jay.krell at cornell.edu
Mon Jun 22 14:58:17 CEST 2009


C:\dev2\cm3.2\m3-libs\libm3\src\os\Common\File.i3
 
 
TYPE
  Status = RECORD
    type: Type;
    modificationTime: Time.T;
    size: INTEGER;
  END;


size: INTEGER causes exceptions when you use the Modula-3 gui
and browse to a directory with files larger than 2 gig.
 
 
I suggest size be changed to LONGREAL, which generally has a 53 bit mantissa
(out 64 bits total) and thus can represent integers very much larger than INTEGER.
 
 
LONGINT is a tempting option but doesn't help on the current NT386 platform,
and I think 53 bits will last a very long time.
 
 
I'm just trying out such a change and I can see it is not source compatible:
 
 
"../src/rw/FileRd.m3", line 73: incompatible argument types: MIN
"../src/rw/FileRd.m3", line 140: types are not assignable
2 errors encountered
"../src/rw/FileWr.m3", line 87: incompatible argument types: MIN
"../src/rw/FileWr.m3", line 103: incompatible argument types: MAX
2 errors encountered

 
Nevertheless I think it should be done, probably even for this release.
 
 
 - Jay


More information about the M3devel mailing list