Back to Forum | View unanswered posts | View active topics
Topic review - Exit Status (Exit Code) |
Author |
Message |
|
|
Post subject: |
Re: exit code |
|
|
Sorry, you cannot set the exit code from within Singular. In general: non-zero is some kind of crash (out of memroy etc.).
Hans Schoenemann
Sorry, you cannot set the exit code from within Singular. In general: non-zero is some kind of crash (out of memroy etc.).
Hans Schoenemann
|
|
|
|
Posted: Tue Oct 24, 2006 8:36 pm |
|
|
|
|
|
Post subject: |
Exit Status (Exit Code) |
|
|
Is it possible to set the exit status of Singular process to be the return value of certain procedure. e.g // File code.sing proc abc() { return(123); }
abc(); // EOF code.sing
$ > Singular < code.sing 123 > $ > echo $? 0
I want to set 123 as an answer to this!! How do I set this? I have tried giving return_value of the proc to exit, but it didnt work. proc abc() { return(123); } int ret = abc(); exit(ret);
I hope I have made myself clear enough. Thanks,
VInay
Is it possible to set the exit status of Singular process to be the return value of certain procedure. e.g // File code.sing proc abc() { return(123); }
abc(); // EOF code.sing
$ > Singular < code.sing 123 > $ > echo $? 0
I want to set 123 as an answer to this!! How do I set this? I have tried giving return_value of the proc to exit, but it didnt work. proc abc() { return(123); } int ret = abc(); exit(ret);
I hope I have made myself clear enough. Thanks,
VInay
|
|
|
|
Posted: Wed Oct 04, 2006 1:00 pm |
|
|
|
|
|
It is currently Fri May 13, 2022 11:03 am
|
|