- Jun
- 570
- 4
I just discovered a problem with flow control and/or command grouping. To illustrate it, consider the following alias definition:
alias zz=if not a eq a (echo one & echo two) & echo three
Since the IF clause is false, I expect the command group not to run, but I expect the additional command to run and echo "three" to the screen. That's exactly what happens with TCMD/TCC v.25.
TCC(25.00.30): C:\>zz
three
TCC(25.00.30): C:\>
With v.27, there is no output.
TCC(27.00.21): C:\>zz
TCC(27.00.21): C:\>
If I change the alias definition to make the IF test true, then three lines are echoed as expected.
alias zz=if not a eq a (echo one & echo two) & echo three
Since the IF clause is false, I expect the command group not to run, but I expect the additional command to run and echo "three" to the screen. That's exactly what happens with TCMD/TCC v.25.
TCC(25.00.30): C:\>zz
three
TCC(25.00.30): C:\>
With v.27, there is no output.
TCC(27.00.21): C:\>zz
TCC(27.00.21): C:\>
If I change the alias definition to make the IF test true, then three lines are echoed as expected.