next up previous index
Next: M432 Utility Routines Up: CERNLIB Previous: M429 Number of

M431 Convert Between Character String and Packed ASCII Form

Routine ID: M431
Author(s): M. MetcalfLibrary: KERNLIB
Submitter: Submitted: 15.01.1986
Language: FortranRevised: 16.05.1986

IFROMC and CFROMI provide a simple, portable facility for storing character strings of 1--4 characters packed into integers.

Structure:

FUNCTION subprograms
User Entry Names: IFROMC, FROMI
External References: CHTOI, ITOCH (M400)

Usage:

    I=IFROMC('string')
stores in I a packed ASCII representation of the 4 leftmost characters of 'string'. If there are fewer than 4 characters, blanks are stored in the empty positions.
    CHARACTER*4 STRING
    ...
    STRING=CFROMI(I)
stores in STRING the four characters stored packed in I in their ASCII representation.

References:

  1. CERN Computer Newsletter 179 (April--May 1985) 11--14.

M432


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995