Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#502 closed bug (wontfix)

setting attrubute of a ring in a procedure by passing ordinary copy fails

Reported by: kroeker@… Owned by: somebody
Priority: minor Milestone: 3-1-6 and higher
Component: dontKnow Version: 3-1-6
Keywords: Cc:

Description

Minimal example:

system("reference");

proc setAttrib( rng, attrubuteName, attributeVal) {

attrib( rng, attrubuteName, attributeVal);

}

proc setAttribOfRef( pRngRef, attrubuteName, attributeVal) {

attrib( pRngRef ,attrubuteName, attributeVal);

}

proc minimalExample() {

string attributeName = "name"; string attributeVal = "it works!"; ring parentRing = integer,(x,y,z),dp;

setAttrib( parentRing, attributeName, attributeVal );

if ( attrib( parentRing, attributeName )<> attributeVal ) {

print("setting attrubute by passing ordinary copy failed");

} else {

print("setting attrubute by passing ordinary copy succeeded");

}

reference rngRef = parentRing; setAttribOfRef( rngRef,attributeName,attributeVal);

if ( attrib( parentRing, attributeName )<> attributeVal ) {

print("setting attrubute by passing reference failed");

} else {

print("setting attrubute by passing reference succeeded !");

}

}

minimalExample();

Change History (1)

comment:1 Changed 11 years ago by boehm

Resolution: wontfix
Status: newclosed

Attributes belong to names. Objects own a fixed number of attributes, new attributes are assigned to the name and not to the object.

Last edited 11 years ago by boehm (previous) (diff)
Note: See TracTickets for help on using tickets.