(j3.2006) [ukfortran] (SC22WG5.5439) RE: Proposal of a new requirement : CMDMSG optional argument in 3 subroutines
N.M. Maclaren
nmm1
Thu Jan 29 09:17:25 EST 2015
On Jan 29 2015, Rafik Zurob wrote:
>
>I also checked the POSIX spec page for getenv()
>to see if it defines any errors -- it does not. (I'm not saying everyone
>on UNIX/Linux/BSD calls getenv(). I was just thinking that if getenv()
>defined errors, some vendors might have defined status > 2 values to
>correspond to those errors.) The Windows GetEnvironmentVariable function
>also does not appear to define errors not covered by status values -1 to
>1.
POSIX is, as we all know, a crock. Implementations can check that the
string is valid and unambiguous and diagnose that separately. Ones
with significant trailing spaces are ambiguous in Fortran terms. setenv()
forbids ones with '=', but POSIX says that any characters other than
alphanumerics and underscore are system-dependent (see 8.1).
And, of course, Unix-derived systems are not the universe.
Allowing an implementation to do better than POSIX seems a good idea.
Requiring it to do so would be a mistake.
Regards,
Nick Maclaren.
More information about the J3
mailing list