这次再介绍四种编程语言:Fortran、Lua、Lisp 和 Logo。
Fortran
Fortran 语言在2010年6月编程语言排行榜中排名第三十一位。下面就是 GregorianTest.for 程序:

我没有在 Fortran 语言的标准库中找到设置指定日期的函数,只好从 1970-01-01 往回倒数 141,438 天得到 1582-10-04 。
安装 GNU Fortran 编译器,编译和运行:
ben@ben-1520:~/work$ sudo apt-get install gfortran
ben@ben-1520:~/work$ gfortran --version
GNU Fortran (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
ben@ben-1520:~/work$ gfortran GregorianTest.for
ben@ben-1520:~/work$ ./a.out
Mon Oct 4 08:05:52 1582
Tue Oct 5 08:05:52 1582
ben@ben-1520:~/work$
ben@ben-1520:~/work$ gfortran --version
GNU Fortran (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
ben@ben-1520:~/work$ gfortran GregorianTest.for
ben@ben-1520:~/work$ ./a.out
Mon Oct 4 08:05:52 1582
Tue Oct 5 08:05:52 1582
ben@ben-1520:~/work$
运行结果和 C 语言一样。
