Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot use variable with Inlist()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01009225
Message ID:
01010223
Views:
24
There is one other difference in using the [] to delimit a string. When a #DEFINE value is needed to be translated:
#define test some value
?"test"   && shows: test
?'test'   && shows: test
?[test]   && shows: some value
>Sergey
>Thanks very much for this solution. I have not ever used brackets inplace of quotes, I did not realize that was syntactcally (is that a word??) correct. I usually do it the wat Ian suggested. But I gave you the solution because you answered first and I gave Ian a star for help because his was the same but later. I really appreciate being a member of the UT. This help have saved me a lot of time. Thank you both.
>
>>You're using macro substitution anyway, why not build the whole FOR condition?
lcForCond = iif(empty(lcValue), [isdigit(allt(ctag))], [inlist(cTag,] + lcValue + [)] )
>>BROWSE FOR &lcForCond
>>
>>
>>>When trying to run this code:
>>>
>>>brow for iif(empty(lcValue),isdigit(allt(ctag)),inlist(cTag,&lcValue))
>>>
>>>I get "Function argument value, type, or count invalid". In this instance the value of lcValue is empty. It seems like the IIf() is still evaluating the code. cTag is a field. Any ideas? I have to leave but will check back later.
>>>
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform