If I enter 'cat' == 'cat' in monitor value, I would expect to get 1, but instead the editor crashes. Same if I enter 'cat' != 'dog'. If i do the same inside a script, it doesn't crash, but I don't get a result. Is there another way to compare strings? Is this a bug?
Thanks,
A
comparing strings
Re: comparing strings
Hi
Thanks for the report - Confirmed -I will forward it to be looked into . . .
Try 'cat'=='cat?1:0 - short hand version of if ? then : else . . .
In a script - decl test = 'cat'=='cat'?1:0;
Monitor.value=test;
or
decl test;
if ('cat'=='cat') test=1;
Monitor2.value=test;
If things don't go as planned, often being more verbose/explicit can help . . .
Cheers
MM
Thanks for the report - Confirmed -I will forward it to be looked into . . .
Try 'cat'=='cat?1:0 - short hand version of if ? then : else . . .
In a script - decl test = 'cat'=='cat'?1:0;
Monitor.value=test;
or
decl test;
if ('cat'=='cat') test=1;
Monitor2.value=test;
If things don't go as planned, often being more verbose/explicit can help . . .
Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: comparing strings
Thanks MM, I will check out your suggestions. Sorry for not being more detailed. I try to simplify the problem so it's easy to find and duplicate, but maybe I oversimplified. In any case, I appreciate your help!
Re: comparing strings
No wotties
The syntax given does work -
I made up a quick project to check your error and find a solution . . .
All good
MM
The syntax given does work -
I made up a quick project to check your error and find a solution . . .
All good
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]