Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot use myfunc() in SET FILTER TO?
Message
 
À
16/10/1998 01:40:51
Man Wai Chang
Hang Hing Metal Manufacturer
Hung Hom, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00147370
Message ID:
00147621
Vues:
31
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform