A
          / \      _             Play Now                         Nemesis on fb
          | |     | |  _______   _        _   _______    _______   _    _______
          | |\    | | |   ____| |  \    /  | |   ____|  /   ____| | |  /   ____|
 /-------/-------------------------------------------------------------------,
O= Home <=XX|  About  News  Pics  Adventurers  Wizards  Download  Connect     >
 \-------\-------------------------------------------------------------------'
          | |   \   | |  |____  | |      | | |  |____   ___ \  \  | |  ___ \  \
          | |     \_| |_______| |_|      |_| |_______| |_______/  |_| |_______/
          \ /
           V  

Documentation Area

Document Path: /doc/room2/page23


<
                                 CHAPTER 2                                      
Basic Concepts:

   The main duty of a basic and generic room support is to provide the code
   for a lot of features, which the wizard doesn't have to program in each
   room again. This concept is named code sharing. 

   LPC understands two ways of code sharing: Include and inherit. These ways
   totally different and I'll explain the difference to you.

   - Include is a preprocessor command. This means, the command is executed
     before the program is compiled. The include command copies a whole file
     to the line where is is stated. Therefore include is mostly used to get
     defines (string replacements) and macros. These are also inserted into
     the program text by the preprocessor. If program code is being included
     it would have to be compiled again. There we come to the second way:

   - Inherit is one of the concepts of Object Orientated Programming (OOP).
     It doesn't copy code, but copies the function and variable tables of
     an already compiled program into another. This means, if one program
     inherits another program, the inherited functions and variables don't
     have to be compiled again. But their references are copied so they are
     present in the inherited-by program.

   Changed/modified by Kiri in August 2016.

See also:
>

This page was generated in LPC

Imprint / Impressum