4 ms·
There's still some cryptic stuff in the Fortran example. I don't know what (*,*) or :: mean. It's even more cryptic than printf or chomp or float.
by yosito 5y ago
There's still some cryptic stuff in the Fortran example. I don't know what (*,*) or :: mean. It's even more cryptic than printf or chomp or float.
- Bostonian 5y agowrite (*,*) "hi" means write to standard output (the first asterisk) using a default format (the second asterisk) chosen by the compiler. I agree it's a bit obscure. An alternative is print*,"hi" The :: just separates the type of variable from the variable names. The code shown compiles and runs the same if the :: is removed, but there are cases where the :: is needed.
- wk_end 5y agoIt's not clear to me that, once you explain all this, you end up saving any time vs. the Python version. And once your students want to do anything besides "read a number and perform a simple calculation on it", Python is likely to start winning out very rapidly.
- wumpus 5y agoI don't think the point was to score which language was best.