Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UDF and FP Function, partiality
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00677396
Message ID:
00678372
Vues:
21
That is where the partiality comes in.
>>>>m.typefilt = "INLIST(a09macct.typegroup, 'CASH', 'BANK')"
and my old way of parameter passing works

Change typefilt to:
>>>>m.typefilt = "typgrp(a09macct.typegroup, 'CASH', 'BANK')"
and FPD25 generates an error on the SET FILTER TO &zfilter. line in my INVHLP function:

Error: 31
Message: Invalid Subscript Reference

Even for the following simple function:
Function typgrp
parameters m.z1, m.z2, m.z3
return inlist(m.z1, m.z2, m.z3)
the para m.zfilter with the value "typgrp(a09macct.typegroup, 'CASH', 'BANK')" is now, I guess, interpreted as an array, where as when the m.zfilter was "INLIST(a09macct.typegroup, 'CASH', 'BANK')" FP knew it was a function. So if I send &typefilt. then the current value is interpreted and sent to invhelp() and invhelp won't like it at the IF line before SET FILTER. Plus the value passed is for the current record only and the utiliy won't remain.

How can I tell FP typgrp is a function and not an array. I can't do this in the invhelp() function as it is a common usage thing and I don't know if there will be any filters required or not and if so am I using UDF or FP functions.


>WHy can you pass it the same way as before?
invhelp(paras, ..., typefilt)
>>This one in my function invhelp():
>>IF m.zfilter # "NOCHANGE"
>>becuase now it is receiving a logical value and in the previous form (they are both similar one for creditors and this one for debtors) it was the string for the filter macro substitution
>>
>>>Wich line generates an errror and what's the error message?
>>>
>>>>Sorry I messed up the quotes in retyping:
>>>>
>>>>m.typefilt = "INLIST(a09macct.typegroup, 'CASH', 'BANK')"
>>>>m.typefilt = "typgrp(a09macct.typegroup, 'CASH', 'BANK')"
>>>>
>>>>>The both lines give "syntax error".
>>>>>m.typefilt = "INLIST(a09macct.typegroup, "CASH", "BANK")
>>>>>m.typefilt = "typgrp(a09macct.typegroup, "CASH", "BANK")
>>>>>
What's your actual code?
>>>>>
>>>>>
>>>< snip >
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform