pxfsetenv(3F)
PXFSETENV - Sets environment variable pair
Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.
NAME PXFSETENV - Sets environment variable pair SYNOPSIS CHARACTER*n name, new INTEGER len, name, lennew, ioverwrite, ierror CALL PXFSETENV (name, lenname, new, lennew, ioverwrite, ierror) STANDARDS IEEE standard interface for FORTRAN 77 DESCRIPTION This routine is in libfortran.so which is linked by default when compiling programs with the MIPSpro 7 Fortran 90 compiler or when compiling programs with the -craylibs option to the MIPSpro F77 compiler. The PXFSETENV routine uses the putenv(3C) function to change a currently existing "name=value" pair or create a new name=value pair. The name or new arguments are stripped of trailing blanks if lenname or lennew are zero. All arguments must be of default kind unless documented otherwise. On IRIX systems, the default kind is KIND=4. The following is a list of valid arguments for this routine: name An input character variable or array element containing the environment name value to be set. lenname An input integer variable containing the character length of name. If lenname is zero, trailing blanks are removed. new An input character variable or array element containing the new environment value for the name=value environment pair. lennew An input integer variable containing the character length of new. If lennew is zero, trailing blanks are removed. ioverwrite An input integer variable containing a zero or nonzero number. When the value is zero, a name=value pair with the name value matching name will not be replaced with a new name=new pair. A nonzero ioverwrite value will replace the matching name=value pair with name=new pair. ierror An output integer variable that contains zero if the environment variable was changed or nonzero if PXFSETENV was not successful. The PXFSETENV routine may return any of the following error values: EINVAL If ilen is less than 0 or lenname is greater than LEN(path) or lennew is less than 0 or lennew is greater than LEN(new). ENOMEM If PXFSETENV is unable to obtain memory to copy name and new to a new name=value string. NOTES The PXF_DEFINITIONS module can be used by Fortran 90 users to enable caller-callee interface checking. EXAMPLES In this example, PXFSETENV sets the SHELL environment value to /bin/csh. program testpxf character*10 name, val integer lenname, lenval, ioverw, ierr c set input arguments name='SHELL' ierr=0 lenname=5 val='/bin/csh' lenval=8 ioverw=1 CALL PXFSETENV(name,lenname,val,lenval,iover,ierr) c print input arguments print *,'name=-',name,'-' print *,'lenname=',lenname print *,'val=-',val,'-' print *,'lenval=',lenval print *,'iotherw=',iotherw c print output argument print *,'ierr=',ierr end SEE ALSO setenv(3C)