Operators

To manipulate data within functions, you will need to use operators.
For maths you already know some: +, -, * and /. For integer values
they will work just fine here (just bear in mind that int means whole
figures and everything is always rounded down to the next lower number).

Here are some other operators and how to use them on different types
of variables:

All variable types:
a = b means: assign the value of b to a.
a == b compares a with b and returns 1 if the same, 0 if not.
   Note: always make sure you are comparing the same types of variables.
   For comparisons arrays of a type are not equal to the type itself! 
a += b means: a = a + b. similar for -=, *= and /=

Strings
abcde" + "f" gives "abcdef
For extracting substrings you will need to use efuns.

Arrays
string *string_array
   Note that in declarations arrays need a * before their name.
   At most other places this * is not needed.
// a collection of strings
string_array = ({ "ab", "cd", "ef" })
string_array[1] gives "cd"  // Not ({ "cd" })
   Note: strings start counting at 0
string_array += ({ "gh" }) gives ({ "ab", "cd", ef, "gh" })
string_array -= ({ "ab" }) gives ({ "cd", "ef" })

Mappings
mapping m
m = ([ "a":1, "b":2 ])
m["a"] returns 1
m["c"] = 3 gives ([ "a":1, "b":2, "c":3 ])
for deleting mapping elements, you need efuns.

Objects
ob->f( arg1, arg2, ... ) means call function f in object ob
   and pass arg1 (etc.) as arguments.
::func( args ) is used when you want to code a function func, while that
   function already exists in the object you inherit. With :: you can call the
   code of this function from the inherited object in your own object.

This will cover most situations you will encounter.
You will learn the necessary efuns later when you need them.

Uglymouth


