Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: howto compare references
PostPosted: Thu Sep 26, 2013 6:57 pm 
Hello,

is there a method to check if
two Singular references belongs to the same name/object?


Jack

example:
Code:

system("reference");
ring rng =0,(x),dp;

reference ref1 = rng;
reference ref2 = rng;

// how to check if ref1 and ref2 a tied to same name/object?


Report this post
Top
  
Reply with quote  
 Post subject: Re: howto compare references
PostPosted: Thu Jun 12, 2014 12:38 am 

Joined: Tue Jun 23, 2009 10:33 pm
Posts: 51
Location: Kaiserslautern
how about the "same" method?

Code:
> system(ref1, "help");
system(<ref>, ...): extended functionality for reference/shared data <ref>
  system(<ref>, count)         - number of references pointing to <ref>
  system(<ref>, enumerate)     - unique number for identifying <ref>
  system(<ref>, undefined)     - checks whether <ref> had been assigned
  system(<ref>, "help")        - prints this information message
  system(<ref>, "typeof")      - actual type referenced by <ref>
  system(<ref1>, same, <ref2>) - tests for identic reference objects
> system(ref1, "same", ref2);
0
>reference ref3 = ref1;
> system(ref1, "same", ref3);
1


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: howto compare references
PostPosted: Thu Jun 12, 2014 3:20 pm 
malex wrote:
how about the "same" method?

ok, same checks if the reference objects are identic,
but then how to test if two references ref1 and ref2 are tied to the >same object<?
Code:
system("reference");
ring rng =0,(x),dp;

reference ref1 = rng;
reference ref2 = rng;
system(ref1,"same",ref2); //0


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