comparing strings using if


    Nov 28 2012 | 12:11 pm
    Read the documentation - nothing about strings.
    Tried:
    if $s1 == this then 0
    Doesn't work. I tried wrapping this in quotes etc, still nothing.
    thanks

    • Nov 28 2012 | 4:19 pm
      Unfortunately, there is no string data structure per se in Max.
      But in your case sel may be an option. Maybe jstrigger is another one.
      p
    • Nov 28 2012 | 8:28 pm
      The Jash objects has a string compare
    • Nov 28 2012 | 10:35 pm
    • Nov 29 2012 | 12:40 am
      @Patrick a jstrigger solution:
    • Nov 29 2012 | 1:49 am
      @Emmanuel using your patch we have a problem if we use a list and just the same error if we use the object "sel"
    • Nov 29 2012 | 12:54 pm
      maybe this gives you a solution for lists ?
      Nikolas
    • Nov 29 2012 | 1:02 pm
      zl.compare !
    • Nov 30 2012 | 1:35 am
      before [zl compare] existed, you were also already able to use certain zl combinations for this kind of thing.
      when looking for a string solutions (we call "strings" "symbols" in max) always look into zl, because it treats every symbol as a list of symbols with only one element. for example [zl reg] makes a great place not only to store "1 2 3 4 5", but also for the message "stop".
      -110