Mercurial Hosting > luan
comparison website/src/diff.html.luan @ 390:bfbbce690bba
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 24 Apr 2015 12:31:13 -0600 |
parents | 497d4ef0a89f |
children | 2f5cc9c2cbf0 |
comparison
equal
deleted
inserted
replaced
389:497d4ef0a89f | 390:bfbbce690bba |
---|---|
136 </pre></tt></p> | 136 </pre></tt></p> |
137 | 137 |
138 <p>The Luan generic <b>for</b> statement is simpler than the Lua version because Luan only uses and expression, not an explist. So a <b>for</b> statement like:</p> | 138 <p>The Luan generic <b>for</b> statement is simpler than the Lua version because Luan only uses and expression, not an explist. So a <b>for</b> statement like:</p> |
139 | 139 |
140 <p><tt><pre> | 140 <p><tt><pre> |
141 for var_1, ···, var_n in exp do block end | 141 for var_1, ···, var_n in exp do block end |
142 </pre></tt></p> | 142 </pre></tt></p> |
143 | 143 |
144 <p>is equivalent to the code:</p> | 144 <p>is equivalent to the code:</p> |
145 | 145 |
146 <p><tt><pre> | 146 <p><tt><pre> |
147 do | 147 do |
148 local f = exp | 148 local f = exp |
149 while true do | 149 while true do |
150 local var_1, ···, var_n = f() | 150 local var_1, ···, var_n = f() |
151 if var_1 == nil then break end | 151 if var_1 == nil then break end |
152 block | 152 block |
153 end | 153 end |
154 end | 154 end |
155 </pre></tt></p> | 155 </pre></tt></p> |