Menu

#99 The 'for' statement crashes on numeric expression

v2.0.1
closed-fixed
6
2010-01-20
2010-01-20
Robert Pes
No

The 'for' statement crashes when the loop expression contains a variable call, for example:

for (y=0; {y} < {_DESKTOP_HEIGHT}; y={y}+{deltay}) {
}

The console shows an exception:

com.tplan.robot.scripting.SyntaxErrorException: Invalid variable declaration. Correct format is 'Var <name>=<value> [<name>=<value> ... <name>=<value>]'.
at com.tplan.robot.scripting.commands.impl.VariableCommand.validate(VariableCommand.java:65)
at com.tplan.robot.scripting.commands.impl.VariableCommand.execute(VariableCommand.java:94)
at com.tplan.robot.scripting.wrappers.ForWrapper.updateForVariable(ForWrapper.java:155)
at com.tplan.robot.scripting.wrappers.ForWrapper.shouldExitWrapperOnThisElement(ForWrapper.java:199)

Discussion

  • Robert Pes

    Robert Pes - 2010-01-20

    Fixed and committed to CVS. Targeting for 2.0.2.

     
  • Robert Pes

    Robert Pes - 2010-01-20
    • status: open --> pending
     
  • Robert Pes

    Robert Pes - 2010-01-20
    • status: pending --> pending-fixed
     
  • Robert Pes

    Robert Pes - 2010-01-20
    • status: pending-fixed --> closed-fixed