Question: how to copy content of one Record to another, without both variable becoming one

I am still buffled by a Record in Maple.

I simply want to make one variable be a Record. Then make separate variable, by making a COPY of the content of the first variable, then change the second variable. Sounds easy, right?

When I do this, I find that the changes in the second variable are being made also to the first variable.

I used eval() to make a copy of all field of first variable to the second.  May be this is not the correct way, but do not know how else (other by explicit copying one field one at a time).

I looked at help, and see nothing there. It talks about making the Record packed. I tried that, but it is still not working. Not a single example in help of how to copy the "content" of one record to another.

I simply want to make a new instance of the first variable, a copy. and change the second instance without the first changing at same time. Why is this so hard in Maple?

restart;
c:=Record('a','b'):
c:-a:=0:
c:-b:=-1:

c1:=eval(c): #make a copy of c??
print("c1=",eval(c1)); #yes, made a copy

c1:-b:=99:  #change one field  in the second variable

print("c1=",eval(c1));
print("c=",eval(c)); #why did c change?

I tried using Record[packed]('a' , 'b'): since help says something about same Record sharing same memory but that make no difference.

How to make a copy of a record to another in Maple without them being the same? I know I could do this

restart;
c:=Record('a','b'):
c:-a:=0:
c:-b:=-1:

c1:=Record('a','b'):
c1:-a:=c:-a;
c1:-b:=c:-b;

c1:-b:=99:  #change one field  in the second variable

print("c1=",eval(c1));
print("c=",eval(c)); #Now it did not change.

But my actual record has many fields. and I do not want to do the above each time.

Please Wait...