I have put PARAMETERS() below the LPARAMETERS to see how much parameters have been passed to my UDF.
I have put to see if there was a too low or too many parameters passed.
It goes something like this.
FUNCTION myUDF()
LPARAMETERS para1, para2, para3, para4
IF PARA() < 2 OR PARA() > 4
RETURN .F.
ENDIF
and rest....
Now, if there are less parameters passed it returns .F., everything is OK.
But, if there are more parameters passed (in this case more than 4), it displays error before program reached to the line where is IF statement, and program is out!!!
Why is this happening? Is this a kind of a bug?
Is there a way to avoide this?