Single Camera Servo Server icon Single Camera Servo Server TCP video server for Unity clients to stream camera video and send servo positions to ARC for remote robot control 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

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

#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.