On 29/05/2021 07:56, Ken Mayer wrote:
> 2) x = 'a' ; ?inlist(x,'b','c','d') will return .f.
there is a simple equivalent in dBase operators but it may not always
work the way you want it to: the $ operator checks whether the value on
the left is included in the value on the right
?"a"$"bcd" or ?"a"$"b,c,d" would both return false in dBase
for multi-character pattern matches, you need a separator
?"fred"$"john,Paul,Peter" would return false, but it gets trickier in
the following case:
?"jon"$"Jonah,Paul,Peter" - would you want this to return true or false?
The cleaner way is what Ken posted earlier, i.e. parse the list into an
array and from there scan the array for the value you want to look for.
--
Gaetano.
|