[DGD] Delay statements in scripting

John West McKenna john at mussel.ucc.gu.uwa.edu.au
Sun Jan 4 12:23:56 CET 2004


Noah Gibbs writes:

<a long post about the difficulties of putting delays into scripts without
either inventing another language or putting up with ghastly syntax>

How about taking advantage of LPC's dynamic nature?  Write your script as
ordinary LPC code, with "calls" to a non-existant "delay" function.  This
script never gets executed, or even compiled.  Instead, it gets fed to a
relatively simple preprocessor that breaks it up into separate chunks and
inserts callbacks between them.

The processed code gets compiled and executed.

With a bit more thought/work, it should be possible to deal with loops and
ifs over the breaks (they'd have to be processed into something new too).

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list