This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: this number Lower bound now is 1 If you want to check the lower bound of an array use Lbound(arrayname, dimension) Lbound(y, 2) Passing Arrays to Procedures In the previous example of temperature at nodes of a plate, supposed we want to ultimately calculate and store temperature in o F. We also want to report the min. and max. temperature. Call conv(T(), nx, ny, Min, Max) Sub conv(T, nx, ny, Min, Max) Tells the program that T is going to be an array No parenthesis required here for T Tells the subroutine the size of the array Example Bubble Sort Example The basic idea is that one goes down an array comparing adjacent pairs and swapping values if they are out of order. We pass through the array many times until there are no more swaps. Can you write a code to implement the bubble sort logic?...
View
Full
Document
This note was uploaded on 04/27/2008 for the course PGE 310f taught by Professor Srinivasan during the Spring '08 term at University of Texas.
 Spring '08
 Srinivasan

Click to edit the document details