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

### `ctrl`

`ctrl("switch"[,obj])`
  :: Sets the value of switch.

return
  value of switch
switch
  switch name
obj
  parameter

- This function is used to set or to get the values of switches. The switches are used to control an execution of Asir.
- If obj is not specified, the value of switch is returned.
- If obj is specified, the value of switch is set to obj.
- Switches are specified by strings, namely, enclosed by two double quotes.
- Here are of switches of Asir.
  `cputime`
    If `on', CPU time and GC time is displayed at every top level evaluation of Asir command; if `off', not displayed. See section `cputime`, `tstart`, `tstop`. (The switch is also set by command `cputime(1)`, and reset by `cputime(0)`.)
  `nez`
    Selection for EZGCD algorithm. It is set to 1 by default. Ordinary users need not change this setting.
  `echo`
    If `on', inputs from the standard input will be echoed onto the standard output. When executing to load a file, the contents of the file will be written onto the standard output. If `off', the inputs will not be echoed. This command will be useful when used with command `output`.
  `bigfloat`
    If `on', floating operations will be done by PARI system with arbitrary precision floating point operations. Default precision is set to 9 digits. To change the precision, use command `setprec`. If `off', floating operations will be done by Asir's own floating operation routines with a fixed precision operations of standard floating double.
  `adj`
    Sets the frequency of garbage collection. A rational number greater than or equal to 1 can be specified. The default value is 3. If a value closer to 1 is specified, larger heap is allocated and as a result, the frequency of garbage collection decreases. See section Command line options.
  `verbose`
    If `on' a warning messages is displayed when a function is redefined.
  `quiet_mode`
    If 1 is set, the copyright notice has been displayed at boot time.
  `prompt`
    If the value is 0, then prompt is not output. If the value is 1, then the standard prompt is output. Asir prompt can be customized by giving a C-style format string. Example (for unix asir); `ctrl("prompt","\033[32m[%d]:= \033[0m")`
  `hex`
    If 1 is set, integers are displayed as hexadecimal numbers with prefix `0x`. if -1 is set, hexadecimal numbers are displayed with ``|'` inserted at every 8 hexadecimal digits.
  `real_digit`
    Sets the number of digits used to print a floating double.
  `double_output`
    If set to 1, any floating double is printed in the style ddd.ddd.
  `fortran_output`
    If `on' polynomials are displayed in FORTRAN style. That is, a power is represented by ``**'` instead of ``^'`. The default value is 'off.
  `ox_batch`
    If 'on', the OpenXM send buffer is flushed only when the buffer is full. If 'off', the buffer is always flushed at each sending of data or command. The default value is 'off'. See section Distributed computation.
  `ox_check`
    If 'on' the check by mathcap is done before sending data. The default value is 'on'. See section Distributed computation.
  `ox_exchange_mathcap`
    If 'on' Asir forces the exchange of mathcaps at the communication startup. The default value is 'on'. See section Distributed computation.

`References`
  section `cputime`, `tstart`, `tstop`, section `output`, section `pari`, section `setprec`, section `eval`, `deval`.

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