function abc
lparameter a_sorting
for m.ii=1 to alen(a_sorting)
? a_sorting[m.ii]
endfor

When I compiled the function, Foxpro complained:

Unknown A_SORTING - Undefined

How could I stop Foxpro from complaining as it's correct.


--
SoftMedia Technology Co., Ltd.
Website: http://www.softmedia.hk Tel: (852)2743 4228
* TryEasy Accounting/POS/Trading/ERP solutions

Re: array by Mark

Mark
Wed Aug 02 02:05:53 CDT 2006

i tried compiling your code in a program on VFP8 and did not get a problem.
but i seem to remember thier is a setting about how arrays are passed as
parameters and if you do it one way it just passes the value of on part of
the array, not the entire array.
"Man-wai Chang" <info@softmedia.hk> wrote in message
news:OPRB39ftGHA.2448@TK2MSFTNGP06.phx.gbl...
> function abc
> lparameter a_sorting
> for m.ii=1 to alen(a_sorting)
> ? a_sorting[m.ii]
> endfor
>
> When I compiled the function, Foxpro complained:
>
> Unknown A_SORTING - Undefined
>
> How could I stop Foxpro from complaining as it's correct.
>
>
> --
> SoftMedia Technology Co., Ltd.
> Website: http://www.softmedia.hk Tel: (852)2743 4228
> * TryEasy Accounting/POS/Trading/ERP solutions



Re: array by Bernhard

Bernhard
Wed Aug 02 03:13:46 CDT 2006

Hi Man-wai Chang,

> function abc
> lparameter a_sorting
> for m.ii=1 to alen(a_sorting)
> ? a_sorting[m.ii]
> endfor
>
> When I compiled the function, Foxpro complained:
>
> Unknown A_SORTING - Undefined
>
> How could I stop Foxpro from complaining as it's correct.

To avoid this warning, add a line:
EXTERNAL ARRAY a_sorting
somewhere in the function. A good place would be right after the LPARAMETER
line, but it could be placed elsewhere within the function.

Regards
Bernhard Sander

Re: array by Man-wai

Man-wai
Wed Aug 02 06:09:32 CDT 2006

> i tried compiling your code in a program on VFP8 and did not get a problem.

I should have posted the exact lines of codes. :)


--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06) Linux 2.6.17.6
^ ^ 19:09:01 up 17 days 2:32 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: array by Man-wai

Man-wai
Wed Aug 02 06:09:44 CDT 2006

> EXTERNAL ARRAY a_sorting

Thanks!

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06) Linux 2.6.17.6
^ ^ 19:09:01 up 17 days 2:32 0 users load average: 1.00 1.00 1.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: array by Mark

Mark
Wed Aug 02 07:22:35 CDT 2006

well that explains it, no problem :)
"Man-wai Chang" <toylet.toylet@gmail.com> wrote in message
news:%2332RrQitGHA.5056@TK2MSFTNGP06.phx.gbl...
>> i tried compiling your code in a program on VFP8 and did not get a
>> problem.
>
> I should have posted the exact lines of codes. :)
>
>
> --
> .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
> / v \ Simplicity is Beauty! May the Force and Farce be with you!
> /( _ )\ (Ubuntu 6.06) Linux 2.6.17.6
> ^ ^ 19:09:01 up 17 days 2:32 0 users load average: 1.00 1.00 1.00
> news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk