Manual:DIL Manual/Functions

From DikuMUD Wiki
Jump to navigation Jump to search

Functions:

  DIL features an extended set of built-in functions
  for extended program control. Built-in functions can be part of
  any expression in DIL. The built-in functions are
  listed later.
Example:

   dilbegin foo();
   code
dilend
  DIL also lets you use templates as functions, but in a
  limited way. Using templates as functions, you may only
  use the return value to assign it to one of the variables
  declared in the 'var' section. No fields.
Example:

   dilbegin integer bar(s:string);
   code
dilend

   dilbegin foo();
   external
     integer bar(s:string);
   var
     myint:integer;
   code
dilend
---~---~---~---~---~---~---~---~---

Functions:

  DIL features an extended set of built-in functions
  for extended program control. Built-in functions can be part of
  any expression in DIL. The built-in functions are
  listed later.
Example:

   dilbegin foo();
   code
dilend
  DIL also lets you use templates as functions, but in a
  limited way. Using templates as functions, you may only
  use the return value to assign it to one of the variables
  declared in the 'var' section. No fields.
Example:

   dilbegin integer bar(s:string);
   code
dilend

   dilbegin foo();
   external
     integer bar(s:string);
   var
     myint:integer;
   code
dilend
---~---~---~---~---~---~---~---~---