Variable assignment without any alteration - 03/02/18 11:38 PM
As far as I know, there are currently two shortcomings with variable assignment where the variable ends up being set to a value that is not equal to the input value, even when using the -n switch to /set and /var:
1) There is no way to assign the two-character sequence "" (i.e., two double quotes) to a variable in any way.
2) Variable assignment is known to drop any single trailing space character. In contrast: assigning two or more trailing space characters, leading space characters, and a single space character with nothing preceding it, all works fine.
Both shortcomings have been there for a long time. However, I think it would still be nice to have some way to be able to assign values without any modification. That would make holding and processing arbitrary input a lot less painful.
I think it would make sense to extend the -n switch to /set and /var to support this extra level of preservation, but a new switch would be just as welcome.
1) There is no way to assign the two-character sequence "" (i.e., two double quotes) to a variable in any way.
2) Variable assignment is known to drop any single trailing space character. In contrast: assigning two or more trailing space characters, leading space characters, and a single space character with nothing preceding it, all works fine.
Both shortcomings have been there for a long time. However, I think it would still be nice to have some way to be able to assign values without any modification. That would make holding and processing arbitrary input a lot less painful.
I think it would make sense to extend the -n switch to /set and /var to support this extra level of preservation, but a new switch would be just as welcome.