Subject: Question on FORTRAN?
From: [email-masked] (Earnie Boyd)

11 Nov 1998 11:07:20 -0800
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: cygwin users <[email-masked]>

I found on the web somewhere an example of a FORTRAN program using the
Win32 API.  I was able to compile this program, but how do I get it to
link and run?  Or is this just impossible with g77?  Note, I was able
to get the DOS version of this program to execute properly.

This is the program:
----8<--------8<--------8<--------8<-------->8-------->8-------->8-------->8----
! Contouring Windows' "program" statements from section 1.2
      integer function WinMain(hInstance,
     &   hPrevInstance, lpszCmdLine, nCmdShow)
      !MS$ ATTRIBUTES STDCALL, ALIAS:'_WinMain@16'::WinMain
      integer hInstance, hPrevInstance, lpszCmdLine, nCmdShow
! end of Windows' header

! DOS program body from section 1.1
       real*4 a,b,c
       character*7 input_file
       input_file='1.0 2.0'
       read(input_file,*) a,b
       c = a + b
       open(unit=1,file="result_file.txt")
       write(1,"(f10.3)") c
       close(1)
! end of DOS body

! the rest of Windows' contouring
       WinMain=0
       end
! end of program
----8<--------8<--------8<--------8<-------->8-------->8-------->8-------->8----
==
-                  \\||//
-------------o0O0--Earnie--0O0o--------------
--          [email-masked]          --
-- http://www.freeyellow.com/members5/gw32 --
----------------ooo0O--O0ooo-----------------

PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".