next up previous
Next: CHR_FANDL - Find the first and last non-blank characters in a string
Up: Routine Descriptions
Previous: CHR_EQUAL - Return whether two strings are equal

CHR_ETOM  -  Translate a string from EBCDIC to the machine's character set

Description:
The string STR1, which has been written on a machine which uses the EBCDIC character set and subsequently read on a machine which may not use the EBCDIC character set to represent characters in Fortran, is returned in STR2 translated into the correct character set for the host machine.

Invocation:
CALL CHR_ETOM( STR1, STR2 )

Arguments:
STR1 = CHARACTER ( ) (Given)
The character string written on a machine with an EBCDIC character set and read on a machine which may not use EBCDIC to represent characters in Fortran.
STR2 = CHARACTER ( ) (Returned)
The translated EBCDIC character string. If STR2 is shorter than STR1, the translated string will be truncated; if STR2 is longer than STR1, STR2 will be padded with blanks beyond the translated string.

Notes:
This subroutine has been implemenred for machines which use the ASCII character set.



next up previous
Next: CHR_FANDL - Find the first and last non-blank characters in a string
Up: Routine Descriptions
Previous: CHR_EQUAL - Return whether two strings are equal



CHR Character Handling Routines
Starlink User Note 40
A C Charles
P C T Rees
A J Chipperfield
2 August 1995
E-mail:ussc@star.rl.ac.uk