]>
Commit | Line | Data |
---|---|---|
c63539ff ML |
1 | .. |
2 | Copyright 1988-2022 Free Software Foundation, Inc. | |
3 | This is part of the GCC manual. | |
4 | For copying conditions, see the copyright.rst file. | |
5 | ||
6 | .. index:: ACHAR, ASCII collating sequence, collating sequence, ASCII | |
7 | ||
8 | .. _achar: | |
9 | ||
10 | ACHAR --- Character in ASCII collating sequence | |
11 | ************************************************ | |
12 | ||
13 | .. function:: ACHAR(I) | |
14 | ||
15 | ``ACHAR(I)`` returns the character located at position ``I`` | |
16 | in the ASCII collating sequence. | |
17 | ||
18 | :param I: | |
19 | The type shall be ``INTEGER``. | |
20 | ||
21 | :param KIND: | |
22 | (Optional) An ``INTEGER`` initialization | |
23 | expression indicating the kind parameter of the result. | |
24 | ||
25 | :return: | |
26 | The return value is of type ``CHARACTER`` with a length of one. | |
27 | If the :samp:`{KIND}` argument is present, the return value is of the | |
28 | specified kind and of the default kind otherwise. | |
29 | ||
30 | Standard: | |
31 | Fortran 77 and later, with :samp:`{KIND}` argument Fortran 2003 and later | |
32 | ||
33 | Class: | |
34 | Elemental function | |
35 | ||
36 | Syntax: | |
37 | .. code-block:: fortran | |
38 | ||
39 | RESULT = ACHAR(I [, KIND]) | |
40 | ||
41 | Example: | |
42 | .. code-block:: fortran | |
43 | ||
44 | program test_achar | |
45 | character c | |
46 | c = achar(32) | |
47 | end program test_achar | |
48 | ||
49 | Note: | |
50 | See :ref:`ICHAR` for a discussion of converting between numerical values | |
51 | and formatted string representations. | |
52 | ||
53 | See also: | |
54 | :ref:`CHAR`, | |
55 | :ref:`IACHAR`, | |
3ed1b4ce | 56 | :ref:`ICHAR` |