CS 430 Notes  -   9/14/06  3:30 – 4:45 Class  - courtesy of Alan Crouch

 

Pre Class Discussion:

 

If you are not registered for this class, Dr. Adams will go Ninja on you and kick you out.

 

During Class Discussion:

 

Playing around with FORTRAN

 

Save data files using “All Files” do not use the return key  à For saving data.in

 

C:\ filename < data.in > data.out  à For running the program with a given input from the cmd line and outputting to a text file

 

Play with the following:

 

READ (5, 10, END = 40) …   

or

READ (5, 10, ERROR = 50) …

 

What is the difference between using a FORMAT(40I2) and a FORMAT(I2) using an implied DO loop in a READ  statement? 

 

Input will need to be on 1 line for the first FORMAT and 40 lines of input for the second FORMAT (it picked up the first two characters and ignore the rest)

                       

Be careful: When reading in numerical data in FORTRAN 12E is read as an exponential/engineering notation

 

Homework:

 

            Be attentive for an incoming homework assignment!

           

See the Free Pascal compiler on the links page. 

You will need to create a .bat file

path=%path%;C:\Dev-pas\bin

OR change your path to the executable (probably shouldn’t do), or make a copy ( path > myRealPath.bat )

           

Quotes of the Day:

 

"I am going to stab you with my laser" – Dr. Adams

“Oh, you’re so smart. I hate you!” – Dr. Adams (Funny in context)