I try not to look for the value 2, however, "should not be" is displayed, not else, "ok".
If Not InStr("1, 2, 3", "2") Then MsgBox ("shouldn't happen") Else MsgBox ("ok") End If
We know that the value is inside the string. but for some reason, "no" does not work. Does anyone know why?
It's because
?InStr("1, 2, 3", "2") 4
and
?not 4 -5 // bitwise not of 4
which is the true value ( cbool(-5) = true ), so you need to:
cbool(-5) = true
if InStr("1, 2, 3", "2") = 0 then // not found else // found
Source: https://habr.com/ru/post/1490911/More articles:How to use a query in an XML file in Delphi? - xmlInstall matplotlib on Ubuntu: ImportError - pythonReverse word order in an array of characters - c ++DataContractJsonSerializer exception - jsonReverse word by word - cIs it possible to change the file build action in pre-build events? - c #Connect to a Bluetooth device programmatically objective c - objective-cInvert every word in a string (should handle the space) - c ++Is it possible to override default_scope in rails_admin? - rails-adminIs it possible to use systemtap 1.7 / 2.1 on Ubuntu 12.04 with 3.5.0 / 3.8.0 kernels? - linux-kernelAll Articles