Christian,
Try:
>LPARAMETERS mVar1, mVar2, mVar3
>LOCAL lcDir1
>lcDir1 = CURDIR() &&for example
>mCnt = PCOUNT()
>FOR i = 1 TO mCnt
> IF FILE(m.lcDir1 +
EVAL("mVar" + ALLT(STR(i))) + ".DBF") && variable mVar not found!
> && Do something
> ENDIF
>ENDFOR
HTH!
Mark
>Hello,
>I'm trying to make a generic code like this, where parameters should be evaluated as following:
>
>LPARAMETERS mVar1, mVar2, mVar3
>LOCAL lcDir1
>lcDir1 = CURDIR() &&for example
>mCnt = PCOUNT()
>FOR i = 1 TO mCnt
> IF FILE(m.lcDir1 + (mVar + i) + ".DBF") && variable mVar not found!
> && Do something
> ENDIF
>ENDFOR
>
>Of course, this does not function.
>Is there a way to work like this? This would save me much work!
>Thank you for your time!
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.