FORTRAN Flashcards
!text
Comments
print *, ‘text’
Outputs ‘text’ to the screen
*
means use the default number of decimal places when the number is written to the screen
What is the significance of ‘implicit none’
By including it in your program, FORTRAN will check that you have properly declared all your variable types.
Translate: x=2
store the value “2” in memory location “x”
Translate: y=3
store the value “3” in memory location “y”
Translate: z=x+y
Add the values stored in memory location “x” and “y” and store the result in memory location “z”
How many variable names can be on the left hand side of an equals sign
One!
+ , -
plus and minus
- , /
multiply and divide
**
exponentiation (raise to the power)
( )
brackets
Does FORTRAN follow the order of operations?
yes
sin(x)
sine
cos(x)
cosine