Support of environment variables and command line parameters.

Ron Wichers Schreur ronny@cs.kun.nl
Thu, 13 Nov 1997 14:14:33 +0100


Nick Kallen wrote (to the Clean discussion list):

> Does the new IO library support accessing environment variables?

No.

> If not, is this planned? Or, will the StdEnv do it?
>    Can one call a clean program with parameters off of a command
> line (in unix or win95/nt)? If not, Will one be able to? When?

There have been a number of requests for support of environment
variables and command-line arguments. We haven't added this
support, because environment variables and command-line arguments
are platform specific (read: the Mac doesn't have them).

The run-time system for Windows and Unix already contains the
necessary basic support for command-line arguments, it's just
not accessible for the Clean programmer.

I'll make some interfaces for command-line arguments (argc/argv)
and environment variables (getenv) for Windows and Unix (should
be ready by tomorrow). Please note that these will be platform
dependent and unsupported. Meanwhile we'll think about a suitable
interface for these features in a future official Clean release.


Cheers,

Ronny Wichers Schreur