Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Comparison operator in CRBasic?


porlando Jan 8, 2018 08:43 PM

What is the equivalent of if a comparison operator in CRBasic? 

For example:

Public x as String

if x == "y" then

    'do something else

else 

    'don't do anything else

endif


JDavis Jan 9, 2018 03:55 PM

We based our syntax on Visual Basic. You use a single equals sign (=).

I often use Instr() when looking for a string match. That way the comparison doesn't fail if you have something like a space at the end of your second string.

Log in or register to post/reply in the forum.