Mercurial Hosting > luan
comparison website/src/manual.html.luan @ 1827:50e570b598b2
security
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 15 Sep 2024 10:36:46 -0600 |
parents | d3e6c7f64559 |
children |
comparison
equal
deleted
inserted
replaced
1826:3cd1d267508c | 1827:50e570b598b2 |
---|---|
13 intro = { | 13 intro = { |
14 title = "Introduction" | 14 title = "Introduction" |
15 content = function() | 15 content = function() |
16 %> | 16 %> |
17 <p> | 17 <p> |
18 Luan is a high level programming language based on <a href="http://www.lua.org">Lua</a>. A great strength of Lua is its simplicity and Luan takes this even further, being even simpler than Lua. The goal is to provide a simple programming language for the casual programmer with as few concepts as possible so that one can quickly learn the language and then easily understand any code written in Luan. | 18 Luan is a high level programming language based on <a href="https://www.lua.org/">Lua</a>. A great strength of Lua is its simplicity and Luan takes this even further, being even simpler than Lua. The goal is to provide a simple programming language for the casual programmer with as few concepts as possible so that one can quickly learn the language and then easily understand any code written in Luan. |
19 </p> | 19 </p> |
20 | 20 |
21 <p> | 21 <p> |
22 Luan is implemented in Java and is tightly coupled with Java. So it makes a great scripting language for Java programmers. | 22 Luan is implemented in Java and is tightly coupled with Java. So it makes a great scripting language for Java programmers. |
23 </p> | 23 </p> |
159 env = { | 159 env = { |
160 title = "Environments" | 160 title = "Environments" |
161 content = function() | 161 content = function() |
162 %> | 162 %> |
163 <p> | 163 <p> |
164 The environment of a chunk starts with only one local variable: <code><a href="#require">require</a></code>. This function is used to load and access libraries and other modules. All other variables must be added to the environment using <a href="http://localhost:8080/manual.html#local_stmt">local declarations</a>. | 164 The environment of a chunk starts with only one local variable: <code><a href="#require">require</a></code>. This function is used to load and access libraries and other modules. All other variables must be added to the environment using <a href="/manual.html#local_stmt">local declarations</a>. |
165 </p> | 165 </p> |
166 | 166 |
167 <p> | 167 <p> |
168 As will be discussed in <a href="#vars">Variables</a> and <a href=#assignment">Assignment</a>, | 168 As will be discussed in <a href="#vars">Variables</a> and <a href=#assignment">Assignment</a>, |
169 any reference to a free name | 169 any reference to a free name |
1174 } | 1174 } |
1175 template_stmt = { | 1175 template_stmt = { |
1176 title = "Template Statements" | 1176 title = "Template Statements" |
1177 content = function() | 1177 content = function() |
1178 %> | 1178 %> |
1179 <p>Template statements provide the full equivalent of <a href="http://en.wikipedia.org/wiki/JavaServer_Pages">JSP</a> but in a general way. Template statements write to standard output. For example:</p> | 1179 <p>Template statements provide the full equivalent of <a href="https://en.wikipedia.org/wiki/Jakarta_Server_Pages">JSP</a> but in a general way. Template statements write to standard output. For example:</p> |
1180 </p> | 1180 </p> |
1181 | 1181 |
1182 <code block> | 1182 <code block> |
1183 local name = "Bob" | 1183 local name = "Bob" |
1184 %> | 1184 %> |
2550 %> | 2550 %> |
2551 <p>Returns a hex digest string of <code>s</code>. Could be defined as:</p> | 2551 <p>Returns a hex digest string of <code>s</code>. Could be defined as:</p> |
2552 | 2552 |
2553 <code block> | 2553 <code block> |
2554 function String.digest_message(algorithm,s) | 2554 function String.digest_message(algorithm,s) |
2555 return <a href="http://localhost:8080/manual.html#Binary.to_hex">Binary.to_hex</a>( <a href="http://localhost:8080/manual.html#Binary.digest_message">Binary.digest_message</a>( algorithm, <a href="http://localhost:8080/manual.html#String.to_binary">String.to_binary(s)</a> ) ) | 2555 return <a href="/manual.html#Binary.to_hex">Binary.to_hex</a>( <a href="/manual.html#Binary.digest_message">Binary.digest_message</a>( algorithm, <a href="/manual.html#String.to_binary">String.to_binary(s)</a> ) ) |
2556 end | 2556 end |
2557 </code> | 2557 </code> |
2558 <% | 2558 <% |
2559 end | 2559 end |
2560 } | 2560 } |
3710 <div content> | 3710 <div content> |
3711 <h1><a href="manual.html">Luan Reference Manual</a></h1> | 3711 <h1><a href="manual.html">Luan Reference Manual</a></h1> |
3712 <p small> | 3712 <p small> |
3713 Original copyright © 2015 Lua.org, PUC-Rio. | 3713 Original copyright © 2015 Lua.org, PUC-Rio. |
3714 Freely available under the terms of the | 3714 Freely available under the terms of the |
3715 <a href="http://www.lua.org/license.html">Lua license</a>. | 3715 <a href="https://www.lua.org/license.html">Lua license</a>. |
3716 Modified for Luan. | 3716 Modified for Luan. |
3717 </p> | 3717 </p> |
3718 <hr> | 3718 <hr> |
3719 <h2>Contents</h2> | 3719 <h2>Contents</h2> |
3720 <div toc> | 3720 <div toc> |