- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following program is adopted from Intel Fortran Libraries Reference, Ch. 2, SetExitQQ, around p. 2-400.
program testSetExitQQ
use IFQWin
integer(4) modeEx, iRslt
do
print *, 'Enter exit mode 1, 2, or 3 '
read (*,*) modeEx
select case(modeEx)
case(1)
iRslt = setExitQQ(QWin$exitPrompt)
case(2)
iRslt = setExitQQ(QWin$exitNoPersist)
case(3)
iRslt = setExitQQ(QWin$exitPersist)
end select
end do
end program testSetExitQQ
No matter what number I input, the program keeps on running. Isnt it supposed to display a message box when the user enters 1? Isnt the program supposed to stop when the user enters 2?
Wen
program testSetExitQQ
use IFQWin
integer(4) modeEx, iRslt
do
print *, 'Enter exit mode 1, 2, or 3 '
read (*,*) modeEx
select case(modeEx)
case(1)
iRslt = setExitQQ(QWin$exitPrompt)
case(2)
iRslt = setExitQQ(QWin$exitNoPersist)
case(3)
iRslt = setExitQQ(QWin$exitPersist)
end select
end do
end program testSetExitQQ
No matter what number I input, the program keeps on running. Isnt it supposed to display a message box when the user enters 1? Isnt the program supposed to stop when the user enters 2?
Wen
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No. If you'll read the description again, SETEXITQQ changes what happens when the program exits - it does not itself cause the program to exit. The default is ExitPrompt. Most people like to use ExitNoPersist so that the window just goes away.
You call SETEXITQQ just once (typically at the start of the program). If you want the program to stop, either get to the END statement or use the STOP statement.
You call SETEXITQQ just once (typically at the start of the program). If you want the program to stop, either get to the END statement or use the STOP statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Steve.
Wen
Wen
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page