Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Exit Status (Exit Code)
PostPosted: Wed Oct 04, 2006 1:00 pm 

Joined: Sat Oct 01, 2005 11:40 am
Posts: 40
Location: IIT Guwahati, Guwahati, Assam, INDIA
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: exit code
PostPosted: Tue Oct 24, 2006 8:36 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

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