Halt and catch fire: Difference between revisions

Content added Content deleted
m (→‎{{header|Lua}}: added another)
m (→‎{{header|Lua}}: more explain)
Line 226: Line 226:


=={{header|Lua}}==
=={{header|Lua}}==
Tricks could be used to shorten this, particularly in the interactive REPL, where <code>-_</code> would be enough (i.e., attempt to perform arithmetic on a nil global). This instead focuses on the "be useful elsewhere" aspect of the task, because both seem short-enough as-is:
Tricks could be used to shorten this, particularly from interactive REPL, where <code>-_</code> would be enough (i.e., attempt arithmetic on a nil global), or from a file <code>_()</code> would be enough (i.e., attempt to call a nil global). This instead focuses on the "be useful elsewhere" aspect of the task, because both seem short-enough as-is:
<lang lua>error(1)</lang>
<lang lua>error(1)</lang>
{{out}}
{{out}}