comparison website/src/manual.html.luan @ 469:85467f95ab13

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 09 May 2015 21:10:08 -0600
parents 9b51e2413cab
children 5627eb637eb4
comparison
equal deleted inserted replaced
468:9b51e2413cab 469:85467f95ab13
1121 <p>Template statements are based on <a href="#template_expr">template exressions</a> and provide the full equivalent of <a href="http://en.wikipedia.org/wiki/JavaServer_Pages">JSP</a> but in a general way. Template statements write the equivalent template exression to standard output. For example:</p> 1121 <p>Template statements are based on <a href="#template_expr">template exressions</a> and provide the full equivalent of <a href="http://en.wikipedia.org/wiki/JavaServer_Pages">JSP</a> but in a general way. Template statements write the equivalent template exression to standard output. For example:</p>
1122 1122
1123 <p><tt><pre><%=Html.encode[[ 1123 <p><tt><pre><%=Html.encode[[
1124 local name = "Bob" 1124 local name = "Bob"
1125 %> 1125 %>
1126 Hello <%=name%>! 1126 Hello <%= name %>!
1127 Bye <%=name%>. 1127 Bye <%= name %>.
1128 <% 1128 <%
1129 ]]%></pre></tt></p> 1129 ]]%></pre></tt></p>
1130 1130
1131 <p>is equivalent to the code:</p> 1131 <p>is equivalent to the code:</p>
1132 1132
1133 <p><tt><pre><%=Html.encode[[ 1133 <p><tt><pre><%=Html.encode[[
1134 local name = "Bob" 1134 local name = "Bob"
1135 require("luan:Io").stdout.write( %> 1135 require("luan:Io").stdout.write( %>
1136 Hello <%=name%>! 1136 Hello <%= name %>!
1137 Bye <%=name%>. 1137 Bye <%= name %>.
1138 <% ) 1138 <% )
1139 ]]%></pre></tt></p> 1139 ]]%></pre></tt></p>
1140 1140
1141 1141
1142 1142
1729 1729
1730 <p>Luan template expression are based on <a href="http://en.wikipedia.org/wiki/JavaServer_Pages">JSP</a>. Template expressions return multiple values. Here is an example:</p> 1730 <p>Luan template expression are based on <a href="http://en.wikipedia.org/wiki/JavaServer_Pages">JSP</a>. Template expressions return multiple values. Here is an example:</p>
1731 1731
1732 <p><tt><pre><%=Html.encode[[ 1732 <p><tt><pre><%=Html.encode[[
1733 local name = "Bob" 1733 local name = "Bob"
1734 write( %>Hello <%=name%>!<% ) 1734 write( %>Hello <%= name %>!<% )
1735 ]]%></pre></tt></p> 1735 ]]%></pre></tt></p>
1736 1736
1737 <p>This is equivalent to the code:</p> 1737 <p>This is equivalent to the code:</p>
1738 1738
1739 <p><tt><pre> 1739 <p><tt><pre>