skylib_fluffos_v3/
skylib_fluffos_v3/bin/
skylib_fluffos_v3/bin/db/
skylib_fluffos_v3/fluffos-2.9-ds2.04/
skylib_fluffos_v3/fluffos-2.9-ds2.04/ChangeLog.old/
skylib_fluffos_v3/fluffos-2.9-ds2.04/Win32/
skylib_fluffos_v3/fluffos-2.9-ds2.04/compat/
skylib_fluffos_v3/fluffos-2.9-ds2.04/compat/simuls/
skylib_fluffos_v3/fluffos-2.9-ds2.04/include/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/clone/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/command/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/data/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/etc/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/include/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/inherit/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/inherit/master/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/log/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/compiler/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/efuns/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/operators/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/u/
skylib_fluffos_v3/fluffos-2.9-ds2.04/tmp/
skylib_fluffos_v3/fluffos-2.9-ds2.04/windows/
skylib_fluffos_v3/mudlib/
skylib_fluffos_v3/mudlib/cmds/
skylib_fluffos_v3/mudlib/cmds/admin/
skylib_fluffos_v3/mudlib/cmds/guild-race/
skylib_fluffos_v3/mudlib/cmds/living/broken/
skylib_fluffos_v3/mudlib/cmds/player/group_cmds/
skylib_fluffos_v3/mudlib/cmds/playtester/
skylib_fluffos_v3/mudlib/d/admin/
skylib_fluffos_v3/mudlib/d/admin/room/
skylib_fluffos_v3/mudlib/d/admin/room/we_care/
skylib_fluffos_v3/mudlib/d/admin/save/
skylib_fluffos_v3/mudlib/d/admin/text/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/buildings/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/map/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/roads/
skylib_fluffos_v3/mudlib/d/learning/chars/
skylib_fluffos_v3/mudlib/d/learning/functions/
skylib_fluffos_v3/mudlib/d/learning/handlers/
skylib_fluffos_v3/mudlib/d/learning/help_topics/
skylib_fluffos_v3/mudlib/d/learning/help_topics/npcs/
skylib_fluffos_v3/mudlib/d/learning/help_topics/objects/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rcs_demo/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rcs_demo/RCS/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/crowd/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/situations/
skylib_fluffos_v3/mudlib/d/learning/save/
skylib_fluffos_v3/mudlib/d/learning/school/
skylib_fluffos_v3/mudlib/d/learning/school/add_sc/
skylib_fluffos_v3/mudlib/d/learning/school/characters/
skylib_fluffos_v3/mudlib/d/learning/school/general/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/basic_commands/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/edtutor/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/unix_tutor/
skylib_fluffos_v3/mudlib/d/learning/school/items/
skylib_fluffos_v3/mudlib/d/learning/school/npc_school/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/room_basic/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/situations/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/terrain_tutor/
skylib_fluffos_v3/mudlib/d/learning/text/
skylib_fluffos_v3/mudlib/d/liaison/
skylib_fluffos_v3/mudlib/d/mudlib/
skylib_fluffos_v3/mudlib/d/mudlib/changes/
skylib_fluffos_v3/mudlib/d/playtesters/
skylib_fluffos_v3/mudlib/d/playtesters/effects/
skylib_fluffos_v3/mudlib/d/playtesters/handlers/
skylib_fluffos_v3/mudlib/d/playtesters/items/
skylib_fluffos_v3/mudlib/d/sage/
skylib_fluffos_v3/mudlib/doc/
skylib_fluffos_v3/mudlib/doc/creator/
skylib_fluffos_v3/mudlib/doc/driver/
skylib_fluffos_v3/mudlib/doc/driver/efuns/arrays/
skylib_fluffos_v3/mudlib/doc/driver/efuns/buffers/
skylib_fluffos_v3/mudlib/doc/driver/efuns/calls/
skylib_fluffos_v3/mudlib/doc/driver/efuns/compile/
skylib_fluffos_v3/mudlib/doc/driver/efuns/filesystem/
skylib_fluffos_v3/mudlib/doc/driver/efuns/floats/
skylib_fluffos_v3/mudlib/doc/driver/efuns/functions/
skylib_fluffos_v3/mudlib/doc/driver/efuns/general/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mappings/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mixed/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mudlib/
skylib_fluffos_v3/mudlib/doc/driver/efuns/numbers/
skylib_fluffos_v3/mudlib/doc/driver/efuns/parsing/
skylib_fluffos_v3/mudlib/doc/login/
skylib_fluffos_v3/mudlib/doc/lpc/basic_manual/
skylib_fluffos_v3/mudlib/doc/lpc/intermediate/
skylib_fluffos_v3/mudlib/doc/new/add_command/
skylib_fluffos_v3/mudlib/doc/new/events/
skylib_fluffos_v3/mudlib/doc/new/handlers/
skylib_fluffos_v3/mudlib/doc/new/living/race/
skylib_fluffos_v3/mudlib/doc/new/living/spells/
skylib_fluffos_v3/mudlib/doc/new/object/
skylib_fluffos_v3/mudlib/doc/new/player/
skylib_fluffos_v3/mudlib/doc/new/room/guild/
skylib_fluffos_v3/mudlib/doc/new/room/outside/
skylib_fluffos_v3/mudlib/doc/new/room/storeroom/
skylib_fluffos_v3/mudlib/doc/object/
skylib_fluffos_v3/mudlib/doc/playtesters/
skylib_fluffos_v3/mudlib/doc/policy/
skylib_fluffos_v3/mudlib/doc/weapons/
skylib_fluffos_v3/mudlib/global/
skylib_fluffos_v3/mudlib/global/creator/
skylib_fluffos_v3/mudlib/handlers/
skylib_fluffos_v3/mudlib/include/casino/
skylib_fluffos_v3/mudlib/include/cmds/
skylib_fluffos_v3/mudlib/include/effects/
skylib_fluffos_v3/mudlib/include/npc/
skylib_fluffos_v3/mudlib/include/room/
skylib_fluffos_v3/mudlib/include/shops/
skylib_fluffos_v3/mudlib/net/daemon/
skylib_fluffos_v3/mudlib/net/daemon/chars/
skylib_fluffos_v3/mudlib/net/inherit/
skylib_fluffos_v3/mudlib/net/obj/
skylib_fluffos_v3/mudlib/net/obj/BACKUPS/
skylib_fluffos_v3/mudlib/obj/amulets/
skylib_fluffos_v3/mudlib/obj/armours/plate/
skylib_fluffos_v3/mudlib/obj/b_day/
skylib_fluffos_v3/mudlib/obj/clothes/transport/horse/
skylib_fluffos_v3/mudlib/obj/faith/symbols/
skylib_fluffos_v3/mudlib/obj/fungi/
skylib_fluffos_v3/mudlib/obj/gatherables/
skylib_fluffos_v3/mudlib/obj/instruments/
skylib_fluffos_v3/mudlib/obj/media/
skylib_fluffos_v3/mudlib/obj/misc/player_shop/
skylib_fluffos_v3/mudlib/obj/monster/godmother/
skylib_fluffos_v3/mudlib/obj/monster/transport/
skylib_fluffos_v3/mudlib/obj/rings/
skylib_fluffos_v3/mudlib/obj/scabbards/
skylib_fluffos_v3/mudlib/obj/spells/
skylib_fluffos_v3/mudlib/obj/stationery/
skylib_fluffos_v3/mudlib/obj/stationery/envelopes/
skylib_fluffos_v3/mudlib/obj/toys/
skylib_fluffos_v3/mudlib/obj/vessels/
skylib_fluffos_v3/mudlib/obj/weapons/axes/
skylib_fluffos_v3/mudlib/obj/weapons/chains/
skylib_fluffos_v3/mudlib/obj/weapons/maces/BACKUPS/
skylib_fluffos_v3/mudlib/save/autodoc/
skylib_fluffos_v3/mudlib/save/book_handler/
skylib_fluffos_v3/mudlib/save/books/history/calarien/
skylib_fluffos_v3/mudlib/save/mail/
skylib_fluffos_v3/mudlib/save/new_soul/data/
skylib_fluffos_v3/mudlib/save/parcels/
skylib_fluffos_v3/mudlib/save/playerinfo/
skylib_fluffos_v3/mudlib/save/players/d/
skylib_fluffos_v3/mudlib/save/players/s/
skylib_fluffos_v3/mudlib/save/random_names/
skylib_fluffos_v3/mudlib/save/random_names/data/
skylib_fluffos_v3/mudlib/save/terrains/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_desert/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_grassy_field/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_mountain/
skylib_fluffos_v3/mudlib/save/todo_lists/
skylib_fluffos_v3/mudlib/secure/
skylib_fluffos_v3/mudlib/secure/cmds/admin/
skylib_fluffos_v3/mudlib/secure/cmds/lord/
skylib_fluffos_v3/mudlib/secure/config/
skylib_fluffos_v3/mudlib/secure/handlers/autodoc/
skylib_fluffos_v3/mudlib/secure/handlers/intermud/
skylib_fluffos_v3/mudlib/secure/include/global/
skylib_fluffos_v3/mudlib/secure/save/
skylib_fluffos_v3/mudlib/secure/save/handlers/
skylib_fluffos_v3/mudlib/secure/std/
skylib_fluffos_v3/mudlib/secure/std/classes/
skylib_fluffos_v3/mudlib/secure/std/modules/
skylib_fluffos_v3/mudlib/std/creator/
skylib_fluffos_v3/mudlib/std/dom/
skylib_fluffos_v3/mudlib/std/effects/
skylib_fluffos_v3/mudlib/std/effects/external/
skylib_fluffos_v3/mudlib/std/effects/fighting/
skylib_fluffos_v3/mudlib/std/effects/magic/
skylib_fluffos_v3/mudlib/std/effects/magic/BACKUPS/
skylib_fluffos_v3/mudlib/std/effects/other/BACKUPS/
skylib_fluffos_v3/mudlib/std/effects/priest/
skylib_fluffos_v3/mudlib/std/effects/room/
skylib_fluffos_v3/mudlib/std/environ/
skylib_fluffos_v3/mudlib/std/guilds/
skylib_fluffos_v3/mudlib/std/guilds/old/
skylib_fluffos_v3/mudlib/std/languages/
skylib_fluffos_v3/mudlib/std/liquids/
skylib_fluffos_v3/mudlib/std/npc/
skylib_fluffos_v3/mudlib/std/npc/goals/
skylib_fluffos_v3/mudlib/std/npc/goals/basic/
skylib_fluffos_v3/mudlib/std/npc/goals/misc/
skylib_fluffos_v3/mudlib/std/npc/plans/
skylib_fluffos_v3/mudlib/std/npc/plans/basic/
skylib_fluffos_v3/mudlib/std/npc/types/
skylib_fluffos_v3/mudlib/std/npc/types/helper/
skylib_fluffos_v3/mudlib/std/npcs/
skylib_fluffos_v3/mudlib/std/outsides/
skylib_fluffos_v3/mudlib/std/races/shadows/
skylib_fluffos_v3/mudlib/std/room/basic/BACKUPS/
skylib_fluffos_v3/mudlib/std/room/basic/topography/
skylib_fluffos_v3/mudlib/std/room/controller/
skylib_fluffos_v3/mudlib/std/room/inherit/topography/
skylib_fluffos_v3/mudlib/std/room/topography/area/
skylib_fluffos_v3/mudlib/std/room/topography/iroom/
skylib_fluffos_v3/mudlib/std/room/topography/milestone/
skylib_fluffos_v3/mudlib/std/shadows/curses/
skylib_fluffos_v3/mudlib/std/shadows/disease/
skylib_fluffos_v3/mudlib/std/shadows/fighting/
skylib_fluffos_v3/mudlib/std/shadows/healing/
skylib_fluffos_v3/mudlib/std/shadows/magic/
skylib_fluffos_v3/mudlib/std/shadows/poison/
skylib_fluffos_v3/mudlib/std/shadows/room/
skylib_fluffos_v3/mudlib/std/shops/controllers/
skylib_fluffos_v3/mudlib/std/shops/objs/
skylib_fluffos_v3/mudlib/std/shops/player_shop/
skylib_fluffos_v3/mudlib/std/socket/
skylib_fluffos_v3/mudlib/std/soul/d/
skylib_fluffos_v3/mudlib/std/soul/e/
skylib_fluffos_v3/mudlib/std/soul/i/
skylib_fluffos_v3/mudlib/std/soul/j/
skylib_fluffos_v3/mudlib/std/soul/k/
skylib_fluffos_v3/mudlib/std/soul/l/
skylib_fluffos_v3/mudlib/std/soul/n/
skylib_fluffos_v3/mudlib/std/soul/o/
skylib_fluffos_v3/mudlib/std/soul/q/
skylib_fluffos_v3/mudlib/std/soul/r/
skylib_fluffos_v3/mudlib/std/soul/u/
skylib_fluffos_v3/mudlib/std/soul/v/
skylib_fluffos_v3/mudlib/std/soul/y/
skylib_fluffos_v3/mudlib/std/soul/z/
skylib_fluffos_v3/mudlib/std/stationery/
skylib_fluffos_v3/mudlib/w/
skylib_fluffos_v3/mudlib/w/default/
skylib_fluffos_v3/mudlib/w/default/armour/
skylib_fluffos_v3/mudlib/w/default/clothes/
skylib_fluffos_v3/mudlib/w/default/item/
skylib_fluffos_v3/mudlib/w/default/npc/
skylib_fluffos_v3/mudlib/w/default/room/
skylib_fluffos_v3/mudlib/w/default/weapon/
skylib_fluffos_v3/mudlib/www/
skylib_fluffos_v3/mudlib/www/java/
skylib_fluffos_v3/mudlib/www/secure/
skylib_fluffos_v3/mudlib/www/secure/lpc/advanced/
skylib_fluffos_v3/mudlib/www/secure/lpc/intermediate/
skylib_fluffos_v3/win32/
Types Declaration

* Basic Types
* Arrays
* Special Types

Types can be used at four places:

 Declaring type of global variables.
 Declaring type of functions.
 Declaring type of arguments to functions.
 Declaring type of local variables to functions.

Normally, the type information is completely ignored, and can be
regarded purely as documentation. However, when the basic type of
a function is declared, then a more strict type checking will be
enforced. That means that the type of all arguments must be defined.
And, the variables can only be used to store values of the declared
type. The function  @dfn{call_other} is defined to return an unkown type,
as the compiler can't know the type. This value must always be casted
(when strict type checking is enabled). Casting a type is done by putting
the type name inside a pair of '(' and ')'.

An example when querying the short description of an object:

(string)call_other(ob, "short");

When a function is compiled with strict type testing, it can only call other
functions that are defined. If they are not yet defined, prototypes can
be defined.

string func(int arg);

Note the ';' instead of a body to the function. All arguments must be
givenby names, but does not have to have the same names as in the real
definition. All types must of course be the same.

There is currently a bug (3.0.36) that recursive calls can not be done if
the function is not also defined by a prototype. That is because a function
is not really defined until the whole function has been compiled. Don't rely
on this behaviour, which will hopefully soon be fixed. A dangerous effect
is that it is possible to redefine efun's, and let the new definition
call the old before it is replaced. Such code will break sooner or later.

If an efun is to be redefined to get some new enhancements, always define
a new with a new name.

There are two kinds of types. Basic types, and special types.
There can be at most one basic type, but any number of special types.
The strict type checking is only used by the compiler, not by the
runtime. Hence, it is actually possible to store a number in a string
variable even when strict type checking is enabled.

Why use strict type checking? It is really recommended, because the
compiler will find many errors at compile time, which will save a lot
of hard work. It is in general much harder to trace an error occuring
at run time. I recommend, that when a wizard is having problem with an
object and wants help, that he first must make all functions have declared
types.

The basic types can be divided in to groups. Those that are referenced
by value, and those that are referenced by address. The types int and 
string are always representing different entities. But the type object 
is a pointer to an object. If a value of this type is assigned to a 
variable or passed as argument, they will all point to the same object. 
The same goes for arrays. That means that if the value of an element in 
an array is changed, then it can modify all other variables pointing to 
the same array. Changing the size of the array will always allocate a 
new one, though. The comparation operator, ==, will compare the actual 
value for the group of types above. But for arrays and objects, it will 
simply check if it is the same object (or array). That has the very 
important implication that the expression ({}) == ({}) will always 
evaluate to false becaus the array construction operator-pair, ({ }) 
always generates a new array.


Basic types

int
  An integer 32 bit number.

object
  Pointer to an object.
  An object pointer can mainly be used for two things. Either
  giving as argument to functions, or used for calling functions
  defined by that object with its specific instance of variables.

string
  An unlimited string of characters. A lot of operators are
  allowed for strings, like + and [] etc.

mixed
  This type is special, in that it is valid to use in any context.
  Thus, if everything was declared @code{mixed}, then the compiler would
  never complain. This is of course not the idea. It is really only
  supposed to be used when a variable really is going to contain
  different types of values. This @strong{should} be avoided if possible.
  It is @strong{not} good coding practice, to allow a function for example
  to return different types.

void
  This type is only usable for functions. It means that the function
  will not return any value. The compiler will complain (when type
  checking is enabled) if the return value is used.

Arrays

Arrays are declared using a '*' with a basic type. For example, declaring an
array of numbers: @samp{int *arr;}. Use the type mixed if you want an array of
arrays, or a @code{mixed} combination of types.

Special types

There are some special types, which can be given before the basic type.
These special types can also be combined. When using special type @code{T}
before an @dfn{inherit} statement, all symbols defined by inheritance will
also get the special type @code{T}. The only special case is @dfn{public}--defined
symbols, which can not be redefined as @dfn{private} in a private inheritance
statement.

varargs
  A function of this type can be called with a variable number of arguments.
  Otherwise, the number of arguments is checked, and can generate an error.

private
  Can be given for both functions and variables. Functions that
  are private in object @code{A} can not be called through @dfn{call_other}
  from another object. And, they are not accessible to any object
  that inherits @code{A}.

static
  This special type behaves different for variables and functions.
  It is similar to private for functions, in that they can not be
  called from other objects. static variables will be neither saved
  nor restored when calling @dfn{save_object()} or @dfn{restore_object()}.

public
  A function defined as public will always be accessible from other
  objects, even if private inheritance is used.

nomask
  All symbols defined as nomask can not be redefined by inheritance.
  They can still be used and accessed as usual.


Access of data and programs in other objects
	Data in other objects
	Access of data in other objects
	Programs in other objects

There is a function call_other(), that can be used to call functions in other 
objects. All functions can be called except those declared static or private.

Functions, Predefined Functions, for more information.

There is another syntax that will do the same thing: 
ob->func(args)
This will call function func in object ob.
This is a much better way to do it.

There has been a lot of questions why this syntax hasn't been used to
allow for accessing variables in other objects.
There are some good reasons for that.

- It conflicts with the idea of programming in an object-oriented way.
- It makes the programming less structured, as there are more dependencies.
- If a variable name is changed, code can be broken.
- Sometimes, you don't even want to keep the variable at all any longer.
Types declarations

Types can be used at four places: Declaring type of global  vari-
ables.  Declaring type of functions.  Declaring type of arguments
to functions.  Declaring type of local  variables  to  functions.
Normally,  the type information is completely ignored, and can be
regarded purely sa documentation.  However, when the  basic  type
of  a function is declared, then a more strict type checking will
be enforced.  That means that the type of all arguments  must  be
defined.   And, the variables can only be used to store values of
the declared type.  The function is defined to return  an  unkown
type,  as  the compiler can't know the type.  This value must al-
ways be casted (when strict type checking is enabled).  Casting a
type is done by putting the type name inside a pair of '(' and An
example when querying the short description of an object:
(string)call_other(ob, "short");
There are two kinds of types.  Basic types,  and  special  types.
There  can  be  at most one basic type, but any number of special
types.  The strict type checking is only used  by  the  compiler,
not  by  the  runtime.  Hence, it is actually possible to store a
number in a string variable even when strict type checking is en-
abled.

Why use strict type checking ?  It is really recommended, because
the  compiler  will  find many errors at compile time, which will
save a lot of hard work.  It is in general much harder  to  trace
an  error  occuring at run time.  I recommend, that when a wizard
is having problem with an object and wants help,  that  he  first
must make all functions have declared types.


Basic types

An integer 32 bit number.   Pointer  to  an  object.   An  object
pointer  can mainly be used for two things.  Either giving as ar-
gument to functions, or used for  calling  functions  defined  by
that object with its specific instance of variables.  An unlimit-
ed string of characters.  A lot  of  operators  are  allowed  for
strings, like and etc.  This type is special, in that it is valid
to use in any context.  Thus, if everything was declared then the
compiler  would  never complain.  This is of course not the idea.
It is really only supposed to be used when a variable  really  is
going  to  contain different types of values.  This be avoided if
possible.  It is good coding practice, to allow  a  function  for
example  to return different types.  This type is only usable for
functions.  It means that the function will not return any value.
The compiler will complain (when type checking is enabled) if the
return value is used.


Arrays

Arrays are declared using a '*' with a basic type.  For  example,
declaring  an array of numbers: "int *arr;".  Use the type if you
want an array of arrays, or a mixed combination of types.


Special types

There are some special types, which can be given before the basic
type.  These special types can also be combined.  When using spe-
cial type before an statement, all symbols defined by inheritance
will  also get the special type The only special case is symbols,
which can not be redefined as in a statement.  Can be  given  for
both  functions  and variables.  Functions that are in object can
not be called through from another object.  And, they are not ac-
cessible  to  any  object that inherits This special type behaves
different for variables and functions.   It  is  similar  to  for
functions,  in  that  they  can not be called from other objects.
variables will be neither saved nor restored when  calling  or  A
function defined as will always be accessible from other objects,
even if is used.  All symbols defined as can not be redefined  by
inheritance.  They can still be used and accessed as usual.