Commit 122e35b4 by Brooks Moses Committed by Brooks Moses

intrinsic.texi: (ICHAR) Improve internal I/O note.

* intrinsic.texi: (ICHAR) Improve internal I/O note.
(ACHAR): Reference it.
(CHAR): Reference it.
(IACHAR): Reference it.

From-SVN: r122729
parent 435b0aa2
2007-03-08 Brooks Moses <brooks.moses@codesourcery.com> 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
* intrinsic.texi: (ICHAR) Improve internal I/O note.
(ACHAR): Reference it.
(CHAR): Reference it.
(IACHAR): Reference it.
2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
* intrinsic.texi: (LINK) Document function form. * intrinsic.texi: (LINK) Document function form.
(RENAME): Likewise. (RENAME): Likewise.
(SYMLNK): Likewise. (SYMLNK): Likewise.
......
...@@ -478,6 +478,10 @@ program test_achar ...@@ -478,6 +478,10 @@ program test_achar
end program test_achar end program test_achar
@end smallexample @end smallexample
@item @emph{Note}:
See @ref{ICHAR} for a discussion of converting between numerical values
and formatted string representations.
@item @emph{See also}: @item @emph{See also}:
@ref{CHAR}, @ref{IACHAR}, @ref{ICHAR} @ref{CHAR}, @ref{IACHAR}, @ref{ICHAR}
...@@ -1856,6 +1860,10 @@ program test_char ...@@ -1856,6 +1860,10 @@ program test_char
end program test_char end program test_char
@end smallexample @end smallexample
@item @emph{Note}:
See @ref{ICHAR} for a discussion of converting between numerical values
and formatted string representations.
@item @emph{See also}: @item @emph{See also}:
@ref{ACHAR}, @ref{IACHAR}, @ref{ICHAR} @ref{ACHAR}, @ref{IACHAR}, @ref{ICHAR}
...@@ -4606,6 +4614,10 @@ program test_iachar ...@@ -4606,6 +4614,10 @@ program test_iachar
end program test_iachar end program test_iachar
@end smallexample @end smallexample
@item @emph{Note}:
See @ref{ICHAR} for a discussion of converting between numerical values
and formatted string representations.
@item @emph{See also}: @item @emph{See also}:
@ref{ACHAR}, @ref{CHAR}, @ref{ICHAR} @ref{ACHAR}, @ref{CHAR}, @ref{ICHAR}
...@@ -4851,21 +4863,25 @@ end program test_ichar ...@@ -4851,21 +4863,25 @@ end program test_ichar
@end smallexample @end smallexample
@item @emph{Note}: @item @emph{Note}:
No intrinsic exists to convert a printable character string to a No intrinsic exists to convert between a numeric value and a formatted
numerical value. For example, there is no intrinsic that, given the character string representation -- for instance, given the
@code{CHARACTER} value @code{'154'}, returns an @code{INTEGER} or @code{CHARACTER} value @code{'154'}, obtaining an @code{INTEGER} or
@code{REAL} value with the value 154. @code{REAL} value with the value 154, or vice versa. Instead, this
functionality is provided by internal-file I/O, as in the following
Instead, you can use internal-file I/O to do this kind of conversion. For
example: example:
@smallexample @smallexample
program read_val program read_val
integer value integer value
character(len=10) string character(len=10) string, string2
string = '154' string = '154'
! Convert a string to a numeric value
read (string,'(I10)') value read (string,'(I10)') value
print *, value print *, value
! Convert a value to a formatted string
write (string2,'(I10)') value
print *, string2
end program read_val end program read_val
@end smallexample @end smallexample
......
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