17.6 Summary
Characters represent a different data type to any other in Fortran, and as a consequence there is a restricted range of operations which may be carried out on them.
A character variable has a length which must be assigned in a CHARACTER declaration statement.
Character strings are delimited by apostrophes (’) or quotation marks (“). Within a character string, the blank is a significant character.
Character strings may be joined together (concatenated) with the // operator.
Substrings occurring within character strings may be also be manipulated. There are a number of functions especially for use with characters:
-
ACHAR
-
ADJUSTL
-
ADJUSTR
-
CHAR
-
IACHAR
-
INDEX
-
LEN
-
LEN_TRIM
-
LLE
-
LGE
-
LGT
-
LLT
-
REPEAT
-
SCAN
-
TRIM
-
VERIFY
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Springer-Verlag London Limited
About this chapter
Cite this chapter
(2006). Characters. In: Introduction to Programming with Fortran. Springer, London. https://doi.org/10.1007/1-84628-054-0_17
Download citation
DOI: https://doi.org/10.1007/1-84628-054-0_17
Publisher Name: Springer, London
Print ISBN: 978-1-84628-053-5
Online ISBN: 978-1-84628-054-2
eBook Packages: Computer ScienceComputer Science (R0)