Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug ? Successfully having C0000005 error
Message
From
24/12/2006 09:24:21
 
 
To
24/12/2006 09:09:09
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01180000
Message ID:
01180024
Views:
12
>>>But shouldnt the first element be returned without []
>>
>>I don't think so... when you reference just the array name you are referring to the WHOLE array.
>
>Actually, that depends on the context.
>
>acopy() - uses the whole array
>
>MyArray = SomeValue - sets all elements
>
>? MyArray - prints the first element (this is probably what Suhas was thinking about)
>
>MyObjectArray.SomeProperty - the situation that gave Suhas trouble: I guess this situation was simply not foreseen by the VFPT.

Could be.
But it could just as easily be that the VFPT chose the easy way out for the "?myArray" construct else the output would be difficult to express (how many?... mixed types, etc).

Since "myArray = SomeValue" and "STORE SomeValue TO myArray" both do the same thing - fill the whole array - I interpret the "rule" to be that referencing the array without an element# references the whole array.
In which case the VFPT did the right thing when it is in a property.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform