NAME
	data_edit - edit datafiles, i.e. files ending in .o

DEFINING OBJECT
	/std/data_edit.c

SYNOPSYS
	data_edit
	data_edit <filename>

ACCESS CLASS
	Domain wizard or higher.

DESCRIPTION
	In order to use the data editor, you need to clone it manually.
	The command data_edit that is linked to the data-editor allows you
	to load a datafile, display it or manipulate with it and store it
	again. The datafile editor has a series of built in commands,
	described below. A brief help page is available within the data
	editor using the command ? or h[elp].

ARGUMENTS
	none       - re-edit the last file edited this session.
	<filename> - the name of the datafile to add.

COMMANDS
	a[dd] <variable> <index> <experssion>

	    The command 'set' allows almost all types of assigning from a
	    value to a certain variable, save the addition of an extra
	    element to an array. This can be done with the 'add' command.
	    The <variable> is the array that you want to add an element to.
	    Note that it may contain indices. The <index> is the index in
	    the array before which the element should be inserted. Use 'end'
	    to append the element after the last element of the array. The
	    <expression> is the element to add to the array. It may contain
	    any type or expression as long as it does not contain variable-
	    references. Note that the array must contain at least one element
	    to be able to use this command. Else, use the 'set' command.

	    Examples:
	    add seconds end "mercadejr"
		    seconds = seconds + ({ "mercadejr" });
	    add powers 2 (8 * 8)
		    powers = powers[..1] + ({ (8 * 8) }) + powers[2..];
	    add sanctions["mercade"] 0 ([ "r" : "/open" ])
		    sanctions["mercade"] = ({ ([..]) }) + sanctions["mercade"];

	d[one] or **

	    Save the datafile in the editor to disk and leave the data
	    editor. If the file already exists, it will be backed up using
	    the extension .o.old and when an error occurs during saving,
	    it will not leave the editor so you can either quit without
	    saving, try to solve the problem or try to save with a
	    different name.

	h[elp] or ?

	    Display the brief built in help page.

	l[ist] [<variable(s)>]

	    Display information about the variables in the datafile. Without
	    arguments, it will give you a list of all variables and their
	    types. For arrays and mappings, their size is also listed.

	    Example: list

	    As argument, you may add a single variable name or a list of
	    variable names and the contents of this/these variable(s) is/are
	    then displayed. The argument '*' will list all variables. The
	    possible list may be separated by commas or spaces.

	    Examples:
	    list *
	    list password, race_name
	    list aliases

	n[ame] [<filename>]

	    Without argument, display the current filename of the datafile.
	    If an argument is passed, this argument will be used as filename
	    when the datafile is saved.

	q[uit]

	    This will leave the datafile editor without saving.

	r[emove] <variable> [<index>]

	    This command can be used to remove a variable or an element of
	    an array of mapping. With only one argument, the variable will
	    be removed from the datafile.

	    Example:
	    remove race_name

	    From an array or mapping, an element can be removed by adding
	    a second argument. This second argument will be the index to
	    the element to remove. For an array, that will always be a
	    number, but for a mapping, that can naturally be a string too.

	    Examples:
	    remove acc_exp 4  /* Remove the 4th element from array acc_exp */
	    remove aliases v  /* Remove element "v" from mapping aliases   */

	s[et] <variable> <expression>

	    With this function, you can assign a variable to a new value or
	    add a new variable to the datafile. The expression may be of any
	    type or expression as long as it does not contain any variable
	    references. The variable may include indices if the variable is
	    an array of mapping. Note that the variable may not contain any
	    spaces.

	    Examples:
	    set race_name "dwarf"         /* race_name = "dwarf";         */
	    set wiz_level 29              /* wiz_level = 29;              */
	    set aliases ([ ])             /* aliases = ([ ]);             */
	    set aliases["t"] "tell"       /* aliases["t"] = "tell";       */
	    set acc_exp[5] (80 * 80 * 80) /* acc_exp[5] = (80 * 80 * 80); */
	    set arr ({ 2, 3, 4, })        /* arr = ({ 2, 3, 4 });         */

