Hasty Briefsbeta

Learning the oldest programming language (2024)

3 days ago
  • #Programming
  • #Fortran
  • #High-Performance Computing
  • Fortran, created in 1957 by John Backus at IBM, stands for FORmula TRANslator and is used for scientific applications and high-performance computing.
  • Modern Fortran uses free form layout (introduced in Fortran 90), recommended over fixed form layout inherited from punch cards.
  • GNU Fortran (gfortran) is the compiler used, with .f90 extension indicating free form source code.
  • Fortran syntax includes program structure with 'program <name>' and 'end program <name>', and uses 'print *, <message>' for output.
  • Implicit typing in Fortran assigns default types based on variable names; 'implicit none' is recommended to disable this.
  • Variables can be declared with types like REAL (floating point) and CHARACTER (characters).
  • User input is handled with 'read *, <variable>', and conditional logic uses 'if' and 'select case' statements.
  • A simple calculator example demonstrates basic Fortran features, including handling division by zero.
  • Fortran is modernizing, with a growing community and interest from developers like ThePrimeagen.