Microsoft KB Archive/35937

From BetaArchive Wiki
Knowledge Base


Equal-Sign Characters in Environment Variables

Article ID: 35937

Article Last Modified on 5/12/2003



APPLIES TO

  • Microsoft MS-DOS 2.11 Standard Edition
  • Microsoft MS-DOS 3.1
  • Microsoft MS-DOS 3.2 Standard Edition
  • Microsoft MS-DOS 3.21 Standard Edition
  • Microsoft MS-DOS 3.3 Standard Edition
  • Microsoft MS-DOS 3.3a
  • Microsoft MS-DOS 4.0 Standard Edition
  • Microsoft MS-DOS 4.01 Standard Edition
  • Microsoft MS-DOS 5.0 Standard Edition
  • Microsoft MS-DOS 5.0a
  • Microsoft MS-DOS 6.0 Standard Edition
  • Microsoft MS-DOS 6.2 Standard Edition
  • Microsoft MS-DOS 6.21 Standard Edition
  • Microsoft MS-DOS 6.22 Standard Edition



This article was previously published under Q35937

SUMMARY

When using environment variables in MS-DOS, you cannot include an equal sign as a character data/value section in an environment variable. The MS-DOS environment parser uses the equal sign as the delimiter between the name and the value of an environment variable. Thus, trying to set the environment variable "EXRC" to "TABS=4" as follows

set EXRC=TABS=4


would result in a syntax error. In OS/2, it is possible to set this environment variable by using the caret character (^) to "escape" the equal sign. Thus, under OS/2, it is possible to set the environment variable "EXRC" as follows:

set EXRC=TABS^=4



Additional query words: 6.22 2.00 2.10 2.11 2.25 3.00 3.10 3.20 3.22 3.30 3.30A 4.00 5.00 5.00a 6.00 6.20

Keywords: KB35937