FTN95 takes almost all the features of FTN77 and moves them into the era of Fortran 90/95. Like FTN77, FTN95 is designed to give meaningful diagnostics at all stages of program development. Many features that were unique to FTN77 have been brought into FTN95 as you will see below.
Many people use Fortran because they have 'dusty decks' containing code that cannot easily be changed. Others prefer to program using some of the more traditional Fortran constructs (such as COMMON blocks). Such users will be glad to know that FTN95 does not just support these features, but contains innovative facilities (such as virtual common) to exploit them in a modern context.
Lets face it, many existing Fortran programs use COMMON blocks. Often a COMMON block can contain one or a small number of large arrays. Often the programmer is uncertain how big to make these arrays, since small program runs may require relatively small arrays, whereas large runs may require many megabytes. The problem is that a large common block hogs memory even if it is not being used. FTN95 supports the concept of virtual common blocks. Using this facility, the linker binds a common block to a region of address space where memory is allocated on demand. This means that a single executable can handle problems of widely different sizes.
Silverfrost FTN95 Win32 generates the standard form of relocatable binary for the Windows platform, and so can be linked by the Microsoft linker. However, FTN95 Win32 comes with its own linker, SLINK, which can greatly simplify the process of program linking:
FTN95 is famous for its easy-to-use Win32 GUI builder - ClearWin+. This library comes as part of the standard run-time system for FTN95, and with it you can write simple Windows programs in a few tens or hundreds of lines of Fortran code (a simple 'Hello World' program takes 5 lines), or larger, fully featured GUI programs in a little more. GUI features are specified using format strings reminiscent of traditional Fortran I/O. Many of our customers have produced very complex GUI applications including graphics, tool bars, edit boxes, etc. using ClearWin+.
FTN95 supports three sizes of floating point number:
All three formats use the coprocessor hardware on x86 chip, and so there is no great speed penalty for operating in high precisions.
Because many Fortran programs were written many years ago before the Fortran 90 standard introduced 'KIND' specifiers, FTN95 has an option to force all single precision calculations (32-bit) into double (64-bit). Using this option, everything is converted - declarations, constants, specific intrinsic functions names (which derive from Fortran 66!) - so that most programs run unchanged at higher precision. This feature is particularly useful for running Fortran programs that were written on mainframes where the base precision was greater than 32-bits. A further option is available to promote all floating point calculations to 80-bit precision.
Many Fortran programmers have a need to access C/C++ routines. Unless such routines have been written with the Fortran programmer in mind, this can be difficult. For example, many C/C++ programs accept arguments by value (rather than using pointers or references), and string data is traditionally nul-terminated rather than being space padded, as is the case for Fortran. The C language is also case sensitive, and so can generate external names that a Fortran programmer cannot access. To deal with these problems FTN95 (like FTN77) has the concept of a C_EXTERNAL statement. These statements define an interface to a C routine which handles all these issues.