Lecture_notes_summary3

Lecture_notes_summary3 - Chapter 3 Arrays Arrays in FORTRAN...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
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

This note was uploaded on 01/15/2012 for the course MAT 5939 taught by Professor Garreau during the Fall '11 term at FSU.

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 Right Arrow Icon
Ask a homework question - tutors are online