CS3911 Reading List: Week 2

Textbook Material
None
The set of slides used in class is available in the common directory with filename F90-Control.pdf.
The accuracy and reliability slide set is in the common directory with filename Accuracy.pdf. (read ahead)

Some Very Simple Fortran 90 Practice
  • Suppose we have the following:
    CHARACTER(LEN=4) :: A = "abcdef", B = "ghik", C = "opq", D = "xy"
    CHARACTER(LEN=10) :: L, M, N
    What is the result of each of the following Fortran 90 expressions?
    • A // B
    • D // D // C
    • B // C
    • D // C // B

    What is the result of the following?

    • L = A // B
    • M = B // C // A
    • N = D // A

    What is the result of the following?

    • A(2:4) = B
    • A(2:5) = "678"
    • L = A // B

    Suppose we wish to concatenate character variables A and B, and retrieve the substring (3:6). How would you carry out this operation? Can we use A // B(3:6) or (A // B)(3:6)? Are they correct? If they are, what would be the results, and which one can yield the desired result?