+ (pseudovariable)

Print Topic  Return to Overview  Previous Topic  Next Topic 

+ is the current command separator. Use this pseudovariable, instead of the actual command separator, if you want your batch files and aliases to work in other users' environment regardless of how the command separator is defined.

 

WARNING: %+ should always be surrounded by spaces.

 

For example, if the command separator is an ampersand [&] (the default in TCC) both of the commands below will display "Hello" on one line and "world" on the next. However, if the command separator has been changed the first command will display "Hello & echo world", while the second command will continue to work as intended.

 

echo Hello & echo world

echo Hello %+ echo world

Topic "plus.htm" last edited 1/27/2008. ©2008  JP Software, Inc.
Keywords: + plus sign,CommandSep,Command separator