@ JohnHell
Sorry to be so long in getting an answer. Was on vacation and place we stayed did not have internet service.
I think the problem is that 1.1.x macro language compare is by character and not numeric value. I wrote a small bit of code to show what I mean.
_Snippet_RunCode{
## $varX set to 12 returns _b
## $varX set to 4 returns _a
## $varX set to 6 returns _c
$varX = 6 ;
$varL = length($varX);
$varL < 2 ? $varX = "0" . $varX : 0 ;
alert("This is $varX " . $varX, "DEBUG", INFO);
#$varX <= 05 ? open($a) : $varX >= 11 ? open($b) : open($c);
$varX <= 05 ? &_a : $varX >= 11 ? &_b : &_c;
}
_c{alert("this is c");}
_b{alert("this is b");}
_a{alert("this is a");}
I just used alerts in place of open(). The sorted order of numbers works only until number of digits changes. The numbers 10, 11, and 12 do not sort correctly unless the numbers with a single digit are preceded with a zero.
1 01
10 02
11 03
12 04
2 05
3 06
4 07
5 08
6 09
7 10
8 11
9 12
I made 5 in your code into 05 and then checked to see if the $varX should have a zero preceding it. I think I got the correct answers doing it this way. I tested under KM ver 1.1.6