View Single Post
  #3  
Old 05-29-2003, 03:52 PM
pjaquiery pjaquiery is online now
Registered User
 
Join Date: 01-19-2003
Location: Dunedin, New Zealand
Posts: 114
In general use the Is True test rather than testing for equality for a true/false type test.

A VBScript or JScript true == -1. You happened to use 1 for the same semantic value (no harm in that, some of the best languages use 1 for true internally). Generally any non-zero value can be treated as true and only 0 is treated as false.

Your test becomes:

%READ_INI(C:\deploy.ini,Global,NewMachineConfig)%
is true

Note that the [] are not required because this is simply a Macro expansion (albeit a magical one as far as I can see). In this case they don't do any harm either because [0] == 0 && [1] == 1.
Reply With Quote