链接已复制
7 回复数
You get this message when your code hits a STOP statement. If you
want a different code you can say, for example: STOP 2000, and then
the message will be '...exited with code 2000'. You can, as an alternative,
use text: STOP 'your message goes here'.
want a different code you can say, for example: STOP 2000, and then
the message will be '...exited with code 2000'. You can, as an alternative,
use text: STOP 'your message goes here'.
To Steve L.: Maybe we are not talking about the same thing, but from the
form of the message he is getting it sounds like what happens in
windows when it hits a stop statement. From the on-line docs:
STOP
Statement: Terminates program execution before the end of the program unit.
Syntax
STOP [stop-code]
stop-code
(Optional) A message. It can be either of the following:
A scalar character constant of type default character.
A string of up to six digits; leading zeros are ignored. (Fortran 95/90 and FORTRAN 77 limit digits to five.)
Effect on Windows Systems
If you specify stop-code, the effect differs depending on its form, as follows:
If stop-code is specified as a character constant, the STOP statement writes the specified message to the standard error device and terminates program execution. The program returns a status of zero to the operating system.
If stop-code is specified as a string of digits, the STOP statement writes the following to the standard error device and terminates program execution:
Return code stop-code
In QuickWin programs, the following is displayed in a message box:
Program terminated with Exit Code stop-code
In both cases, the program returns a status of stop-code to the operating system as an integer.
form of the message he is getting it sounds like what happens in
windows when it hits a stop statement. From the on-line docs:
STOP
Statement: Terminates program execution before the end of the program unit.
Syntax
STOP [stop-code]
stop-code
(Optional) A message. It can be either of the following:
A scalar character constant of type default character.
A string of up to six digits; leading zeros are ignored. (Fortran 95/90 and FORTRAN 77 limit digits to five.)
Effect on Windows Systems
If you specify stop-code, the effect differs depending on its form, as follows:
If stop-code is specified as a character constant, the STOP statement writes the specified message to the standard error device and terminates program execution. The program returns a status of zero to the operating system.
If stop-code is specified as a string of digits, the STOP statement writes the following to the standard error device and terminates program execution:
Return code stop-code
In QuickWin programs, the following is displayed in a message box:
Program terminated with Exit Code stop-code
In both cases, the program returns a status of stop-code to the operating system as an integer.
Ah, I had forgotten that STOP nnnnn would turn that into an exit status.
I have noticed that QuickWin programs tend to have their threads exit with a status of -1, and the main program zero. If the exit status is greater than zero, that's the time to wonder what else happened.
Steve
I have noticed that QuickWin programs tend to have their threads exit with a status of -1, and the main program zero. If the exit status is greater than zero, that's the time to wonder what else happened.
Steve