The parameters to a proc are referred to as arguments. To define argument variables, place them inside the ()‘s in the proc definition. A default value may be specified. Otherwise, arguments default to null.

proc/Sum(a,b)
  return a + b
proc/set_mob_desc(mob/M,desc="big and bad")
  M.desc = desc
  world << "The new desc for [M] is [desc]."

Note how the variable type may be specified. It is just like any other variable definition, except “var/” is implicit and does not need to be typed.

See also

1 item under this folder.