company logo

Options read from environment

Options, that have neither been found in the configuration or ini-file nor in database configuration, are read from the system environment. Finally, options can be set in the application (via OSI expressions or implemented functions).

// Setting environment variable before calling the program

// LINUX:

export USER=Miller

NET=YES

// MS Windows:

set __USER=Miller

set NET=YES

// referring to options

...  fragment ( ) {

  if ( Option("USER") != "" ) // check user name

    Application::output(Option("USER").toString());

  if ( Option("NET").isTrue() )

    Application::output("shared database access");

}

Related topics