Hi David,

This section of the Language Reference may help in remembering which operand 
(of the equality operator) gets the wildcard.

It’s found in  “Operators” -> “Comparison Operators”. Then look for section 
titled "More about string comparisons”.

For wildcard placement:

"The wildcard character must be used within the second operand (the string on 
the right side) in order to match any number of characters.”

See: 
http://doc.4d.com/4Dv16/4D/16/Comparison-Operators.300-3036456.en.html#Paragraph_863680

Best regards,
Jeremy French


> On Jan 23, 2017, at 10:00 PM, David Adams <[email protected]> wrote:
> 
> This is probably documented, long-standing behavior that everyone but me
> knows and remembers. But, just in case, I just (re)discovered that the =
> operator is *not* always transitive. Specifically, when you're comparing a
> string with a wildcard.
> 
> C_TEXT($comparison_text)
> C_TEXT($input_text)
> $comparison_text:="@"
> $input_text:="Hello"
> 
> C_BOOLEAN($returns_false)
> C_BOOLEAN($returns_true)
> $returns_false:=$comparison_text=$input_text
> $returns_true:=$input_text=$comparison_text
> 
> If someone has something usefully smart to say to help me keep this
> straight in my head, I'm all ears.

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to