| Summary: | Plus operation adds to source and target arrays | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | broy2 |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeffdouglas |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
fixed Verified in 20111103 build. |
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{"+"}};