Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array not found...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00046776
Message ID:
00046852
Views:
27
>Edward,
>
>>Include in the method something like:
>>IF .f.
>> Dimension lavararray(1)
>>Endif
>
>
>This worked. The workarounds we programmers have to come up with to get things to work are amazing sometimes. You'd think MS would have a better compiler.
Jim,

Begfore you throw darts at MS the EXTERNAL ARRAY command is exactly for your situation. You are referencing an array that is NOT demensioned n the code where the reference takes place. The compiler doesn't have an idea if this is an array or a function and it cannot find it anywhere, so the build gives you a warning. If you ahve ever programmed in C or C++ you would be used to compiler warnings versus errors.

By delcaring EXTERNAL ARRAY YourArrayName you are announcing to the compielr that that array is defined elsewhere in the app and that it should not warn you about it.

Ed's approach will also work because it fools the compiler into thinking the array is defined in the code that references it. However the construct in the4 language for dealing with arrrays that are defined external to the code is the EXTERNAL ARRAY command.
Previous
Reply
Map
View

Click here to load this message in the networking platform