FORTRAN PROGRAMMING ENVIRONMENT FEATURES

FPE HOME | Directives | Double Options | Format | Functions | Operators | Options | Recommend | Source | Statements

OPERATORS AVAILABLE

* multiply
  Available on all platforms.
** exponentiation
  Available on all platforms.
+ add
  Available on all platforms.
- subtract
  Available on all platforms.
.and. logical conjunction
  Available on all platforms if operands are type logical. Otherwise:
Fortran 77 Not available other than for logicals.
Fortran 90 Available for logicals; use IAND(x,y) for bitwise on integers.
IBM XLF Available for logicals. Only available for byte, integer, and typeless operands if -qintlog option used.
CIVIC Operands are converted to logical before operation. To convert to F90, change x.and.y to (x.ne.0).and.(y.ne.0)
CF77 Treated as bitwise intersection if non-logical operands. To convert to F90, change x.and.y to IAND(x,y)
Alternate form is .a.
CF90 Treated as bitwise intersection if non-logical operands.
Alternate form is .a.
DEC F77 Treated as bitwise intersection if non-logical operands.
DEC F90 Treated as bitwise intersection if non-logical operands.
PGF77 Bitwise intersection for integer operands (same as and(...) and iand(...) except that the result type on iand is integer, not typeless).
Sun F77 Operands are converted to logical before operation. To convert to F90, change x.and.y to (x.ne.0).and.(y.ne.0)
Sun F90 Operands are converted to logical before operation. To convert to F90, change x.and.y to (x.ne.0).and.(y.ne.0)
.comp. bitwise complement
Fortran 90 Not available. Use bitwise intrinsic NOT(x) for integer x
CIVIC Bitwise operation. To convert to CF77, change .comp.x to .not.x or compl(x)
To convert to F90, change .comp.x to NOT(x) for integer x
CF77 Use bitwise operation .not.x or .n.x or compl(x)
CF90 Use bitwise operation .not.x or .n.x or compl(x)
PGF77 Use bitwise operation .not.x or compl(x)
Sun F77 Not available. Use bitwise intrinsic not(x)
Sun F90 Not available. Use bitwise intrinsic not(x)
.eq. equal to
Fortran 90 Alternate form is ==
IBM XLF Alternate form is ==
CF90 Alternate form is ==
DEC F90 Alternate form is ==
Sun F90 Alternate form is ==
.eqv. logical equivalence
  Available on all platforms if operands are type logical. Otherwise:
Fortran 77 Not available other than for logicals.
Fortran 90 Not available other than for logicals; use NOT(IEOR(x,y)) for bitwise on integers.
IBM XLF Available for logicals. Only available for byte, integer, and typeless operands if -qintlog option used.
CIVIC Operands are converted to logical before operation. To convert to F90, change x.eqv.y to (x.ne.0).eqv.(y.ne.0)
CF77 Treated as bitwise logical equivalence if operands are not logical. To convert to F90, change x.eqv.y to NOT(IEOR(x,y)) where x and y are integers
CF90 Treated as bitwise logical equivalence if operands are not logical.
DEC F77 Treated as bitwise logical equivalence if operands are not logical.
DEC F90 Treated as bitwise logical equivalence if operands are not logical.
PGF77 Treated as bitwise logical equivalence if operands are integer.
Sun F77 Operands are converted to logical before operation. To convert to F90, change x.eqv.y to (x.ne.0).eqv.(y.ne.0)
Sun F90 Operands are converted to logical before operation. To convert to F90, change x.eqv.y to (x.ne.0).eqv.(y.ne.0)
.ge. greater than or equal to
Fortran 90 Alternate form is >=
IBM XLF Alternate form is >=
CF90 Alternate form is >=
DEC F90 Alternate form is >=
Sun F90 Alternate form is >=
.gt. greater than
Fortran 90 Alternate form is >
IBM XLF Alternate form is >
CF90 Alternate form is >
DEC F90 Alternate form is >
Sun F90 Alternate form is >
.int. bitwise intersection
Fortran 90 Use bitwise intrinsic IAND(x,y) for integer x and y
CIVIC Bitwise operation. To convert to CF77, change x.int.y to x.and.y or and(x,y)
To convert to F90, change x.int.y to IAND(x,y) for integer x and y.
CF77 Use bitwise operation use x.and.y or and(x,y) or iand(x,y) for integer x and y.
CF90 Use bitwise operation use x.and.y or and(x,y) or iand(x,y) for integer x and y.
PGF77 Use bitwise and(x,y) for typeless result or iand(x,y) for integer result.
Sun F77 Use bitwise intrinsic and(x,y)
Sun F90 Use bitwise intrinsic and(x,y)
.integer. treat as integer
Fortran 90 Use TRANSFER(input,0)
CIVIC CIVIC extension--most must use equivalenced variables
.le. less than or equal to
Fortran 90 Alternate form is <=
IBM XLF Alternate form is <=
CF90 Alternate form is <=
DEC F90 Alternate form is <=
Sun F90 Alternate form is <=
.loc. location of
IBM XLF loc(x) returns byte address of variable x
CIVIC Available. For CF77, .loc.x may be replaced with loc(x) if x is a variable. The argument to loc may not be a label. If the argument to loc is an external a word address is returned rather than the parcel address returned by .loc.
CF77 loc(x) returns word address; cloc(c) where c is character returns full character descriptor. Under UNICOS, can't data load .loc. of anything in common
CF90 loc(x) returns word address; cloc(c) where c is character returns full character descriptor. Under UNICOS, can't data load .loc. of anything in common
DEC F77 %loc(x) returns byte address of variable x
DEC F90 %loc(x) returns byte address of variable x
PGF77 loc(x) returns byte address of variable x
Sun F77 loc(x) returns byte address of variable x
Sun F90 loc(x) returns byte address of variable x
.lt. less than
Fortran 90 Alternate form is <
IBM XLF Alternate form is <
CF90 Alternate form is <
DEC F90 Alternate form is <
Sun F90 Alternate form is <
.ne. not equal to
Fortran 90 Alternate form is /=
IBM XLF Alternate forms are /= and <>
CF90 Alternate form is /= . The <> and .LG. forms are also available for real operands.
DEC F90 Alternate form is /=
Sun F90 Alternate form is /=
.neqv. logical nonequivalence
  Available on all platforms if operands are type logical. Otherwise:
Fortran 77 Not available other than for logicals.
Fortran 90 Not available other than for logicals; use IEOR(x,y) for bitwise on integers.
IBM XLF Available for logical operands. Only available for byte, integer, and typeless operands if -qintlog option used.
CIVIC Operands are converted to logical before operation. To convert to F90, change x.neqv.y to (x.ne.0).neqv.(y.ne.0)
CF77 Treated as bitwise exclusive or if operands are not logical. To convert to F90, change x.neqv.y to IEOR(x,y) where x & y are integers.
CF90 Treated as bitwise exclusive or if operands are not logical.
DEC F77 Treated as bitwise exclusive or if operands are not logical.
DEC F90 Treated as bitwise exclusive or if operands are not logical.
PGF77 Treated as bitwise exclusive or if operands are integers. Same as neqv(x,y).
Sun F77 Operands are converted to logical before operation. To convert to F90, change x.neqv.y to (x.ne.0).neqv.(y.ne.0)
Sun F90 Operands are converted to logical before operation. To convert to F90, change x.neqv.y to (x.ne.0).neqv.(y.ne.0)
.not. logical complement
  Available on all platforms if operand is type logical. Otherwise:
Fortran 77 Not available other than for logical.
Fortran 90 .not. requires logical operand; use NOT(x) for bitwise integer complement.
IBM XLF Available for logical operand. Only available for byte, integer, and typeless operand if -qintlog option used.
CIVIC Operand is converted to logical before operation To convert to F90, change .not.x to .not.(x.ne.0) or x.eq.0
CF77 Treated as bitwise complement if operand is non-logical. To convert to F90, change .not.x to NOT(x) for integer x. Alternate form is .n.
CF90 Treated as bitwise complement if operand is non-logical. Alternate form is .n.
DEC F77 Treated as bitwise complement if operand is non-logical.
DEC F90 Treated as bitwise complement if operand is non-logical.
PGF77 Bitwise complement if operand is integer; same as not(x); .not. of a logical operand is also a bitwise complement
Sun F77 Operand is converted to logical before operation. To convert to F90, change .not.x to .not.(x.ne.0) or x.eq.0
Sun F90 Operand is converted to logical before operation. To convert to F90, change .not.x to .not.(x.ne.0) or x.eq.0
.or. logical or
  Available on all platforms if operands are type logical. Otherwise:
Fortran 77 Not available other than for logicals.
Fortran 90 Not available other than for logicals; use IOR(x,y) for bitwise on integers.
IBM XLF Available for logical operands. Only available for byte, integer, and typeless operands if -qintlog option used.
CIVIC Operands are converted to logical before operation. To convert to F90, change x.or.y to (x.ne.0).or.(y.ne.0)
CF77 Treated as bitwise union if non-logical operands. To convert to F90, change x.or.y to IOR(x,y) Alternate form is .o.
CF90 Treated as bitwise union if non-logical operands. To convert to F90, change x.or.y to IOR(x,y) Alternate form is .o.
DEC F77 Treated as bitwise union if non-logical operands.
DEC F90 Treated as bitwise union if non-logical operands.
PGF77 Treated as bitwise union if integer operands (same as or(...) and ior(...) except that ior gives integer result rather than typeless).
Sun F77 Operands are converted to logical before operation. To convert to F90, change x.or.y to (x.ne.0).or.(y.ne.0)
Sun F90 Operands are converted to logical before operation. To convert to F90, change x.or.y to (x.ne.0).or.(y.ne.0)
.real. treat as real
Fortran 90 Use TRANSFER(input, 0.0)
CIVIC CIVIC extension--use equivalenced variables most other places.
.rem. modulo
CIVIC Available. Elsewhere must use mod(x,y)
.shl. shift left
Fortran 90 For i.shl.j iff j>0, use ishftc(i,j,64) ; otherwise not available.
CIVIC Available.
CF77 For i.shl.j iff j>0, use shift(i,j)
CF90 For i.shl.j iff j>0, use shift(i,j)
PGF77 For i.shl.j iff j>0, use ishftc(i,j,32) for 32 bit circular shift.
.shr. shift right
Fortran 90 For i.shr.j iff j<0, use ishftc(i,-j,64) ; otherwise not available.
CIVIC Available.
CF77 For i.shr.j iff j>0 and i>0 use shiftr(i,j)
CF90 For i.shr.j iff j>0 and i>0 use shiftr(i,j)
PGF77 Sign extend shifts are not available.
.un. bitwise union
Fortran 90 Use bitwise intrinsic IOR(x,y) for integer x and y
CIVIC Bitwise operation. To convert to CF77, change x.un.y to x.or.y or or(x,y). To convert to F90, change x.un.y to IOR(x,y) for integer x and y.
CF77 Use bitwise operation x.or.y or or(x,y) or ior(x,y) for integer x and y.
CF90 Use bitwise operation x.or.y or or(x,y) or ior(x,y) for integer x and y.
PGF77 Use bitwise intrinsic or(x,y) for typeless result or ior(x,y) for integer x and y.
Sun F77 Use bitwise intrinsic or(x,y)
Sun F90 Use bitwise intrinsic or(x,y)
.xor. bitwise nonequivalence or exclusive or
Fortran 90 Not available. Must use bitwise intrinsic IEOR(x,y) for integer x and y.
IBM XLF Only available for byte, integer, and typeless operands if -qintlog option used. Otherwise use IEOR(x,y) for integer x and y.
CIVIC Available. To convert to CF77, change x.xor.y to x.neqv.y iff x and y are logical; otherwise no change required.
To convert to F90, change x.xor.y to IEOR(x,y) for integers x and y.
CF77 Available. Alternate forms are x.x.y and x.neqv.y
CF90 Available. Alternate forms are x.x.y and x.neqv.y
DEC F77 Available.
DEC F90 Available.
PGF77 Available or use bitwise intrinsics xor(x,y) or ieor(x,y).
Sun F77 Available or use bitwise intrinsic xor(x,y)
Sun F90 Available or use bitwise intrinsic xor(x,y)
/ divide
  Available on all platforms.
// character string catination
  Available on all platforms.

Questions or comments regarding this page? John Engle