Dnia wtorek, 19 kwietnia 2005 03:35, Jonas Raoni Soares Silva napisał:
>  On 4/18/05, Dave Murray <[EMAIL PROTECTED]> wrote:
>  > What does a type declaration like this mean?
>  > Adapter : array [0..0] of IP_ADAPTER_INDEX_MAP;
>  >
>  > Why is the index range 0..0?
>  >
>  > I'm trying to iterate through this array in a while loop and sometimes
>  > get a range error when I know there are still entries left.
>
>  I think it's an old way of creating dynamic arrays ;]
>  If i remember well, a friend of mine used this thing in his code on delphi
> 3 ...
>
>  With this sintax you can use GetMen to increase your array length and
>  still able to index the array ;]
>
>  ex:
>  GetMem( Adapter, ArrayLength * IP_ADAPTER_INDEX_MAP );
>
>  Adapter[5] = xyz;

...but I think you should think about changing this declaration to a proper 
and nice dynamic-array declaration, like

Adapter:array of IP_ADAPTER_INDEX_MAP;

and then use the good old SetLength to do the job. :)
Unless, of course it would mean re-writing the whole program.

Cheers
MIke



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to