Manual:DIL Manual/dilend
Jump to navigation
Jump to search
Contents
dilend
Keyword. Ends a template.
dilbegin name();
...
code
{
...
}
dilend
Every dilbegin needs its dilend, right after the closing brace of code. A comment may follow it on the same line.
Notes
dilendworks through a macro:wmacros.hdefines it asdilend^, and vmc takes each program out of the zone fromdilbeginup to the first^. A zone with DIL therefore has to#include <macros.h>(which includeswmacros.h).- Because of that, a
^anywhere in a program's text, for instance inside a string, ends the program there and gives a syntax error. Comments are removed before this happens, so a^in a comment does no harm. - A missing
dilendmakes vmc read on into whatever follows, and fail there.
Example
dilbegin bell();
code
{
act("A bell rings; its note hangs in the air.", A_ALWAYS, self, null, null, TO_ALL);
quit;
}
dilend // the end of bell
The smallest kind of program: a header, a code section and dilend.