120. Character variables can be compared like numerical variables.#
topic: Character variables
Note
This tip is a draft1.
The comparison operators < <= etc. or .lt. .le. etc. can be used for character variables, usually with the ASCII collating sequence. The lexical comparison functions LLT, LLE, LGE, LGT use this sequence. MINVAL, MINLOC, FINDLOC work on arrays of strings.
The comparison operators < <= etc. or .lt. .le. etc. can be used for character variables, usually with the ASCII collating sequence. The lexical comparison functions LLT, LLE, LGE, LGT use this sequence. MINVAL, MINLOC, FINDLOC work on arrays of strings. pic.twitter.com/fymX8ecd4j
— FortranTip (@fortrantip) February 12, 2022
- 1
From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.