[M3devel] TextLiteral.MaxBytes again
Jay K
jay.krell at cornell.edu
Tue Sep 3 08:02:52 CEST 2013
ok, another question:
CONST
(* DIV BITSIZE should not be here! *)
(* MaxBytes = LAST (INTEGER) DIV BITSIZE (Byte) - 7 - 8 * ORD(BITSIZE(INTEGER) = 64); *)
MaxBytes = 16_7FFFFFFF DIV BITSIZE (Byte) - 7 - 8 * ORD(BITSIZE(INTEGER) = 64);
TYPE
T = RTHooks.TextLiteral;
REVEAL
T = TEXT BRANDED "TextLiteral.T" OBJECT
cnt : INTEGER;
buf : ARRAY [0..MaxBytes - 1] OF Byte;
OVERRIDES ...
T is a reference type.
Is there a way to state this with no limit?
Isn't it already unsafe?
You know -- the array is usually smaller and the compiler is only going to check against this large size.
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130903/0196a06f/attachment-0001.html>
More information about the M3devel
mailing list