Yes. Fortran just needs the decimal to interpret the number as a REAL type. "10.", "10.0", "1.e1", "1.0e1", "1.0e01", "1.0e+1", and "1.0e+01" all are the same number to Fortran.
When naming a DO loop, why did you use "loop1: do" to start the loop, and "end do loop2" to end it?
Because my brain was disconnected from my fingers. The names should be consistent. A loop beginning "loop1: do" should end with "end do loop1." Sorry for any damage on that slip. No test questions on do loop naming.
I don't understand what the 3 arguments in DO loops are or say. For instance "do 100 i=1,10,2"
Best way to do that is to look at what happens to a sample loop. Try the following:
Is it possible to use the values generated in the middle of a do loop?
Yes, look at the example above. The variables y and dfdx are generated in the middle of the loop, but also "used" in the print statement below the loop.
With the DO loops, if you have "do 100 1,10" and no third number to set the increment, does Fortran automatically make the increment = 1?
Yes. The following example compiles without errors:
Does it matter if you use DO WHILE or loops like DO 100? Does it make any difference?
You can do any looping task with either form. The difference is in the level of convenience. If you are going to be stepping some INTEGER as the loop proceeds (counting), use the "do 100 i=imin,imax,istep" form. If it is easier to do your conditional tests somewhere in the middle of the loop, go with the do 100 type loops again.
Do IF and DO loops only do comparisons?
They do comparisons and then branch to different instructions based on those comparisons.
Do DO loops only do comparisons for greater than unless otherwise instructed?
A simple DO like "do 200 i=1,10,2" is just looking to see if "i" is greater than 10. However, note that "do 200 i=10,1,-1" will be watching to see if "i" is less than 1.
In my main program, the argument list for a function is "(x,dfdx), and in the function it is "(x,deriv)". What happens if I use the variable "deriv" from the function in the main program? Will it have the same value as dfdx or will it give me an error?
Here's a sample of what I think you're asking
What is the difference between an argument and a dummy argument, and how do they interact?
The author of the text and I use different terminology for this feature. In the text the variable names between the parentheses when a subroutine is called or function is referenced
As to interaction, the calling sequence (actual arguments) establishes locations in memory that will be represented by corresponding names in the subprogram argument list (dummy arguments). The calling sequence (actual argument list) is dictating where things will actually be stored in the computer. The subprogram argument list (dummy argument list), is providing a translation to tell you what name is going to be used in the subprogram to symbolically represent the memory locations passed from the calling sequence.
Can you have a function with its own name in the calling sequence?
What exactly does "implicit none" mean?
If you don't say anything about variable types (no REAL or INTEGER statements, and no IMPLICIT NONE), Fortran implicitly assumes that variables beginning with the letters a through h (or A through H) are REAL. It assumes that those beginning with i through n (or I through N) are INTEGER and those beginning with o through z (or O through Z) are REAL. "IMPLICIT NONE" says make no implicit assumptions, and requires that you declare the type for every variable (or function) that you use. This protects you from typos.
Easiest way is to move it to a PC with FTP, open it with your favorite Word Processor, and print like any paper. I recommend setting the font to 10 point Courier at the top of the document. If you are in 316 Hammond and want to print a program named "test.f", try the Unix print command:
lpr -Pasci test.f
How do I cut and paste on a remote terminal. Willie said he'd tell us in class but he must have forgotten. He said there was a way without using the mouse. That was my problem; trying to highlight stuff with the mouse and cutting the statements and pasting them in another file.
I don't know how to pull it off without a mouse on an Xterm, will check with Willie myself. In a Windows PC Telnet session, you are probably in big trouble without using a mouse to select the text for copying. The standard Windows text selection keystrokes are interpreted differently within the Telnet window
Is there a reason why my mouse would not work on a telnet session from my home computer to use with cutting and pasting?
CAC is probably giving you a poorer default Telnet program than they install in their own labs. Use FTP and select the connection option labeled "CAC More Windows Clients". Download and install either ewan1052.zip or uwterm.zip. I like uwterm better, but ewan is probably easier to install.
How can I get a copy of the program Ghostscript?
Fire up Netscape and do a search on "Ghostview". Look at the hits for the search until one gives you an option to download a file with an installation package for your computer.
If you know the value of a function, and the value of all of its derivatives at a point, the Taylor Series gives you a way to obtain values of the function near that point without ever having to know the exact form of the function. To get a thorough answer to this question, you should take a look in a calculus book. If you don't have such a book, go to the math library, find the section of the shelves with calculus textbooks, and browse until you find one that makes sense.
How do you use the convergence criteria inside a loop?
Look at the loops in newton2.f
Mid-Terms in 64 Willard. Final not yet scheduled, but probably in the regular classroom, 64 Willard.
Will we be reviewing Monday?
Is everything we need to know in our notes or should we study other things also?
See the Web notes for Monday's review session
Will I have to write a program on the fill in the blank portion of the test or just a portion of it?
Just a portion.
Is the test going to be hard?
Past student answer to that question would probably be "yes".
What are the averages on your tests usually?
Last year is the only data for this class. Averages were mid to high B.
Can we get the answers to the practice exams?
The answers are there but may be hard to see. In True-False look for question numbers that are slightly lighter that the rest of the text to see True statements. For multiple choice look for one letter that is slightly lighter. For fill-in-the-blank, look at the text with a straight horizontal line through it for one possible answer.
Will the DO loop structure be tested heavily on our first exam?
Maximum of 8 out of 100 points on exam.
How much of the exam is dedicated to Subroutines and Functions?
Add up intrinsic functions, knowledge of calling sequences and argument lists, behavior of variable names and labels across program units, and the actual Fortran statements associated with calling (or referencing) subprograms, marking there beginning and ends, and dealing with data types in each. There is enough there to get you in serious trouble if you don't know what is going on.