Halt and catch fire: Difference between revisions

Content added Content deleted
No edit summary
(→‎{{header|Lua}}: added Lua solution)
Line 224: Line 224:
This is just one possibility.
This is just one possibility.
<lang lb>Let</lang>
<lang lb>Let</lang>

=={{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 it's short-enough as-is:
<lang lua>error(1)</lang>
{{out}}
<pre>1
stack traceback:
[C]: in function 'error'
stdin:1: in main chunk
[C]: in ?</pre>


=={{header|Nim}}==
=={{header|Nim}}==