>When I execute this program,
>
>use data\payslphd
>set filter to myfunc()
>
>function myfunc
>return .t.
>
>I got an error "Invalid Subcript Reference".
>Why? Any workaround?
FPW "thinks" that you're referring to an array. You'll get the same message even passing fields to the function. VFP (6.0 at least) allows you to use a function in a SET FILTER TO. According to the help, in FPW 2.6 the filter condition must be a logical expression that each record satisfies. While a function call can be a "logical expression", I think in this instance FPW doesn't see it as such.
George
Ubi caritas et amor, deus ibi est