setenv()

Sets the value of an environment variable.

Synopsis

int setenv( string name, string value);

Parameters

Parameter Description
name Name of the variable
value Value to be set

Return value

Int - 0 if the function was executed correctly and in case of errors an error code.

Errors

The function returns an error code.

Description

Sets the value of an environment variable.

Example

In this example the value of the time zone variable "TZ" is changed.

main()
{
  setenv("TZ", "UTC");
}

Assignment

Miscellaneous functions

Availability

CTRL