Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sporadic lost data from array elements
Message
From
30/06/2006 14:11:54
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
30/06/2006 13:41:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01130365
Message ID:
01133159
Views:
23
>>>>The only other thing that I can think of is to check if the array or an element of it, is passed as a parameter to a function somewhere. The function could be changing the array or its size indirectly.<<
>>
>>But, things most frequently go sour upon returning from the new code. In that routine one array element is assigned to a variable before being passed as a parameter. I wouldn't think there would be any way that could modify the original array element's value. Usually the array elements aren't empty upon returning, they just contain incorrect data. In one instance every element in the array was replaced with the same value, the PK! More commonly, only the other 3 numeric fields have been replaced. This causes an error when the application attempts to store the data back to the table because the PK's value is too large for the other numeric fields. In fact, that error is often the only symptom that something has gone wrong. What could assign the value from Case(2) to all 14 or so elements in the Case() array? Or even to the other 3 numeric elements?
>
>A statement like | case=m.case(2) | would do the first.

Hi Jim

An array is in a sense a collection of variables, not a variable itself. It gets confusing to see m.case = m.case(2), because this will assign a single array element to the entire array. Just a suggestion: don't put mdot on arrays because they're a different animal. By not putting mdot on them, they stick out further from the surrounding code.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform