Re: [htmltmpl] TMPL_IF truth vs definition
Brought to you by:
samtregar
From: Douglas K. <dlk...@rh...> - 2002-06-21 21:17:34
|
On Friday 21 June 2002 09:43 am, you wrote: > Hi Tugrul, > > I normally don't jump in on these conversations, but are you really > suggesting that TMPL_IF be true if the value of the variable is 0? 0 = true > goes against everything computers stand for. > > > TMPL_IF works all of the time except when the data that exists just > > happens to be 0 (or anything else that is false). > > So, what you are saying is TMPL_IF is false if the data is false. Sounds > like it works perfectly to me! > The problem I see with that, is if the TMPL_IF is reading the data. we should be able to see if the data equal a value. If that is a case then there should be something like this: <TMPL_IF NAME="FOO" eq 5> The data is aready known because it knowns that the data is either zero or something else. It should not be that much work to do a test against a value. my 2 cents Douglas |