Example:
@echo off&setlocal enabledelayedexpansion
set n=abc987
set "m="
set /p=!n:~-6!<nul
set /p=!m:~0,3!<nul
pause
Here is the backspace character. I'd like to ask, doesn't set /p=!m:~0,3!<nul mean displaying 3 backspace characters, that is, deleting three characters? In this example, shouldn't the final result be abc? But when I run it, the final result is abc98. I just can't figure it out no matter how much I think about it. Why is that?
@echo off&setlocal enabledelayedexpansion
set n=abc987
set "m="
set /p=!n:~-6!<nul
set /p=!m:~0,3!<nul
pause
Here is the backspace character. I'd like to ask, doesn't set /p=!m:~0,3!<nul mean displaying 3 backspace characters, that is, deleting three characters? In this example, shouldn't the final result be abc? But when I run it, the final result is abc98. I just can't figure it out no matter how much I think about it. Why is that?
