home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,487 of 10,432   
   Rosario19 to All   
   Re: [Axiom] Bug in Axiom?   
   25 Jun 17 17:22:07   
   
   From: Ros@invalid.invalid   
      
   On Sun, 25 Jun 2017 16:27:37 +0200, Rosario19 wrote:   
      
   >On Sun, 25 Jun 2017 05:35:38 -0700 (PDT), oldk wrote:   
   >   
   >>Not a bug.  In your code,  "c:=c1:=[0,0]" means that 'c' and 'c1'   
   >>points to *the same* list [0,0].  Which means the assignment   
   >>to 'c' also affects 'c1'.   
   >>   
   >>You should use "c:=[0,0];c1:=[0,0]" or "c :=[0,0]; c1 := copy c"   
   >   
   >ok thank you   
   >   
   >so there is a difference in c:=c1:=a   
   >in dipendence of the type   
   >   
   >for List type they would follow in multiple assigament as C++   
   >reference to obj   
   >   
   >for basic type as INT Float etc they would follow assignament to obj   
   >   
   >because if a,c,c1 are floats or INT i remember   
   >not have any problem in this   
      
   so if i have this   
      
   f(a:List INT):List INT==(a.1:=a.1+1;a)   
      
   in   
   a:List INT:=[0,0]   
      
   b:=f(a)   
      
   b assume the same reference of a [so if i change a it change b] or it   
   is one other obj?   
      
   or possible if i want a new obj and not a already used object   
   it is better?   
      
   b:= copy( f(a) )   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca