/doc/lfun/Set


LFUN

#include <properties.h>

mixed Set (string name, mixed arg [, int sc])

DESCRIPTION

Set the value of a property.

Arguments
name: the name of the property to set.
arg : the value to set.
sc : if non-zero, the 'soft property' is set.

Result
The value actually set.

Using this function automatically takes care if the requested property is implemented 'hard' (by a function Set<name>()) or 'soft' (as a value in a mapping).

Hardcoded properties may deny a change of the properties value and may thus return a value different from 'arg'

EXAMPLE

  #include <properties.h>
  obj->Set(P_VALUE, 100);  /* sets the <obj> value to 100 coins. */

IMPLEMENTED

/std/base

SEE ALSO

properties

| Home | Applied | Concepts | Efuns | Help | Intro | Lfuns | Lib | LPC | Prop | Obj | Sefuns | Std | W |

Nightfall@quest.tat.physik.uni-tuebingen.de
Automatically generated on Mon, Jul 22, 1996