Home > Archive > Fortran > June 2004 > Compiler query
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Aenathras 2004-06-27, 8:56 am |
| I don't know if anyone can point me in the right direction(s) here.
I have a legacy Fortran program compiled with an old version of
Microsoft Fortran and running in a 'DOS box' under Windows. No
graphical interface is required - it is a black box for another
program - it just has to work under Windows 2000 now.
I started off searching for a Fortran compiler to use - as the moment
I am using Salford FTN77 - the code was Fortran 77 - and although the
coding environment is basic I can get it to compile and link. If there
is a better/more user friendly compiler out there I am open to
suggestions. The compiler will need to be used in a commercial
environment.
The problem that I have with this compiler though is to write Fortran
code that will read in the number of parameters at run time and then
to be able to store the parameters as file variables for processing.
For instance I would have a command:
ALLOC file1.dat file2.dat 2 D
where
ALLOC is the program name (ALLOC.EXE)
file1.dat is the name of the file to input data from
file2.dat is the name of the file to output data to
2 is a parameter which control what the program does
D is an optional parameter (standing for Debug) telling the program
to
show intermediate results - hence the need to know the number of
parameters
I need to know the syntax for the code to deal with parameters in
Salford (or a.n. other compiler) and how to link the libraries at the
compile/link stage so that the final program can process arguments
correctly.
It can't be that unusual request - it is just a case of finding an
alternative to the Microsoft option.
Ideas very welcome - code snippets even more welcome :)
Aenathras
| |
| beliavsky@aol.com 2004-06-27, 8:56 am |
|
aenathras@beenlogoed.com (Aenathras) wrote:
>I don't know if anyone can point me in the right direction(s) here.
>
>I have a legacy Fortran program compiled with an old version of
>graphical interface is required - it is a black box for another
>program - it just has to work under Windows 2000 now.
>
>I started off searching for a Fortran compiler to use - as the moment
>I am using Salford FTN77 - the code was Fortran 77 - and although the
>coding environment is basic I can get it to compile and link. If there
>is a better/more user friendly compiler out there I am open to
>suggestions. The compiler will need to be used in a commercial
>environment.
>
>The problem that I have with this compiler though is to write Fortran
>code that will read in the number of parameters at run time and then
>to be able to store the parameters as file variables for processing.
>For instance I would have a command:
>
>ALLOC file1.dat file2.dat 2 D
>
>where
> ALLOC is the program name (ALLOC.EXE)
> file1.dat is the name of the file to input data from
> file2.dat is the name of the file to output data to
> 2 is a parameter which control what the program does
> D is an optional parameter (standing for Debug) telling the program
>to
> show intermediate results - hence the need to know the number of
>parameters
>
>I need to know the syntax for the code to deal with parameters in
>Salford (or a.n. other compiler) and how to link the libraries at the
>compile/link stage so that the final program can process arguments
>correctly.
>
>It can't be that unusual request - it is just a case of finding an
>alternative to the Microsoft option.
>
>Ideas very welcome - code snippets even more welcome :)
>
>Aenathras
The program "parameters" you refer to are commonly called "command line arguments".
Fortran compilers are listed at http://www.dmoz.org/Computers/Programming/Languages/Fortran/Compilers/
. Most of the compilers listed there are Fortran 90 or 95 compilers, but
they certainly run F77 codes as well. The g77 and Watcom compilers are free
Fortran 77 compilers for Windows, and g77 has free front-ends Force and Vfort
-- see http://www.dmoz.org/Computers/Programming/Languages/Fortran/Compilers/GCC_Front_Ends/
. There is g77 info for Windows at http://myweb.lmu.edu/dmsmith/g77Help.html
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
| |
| Tim Prince 2004-06-27, 3:57 pm |
|
"Aenathras" <aenathras@beenlogoed.com> wrote in message
news:16cf2ab0.0406270215.7b425b39@posting.google.com...
> For instance I would have a command:
>
> ALLOC file1.dat file2.dat 2 D
>
> I need to know the syntax for the code to deal with parameters in
> Salford (or a.n. other compiler) and how to link the libraries at the
> compile/link stage so that the final program can process arguments
> correctly.
Any of the compilers supported by this port of the Fortran 2003 command line
interface will accomplish this in the standard manner:
http://www.winteracter.com/f2kcli/
| |
| David Frank 2004-06-27, 3:57 pm |
|
"Aenathras" <aenathras@beenlogoed.com> wrote in message
news:16cf2ab0.0406270215.7b425b39@posting.google.com...
>I don't know if anyone can point me in the right direction(s) here.
>
> I have a legacy Fortran program compiled with an old version of
> Microsoft Fortran and running in a 'DOS box' under Windows. No
> graphical interface is required - it is a black box for another
> program - it just has to work under Windows 2000 now.
>
If it works under some old "windows" but doesnt under Windows 2000
just upgrade your "windows" to Windows XP, thus restoring support of
your old version of MS Fortran (which is likely still superior in syntax
features
to any other F77 compiler thats freely available)..
| |
| Gary L. Scott 2004-06-27, 3:57 pm |
| David Frank wrote:
>
> "Aenathras" <aenathras@beenlogoed.com> wrote in message
> news:16cf2ab0.0406270215.7b425b39@posting.google.com...
>
> If it works under some old "windows" but doesnt under Windows 2000
> just upgrade your "windows" to Windows XP, thus restoring support of
> your old version of MS Fortran (which is likely still superior in syntax
> features
> to any other F77 compiler thats freely available)..
....referring to MS peculiar extensions most supported by CVF...but
widely regarded as archaic, buggy, poorly designed, proprietary, and
which usage of will make your code less portable...and the product is
unsupported by the vendor which formally recommended that user's move to
other products.
--
Gary Scott
mailto:garyscott@ev1.net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
Why are there two? God only knows.
Democracy is two wolves and a sheep, voting on what to eat for dinner...
Liberty is a well armed sheep contesting the vote. - Thomas Jefferson
| |
| Herman D. Knoble 2004-06-28, 4:10 pm |
| Windows 2000 is probably the worst Windows when it comes
to the DOS Box. Windows XP is probably the best in this connection.
Outside of a Fortran 90 compiler (like Salford FN95 or Lahey LF95)
which compiles Fortran 77 as a subset of Fortran 90,
there is really no better free Fortran 77 than Salford FTN77. There is
documentation available (Library.pdf and Userguide.pdf)
which detail extensions. Suggest that
you write a supbrogram to implement what seems to me as a
most unconventional ALLOC "command". If you need to process
parameters passed to the Fortran .EXE, see the Command_Line
function in Library.PDF. UserGuide.PDF tells how to use libraries.
Skip Knoble, Penn State
On 27 Jun 2004 03:15:01 -0700, aenathras@beenlogoed.com (Aenathras) wrote:
-|I don't know if anyone can point me in the right direction(s) here.
-|
-|I have a legacy Fortran program compiled with an old version of
-|Microsoft Fortran and running in a 'DOS box' under Windows. No
-|graphical interface is required - it is a black box for another
-|program - it just has to work under Windows 2000 now.
-|
-|I started off searching for a Fortran compiler to use - as the moment
-|I am using Salford FTN77 - the code was Fortran 77 - and although the
-|coding environment is basic I can get it to compile and link. If there
-|is a better/more user friendly compiler out there I am open to
-|suggestions. The compiler will need to be used in a commercial
-|environment.
-|
-|The problem that I have with this compiler though is to write Fortran
-|code that will read in the number of parameters at run time and then
-|to be able to store the parameters as file variables for processing.
-|For instance I would have a command:
-|
-|ALLOC file1.dat file2.dat 2 D
-|
-|where
-| ALLOC is the program name (ALLOC.EXE)
-| file1.dat is the name of the file to input data from
-| file2.dat is the name of the file to output data to
-| 2 is a parameter which control what the program does
-| D is an optional parameter (standing for Debug) telling the program
-|to
-| show intermediate results - hence the need to know the number of
-|parameters
-|
-|I need to know the syntax for the code to deal with parameters in
-|Salford (or a.n. other compiler) and how to link the libraries at the
-|compile/link stage so that the final program can process arguments
-|correctly.
-|
-|It can't be that unusual request - it is just a case of finding an
-|alternative to the Microsoft option.
-|
-|Ideas very welcome - code snippets even more welcome :)
-|
-|Aenathras
Herman D. (Skip) Knoble, Research Associate
(a computing professional for 38 years)
Email: SkipKnobleLESS at SPAMpsu dot edu
Web: http://www.personal.psu.edu/hdk
Penn State Information Technology Services
Academic Services and Emerging Technologies
Graduate Education and Research Services
Penn State University
214C Computer Building
University Park, PA 16802-21013
Phone:+1 814 865-0818 Fax:+1 814 863-7049
|
|
|
|
|