{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture_notes_summary3

# Lecture_notes_summary3 - Chapter 3 Arrays Arrays in FORTRAN...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 3 Arrays Arrays in FORTRAN are made simple to users ! We summarize below some declarations. 3.1 Arrays ARRAY EXAMPLE.f95 PROGRAM ARRAY EXAMPLE IMPLICIT NONE INTEGER , PARAMETER : : DP = SELECTED REAL KIND(P=15) REAL ( KIND = DP) , DIMENSION (0:3) : : array1 REAL ( KIND = DP) , DIMENSION (4) : : array2 ! same as ( 1 : 4 ) REAL ( KIND = DP) , DIMENSION ( − 2:2) : : array3 REAL ( KIND = DP) , DIMENSION ( − 1:1 ,0:2) : : array4 REAL ( KIND = DP) : : array5 (2 ,2 ,0:3) REAL ( KIND = DP) : : x , y INTEGER : : i , j , k x=2.3 dp y=7.7 dp write ( ∗ , ∗ ) ’ s i z e of array1=’ , size ( array1 ) write ( ∗ , ∗ ) ’ s i z e of array2=’ , size ( array2 ) write ( ∗ , ∗ ) ’ s i z e of array3=’ , size ( array3 ) write ( ∗ , ∗ ) ’ s i z e of array4=’ , size ( array4 ) write ( ∗ , ∗ ) ’ s i z e of array5=’ , size ( array5 ) write ( ∗ , ∗ ) ’ shape of array1=’ , shape ( array1 ) write ( ∗ , ∗ ) ’ shape of array2=’ , shape ( array2 ) write ( ∗ , ∗ ) ’ shape of array3=’ , shape ( array3 ) write ( ∗ , ∗ ) ’ shape of array4=’ , shape ( array4 ) write ( ∗ , ∗ ) ’ shape of array5=’ , shape ( array5 ) write ( ∗ , ∗ ) ’ lbound of array1=’ , lbound ( array1 ) write ( ∗ , ∗ ) ’ lbound of array2=’ , lbound ( array2 ) write ( ∗ , ∗ ) ’ lbound of array3=’ , lbound ( array3 ) write ( ∗ , ∗ ) ’ lbound of array4=’ , lbound ( array4 ) write ( ∗ , ∗...
View Full Document

{[ snackBarMessage ]}

### Page1 / 5

Lecture_notes_summary3 - Chapter 3 Arrays Arrays in FORTRAN...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online