I did a search for "while loop" on the entire forum for the past 6 months, and I didn't see anything directly related so..

I'm not for sure if this is a bug or if it is known but while loop fails to loop when there is a space in a variable.

I will try to demonstrate. Here is a simple script to while loop:
Code:
alias testwhile {
  var %x = 1,%y = 5
  while (%x <=  %y) {
    echo -a %x
    inc %x
  }
  echo -a Finished
}


Logically the ouput will echo the numbers 1-5, but when you modify the var part to:
"var %x = 1,%y = $+($chr(32),5)" the while loop will not echo anything and will continue to echo "Finished". A way to fix this would be to $remove character 32 before it runs thru the while loop.

I also noticed if you left the var as "%y = 5" and then change the while loop too "(%x <= %y)" (Two spaces after the equal sign.) the while loop will work.

So is this an while loop parsing the variables error? Please assist in anyway. Thanks. smile

- Zach