[UP]


Manual Reference Pages  - char (3)

NAME

char(3f) - [FORTRAN:INTRINSIC:CHARACTER] Character conversion function

CONTENTS

Syntax
Description
Return Value
Example
Note
Standard
Class
See Also

SYNTAX

result = char(i [, kind])

DESCRIPTION

char(i [, kind]) returns the character represented by the integer I.

    ARGUMENTS

I - The type shall be INTEGER.
KIND - (Optional) An INTEGER initialization expression indicating the kind parameter of the result.

RETURN VALUE

The return value is of type character(1)

EXAMPLE

Sample program:

    program demo_char
        integer :: i = 74
        character(1) :: c
        c = char(i)
        print *, i, c ! returns ’J’
    end program demo_char

NOTE

See [[ichar]] for a discussion of converting between numerical values and formatted string representations.

STANDARD

[[FORTRAN 77]] and later

CLASS

[[Elemental procedure|Elemental function]]

SEE ALSO

[[achar]], [[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


char (3) March 18, 2019
Generated by manServer 1.08 from 4106fbde-7e2f-4db3-ae74-39129f8a4c0d using man macros.