*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/pxfsetenv (3)              
Title
Content
Arch
Section
 

Contents


PXFSETENV(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFSETENV - Sets environment variable pair

SYNOPSIS    [Toc]    [Back]

     CHARACTER*n name, new
     INTEGER len, name,	lennew,	ioverwrite, ierror
     CALL PXFSETENV (name, lenname, new, lennew, ioverwrite, ierror)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     IEEE standard interface for FORTRAN 77

DESCRIPTION    [Toc]    [Back]

     On	IRIX systems, 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
     7.2 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.

     When using	the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk,	or IRIX	systems, all arguments must be of default
     kind unless documented otherwise.	On UNICOS and UNICOS/mk, default
     kind is KIND=8 for	integer, real, complex,	and logical arguments; on
     IRIX, 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.

EXAMPLES    [Toc]    [Back]

     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    [Toc]    [Back]

      
      
     setenv(3C)

     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

PXFSETENV(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFSETENV - Sets environment variable pair

SYNOPSIS    [Toc]    [Back]

     CHARACTER*n name, new
     INTEGER len, name,	lennew,	ioverwrite, ierror
     CALL PXFSETENV (name, lenname, new, lennew, ioverwrite, ierror)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     IEEE standard interface for FORTRAN 77

DESCRIPTION    [Toc]    [Back]

     On	IRIX systems, 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
     7.2 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.

     When using	the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk,	or IRIX	systems, all arguments must be of default
     kind unless documented otherwise.	On UNICOS and UNICOS/mk, default
     kind is KIND=8 for	integer, real, complex,	and logical arguments; on
     IRIX, 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.

EXAMPLES    [Toc]    [Back]

     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    [Toc]    [Back]

      
      
     setenv(3C)

     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

[ Back ]
 Similar pages
Name OS Title
putenv Tru64 Sets an environment variable
pam_putenv FreeBSD set the value of an environment variable
getenv IRIX get value of environment variable
getenv Linux get an environment variable
getenv OpenBSD environment variable functions
pam_getenv FreeBSD retrieve the value of a PAM environment variable
setenv FreeBSD environment variable functions
getenv FreeBSD environment variable functions
putenv FreeBSD environment variable functions
unsetenv FreeBSD environment variable functions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service