ACHAR(3f) - [FORTRAN:INTRINSIC:CHARACTER] returns a character in a specified position in the ASCII collating sequence
Syntax
Description
Arguments
Return Value
Example
Note
Standard
Class
See Also
result = ACHAR(I [, KIND])
ACHAR(I) returns the character located at position I in the ASCII collating sequence.
I - the type shall be INTEGER. KIND - (optional) an INTEGER initialization expression indicating the kind parameter of the result.
The return value is of type CHARACTER with a length of one. If the KIND argument is present, the return value is of the specified kind and of the default kind otherwise.
Sample program:
program demo_achar character c c = achar(32) end program demo_achar
see [[ichar]] for a discussion of converting between numerical values and formatted string representations.
[[FORTRAN 77]] and later, with KIND argument Fortran 2003 and later
Elemental function
[[char]], [[iachar]], [[ichar]]
Functions that perform operations on character strings, return lengths of arguments, and search for certain arguments:
Elemental: ADJUSTL, ADJUSTR, INDEX, LEN_TRIM, SCAN, VERIFY; Nonelemental: REPEAT, TRIM
achar (3) | March 18, 2019 |