Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error : Not an array
Message
From
06/07/2001 15:06:01
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00526286
Message ID:
00527610
Views:
21
You miss my point. If you leave off the dimension with the array keyword, the compiler will let you know. If you leave off the dimension without the array keyword, you findout at runtime. I know it is optional, it protects you from yourself.

>>>>It should be:
>>>>
>>>>local array myArray[1]
>>>>
>>>>or it could be:
>>>>local myArray
>>>>dimension myArray[1]
>>>>
>>>>>Try this:
>>>>>
>>>>>LOCAL MyArray(1)
>>>>>
>>>
>>>The ARRAY keyword is not necessary. LOCAL arrayname[1] works just fine.
>>
>>The array keyword provides useful information to the compiler so that
>>
>>local array myArray
>>myArray[1] = 1
>>
>>generates a syntax error on compilation while
>>
>>local myArray
>>myArray[1] = 1
>>
>>generates an error at runtime.
>
>
>Yes, but you missed my point. You still need to put the array dimensions on the line, so again, the ARRAY keyword is not needed, it's totally optional. If you forget the dimensions, well, that's an entirely different problem.
Previous
Reply
Map
View

Click here to load this message in the networking platform