Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Pointers
PostPosted: Thu Jul 22, 2010 9:14 pm 
Is it possible to pass values by reference or pointers in Singular?


Report this post
Top
  
Reply with quote  
 Post subject: Re: Pointers
PostPosted: Sat Jul 31, 2010 3:20 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
You may try a new, experimental feature (3-1-1-3 and later):
prepend the type of the parameter by "alias" and the variable will be passed by reference (currently read-only: we still have to discussed about that).
Example:
proc (alias int i)
{
.....
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Pointers
PostPosted: Mon Apr 22, 2013 2:35 pm 
Hello,

It seems that Singular provides an experimental reference type.
( Manual/latest/sing_250.htm#SEC290 )
What are the potential issues?
Is it still experimental?


As soon as it gets stable, there will be hopefullly no excuse any more for
monsters like 'normalizationPrimes(..)' (900 lines of code)
or for dublicate code.


Jakob


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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 11:06 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group