Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP3
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01580886
Message ID:
01580888
Views:
76
>Hi Gang!
>
>My fellow colleague at work has this problem. He has this in some code
>
>
>PROCEDURE getArrayElement
>      PARAMETERS lnElement
>      pcTheData = laWarnLbl[lnElement]
>      RETURN pcTheData
>ENDPROC
>
>
>The above snippet of code is giving me the “invalid subscript reference” error on the “pcTheData = laWarnLbl[lnElement] line.
>
>The value of lnElement at this point is 1.
>
>And laWrnLbl is dimensioned to 6.
>
>Thanks

Could it be that the array laWarnLbl is local to another procedure? And not in scope within GetArrayElement?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform