[M3devel] question on File.Status.size

Coleburn, Randy rcolebur at SCIRES.COM
Mon Sep 30 00:59:35 CEST 2013

I've been trying to rebuild all my developed software using my newly rebuilt cm3 from the HEAD branch.

I've run into some new build errors and have a question.

It seems the type of File.Status.size has been changed to LONGCARD.

I have some code that now fails to build because of this change.

I suppose this interface change is an attempt to better deal with files whose size in bytes is larger than MAX(CARDINAL).

So, for example:
   fs := FS.Status(file);
   INC(numBytes, fs.size);
no longer works if numBytes is defined as a CARDINAL.  Of course, I can change its type to be LONGCARD, but there will be a ripple effect throughout the code.

Has the language definition also been updated to allow NUMBER(array) to yield a LONGCARD ?
(Interface File uses open arrays)

In my old language definition, it says that:

An open array type declaration has the form:

    TYPE T = ARRAY OF Element

where Element is any type. The values of T are arrays whose element type is Element and whose length is arbitrary. The index type of an open array is the INTEGER subrange [0..n-1], where n is the length of the array.
In the past NUMBER(x) always yielded a CARDINAL, not a LONGCARD.  So, if this has changed, I'll need to do some more updates across my code base.

How does one know in advance if NUMBER(x) is going to yield a CARDINAL or a LONGCARD value, esp. for open arrays?

Randy Coleburn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130929/46854e27/attachment-0001.html>

More information about the M3devel mailing list