12.3.43 SP_getenv()


#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().



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.