tcak via Digitalmars-d-learn
2014-10-18 23:51:51 UTC
enum Values: string{
NONE = "",
Value1 = "Apple",
Value2 = "Peach",
Value3 = "Lemon"
}
Values lastHeldValue = Value3;
Is the "lastHeldValue" just "pointer + length" information, and it
points to "Lemon"; or is "Lemon" copied to another place in
memory?
I am doing comparison as "if( lastHeldValue == Value3 )" and am
not
sure what comparison operation it is doing in the background.
NONE = "",
Value1 = "Apple",
Value2 = "Peach",
Value3 = "Lemon"
}
Values lastHeldValue = Value3;
Is the "lastHeldValue" just "pointer + length" information, and it
points to "Lemon"; or is "Lemon" copied to another place in
memory?
I am doing comparison as "if( lastHeldValue == Value3 )" and am
not
sure what comparison operation it is doing in the background.