Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

"Set" command behavior - a bug?

Feb
11
0
The documentation says:

If you enter only name, and there is no variable with that name, SET will display all environment variables whose names begin with name. For example, if there is no variable pa, the command below will display all variables whose names start with pa:

set pa

The above command is equivalent to the command

set pa*

Here is the batch file to test this:

set var1=var1
set var11=var11
set var1


The TCC output:
1524221939034.png


The cmd.exe output:
1524222136140.png


Does it look like a bug?
 
TCC's behavior matches the documentation, so I would say no. More like a deliberate incompatibility.

(I'm guessing, but this behavior may go back to 4DOS, predating CMD.EXE.)
 
If you want to see the contents of a variable, use echo.
"Set" is to SET the variable.
All other behavior is undefined and cannot be relied upon across various shells.
 
Back
Top
[FOX] Ultimate Translator
Translate