<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770700#M22431</link>
    <description>The following compile and run:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;Subroutine SetupExit&lt;/P&gt;&lt;P&gt; USE KERNEL32&lt;/P&gt;&lt;P&gt; integer*4 ff&lt;/P&gt;&lt;P&gt; ff=SetConsoleCtrlHandler(closewindow,TRUE)&lt;/P&gt;&lt;P&gt; Return&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;subroutine CloseWindow(number)&lt;/P&gt;&lt;P&gt;!DEC$ ATTRIBUTES STDCALL :: CloseWindow&lt;/P&gt;&lt;P&gt; integer*4 number&lt;/P&gt;&lt;P&gt; Return&lt;/P&gt;&lt;P&gt;end&amp;#26;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2011 00:48:47 GMT</pubDate>
    <dc:creator>reneeculver</dc:creator>
    <dc:date>2011-04-06T00:48:47Z</dc:date>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770691#M22422</link>
      <description>The book arrived today!!!&lt;BR /&gt;&lt;BR /&gt;Subroutine SetupExit&lt;BR /&gt;Use kernel32&lt;BR /&gt;Integer*4 FF&lt;BR /&gt;ff=SetupConsoleCntlrHandler(CloseWindow,.true.)&lt;BR /&gt;Return&lt;BR /&gt;End&lt;BR /&gt;&lt;BR /&gt;Subroutine CloseWindow(number)&lt;BR /&gt;Integer*4 number&lt;BR /&gt;Return&lt;BR /&gt;End&lt;BR /&gt;&lt;BR /&gt;I amcallingSetupExit but FFreturns a 1 which means an error ocurred. But what's the error?&lt;BR /&gt;&lt;BR /&gt;Renee&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Apr 2011 20:27:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770691#M22422</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-05T20:27:29Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770692#M22423</link>
      <description>Renee,&lt;BR /&gt;&lt;BR /&gt;I see several things wrong:&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;LI&gt;The name of the function is SetConsoleCtrlHandler&lt;/LI&gt;&lt;LI&gt;You did not declare CloseWindow as EXTERNAL (if it is a procedure in the same module, then you don't need to do that.)&lt;/LI&gt;&lt;LI&gt;You passed .true. which is a Fortran LOGICAL value, not the C BOOL that the function expects. Use TRUE (declared in KERNEL32) instead&lt;/LI&gt;&lt;LI&gt;The documentation for this function indicates that a zero return value indicates error. You would then call GetLastError to get a more detailed error code. A value of 1 indicates success.&lt;/LI&gt;&lt;LI&gt;Any Windows callback function needs to be STDCALL. So you need to add "!DEC$ ATTRIBUTES STDCALL :: CloseWindow" to the CloseWindow routine itself and in the caller (again, this last is not needed if it is a module procedure.)&lt;/LI&gt;&lt;/OL&gt;Note that the STDCALL attribute will also turn the argument for CloseWindow to be by value, which is what you want.</description>
      <pubDate>Tue, 05 Apr 2011 21:35:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770692#M22423</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-04-05T21:35:00Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770693#M22424</link>
      <description>I know but the copy for this forum is not working today. I spelled it correctly in the code. But the hand copy was fatal.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CloseWindow is immediately below so it is in the same module.&lt;BR /&gt;&lt;BR /&gt;Let me go try the others.&lt;BR /&gt;&lt;BR /&gt;Renee&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Apr 2011 21:52:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770693#M22424</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-05T21:52:58Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770694#M22425</link>
      <description>Is it in a MODULE or just adjacent in the source file? If not inside a MODULE (with CONTAINS before all the procedures), then you need EXTERNAL.</description>
      <pubDate>Tue, 05 Apr 2011 21:54:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770694#M22425</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-04-05T21:54:07Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770695#M22426</link>
      <description>When I add the IDEC to CloseWindow its fine, as far as the compile/link is concerned and it runs.&lt;BR /&gt;&lt;BR /&gt;When I add it to SetupExit also, Irecieve the following error:&lt;BR /&gt;&lt;BR /&gt;Error 1 error #7112: This actual argument must not be the name of a procedure. [CLOSEWINDOW] D:\System Utilities\Adventure\Adventure\Adventure(intel)\Adventure\ASUBS.FOR 2458&lt;BR /&gt;&lt;BR /&gt;Renee</description>
      <pubDate>Tue, 05 Apr 2011 22:39:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770695#M22426</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-05T22:39:39Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770696#M22427</link>
      <description>You'll have to show me exactly what the source you changed says.</description>
      <pubDate>Tue, 05 Apr 2011 22:43:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770696#M22427</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-04-05T22:43:41Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770697#M22428</link>
      <description>I just recieved a Forrtl error of 200: Progran aborting due to a Window-Close event. This is the fitst time I've ever seen such an event.&lt;BR /&gt;&lt;BR /&gt;Renee</description>
      <pubDate>Tue, 05 Apr 2011 22:54:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770697#M22428</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-05T22:54:40Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770698#M22429</link>
      <description>This is what the code is now:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;Subroutine SetupExit&lt;/P&gt;&lt;P&gt;USE KERNEL32&lt;/P&gt;&lt;P&gt;integer*4 ff&lt;/P&gt;&lt;P&gt;ff=SetConsoleCtrlHandler(closewindow,TRUE)&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;subroutine CloseWindow(number)&lt;/P&gt;&lt;P&gt;!DEC$ ATTRIBUTES STDCALL :: CloseWindow&lt;/P&gt;&lt;P&gt;integer*4 number&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;end&lt;BR /&gt;&lt;BR /&gt;Where do I put the External?&lt;BR /&gt;&lt;BR /&gt;By the way....TRUE remains undefined in the call to SetConsoleCtrlHandler.&lt;BR /&gt;&lt;BR /&gt;Renee&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 22:58:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770698#M22429</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-05T22:58:56Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770699#M22430</link>
      <description>TRUE is a PARAMETER constant defined by the USE KERNEL32.&lt;BR /&gt;&lt;BR /&gt;The EXTERNAL declaration goes in SetupExit.&lt;BR /&gt;&lt;BR /&gt;The error 200 is caused by the Run-Time Library seeing an unexpected Window Close event. You might try adding this to your CloseWindow routine:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[fortran]    interface
    subroutine for_rtl_finish_ () BIND (C)
    end subroutine for_rtl_finish_
    end interface
    
    call for_rtl_finish_[/fortran]&lt;/PRE&gt; &lt;BR /&gt;After the declaration of "number". I don't know if that will help. What it does is tell the run-time library to shut down.</description>
      <pubDate>Tue, 05 Apr 2011 23:30:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770699#M22430</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-04-05T23:30:15Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770700#M22431</link>
      <description>The following compile and run:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;Subroutine SetupExit&lt;/P&gt;&lt;P&gt; USE KERNEL32&lt;/P&gt;&lt;P&gt; integer*4 ff&lt;/P&gt;&lt;P&gt; ff=SetConsoleCtrlHandler(closewindow,TRUE)&lt;/P&gt;&lt;P&gt; Return&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;subroutine CloseWindow(number)&lt;/P&gt;&lt;P&gt;!DEC$ ATTRIBUTES STDCALL :: CloseWindow&lt;/P&gt;&lt;P&gt; integer*4 number&lt;/P&gt;&lt;P&gt; Return&lt;/P&gt;&lt;P&gt;end&amp;#26;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 00:48:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770700#M22431</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-06T00:48:47Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770701#M22432</link>
      <description>&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;P&gt;With this source, I receive the following errors:&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;Subroutine&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt; SetupExit&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;USE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt; KERNEL32&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;External&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt; Closewindow&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;integer*4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt; ff&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;ff=SetConsoleCtrlHandler(closewindow,TRUE)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;Return&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;End&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;subroutine&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt; CloseWindow(number)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #008000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #008000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #008000; font-size: x-small;"&gt;&lt;P&gt;!DEC$ ATTRIBUTES STDCALL :: CloseWindow&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;integer*4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt; number&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #0000ff; font-size: x-small;"&gt;Return&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; color: #ff0000; font-size: x-small;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;&lt;SPAN style="font-family: Consolas; font-size: x-small;"&gt;end&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error 1 error #7112: This actual argument must not be the name of a procedure. [CLOSEWINDOW] D:\System Utilities\Adventure\Adventure\Adventure(intel)\Adventure\ASUBS.FOR 2458&lt;BR /&gt;&lt;BR /&gt;Error 2 error #5508: Declaration of routine 'AT' conflicts with a previous declaration D:\System Utilities\Adventure\Adventure\Adventure(intel)\Adventure\ASUBS.FOR 60&lt;BR /&gt;&lt;BR /&gt;Error 3 Compilation Aborted (code 1) D:\System Utilities\Adventure\Adventure\Adventure(intel)\Adventure\ASUBS.FOR 1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/B&gt;&lt;/B&gt;&lt;/B&gt;&lt;/B&gt;&lt;/B&gt;&lt;/B&gt;&lt;/B&gt;&lt;/B&gt;&lt;/B&gt;</description>
      <pubDate>Wed, 06 Apr 2011 01:02:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770701#M22432</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-06T01:02:37Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770702#M22433</link>
      <description>&lt;P&gt;By the way, assuming you see the interface the way it's shown, I don't see it with numbers, although I see ms code with numbers.&lt;/P&gt;&lt;P&gt;Unfortunately the book hasn't done me much good. Neither "USE" or "External" are in the index. I need a book on Keywords.&lt;/P&gt;&lt;P&gt;Renee&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 01:22:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770702#M22433</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-06T01:22:32Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770703#M22434</link>
      <description>Which book did you get?</description>
      <pubDate>Wed, 06 Apr 2011 01:48:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770703#M22434</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2011-04-06T01:48:33Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770704#M22435</link>
      <description>Could you tell us the book you are using? Perhaps you should search for the word "module".&lt;BR /&gt;&lt;BR /&gt;Pedro</description>
      <pubDate>Wed, 06 Apr 2011 01:52:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770704#M22435</guid>
      <dc:creator>psantos</dc:creator>
      <dc:date>2011-04-06T01:52:48Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770705#M22436</link>
      <description>&lt;I&gt;&amp;gt; But what's the error?&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;If you had used IMPLICIT NONE, you would have found out. &lt;BR /&gt;&lt;BR /&gt;According to the rules of Fortran, CloseWindow is an uninitialized default REAL variable in SetupExit.&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Apr 2011 02:08:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770705#M22436</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2011-04-06T02:08:57Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770706#M22437</link>
      <description>&lt;P&gt;Here you go - have a look at this.  Note your callback needs to be a function too.  This is free form source (if you copy it to a file on your computer use the .f90 extension).&lt;/P&gt;

&lt;PRE&gt;[fortran]&lt;BR /&gt;&lt;BR /&gt;! We'll put out utility routines into a module.  That helps the compiler check
! that we are calling the routines correctly (amongst numerous other benefits).
MODULE RoutinesForHandlingTheConsole
  IMPLICIT NONE     ! Avoid bugs due to typos and confusion about type.
CONTAINS
  ! Subroutine for us to call when we want to install our console event 
  ! handler.
  SUBROUTINE SetupExit
    ! Intel provide with the compiler a series of modules which already have
    ! the "interface definitions" of the commonly used Windows operating
    ! system calls (Windows API) and associated types and constants.  KERNEL32 
    ! contains the SetConsoleCtrlHandler interface (and probably a thousand 
    ! other things).  We use the ONLY clause to document where the interface for
    ! SetConsoleCtrlHandler (and the definitions of some of the other constants
    ! that we need) came from.
    USE KERNEL32, ONLY: SetConsoleCtrlHandler, BOOL, TRUE
    !---------------------------------------------------------------------------
    ! Local variables
    ! Under the windows api true and false are actually represented by a 
    ! particular kind of integer, rather than by the LOGICAL type from the
    ! fortran language.
    INTEGER(BOOL) :: ff     
    !***************************************************************************
    ! Tell the operating system what we want our handler function to be.  The
    ! TRUE value for the second argument tells the operating system that
    ! we want to Add the handler.  Documentation for SetConsoleCtrlHandler is
    ! online at:
    ! &lt;A href="http://msdn.microsoft.com/en-us/library/ms686016%28v=vs.85%29.aspx" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/ms686016%28v=vs.85%29.aspx&lt;/A&gt;
    ! (But it is written for C/C++ programmers, not Fortran programmers).
    !
    ! The LOC intrinsic function is an extension provided by ifort that 
    ! converts the address of the procedure into an integer (this is how 
    ! addresses are/were handled historically when interfacing Fortran
    ! programs with the windows API).
    ff = SetConsoleCtrlHandler(LOC(CloseWindow), TRUE) 
  END SUBROUTINE SetupExit

  ! Our handler routine.  As per the Window API documentation this needs to be a 
  ! function that returns a BOOL (C declaration - INTEGER(BOOL) in Fortran).  It
  ! must take a single DWORD (C declaration - in Fortran INTEGER(DWORD) is the
  ! equivalent) argument that describes the type of event to be handled.
  ! 
  ! A return value of FALSE means the event should be passed onto the next
  ! handler in the chain.  A return value of TRUE means that no further event
  ! handlers will be called (the event has been processed).
  !
  ! Documentation for the handler routine is online at:
  ! &lt;A href="http://msdn.microsoft.com/en-us/library/ms683242%28v=vs.85%29.aspx" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/ms683242%28v=vs.85%29.aspx&lt;/A&gt;
  !
  ! Documentation is also available from within Visual Studio (press F1!).
  FUNCTION CloseWindow(number)
    ! As per the USE statement comment above.
    USE KERNEL32, ONLY: BOOL, DWORD, TRUE, FALSE
    ! Function result type
    INTEGER(BOOL) :: CloseWindow    
    ! We need the calling convention of CloseWindow to match what the 
    ! windows operating system expects - that's STDCALL (on 32 bit windows).
    !DEC$ ATTRIBUTES STDCALL :: CloseWindow 
    ! Our argument type.  Because this routine is STDCALL, and this is a scalar,
    ! this argument will be passed by value (which is what we want per the docs).
    INTEGER(DWORD), INTENT(IN) :: number  
    !****
    ! Meaning of number based on the online documentation.
    SELECT CASE (number)
    CASE (0)    ! Ctrl c
      PRINT "('Oi!!  Stop pressing Ctrl-C!')"
      CloseWindow = TRUE
    CASE (1)    ! Ctrl break
      PRINT "('Ouch!!  That Ctrl-Break hurt!')"
      CloseWindow = TRUE
    CASE (2)    ! Console Window close
      PRINT "('Wait a tick - I don''t want to go away!')"
      CloseWindow = TRUE
    CASE DEFAULT ! 5 for log off, 6 for shutdown - 
      ! We'll indicate that we want the next handler (which should be the
      ! fortran runtime) to deal with this, because the user is being
      ! pretty serious about leaving!
      PRINT "('Bye bye!!')"
      CloseWindow = FALSE
    END SELECT
  END FUNCTION CloseWindow
END MODULE RoutinesForHandlingTheConsole

PROGRAM RENEE_1
  ! Make available our utility procedures.
  USE RoutinesForHandlingTheConsole
  ! For testing we'll run a little loop to take up some time.  Each loop
  ! iteration we'll sleep - intel provide a "Sleep" function to let us
  ! do that (we could also go directly to sleep routines in the Windows
  ! API).
  USE IFPORT, ONLY: SLEEPQQ
  IMPLICIT NONE
  INTEGER :: i    ! Loop counter
  !*****************************************************************************
  ! Install our console handler
  CALL SetupExit  
  PRINT "('Go ahead - make my day (try Ctrl-C/Ctrl-Break/Close my window!')"
  DO i = 1, 20          
    PRINT "(I0)", i
    CALL SLEEPQQ(500)   ! Sleep for half a second
  END DO
END PROGRAM RENEE_1[/fortran]&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Apr 2011 02:41:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770706#M22437</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2011-04-06T02:41:21Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770707#M22438</link>
      <description>I got the Compaq VF book...of course it doesn't have &lt;STRONG&gt;module&lt;/STRONG&gt; in the index either.&lt;BR /&gt;&lt;BR /&gt;I cant use Implicit none because I am working on the oldest game written on computers and it already has Implicits declared.&lt;BR /&gt;&lt;BR /&gt;But the real help's alot. The error messsages have not changed and my code is:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;Subroutine SetupExit&lt;/P&gt;&lt;P&gt;USE KERNEL32&lt;/P&gt;&lt;P&gt;External Closewindow1&lt;/P&gt;&lt;P&gt;Real ff&lt;/P&gt;&lt;P&gt;ff=SetConsoleCtrlHandler(closewindow1,TRUE)&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;subroutine CloseWindow1(number)&lt;/P&gt;&lt;P&gt;!DEC$ ATTRIBUTES STDCALL :: CloseWindow&lt;/P&gt;&lt;P&gt;integer*4 number&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;end&amp;#26;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Renee</description>
      <pubDate>Wed, 06 Apr 2011 02:57:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770707#M22438</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-06T02:57:39Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770708#M22439</link>
      <description>It was the Loc.&lt;BR /&gt;&lt;BR /&gt;I've never heard of a LOC...it has not been mentioned and it's not in the index either.&lt;BR /&gt;&lt;BR /&gt;Renee</description>
      <pubDate>Wed, 06 Apr 2011 03:03:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770708#M22439</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-06T03:03:54Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770709#M22440</link>
      <description>&lt;P&gt;Function CloseWindow1(number)&lt;/P&gt;&lt;P&gt;!DEC$ ATTRIBUTES STDCALL :: CloseWindow&lt;/P&gt;&lt;P&gt;integer*4 number&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;end&amp;#26;&lt;BR /&gt;&lt;BR /&gt;Ok, it compiles and runs. and closewindow1 fires on windows closings (and no telling what else). But within the routine number comes in during window closings which I get now, as as &lt;STRONG&gt;undefined address&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Renee&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 03:16:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770709#M22440</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-06T03:16:18Z</dc:date>
    </item>
    <item>
      <title>Error?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770710#M22441</link>
      <description>&lt;P&gt;Subroutine SetupExit&lt;/P&gt;&lt;P&gt;USE KERNEL32&lt;/P&gt;&lt;P&gt;External Closewindow1&lt;/P&gt;&lt;P&gt;Real ff&lt;/P&gt;&lt;P&gt;ff=SetConsoleCtrlHandler(loc(closewindow1),TRUE)&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Function CloseWindow1(number)&lt;/P&gt;&lt;P&gt;!DEC$ ATTRIBUTES STDCALL :: CloseWindow&lt;/P&gt;&lt;P&gt;integer*4 number&lt;/P&gt;&lt;P&gt;stop&lt;/P&gt;&lt;P&gt;Return&lt;/P&gt;&lt;P&gt;end&lt;BR /&gt;&lt;BR /&gt;So far, it works like this with no stack dumps.&lt;BR /&gt;&lt;BR /&gt;I"d like to thank Steve and especiallly Ian. Thank you.&lt;BR /&gt;&lt;BR /&gt;I still dont know why number was undefined at run time.&lt;BR /&gt;&lt;BR /&gt;Renee&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2011 03:26:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error/m-p/770710#M22441</guid>
      <dc:creator>reneeculver</dc:creator>
      <dc:date>2011-04-06T03:26:51Z</dc:date>
    </item>
  </channel>
</rss>

