Table of Contents

settings

`settings` is a built-in global object for reading and writing host application settings.

It is used directly by name. Do not call `settings()`.


Methods

exists(name)

Returns `true` if a setting with `name` exists.

if (settings.exists('displayX'))
{
    print('setting exists');
}

get(name)

Returns the setting value. If the setting does not exist, an error is raised.

x = settings.get('displayX');

set(name, value)

Sets a setting value and returns an OK result. If the setting does not exist or the value is invalid, an error is raised.

settings.set('displayX', 100);

Properties

Known settings can also be read as properties:

x = settings.displayX;

Use `exists(name)` before reading optional or host-version-specific settings.


Assignment

`settings` is a built-in global object. The name itself cannot be overwritten:

settings = 1;     // error

Previous: Global objects

Next: session