Feature suggestion: 0==false

Please make $if interpret 0 and empty string as false.

This would allow e.g.

$if($strstr(haystack,st),found, not)

which currently must (AFAICS) be written:

$if($neql(0,$strstr(haystack,st)),found, not)

... can be written as ...


The whole scripting language needs a ground up rewrite, IMO. Make it more rigid, and better define what is TRUE and FALSE. Right now it's a crapshoot how most things work. It's very inconsistent and has always been so.

Thanks D. No fewer characters, but fewer brackets makes it IMO preferable! :slight_smile:

I agree it could be better, but while retaining compatibility, the crapshoot can be fixed simply by complete documentation.