Understanding SHIFT

The manual states that SHIFT /n also affects the value of %*. I have a case where it doesn't - so I wonder if I misunderstood, if the doc is wrong or the implementation:
Here's testshift.btm:
@echo off
echo [a] *: %*
echo [a] $: %$
shift /1
echo *: %*
echo $: %$


And a sample of running testshift.btm 1 2 3
[a] *: 1 2 3
[a] $: 1 2 3
*: 1 2 3
$: 2 3


%* seems to be not affected.

P.S: TCC 25.00.24 x64 Windows 10 [Version 10.0.18363.657]
 
Where did you see that? I found these.

1583852063975.png


This form of SHIFT also affects the special parameters %n$, %$ and %# (number of command parameters). However, for compatibility with CMD, this form of the SHIFT command does not alter the contents or order of the parameters returned by %*.
 

Similar threads