>>Don't expect the PARAMETERS() function to work all the time. In my experience this function does not work if it's called from a source file that's too big such as a big class for example.
>>
>>Pat
>
>You may be right Pat. I am having problems with PARAMETERS() in a FPW2.6 application :
>
>a.prg calls b.prg calls c.prg calls d.prg calls e.prg calls f.prg with 2 parameters.
>
>f.prg uses the parameters as such:
>
>
>Function f
>PARAMETERS para1,para2,para3,para4
>* Sometimes called with 2 params sometimes with 3 or 4
>
>IF PARAMETERS()<3
> para3 = "A"
>ENDIF
>
>...
>...
>...
>
>l_secondvar = IIF(para3 # "N","A","N")
>
>The function at times comes up with an error at the above line:
>"Invalid function, arguement or count"
>
>This error can only happen when (in this case) 2 parameters are passed and the PARAMETERS() <3 check fails leaving para3 and para4 as .F.so when the IIF tries checks the value against a string it causes an error.
>
>Is this so? Is this a bug? How do I get around it if so?
>
>Thanks
>
>Bernard
Bernard,
I had that backwards. It was PCOUNT() that was originally introduced for dBASE compatibility. However, PCOUNT() now is prefered since it's unaffected by OKLs, etc.
George
Ubi caritas et amor, deus ibi est