--
________________ email me at:
|om /\/\ac/\dam aa...@chebucto.ns.ca
Hi. I just wanted to throw this out and see if anyone could give me any
helpful comments...
I want to use HTML and CGI to create a front end for a program written in
FORTRAN. I want the user to enter data into an HTML form, submit that
form and have a CGI program somehow parse the data and send it to a
FORTRAN program to be processed. I also want the output from the FORTRAN
program to be sent back to the user in the form of an HTML page (possibly
including graphics, although I am not sure about this right now). For
several reasons, it is not viable to transfer the FORTRAN program to any
other language.
Currently the only helpful reference I found to using HTML/CGI in this way
is a page by Nik Swoboda from Indiana University
(http://blackcat.brynmawr.edu/~nswoboda/prog-html.html), but this still
leaves some questions unanswered. Specifically, am I able to call a
FORTRAN program from a CGI script, and if so, how do I pass/retrieve data
from it?
I've seen some web sites that seem to be front ends to relatively
large/complex (ie. not just form processing) programs, so am I correct to
assume what I am proposing can be done? Any helpful comments would be
greatly appreciated...
Tom.
: --
:I want to use HTML and CGI to create a front end for a program written in
:FORTRAN. I want the user to enter data into an HTML form, submit that
:form and have a CGI program somehow parse the data and send it to a
:FORTRAN program to be processed. I also want the output from the FORTRAN
:program to be sent back to the user in the form of an HTML page (possibly
:including graphics, although I am not sure about this right now). For
:several reasons, it is not viable to transfer the FORTRAN program to any
:other language.
[snip]
: am I able to call a
:FORTRAN program from a CGI script, and if so, how do I pass/retrieve data
:from it?
CGI programs can be scripts (i.e. interpreted) or compiled (any language) -
there
is nothing special about them except for the conventions of how data is
passed to them from the http server and how they pass the HTML back to
the server.
Hence you could have a CGI program that invokes your (compiled) Fortran program
provided only that your CGI program is in some language that can invoke
a separate program and pass parameters to it.
I.e. if you are talking about a *separate* executable (the Fortran program)
this is not really a CGI issue - you deal with it exactly as you would deal
with inter-program communication outside of this context.
If you are instead talking about calling a Fortran subroutine within your
CGI program, all that is required is that your CGI program be written in a
language which can interface to Fortran. There would be nothing particularly
to stop you from using Fortran for *all* of your CGI program except that you
won't find Fortran code to do the CGI parameter parsing and so you will have
to do a bit more work than if it were done in Perl or C where such code is
publicly available.
--
Cameron Hayne (ha...@crim.ca)
Centre de recherche informatique de Montreal
aa...@chebucto.ns.ca (Tom A. MacAdam) wrote:
:Tom A. MacAdam (aa...@chebucto.ns.ca) wrote:
.
:Hi. I just wanted to throw this out and see if anyone could give me any
:helpful comments...
.
:I want to use HTML and CGI to create a front end for a program written in
:FORTRAN. I want the user to enter data into an HTML form, submit that
:form and have a CGI program somehow parse the data and send it to a
:FORTRAN program to be processed. I also want the output from the FORTRAN
:program to be sent back to the user in the form of an HTML page (possibly
:including graphics, although I am not sure about this right now). For
:several reasons, it is not viable to transfer the FORTRAN program to any
:other language.
.
:Currently the only helpful reference I found to using HTML/CGI in this way
:is a page by Nik Swoboda from Indiana University
:(http://blackcat.brynmawr.edu/~nswoboda/prog-html.html), but this still
:leaves some questions unanswered. Specifically, am I able to call a
:FORTRAN program from a CGI script, and if so, how do I pass/retrieve data
:from it?
.
:I've seen some web sites that seem to be front ends to relatively
:large/complex (ie. not just form processing) programs, so am I correct to
:assume what I am proposing can be done? Any helpful comments would be
:greatly appreciated...
.
:Tom.
.
:: --
:: ________________ email me at:
:: |om /\/\ac/\dam aa...@chebucto.ns.ca
.
.
.
.
.
.
:--
: ________________ email me at:
: |om /\/\ac/\dam aa...@chebucto.ns.ca
.
.
.
.
.
---
Rob Tweed
Nucleus Design Ltd : http://www.nucleus.co.uk
M/Gateway Developments Ltd : http://www.hwsl.co.uk/mgw
---
If you know Perl also you could do this fairly easily.
Some here will say to use the CGI.pm routines. But
whichever way you decide to go on this all you should have
to do with a Perl script is to load everything in, save it
all to a file, and then do a SYSTEM command to call the
FORTRAN program. The program could then read in the values
which were stored in the file and continue on. If you do
not have Perl - it's free and available for most
platforms. Go to Yahoo! and look for the CPAN location
nearest you. CPAN will also contain the CGI.pm module.
:-)
--------------------------------------------------------------------------------
All e-mail needs to be sent to ma...@cheers.jsc.nasa.gov.
If you don't, it will probably bounce. What man does not
understand or fears; he ultimately destroys.