The information in this article applies to:
SUMMARY
The ICHAR intrinsic function converts one character to its integer
ASCII value. The CHAR intrinsic function converts an integer to its
corresponding ASCII character value. Both the ICHAR and CHAR functions
use decimal integer values and the Extended ASCII Character Set.
MORE INFORMATION
The integer value in each case must be between 0 and 255. The
functions use modulo arithmetic to convert a number larger than 255 to
a value between 0 and 255, for example, 256 "wraps around" to 0, 511
to 255, and so on.
Sample Code
The output of program example is as follows:
CHAR1 = A AND INT1 = 65The values 65 and 90 correspond to the decimal ASCII values for "A" and "Z" respectively. For more information on the CHAR and ICHAR intrinsic functions, see pages 240-241 of the Microsoft FORTRAN "Reference" manual for versions 5.0 and 5.1 or pages 323 and 325 of the Microsoft FORTRAN "Language Reference" manual for version 4.1 or the FORTRAN PowerStation Language Help. Additional query words: kbinf 1.00 4.10 5.00 5.10 type conversion
Keywords : kbcode kbFortranPS kbLangFortran |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |