Community
Participate
Working Groups
Debug the program below. After the plus statement, "Meredith" has been added to newList and myNames. Should only be newList. program plusProb type BasicProgram {} myNames string[] =["Carolina", "State", "Duke"]; element string = "Meredith"; newList string[]; function main() newList = myNames + element; end end /** * {@Operation +} Creates a new list consisting of the first operand's elements * followed by the second operand. The assigning form of the operator (+=) does * not create a new list: the appendElement function is used to add the second * operand to the end of the first operand. */ static function $Plus(lvalue EList in, rvalue EAny in) returns (EList) {@Operation{"+"}};
fixed
Verified in 20111103 build.