---
name: "Environment"
section: "3"
platform: "macos"
package: "tcl"
version: "152"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/Environment"
---

# Environment(3)

procedures to manipulate the environment

## NAME

Tcl\_PutEnv - procedures to manipulate the environment

## SYNOPSIS

```
#include <tcl.h>

int
Tcl_PutEnv(assignment)
```

## ARGUMENTS

Info about environment variable in the format The *assignment* argument is in the system encoding.

## DESCRIPTION

**Tcl\_PutEnv** sets an environment variable. The information is passed in a single string of the form This procedure is intended to be a stand-in for the UNIX **putenv** system call. All Tcl-based applications using **putenv** should redefine it to **Tcl\_PutEnv** so that they will interface properly to the Tcl runtime.

## SEE ALSO

[tclvars(n)](/tclvars/n.md)

## KEYWORDS

environment, variable
