Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot use myfunc() in SET FILTER TO?
Message
 
To
16/10/1998 01:40:51
Man Wai Chang
Hang Hing Metal Manufacturer
Hung Hom, Hong Kong
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00147370
Message ID:
00147621
Views:
30
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform