[Next] [Up] [Previous] [Contents] [Index]
Next: 3. Types, operators and Up: NannyMUD LPC Previous: 1. Introduction


2. Fundamentals

2.1 What is LPC?

LPC is an acronym for 'Lars Pensjö C', and was in its original form created by Lars Pensjö in 1989. LPC is an object-oriented (OO), interpreted language, and the interpreter program is known as the driver. The version number of the driver is also the version number of the LPC. NannyMUD started off with the 2.4.5 driver on the spring of 1990.

2.2 LPC object and times

The definition of an LPC object is a text-file. When the driver detects that the object is needed, the driver first checks if the object is already in the memory. If it is not, the file is read and parsed into an internal representation. This first step is called loading the object, and the moment in time when it happens is known as load-time. After loading, a function named 'reset' is called in the object, with the argument zero.

The object stays loaded in memory until explicitly destructed. When there is a need to execute code in the 'loaded' object, the internal representation is interpreted by the driver. This happens in run-time.

The loaded object can then, after being loaded, be copied in a process called cloning. The original object, i.e. the loaded one, is known as the master object. Cloned objects are called clones.

2.3 The value of truth

In LPC, there is no such thing as a special truth value, nor any special false value. The distinction is simply between zero, and everything else. This has several implications which will become clear further on.

2.4 More Reading

Inside NannyMUD, there is detailed and voluminous documentation available to the coders through the use of the 'man' command. The most up-to-date documentation is, naturally, the source code of the objects. At the time of writing this document, both the man-pages and the source code are available over WWW. Navigate down from http://www.lysator.liu.se/nanny/ to access it.

[Next] [Up] [Previous] [Contents] [Index]
Next: 3. Types, operators and Up: NannyMUD LPC Previous: 1. Introduction
Mats Henrik Carlberg