The following format allows you to assign a value based on an if()
style test. If it is true, <true value> is returned. If it is
false, the <false value> is returned.

<variable> = < logic test > ? <true value> : <false value> ;

==================================================================
The ?: operator is an extreamly powerful and complex one to use.
It can be used just about anyplace in the LPC objects that a value
is being returned or assigned. This includes if, for, else and
return commands.

------- SAMPLE CODING -------

Lets say you wish to have two different races for a monster based
upon a randomly generated value for it's level. You could do the
following in the create() code;

        set_level(random(20));
        set_race((this_object()->query_level() >= 10) ?
            "ogre" : "elf") ;

This code first assigns a random value to the objects level ( I
assumed your doing this inside of a monster object). It then uses
the logical_switch operator to determine the value passed to
set_race(). The logic test in this case checks to see if the level
that was randomly choosen was >= 10. If the result is true, then
"ogre" is passed into set_race() and the monster would be an ogre.
If the result is false, then "elf" is passed to set_race() and the
monster would be an elf. The code would function the same as the
following lines using if and else;

       set_level(random(20));
       if((this_()->query_level() >=10) set_race("ogre");
       else set_race("elf");


--------------------------------------------------------------
----------------- Advanced Coding notes ----------------------
--------------------------------------------------------------

1) You do not have to encase the logic test in (). I however
   recommend that you do so that the code is easier to read.

2) It is possible to nest more than one ?: inside one another.
    I don't recommend doing this as it leads to a file that is
   usually hard to read. If you do nest them, please get in the
   habit of surrounding each ?: operation with ()'s.

3) You can use the ?: operation in the declaration statement of
   a variable. This makes it a unique and compact way to code an
   object.

------------------------------------------------------------------

Any questions?? Please feel free to ask me or any Archwizard.

Ironman
