<html><head><base href="x-msg://277/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Have you played around with SUBARRAY?<div><br>
<br><div><div>On Dec 26, 2010, at 11:37 PM, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">I'm still wrestling with this. I have found a few options that work and they all have glaring problems.<br><br><br>VAR macho_header32_t_fields := ARRAY [0..6] OF field_t{<br> field_t{ "magic", 0, 4, enum_table := EnumTable(macho_magic_names)},<br>...<br> field_t{ "flags", 24, 4}};<br><br><br>1) I shouldn't have to give the size of the array.<br>2) I shouldn't have to copy the enum table to make it an indexable array.<br><br><br>Disappointing..<br><br><br> - Jay<br><br><br><hr id="stopSpelling">From:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Date: Mon, 27 Dec 2010 02:11:28 +0000<br>Subject: [M3devel] pointers/arrays?<br><br>a: UNTRACED REF T;<br>i: INTEGER;<br><br><br>a[i] ?<br>(a + i)^ ?<br><br><br>Or I'm really stuck with<br>LOOPEHOLE(a + i * BYTESIZE(a^), UNTRACED REF T)<br><br><br>Seems kind of stinky.<br>I've got some nice efficient readable safe-enough C and it doesn't seem to translate well easily efficiently to Modula-3.<br><br><br> - Jay<br><br></div></span></blockquote></div><br></div></body></html>