#9 mEL 2.0 .mel rotation error.


There is a bug in .mel rotation. When an argument
isn't given to .mel rotation, TCL 8.4 throws this
error: Tcl error [::mel::dcc]: syntax error in
expression " < 1": unexpected operator <

The root problem of this is with this comparison:

if {[string is integer [lindex $args 1]]} {

This will return true if there is no second argument.
From the TCL documentation:

For lindex: "If index is negative or greater than or
equal to the number of elements in value, then an empty
string is returned."

For string is class: "If -strict is specified, then an
empty string returns 0, otherwise an empty string will
return 1 on any class."

If you read both of the above, you can see why this
check fails to handle an empty second element.

Adding -strict to the string is integer fixes the problem.


  • Gilbert van Griensven

    • assigned_to: nobody --> jules_74
    • status: open --> closed-fixed
  • Gilbert van Griensven

    Logged In: YES

    Fixed in latest release


Log in to post a comment.