Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Booleans with Functions

Quote Reply
Booleans with Functions
Why doesn't this work -
<%if Dbsql::scFileFind::get_files($school,'picture_lesson','1') eq 'no'%>Do something<%else%>Dbsql::scFileFind::get_files($school,'picture_lesson','1')<%endif%>
but this does -
<%set return_result = Dbsql::scFileFind::get_files($school,'picture_lesson','1')%>
<%if return_result eq 'no'%>Do something<%else%><%return_result%><%endif%>

Thank you.
Simon.
Quote Reply
Re: [jai] Booleans with Functions In reply to
I know, there are some cases, where the GT parser doesn't "understand" what you want.
To answer shortly: it is a parser "feature". Wink
Logically, it should handle these cases, but it can't, so you have to simplify some expression result into a variable using set, which variable can be easily handled/understood by the parser.

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...