Next: , Previous: , Up: cpg-bif   [Contents][Index]


12.3.43 SP_getenv()

Synopsis

#include <sicstus/sicstus.h>

void *
SP_getenv(const char *name);

Retrieves the value of the system property, or if no such system property exists the environment variable, with the given name.

The memory for the returned value is managed by Prolog and should be freed with SP_free().

Arguments

name

The name of the system property or environment variable.

Return Value

The value of the system property or environment variable, if set. NULL if neither a system property nor an environment variable of that name exists, or if an error occurs.

See Also

System Properties and Environment Variables.


Send feedback on this subject.