Go to the first, previous, next, last section, table of contents.

### `getopt`

`getopt([key])`
  :: Returns the value of an option.

return
  object

- When a user defined function is called, the number of arguments must be equal to that in the declaration of the function. A function with indefinite number of arguments can be realized by using options (see section option). The value of a specified option is retrieved by `getopt`.
- If `getopt()` is called with no argument, then it returns a list `[[key1,value1],` `[key2,value2],...]`. In the list, each `key` is an option which was specified when the function executing `getopt` was invoked, and `value` is the value of the option.
- If an option key is specified upon a function call, `getopt` return the value of the option. If such an option is not specified, the it returns an object of VOID type whose object identifier is -1. By examining the type of the returned value with `type()`, one knows whether the option is set or not.
- Options are specified as follows:

      xxx(A,B,C,D|x=X,y=Y,z=Z)

  That is, the options are specified by a sequence of key=value seperated by ``,'`, after ``|'`.

`References`
  section option, section `type`.

Go to the first, previous, next, last section, table of contents.