boolean - TCL 0 not equal to FALSE -
i try expr 0==false returns 0 instead of 1. according http://wiki.tcl.tk/16295, false values case-insensitive words no, off, false, unique abbrevations, , 0.
it weird, or understanding wrong?
while specifying operands expr command, validate against boolean value, should use string is command.
% expr {0==false} 0 % expr {[string false 0]} 1 simply validating against boolean equal == treat them if literal string/list.
reference : expr
Comments
Post a Comment