LPC
The LPmud programming language
Edition pre-3.01
July 1996
by Ronny Wikh (
rw@cd.chalmers.se
)
Copying Conditions
Introduction
i - Acknowledgments
ii - Tutorial Setup
iii - History of LPC
iv - Gamedriver/Mudlib
v - Administrative Setup
vi - Writing code
LPC basics
Basic programming concepts
What is programming?
Compiled/Interpreted code
Programs
Objects
Object makeup
Basic LPC
Comments
Data types
Variable declarations
Function declarations
Statements and Expressions
Statements
Expressions
The block statement
The ';' statement
Scope and prototypes
Operator expressions
Miscellaneous operators
Arithmetic operators
Boolean operators
Conditional (logical) operators
Comparative operators
Prefix allocation
Precedence and Order of evalutaion
Conditionals
The if/else statement
The switch statement
The ?: expression
Loop statements
The for statement
The while statement
The break and continue statement
Arrays and Mappings
How to declare and use arrays
How to declare and use Mappings
The preprocessor
The #include statement
The #define statement
The #if, #ifdef, #ifndef, #else and #elseif statements
Essential LPC and Mudlib
Peeking at things to come
LPC revisited
Function calls
Making object-internal function calls
Making single object-external function calls
Making multiple object-external function calls
Inheriting object classes
Shadows: Masking functions during runtime
Type identification
Type qualifiers
The static variable qualifier
The static function qualifier
The private function/variable qualifier
The nomask function/variable qualifier
The public function/variable qualifier
The varargs function qualifier
The function data type, part 2
switch/case part 2
catch/throw: Error handling during runtime
Array & Mapping references
LPC/Mudlib interafce
Definition of standard and library objects
The base object class, /std/object.c
Standard object classes
Standard library objects
How to obtain object references
Object references relative to the current object
Creating objects
Finding references relative to another object
Object references to interactive objects
Destroying objects
Object-inherent command handling
Alarms: Asynchronous function execution
The inventory and the environment
String functions
Bit functions
Time functions
Array/string conversion
Array functions
Mapping functions
Type conversion
Math functions
File handling
Directory handling
Screen input/output
Advanced LPC and Mudlib
Function data type, part 3
The basics of the function type
Partial argument lists
Complex function applications
Writing efficient code
Efficient loops
Abusing defines
Traps and pitfalls
Mapping/Array security
Alarm loops
LPC Index
Efun/Sfun Index
Lfun/Macro Index
Type Index
This document was generated using a modified
texi2html
translator version 1.42.