CS 3304: Comparative Languages
Data Types
[
Course Documents
] : [
Data Types
]
Previous
Contents
Next
Keyword Index
Examples of String Support
Pascal
Not primitive; assignment and comparison only (of packed arrays)
Ada, FORTRAN 77, FORTRAN 90 and BASIC
Somewhat primitive
Assignment, comparison, concatenation, substring reference
FORTRAN has an intrinsic for pattern matching
Examples (in Ada)
N := N1 & N2 (catenation)
N(2..4) (substring reference)
C (and C++ for some people)
Not primitive
Use char arrays and a library of functions that provide operations