Menu

#2 String comparison not equals not working

1.0
open
nobody
!+ (1)
2014-05-16
2014-05-16
No

When comparing two strings, it is not possible to use !=

Exception in thread "Thread-7" java.lang.RuntimeException: Problem comparing non-numeric terms in astra.plan.EvaluateVisitor: name != "org.eclipse.core.runtime.compatibility.registry"
at astra.util.AbstractEvaluateVisitor.visit(AbstractEvaluateVisitor.java:170)
at astra.formula.Comparison.accept(Comparison.java:39)
at astra.statement.If$1.execute(If.java:35)
at astra.core.Intention.execute(Intention.java:73)
at astra.statement.Block$1.execute(Block.java:24)
at astra.core.Intention.execute(Intention.java:73)
at astra.core.Agent.execute(Agent.java:204)
at ie.ucd.sixth.astra.Launcher$1.run(Launcher.java:18)
at java.lang.Thread.run(Unknown Source)

A simple workaround does exist where the entire expression is negated ~(name == "org.eclipse.core.runtime.compatibility.registry")

Discussion

  • Rem Collier

    Rem Collier - 2015-10-28

    Hey!

    New message, please read http://campingmeetingpoint.com/tongue.php?7p

    SUPPORT UCD-SCI-COLLEAGUES-FP7-ICT@LISTSERV.HEANET.IE

     
  • Rem Collier

    Rem Collier - 2016-02-02

    Hey!

    Open message http://yates.eazyworks.com/grew.php?t

    Russell Higgs

     

Log in to post a comment.