Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Exit Status (Exit Code)
Author Message
  Post subject:  Re: exit code  Reply with quote
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
Post Posted: Tue Oct 24, 2006 8:36 pm
  Post subject:  Exit Status (Exit Code)  Reply with quote
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
Post Posted: Wed Oct 04, 2006 1:00 pm


It is currently Fri May 13, 2022 11:03 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group