Programming Help by Programmers hub

LPC Programming Language

LPC is a object oriented programming language designed for the development of the computer games. The LPC acronym stands for its creator, Lars Pensjö, and the programming language from which it was derived, C — therefore LPC. The syntax of the LPC programming language is C-like and LPC is a highly flexible language. LPC has no strongly typed variables. This allows LPC to be used for creating objects instead of items

LPC supports

  • procedural programming
  • modular programming
  • structured programming
  • object-oriented programming
  • programming with defined data types
  • weakly variable typed programming
LPC Programming Language

LPC Programming Code Example

{`
#include <mudlib.h>
    inherit ALCOHOL;



     void create() {

      ::create();

      set_author("flake");

      set_id( ({ "glass", "nectar"}) );



      set_short("A crystal glass of nectar");

      set_long("The deep earthy smells waft from the pure crystal glass "

               "and surround you in an refreshing intoxication.  It is "

               "good to be Immortal.");



      set("empty_short", "An empty glass");

      set("empty_long", 

          "An empty glass with but a savory hint of the lovely nectar it "

          "once held.");



       set("alcohol", 2);

    

      set("drink_message", 

          "You drink from the glass and the smooth liquid gently washes "

     "down your throat in such a pleasant interlude that lasts for "

          "hours that even Aubrey couldn't annoy you.\n");

    

      set("other_drink_message", 

          "drinks sweetly from the pure crystal glass of nectar.\n");

  }
 `}

On Web

www.wisegeek.com

www.darkrifts.org