GNU Fortran (version 3.4.6_3)
GNU Fortran (version 3.4.6 release 3)
How set up a simple application to run the GNU Fortran for RISC-OS
GNU Fortran requires a machine with at least 4Mbytes free
application space
This version is claimed to be 32-bit (Iyonix) compatible.
If you already have this GNU Fortran set up and want the PGPlot package,
click here
-
Download the skeleton application (!GNUF77, 61 Kbytes) and unzip it to a suitable
directory
-
Download the g77.zip (2.15 Mbytes).
-
Download the gcc.zip (2.51 Mbytes)
- the g77.zip just contains an application called !gcc.
Extract the files:
- !gcc.bin.g77
to your new !GNUF77.bin.g77
- !gcc.bin.arm-riscos-aof.3_4.f771
to !GNUF77.bin.f771
- !gcc.bin.arm-riscos.3_4.apcs32.abs.unixlib.o.libg2c
to !GNUF77.bin.o.libg2c
- there is also a directory of docs which you may find useful.
The file g77-readme has a list of error numbers and the file
g77 has all the possible compiler options. You should read the
beginnings of these to be aware of the GNU license.
- the gcc.zip also contains an application !gcc. Extract the files:
- !gcc.bin.arm-riscos-aof.3_4.as
to !GNUF77.bin.as
- !gcc.bin.arm-riscos-aof.3_4.apcs32.abs.unixlib.o.libgcc
to !GNUF77.bin.o.libgcc
- !gcc.bin.arm-riscos-aof.3_4.apcs32.abs.unixlib.o.unixlib
to !GNUF77.bin.o.unixlib
- !gcc.bin.gcc
to !GNUF77.bin.gcc
- !gcc.bin.drlink
to !GNUF77.bin.drlink
- (you would normally have to download the system.zip but this
just has a module which is already in the skeleton application)
- all the information needed has now been extracted from the downloaded
zip files so you could delete them now.
There is a rudimentary interface to RISC-OS in our library called
‘OSlibN32’ which contains many of the functions of the Utils,
Graphics and SpriteOps libraries defined in our free distribution for Fortran release 2. This
library has had little testing so far, (Oct 2004), we can do more testing
and extend it further if there is any interest.
Now you should be ready to compile, link and run a simple Fortran
program.
Double-click on the !GNUF77 which sets up system variables and
opens the directory ‘myprogs’ containing the source subdirectory
‘f’ with the trivial program ‘Hello’.
The obey files ‘clr’ and ‘clrOpt’ will compile, link
and run a Fortran program, either unoptimized or optimized.
‘clr’ or ‘clrOpt’ request a 4Mbyte chunk of memory
for the compiler. This is not necessary for short programs and can be
reduced to 3Mbytes if you only have a 4Mbyte computer (use !Edit to change
the second line of these Obey files appropriately).
Open a task window (Ctrl+F12) and type ‘clr hello’ to see it
perform.
It will create a directory ‘o’ with the object code and place
the run image directly into ‘myprogs’.
GNU Fortran and the PGPlot graphics package
PGplot is a portable high level Fortran graphics library,
written for the display of astronomical data, but useful for any scientific
discipline.
Full information can be found on the official PGPlot web site:
PGPlot
(version 5.2.0).
Brief details and some example plots can be seen here.
The RISC OS version for GNUF77 is available from
here (size 201K) and contains instructions on how to set it up. It has
been compiled optimised.
It does not contain a PGPlot manual; this can be found on the PGPlot
web site (above).
Bugs we have found
These we list in order of decreasing seriousness:
- unable to open a file with a name with a ‘/’ in it;
unhelpful for files with DOS extensions
no change from previous version;
- reading integers which are too big for the word size
does not report an error, it just gives a wrong result;
no change from previous version;
- does not allow trailing blanks in I/O keywords;
no change from previous version;
- integer division by zero gives the diagnostic ‘Floating
Exception’;
no change from previous version.
Please send any comments to us here.
Good Luck!
Page last updated 8 February 2010
Click here to return to Fortran Friends Top page