On May 17, 2007, at 11:03 AM, Norman Palardy wrote:

>
> On 17-May-07, at 7:14 AM, Daniel Stenning wrote:
>
>> This makes me wonder: -  Idoes Ubound use a method/function call to
>> get the
>> ubound value,  or does the RB generate code to directly access a
>> "property"
>> or variable holding the internal array size ?.
>
> It's a method call
>
> Try
>       dim someArray(-1) as integer
>       someArray.append 1
>       someArray.append 2
>
>       for i as integer = 0 to ubound(someArray)
>               someArray.append i
>       next
>
>> Naturally there would be some speed advantage to NOT using any
>> function to
>> get the size.
>
> Except the size can change :)


In which case you should not use a for-next loop, in general :)

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to