OR man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]

OR(3M)						       Last changed: 1-6-98

NAME
     OR - Computes logical sum

SYNOPSIS
     OR ([I=]i,[J=]j)

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

STANDARDS
     Compiler extension to Fortran 90

DESCRIPTION
     OR is an elemental function for the CF90 compiler.

     arg, i, or j can be of type Boolean, integer, real, logical, or Cray
     pointer.

NOTES
     This is an outmoded routine for the CF90 compiler.	 Refer to the
     Fortran Language Reference Manual, Volume 3, publication SR-3905, for
     information about outmoded features and their preferred standard
     alternatives.

     The name of this intrinsic cannot be passed as an argument.

CAUTIONS
     Unexpected results can occur when Boolean functions are declared
     external and then used with logical arguments.  The external Boolean
     functions always treat their arguments as type Boolean and return a
     Boolean result on UNICOS and UNICOS/mk systems.  On IRIX systems, they
     return an integer result.

RETURN VALUES
     When given two arguments of type logical, OR computes a logical sum
     and returns a logical result.

     When given two arguments of type integer, real, Boolean, or pointer,
     OR computes a bit-wise logical sum and returns a Boolean result.  No
     type conversion occurs.

     The following tables show both the logical sum and bit-wise logical
     sum:

     -----------------------------------------------------------------
	Logical	       Logical		 (Logical Variable 1) OR
      Variable 1     Variable 2		  (Logical Variable 2)
     -----------------------------------------------------------------
	   T		  T			    T
	   T		  F			    T
	   F		  T			    T
	   F		  F			    F
     -----------------------------------------------------------------

     --------------------------------------------------------------
     Bit of	   Bit of	 (Bit of Variable 1) OR
     Variable 1	   Variable 2	 (Bit of Variable 2)
     --------------------------------------------------------------
	  1		1			 1
	  1		0			 1
	  0		1			 1
	  0		0			 0
     --------------------------------------------------------------

EXAMPLES
     The following section of Fortran code shows the OR function used with
     two arguments of type logical:

	  LOGICAL L1, L2, L3
	  ...
	  L3 = OR(L1,L2)

     The following section of Fortran code shows the OR function used with
     two arguments of type integer.  The bit patterns of the arguments and
     result are also shown.  For clarity, only the rightmost 8 bits are
     shown.

   INTEGER I1, I2, I3
   I1 = 12
   I2 = 10
   ...
   I3 = OR(I1,I2)

       -------------------------------	   -------------------------------
      | 0 |   |	  |   |	  |   |	  |   |	  | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 |
       -------------------------------	  -------------------------------
		     I1				      I2

		     -------------------------------
		    | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 |
		    -------------------------------
				    I3

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

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net