Subversion Repositories eduke32

Rev

Rev 4860 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4860 Rev 4880
Line 31... Line 31...
31
  code that implies ambiguities in the language.
31
  code that implies ambiguities in the language.
32
32
33
* On the run-time side, most checking is done by Lunatic. For example, indexing
33
* On the run-time side, most checking is done by Lunatic. For example, indexing
34
  actor gamevars with out-of-bounds values produces an error that gets
34
  actor gamevars with out-of-bounds values produces an error that gets
35
  permanently displayed on the screen. Like with Lua code, the
35
  permanently displayed on the screen. Like with Lua code, the
36
  link:lunatic.html/#error[error] entry in the log then contains a traceback
36
  link:lunatic.html#error[error] entry in the log then contains a traceback
37
  annotated with line numbers, making it possible for the CON coder to pinpoint
37
  annotated with line numbers, making it possible for the CON coder to pinpoint
38
  its location and context.
38
  its location and context.
39
39
40
For these reasons, many existing CON mods and TCs are expected to need
40
For these reasons, many existing CON mods and TCs are expected to need
41
amendments in order to translate and/or run properly. This is generally a
41
amendments in order to translate and/or run properly. This is generally a
Line 311... Line 311...
311
^^^^^^^^^^^^^^^^^
311
^^^^^^^^^^^^^^^^^
312
312
313
As LunaCON is implemented by translating all given CON code to a Lunatic
313
As LunaCON is implemented by translating all given CON code to a Lunatic
314
module, it is the Lunatic runtime that checks for proper use of its services at
314
module, it is the Lunatic runtime that checks for proper use of its services at
315
execution time and takes care of error handling and reporting. In Lua, an error
315
execution time and takes care of error handling and reporting. In Lua, an error
316
link:lunatic.html/#nlcf[transfers control] to the end of the innermost
316
link:lunatic.html#nlcf[transfers control] to the end of the innermost
317
``protected'' call of a Lua chunk.
317
``protected'' call of a Lua chunk.
318
318
319
This is in contrast to C-CON, which for some errors would print a message to
319
This is in contrast to C-CON, which for some errors would print a message to
320
the log, but otherwise would continue execution as if nothing had happened. In
320
the log, but otherwise would continue execution as if nothing had happened. In
321
LunaCON, the code following an error is *not* executed. This way, the author of
321
LunaCON, the code following an error is *not* executed. This way, the author of