ABSTRACT

The general rules for assignment are applicable to characters. Two or more character variables or constants or their combinations may be concatenated (joined) by the concatenation operator, which is denoted by two successive division signs (//); 'abc' // 'def' will become 'abcdef'. The question whether a particular character is greater than or less than another character is determined by the collating sequence. Fortran provides four lexical comparison functions. All these functions take two strings as arguments. They are llt, lle, lgt and lge. The comparison always takes place according to the ASCII collating sequence even if the processor uses some other character set. In character–integer conversion, an integer may be converted into a character according to its position in the collating sequence. Similarly, a character may be converted into an integer, where its position in the collating sequence is returned as an integer.