I need to elaborate more on this code<br><br>On this line<br><br> d := stTypes[i - Ord(low(stType))];<br><br>since stTypes is an array, I expect stTypes[n], with n being 1 to 4,  to retrieve an array value and as 'i - Ord(low(stType)) evaluates to integer it should compile but it generates an error.<br>
<br>What would be the correct way?<br><br><div class="gmail_quote">On 12 September 2010 12:51, Frank Church <span dir="ltr"><<a href="mailto:vfclists@gmail.com">vfclists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
program testnums;<br>//{$APPTYPE CONSOLE}<br><br>uses<br>  Classes, SysUtils; <br>type<br>   stType = (stLite := -100, stDb, stBothLite, stBothDb); //settings location Type<br>   stTypes = Array [stType] of integer;<br>var<br>

 d : stType;<br> s : string;<br> i : integer;<br>begin<br> writeln('');<br> for i := Ord(low(stType)) to Ord(high(stType)) do<br> begin<br>  d := stTypes[i - Ord(low(stType))];<br>   writestr(s,d);<br>   writeln(d + ' ' + IntToStr(Integer(i)));<br>

 end;<br> readln;<br><br>end.<br clear="all"><font color="#888888"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com" target="_blank">http://devblog.brahmancreations.com</a><br>

</font></blockquote></div><br><br clear="all"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>