Touch Path icon Touch Path Sketch paths with finger or mouse and set turn/move speeds; interactive, educational demo of timing-based, sensorless robot navigation and limits. Try it →
New Zealand
LinkedIn Thingiverse Twitter Google+ YouTube
Asked — Edited

Comparing String Variables

Can't seem to find an example of string variables being compared in EZ-Script

$A="Apple" $B="Apple" if ($A=$B) say ("They're the same")

if ($A$B) say ("They're not the same")

Am I looking at this the wrong way or what?


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

#1  

I would say what you use for not equal are the less-than and greater-than signs together. But, the rest looks good. It doesn't work for me either.

when i tried to put the symbols for not equal, the community forum board would not let me enter it into this post. confused

I guess we need videos for String variables and also emotions.

#2  

try $A==$B that's usually the syntax for comparison

and $A!=$B for not equal to

these may not have been added yet

Author Avatar
New Zealand
LinkedIn Thingiverse Twitter Google+ YouTube
#3  

Issue resolved with latest update.

And the informative Syntax statement that pops up when we get it wrong is very insightful!

Thanks DJ Sures.