9.127. IACHAR

9.127 IACHAR — Code in ASCII collating sequence

Description:
IACHAR(C) returns the code for the ASCII character in the first character position of C.
Standard:
Fortran 95 and later, with KIND argument Fortran 2003 and later
Class:
Elemental function
Syntax:
RESULT = IACHAR(C [, KIND])
Arguments:
C Shall be a scalar CHARACTER, with INTENT(IN)
KIND (Optional) An INTEGER initialization expression indicating the kind parameter of the result.
Return value:
The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value is of default integer kind.
Example:
program test_iachar
  integer i
  i = iachar(' ')
end program test_iachar
Note:
See ICHAR for a discussion of converting between numerical values and formatted string representations.
See also:
ACHAR, CHAR, ICHAR

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gfortran/IACHAR.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部