Replies: 2 comments
-
Best workaround when there can/will be quotes in the string comparison is to use braces instead of quotes.
Another option is to encode the quotes as hex.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Braces work for me. Thanks for your reply. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ver 2.02.12 from BREW install on macos Big Sur 11.6.1
Not sure if it can be reproduced on other platforms.
===== compare string containg quote =====
#VA a {do something ""}
#OK. VARIABLE {a} HAS BEEN SET TO {do something ""}.
#MATH m {"$a" != ""}
#MATH: VARIABLE {m} HAS BEEN SET TO {0}.
#MATH m {"$a" == ""}
#MATH: VARIABLE {m} HAS BEEN SET TO {0}.
Both != and == result 0.
===== normal compare =====
#VA a {do something}
#OK. VARIABLE {a} HAS BEEN SET TO {do something}.
#MATH m {"$a" != ""}
#MATH: VARIABLE {m} HAS BEEN SET TO {1}.
#MATH m {"$a" == ""}
#MATH: VARIABLE {m} HAS BEEN SET TO {0}.
!== and === do same as != and ==
This problem also affect #IF.
Beta Was this translation helpful? Give feedback.
All reactions