Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [webmaster33] Strange template variable equal comparison bug?

Quote Reply
Re: [webmaster33] Strange template variable equal comparison bug? In reply to
If at the right side of expression we use $ sign for the tag, then will be compared correctly.
<%if Add_Date eq $Mod_Date%>added: '<%Add_Date%>'<%else%>modified: '<%Mod_Date%>'<%endif%>
This will work.

However I think, that if we allow left side to interpolate, then we should also allow the right side of the expression to interpolate, too!
So <%if Add_Date eq Mod_Date%> should be work the same way as <%if Add_Date eq $Mod_Date%>.
If we want to compare uninterpolated value, just as string, we can do that way:
<%if Add_Date eq 'Mod_Date'%> - this is not interpolated, and 'Mod_Date' is used as string
<%if Add_Date == 1998%> - this is not interpolated either, and '1998' is used as string

I've doubts that Alex will change that behaviour, but I have to express my opinion, that I don't aggree with current solution.
Somebody convince me, that the current solution is better for some reasons, than the suggested one...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Subject Author Views Date
Thread Strange template variable equal comparison bug? webmaster33 849 Jan 5, 2004, 5:09 PM
Post Re: [webmaster33] Strange template variable equal comparison bug?
webmaster33 797 Jan 5, 2004, 5:35 PM