#353 "SET X= " behavior

open
nobody
shell (25)
5
2012-09-07
2010-07-05
Paul Blair
No

I've noticed a discrepancy between the way MS-DOS handles SET and the way DOSBox does.

In MS-DOS, "SET X= " (where the value is just a space or multiple spaces) will actually store the variable in memory as the correct number of spaces.

In DOSBox, the same command not only does not store the variable as space(s), but actually clears the variable from memory entirely, even if it already existed with another value.

I have confirmed that PC-DOS 3.3 and Windows Vista CMD behave the same way. That represents a pretty long span of time, so I'd imagine that DOSBox should behave the same way.

Discussion