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

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

Contents


UNIT(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     UNIT - Returns the	status of a BUFFER IN or BUFFER	OUT statement

SYNOPSIS    [Toc]    [Back]

     UNIT ([I=]i)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

DESCRIPTION    [Toc]    [Back]

     After execution of	asynchronous I/O with a	BUFFER IN or BUFFER OUT
     statement,	the execution sequence continues concurrently with the data
     transfer.	If UNIT	is called in this execution sequence, the sequence
     is	delayed	until the transfer is complete.	 After the BUFFER IN
     operation,	use UNIT or LENGTH(3I) before using memory locations where
     the data is stored.  UNIT accepts the following argument:

     i	  Must be an integer or	Boolean	value.	Represents a unit number.

     UNIT is a Fortran 90 elemental function.  The name	of this	intrinsic
     cannot be passed as an argument.

NOTES    [Toc]    [Back]

     On	UNICOS and UNICOS/mk systems, UNIT can be called as either an
     external subprogram or as an intrinsic procedure.

     On	IRIX systems, the BUFFER IN and	BUFFER OUT statements are used for
     synchronous I/O.  Asynchronous I/O	is not available through BUFFER	I/O
     on	IRIX systems.

RETURN VALUES    [Toc]    [Back]

     When the transfer is complete, UNIT returns a value of type real.	The
     value is of type REAL(KIND=8) on UNICOS and UNICOS/mk systems; it is
     of	type REAL(KIND=4) on IRIX systems.  The	returned value has one of
     the following meanings:

     Value     Meaning

     -2.0      A partial-record	read terminated	after delivering the
	       requested number	of words or characters,	but more data
	       remains in the record.  This status can be received only
	       after a BUFFER IN in partial record mode.

     -1.0      Operation was completed (indicates one of the following):

	       * A full- or partial-record BUFFER OUT operation	completed.

	       * A full-record BUFFER IN completed, transferring as much of
		 the record as would fit in the	space provided.

	       * A partial-record BUFFER IN completed, transferring as much
		 data as was left in the record	(no more data remains in
		 the record).

	       * UNIT was called for an	unconnected unit or for	a unit on
		 which no BUFFER IN or BUFFER OUT operations have been
		 performed.

     0.0       An end-of-file was encountered on the previous BUFFER IN
	       operation.  No data was transferred.

     1.0       A partially recovered error occurred on the previous BUFFER
	       IN operation.  Use the LENGTH function to determine how much
	       data was	transferred.

     2.0       An unrecovered error occurred on	the last BUFFER	IN or
	       BUFFER OUT operation.

EXAMPLES    [Toc]    [Back]

	  PROGRAM TESTUNIT
	  DIMENSION M(200,5)
	  BUFFER IN(32,0) (M(1,1),M(200,5))
	  IF (UNIT(32) .EQ. -1.0) THEN
	     DO	J = 1,5
	       DO I = 1,200
		 M(I,J)	= M(I,J)*2
	       END DO
	     END DO
	     BUFFER OUT	(22,0) (M(1,1),M(200,5))
	     IF	(UNIT(22) .NE. -1.0) CALL ABORT
	  ELSE
	     CALL ABORT
	  ENDIF
	  END

SEE ALSO    [Toc]    [Back]

      
      
     LENGTH(3I)

     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

UNIT(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     UNIT - Returns the	status of a BUFFER IN or BUFFER	OUT statement

SYNOPSIS    [Toc]    [Back]

     UNIT ([I=]i)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

DESCRIPTION    [Toc]    [Back]

     After execution of	asynchronous I/O with a	BUFFER IN or BUFFER OUT
     statement,	the execution sequence continues concurrently with the data
     transfer.	If UNIT	is called in this execution sequence, the sequence
     is	delayed	until the transfer is complete.	 After the BUFFER IN
     operation,	use UNIT or LENGTH(3I) before using memory locations where
     the data is stored.  UNIT accepts the following argument:

     i	  Must be an integer or	Boolean	value.	Represents a unit number.

     UNIT is a Fortran 90 elemental function.  The name	of this	intrinsic
     cannot be passed as an argument.

NOTES    [Toc]    [Back]

     On	UNICOS and UNICOS/mk systems, UNIT can be called as either an
     external subprogram or as an intrinsic procedure.

     On	IRIX systems, the BUFFER IN and	BUFFER OUT statements are used for
     synchronous I/O.  Asynchronous I/O	is not available through BUFFER	I/O
     on	IRIX systems.

RETURN VALUES    [Toc]    [Back]

     When the transfer is complete, UNIT returns a value of type real.	The
     value is of type REAL(KIND=8) on UNICOS and UNICOS/mk systems; it is
     of	type REAL(KIND=4) on IRIX systems.  The	returned value has one of
     the following meanings:

     Value     Meaning

     -2.0      A partial-record	read terminated	after delivering the
	       requested number	of words or characters,	but more data
	       remains in the record.  This status can be received only
	       after a BUFFER IN in partial record mode.

     -1.0      Operation was completed (indicates one of the following):

	       * A full- or partial-record BUFFER OUT operation	completed.

	       * A full-record BUFFER IN completed, transferring as much of
		 the record as would fit in the	space provided.

	       * A partial-record BUFFER IN completed, transferring as much
		 data as was left in the record	(no more data remains in
		 the record).

	       * UNIT was called for an	unconnected unit or for	a unit on
		 which no BUFFER IN or BUFFER OUT operations have been
		 performed.

     0.0       An end-of-file was encountered on the previous BUFFER IN
	       operation.  No data was transferred.

     1.0       A partially recovered error occurred on the previous BUFFER
	       IN operation.  Use the LENGTH function to determine how much
	       data was	transferred.

     2.0       An unrecovered error occurred on	the last BUFFER	IN or
	       BUFFER OUT operation.

EXAMPLES    [Toc]    [Back]

	  PROGRAM TESTUNIT
	  DIMENSION M(200,5)
	  BUFFER IN(32,0) (M(1,1),M(200,5))
	  IF (UNIT(32) .EQ. -1.0) THEN
	     DO	J = 1,5
	       DO I = 1,200
		 M(I,J)	= M(I,J)*2
	       END DO
	     END DO
	     BUFFER OUT	(22,0) (M(1,1),M(200,5))
	     IF	(UNIT(22) .NE. -1.0) CALL ABORT
	  ELSE
	     CALL ABORT
	  ENDIF
	  END

SEE ALSO    [Toc]    [Back]

      
      
     LENGTH(3I)

     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

[ Back ]
 Similar pages
Name OS Title
glxqueryglxpbuffersgix IRIX returns information about a GLX pixel buffer
getgconfig IRIX gets the size of a buffer or a state in the current buffer configuration
VkFormat IRIX Convenience function that prints into a buffer and returns it
SSL_peek Tru64 Copy the data in the SSL buffer into the buffer passed to this API
glxgetselectedevent IRIX returns GLX events that are selected for a window or a GLX pixel buffer
glxgetselectedeventsgix IRIX returns GLX events which are selected for a window or a GLX pixel buffer
get_random_bytes Tru64 General: Returns the requested number of random bytes and stores them in a buffer.
get_random_bytes_wait Tru64 General: Returns the requested number of random bytes and places them in a buffer.
glxquerychannelrectsgix IRIX returns area of frame buffer that is to be resized to match video resolution
dmAudioRateConvert IRIX convert data sampling rate. It consumes an input buffer of floats and generates an output buffer of floats.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service