Commit a56c06d8 by Daniel Franke Committed by Daniel Franke

intrinsic.texi (AND, [...]): Fixed examples.

2007-04-27  Daniel Franke  <franke.daniel@gmail.com>

	* intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
	XOR): Fixed examples.

From-SVN: r124223
parent 1c6ab44e
2007-04-27 Daniel Franke <franke.daniel@gmail.com> 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
* intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
XOR): Fixed examples.
2007-04-27 Daniel Franke <franke.daniel@gmail.com>
* intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM, * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
SYSTEM_CLOCK, TRANSFER, UNPACK): New. SYSTEM_CLOCK, TRANSFER, UNPACK): New.
(DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references. (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
......
...@@ -985,7 +985,7 @@ cross-promotion of the arguments. ...@@ -985,7 +985,7 @@ cross-promotion of the arguments.
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
PROGRAM test_and PROGRAM test_and
LOGICAL :: T = .TRUE., F = ..FALSE. LOGICAL :: T = .TRUE., F = .FALSE.
INTEGER :: a, b INTEGER :: a, b
DATA a / Z'F' /, b / Z'3' / DATA a / Z'F' /, b / Z'3' /
...@@ -3767,7 +3767,7 @@ Non-elemental subroutine ...@@ -3767,7 +3767,7 @@ Non-elemental subroutine
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
PROGRAM test_fput PROGRAM test_fput
CHARACTER(len=*) :: str = "gfortran" CHARACTER(len=10) :: str = "gfortran"
INTEGER :: i INTEGER :: i
DO i = 1, len_trim(str) DO i = 1, len_trim(str)
CALL fput(str(i:i)) CALL fput(str(i:i))
...@@ -3818,7 +3818,7 @@ Non-elemental subroutine ...@@ -3818,7 +3818,7 @@ Non-elemental subroutine
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
PROGRAM test_fputc PROGRAM test_fputc
CHARACTER(len=*) :: str = "gfortran" CHARACTER(len=10) :: str = "gfortran"
INTEGER :: fd = 42, i INTEGER :: fd = 42, i
OPEN(UNIT = fd, FILE = "out", ACTION = "WRITE", STATUS="NEW") OPEN(UNIT = fd, FILE = "out", ACTION = "WRITE", STATUS="NEW")
...@@ -7020,7 +7020,7 @@ program test_modulo ...@@ -7020,7 +7020,7 @@ program test_modulo
print *, modulo(17,-3) print *, modulo(17,-3)
print *, modulo(17.5,-5.5) print *, modulo(17.5,-5.5)
end program test_mod end program
@end smallexample @end smallexample
@end table @end table
...@@ -7369,7 +7369,7 @@ after cross-promotion of the arguments. ...@@ -7369,7 +7369,7 @@ after cross-promotion of the arguments.
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
PROGRAM test_or PROGRAM test_or
LOGICAL :: T = .TRUE., F = ..FALSE. LOGICAL :: T = .TRUE., F = .FALSE.
INTEGER :: a, b INTEGER :: a, b
DATA a / Z'F' /, b / Z'3' / DATA a / Z'F' /, b / Z'3' /
...@@ -8471,11 +8471,11 @@ it is @code{FRACTION(X) * RADIX(X)**I}. ...@@ -8471,11 +8471,11 @@ it is @code{FRACTION(X) * RADIX(X)**I}.
@item @emph{Example}: @item @emph{Example}:
@smallexample @smallexample
program test_setexp PROGRAM test_setexp
real :: x = 178.1387e-4 REAL :: x = 178.1387e-4
integer :: i = 17 INTEGER :: i = 17
print *, set_exponent(x), fraction(x) * radix(x)**i PRINT *, SET_EXPONENT(x, i), FRACTION(x) * RADIX(x)**i
end program test_setexp END PROGRAM
@end smallexample @end smallexample
@end table @end table
...@@ -9928,7 +9928,7 @@ after cross-promotion of the arguments. ...@@ -9928,7 +9928,7 @@ after cross-promotion of the arguments.
PROGRAM test_xor PROGRAM test_xor
LOGICAL :: T = .TRUE., F = .FALSE. LOGICAL :: T = .TRUE., F = .FALSE.
INTEGER :: a, b INTEGER :: a, b
DATA a / Z,'F' /, b / Z'3' / DATA a / Z'F' /, b / Z'3' /
WRITE (*,*) XOR(T, T), XOR(T, F), XOR(F, T), XOR(F, F) WRITE (*,*) XOR(T, T), XOR(T, F), XOR(F, T), XOR(F, F)
WRITE (*,*) XOR(a, b) WRITE (*,*) XOR(a, b)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment