Mercurial Hosting > luan
comparison website/src/manual.html.luan @ 589:97c8ae330efe
add varargs to Luan.try;
add Io.output_to and Io.output_of;
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 26 Aug 2015 04:38:37 -0600 |
parents | 5d4652d78ce0 |
children | b73f005f3735 |
comparison
equal
deleted
inserted
replaced
588:5fdbefa80146 | 589:97c8ae330efe |
---|---|
2174 with <code>v</code> as argument, | 2174 with <code>v</code> as argument, |
2175 and uses the result of the call as its result. | 2175 and uses the result of the call as its result. |
2176 | 2176 |
2177 | 2177 |
2178 | 2178 |
2179 <h4 heading><a name="Luan.try"><code>Luan.try (t)</code></a></h4> | 2179 <h4 heading><a name="Luan.try"><code>Luan.try (t, ···)</code></a></h4> |
2180 | 2180 |
2181 <p> | 2181 <p> |
2182 Implements try-catch as found in other languages where each block is in table <code>t</code>. <code>t[1]</code> is the "try" block. The <code>t.catch</code> and <code>t.finally</code> blocks are optional. Returns the result of the "try" block or the "catch" block. | 2182 Implements try-catch as found in other languages where each block is in table <code>t</code>. <code>t[1]</code> is the "try" block. The <code>t.catch</code> and <code>t.finally</code> blocks are optional. Any extra arguments are passed to the "try" function. Returns the result of the "try" block or the "catch" block. |
2183 | 2183 |
2184 <p> | 2184 <p> |
2185 Example use: | 2185 Example use: |
2186 | 2186 |
2187 <pre> | 2187 <pre> |