User Tools

Site Tools


argument

Argument

In mathematics, an argument of a function is a value provided to obtain the function's result. It is also called an independent variable.

In the Ecolego an argument is defined as a value sent to a function, or to expressions or lookup tables.

Different functions require different amounts of arguments, examples:

  • time() requires no arguments. You need therefore not write the parenthesis, but can call the function using only the name: time. Returns the current simulation time in the simulation time unit.
  • sin() requires one argument - the angle. Returns the trigonometric sine of an angle.
  • abs() requires one argument - the value, or parameter/expression name to return its absolute value.
  • mod() requires two arguments - the dividend and the divider. The function helps find a remainder after a number (dividend) is divided by another number (divisor).
  • max() requires two, or more, arguments and will return the highest of the given arguments.
  • A lookup table which has been configured to accept arguments accepts only one argument - the lookup key.
  • An expression which has been configured to acccept arguments requires exactly the number of arguments as the configuration specifies.

See also

argument.txt · Last modified: 2023/01/09 10:05 by dmytroh