While loops not working correctly - 22/12/03 04:48 PM
OK I've come here since this while loop doesnt seem to work as its supposed to.
Thats what the code is supposed to be. If the variable exists, move on to the next number. Here are my results of using this.
It seems when I set the while evaluation to == $null it will break out of the loop and process the set commands for %user1, %pass1, and %mask1 only whether they exist or not. (If %user1 exists its understandable but if it didnt exist, it SHOULD have ran away)
If the while evaluation is set to != $null, no matter what it runs away.
Code:
alias memorymanager { set %unitnumber 1 while ( %user $+ %unitnumber != $null) { /inc %unitnumber 1 } set %user $+ %unitnumber %username set %pass $+ %unitnumber %password set %mask $+ %unitnumber %who }
Thats what the code is supposed to be. If the variable exists, move on to the next number. Here are my results of using this.
It seems when I set the while evaluation to == $null it will break out of the loop and process the set commands for %user1, %pass1, and %mask1 only whether they exist or not. (If %user1 exists its understandable but if it didnt exist, it SHOULD have ran away)
If the while evaluation is set to != $null, no matter what it runs away.