The current implementation of the "exit" command in OpenSees depreciates the standard Tcl "exit" command (http://www.tcl.tk/man/tcl/TclCmd/exit.htm) in that it does not allow the option for a return code.
The following code in OpenSeesExit within command.cpp should do the trick:
At the beginning:
int returnCode = 0;
if (argc > 1) {
if (Tcl_GetInt(interp, argv[1], &returnCode) != TCL_OK) {
opserr << "WARNING OpenSeesExit -- could not read returnCode \n";
return TCL_ERROR;
}
}
At the end:
Tcl_Exit(returnCode);
Thanks,
Mark
Return Code in Exit Command
Moderators: silvia, selimgunay, Moderators
Re: Return Code in Exit Command
good idea .. i have added the change to the repository
新建 文本文档 (19)
This is exactly what I have been looking for!thanks for sharing