What do you think?
Rate this book


235 pages, Paperback
First published January 1, 1980
The supreme joy of learning to program a computer comes when the learner begins to formulate new problems to solve.
While many computer programming language facilities include the ability to generate random numbers, most FORTRANs do not. You may be using a FORTRAN that does supply a random number generating function, in which case you need only determine how it is to be applied. There are several other ways you can provide yourself with a source of random numbers. If you are working on a computer with a BASIC language that has a random number generator, you may be able to write a couple of thousand random numbers to an external data file, which you can read in any FORTRAN program that requires random numbers.
Most implementations of FORTRAN do not check to see if the subscript that we use is within the bounds stated in a DIMENSION statement or a type declaration statement. So if we dimension an array to be 20 by 30 and we write a program statement that tries to store a number at subscript position (50, 50), the results may be unpredictable. We might alter some memory location in the operating system and shut down the computer or send it into some strange loop, printing a system error message that appears to have nothing to do with anything in our program. It is the programmer's responsibility to provide valid subscripts.
Be cautious, but be adventurous and the rewards will be tremendous.