Silverfrost FTN95: Fortran for Windows | |
Developer: | Silverfrost |
Genre: | Compiler |
License: | Proprietary |
Latest Release Version: | 9.00 |
Operating System: | Microsoft Windows |
Silverfrost FTN95: Fortran for Windows is a compiler for the Fortran programming language for computers running Microsoft Windows. It generates executable programs from human-written source code for native IA-32 Win32, x86-64 (from version 8.00[1]) and for Microsoft's .NET platform. There is a free-of-charge Personal edition, which generates programs which briefly display a banner, and Commercial and Academic editions.
FTN95, like its predecessor FTN77, has strong run-time checking options, collectively called CHECKMATE. Compiler switches can turn on various levels of run-time checking. These include array bound checks, constant modification, DO LOOP modification, argument checking and undefined variable use. Program run-times are increased when checking is used.[2]
ClearWin+ is a library built into the FTN95 run-time system. It offers an easy to use interface to the Windows API and is not available when producing .NET code. It makes use of a set of format codes and call-backs. The format codes resemble C style printf codes. ClearWin+ is used to power the UI for Simfit. From FTN95 version 7.00 a 64-bit version of ClearWin+ is included. This can be used with existing, free, 64-bit compilers.
A simple ClearWin+ program:
INTEGER i,winio@ EXTERNAL func i=winio@('Press this to see what happens &') i=winio@('%^bt[PRESS]',func) END
c---Function to do something--- INTEGER function func func=1 ENDA full GUI interface with windows, menus, popup dialog boxes, list boxes, edit boxes, bitmaps, toolbars, etc can be developed using the available format codes. Applications written using ClearWin+ can also contain graphics regions, enabling charts and graphs to be included. OpenGL graphics can also be included.A simple ClearWin+ program that demonstrates two dimensional graph plotting using ClearWin+:
! Generate x-y data arrays
a = 1.d0 th1 = 0.d0 dth1 = 4.d0*ATAN(1.d0)/25.d0 DO i = 1, n, 1 x(i) = a * SQRT(th1) * COS(th1) y(i) = a * SQRT(th1) * SIN(th1) th1 = th1 + dth1 END DO ! Configure plot CALL WINOP@('%pl[frame,etched,gridlines,colour=blue,width=2,symbol=5]') CALL WINOP@('%pl[smoothing=4,x_array,margin=100]') CALL WINOP@('%pl[Title="Fermat''s spiral"]') ! Set window font (%fn), text size (%ts), and set to bold (%bf) i = WINIO@('%fn[Tahoma]%ts%bf&',1.5d0) ! Create a 800 x 800 graphics region, and plot curve defined by data in x and y i = WINIO@('%pl',800,800,n,x,y) END
FTN95 can add extra debugging information to the EXE files that it produces. This facility is made available when the user requests it with the appropriate compiler options (/debug, /check, /undef). The SDBG/SDBG64 debuggers are fast and capable tools that are easier to learn and use than the much more versatile but resource-hungry Visual Studio tools.
FTN95 was the first Fortran compiler capable of producing code for Microsoft .NET. In addition plug-ins are available that allows FTN95 programs to be written, compiled and debugged inside Visual Studio. The plug-ins fully support Win32 and .NET code generation. The current release has plug-ins for Visual Studio from 2008 to 2019. There is currently no plug-in for Visual Studio 2022. The FTN95 plug-ins can be installed into Visual Studio Community Edition.
Plato is the Integrated Development Environment supplied with FTN95. It can edit, compile and debug programs in a manner similar to the Visual Studio plug-ins. Although Plato specialises in Fortran it is not limited to it and can be tuned to work with any compiler. It is designed to stand-alone from FTN95.
FTN95 was developed by Salford Software Limited, a company owned by University of Salford, and is the successor to their Fortran 77 compiler FTN77. In August 2004 Salford Software relinquished control of FTN95 to Silverfrost Limited. Silverfrost FTN95 is often referred to as Salford FTN95 because of its University of Salford pedigree.
FTN95 programs can be linked to dynamic libraries generated by other Fortran compilers such as gFortran and Intel Fortran. The calling conventions among these compilers are quite similar, and the Silverfrost linkers (Slink/Slink64) can directly link users' object files to routines in one or more Windows dynamic libraries (DLLs), such as the Intel MKL DLLs, without the need for an import library.
Features from the later Fortran 2003 and 2008 standards are available with FTN95, including:
Fortran 2003:
Fortran 2008: