Message3682

Author otmarhumbel
Recipients foripperz, fwierzbicki, mr_tines, otmarhumbel
Date 2008-10-14.12:31:05
SpamBayes Score 0.0378363
Marked as misclassified No
Message-id <1223987465.98.0.954016507497.issue1125@psf.upfronthosting.co.za>
In-reply-to
Content
To illustrate the problem:

  C:\stuff\temp>set TEST=my test
  C:\stuff\temp>echo %TEST%
  my test
  C:\stuff\temp>if not [%TEST%]==[] echo [%TEST%] is set
  "test]==[]" is syntactically not valid here
  C:\stuff\temp>if not "%TEST%"=="" echo [%TEST%] is set
  [my test] is set
  C:\stuff\temp>if not '%TEST%'=='' echo [%TEST%] is set
  "test'==''" is syntactically not valid here

  C:\stuff\temp>set TEST="my test"
  C:\stuff\temp>echo %TEST%
  "my test"
  C:\stuff\temp>if not [%TEST%]==[] echo [%TEST%] is set
  ["my test"] is set
  C:\stuff\temp>if not "%TEST%"=="" echo [%TEST%] is set
  "test""==""" is syntactically not valid here
  C:\stuff\temp>if not '%TEST%'=='' echo [%TEST%] is set
  ["my test"] is set

The error message is my translation from the German:
  kann syntaktisch an dieser Stelle nicht verarbeitet werden

Summary:
There is no common syntax for testing the emptiness of a string
(containing spaces, quoted or unquoted).
History
Date User Action Args
2008-10-14 12:31:05otmarhumbelsetmessageid: <1223987465.98.0.954016507497.issue1125@psf.upfronthosting.co.za>
2008-10-14 12:31:05otmarhumbelsetrecipients: + otmarhumbel, fwierzbicki, mr_tines, foripperz
2008-10-14 12:31:05otmarhumbellinkissue1125 messages
2008-10-14 12:31:05otmarhumbelcreate