Magnus Lie Hetland wrote: > Just wondering ... Is there any easy way to do stuff like: > > > <% if foobar: %> > ... > <% elif babar: %> > ... > <% else: %> > ... > <% end %> > > in PSP without using braces? I realise that the example above doesn't > work unmodified; I think the "end" solution is quite nice... But can > it be used for multi-block statements (with else clauses etc)? By > simply recognising the keywords catch, else, and elif most of those > could be covered -- no? (Can't think of any others at the moment.)
Here's how you write it in PSP: <%if foobar:%> ... <%end%> <%elif babar:%> ... <%end%> <%else:%> ... <%end%> In other words, every block must be "unindented" with an <%end%> tag. This only works with Webware 0.7 -- in prior versions you had to write: <%if foobar:%> ... <%end%><%elif babar:%> ... <%end%><%else:%> ... <%end%> with no extra whitespace between the <%end%> and the <%else:%>. - Geoff _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
