Can someone tell me why--after i create a cube--it display 'enter test operation' twice?
[ November 17, 2008: Message edited by: Bear Bibeault ]
Originally posted by Ulf Dittmer:
That's in a loop, so I'd assume that the loop is executed repeatedly. Check whether the loop termination condition works as you expect it to.
By the way, I'm almost positive that the getValue method does not work as you expect it to work. You may want to read about the "switch" statement, and what happens once one of the cases is matched.
Lastly, in the future UseAMeaningfulSubjectLine that states what the problem is.
[ November 17, 2008: Message edited by: Ulf Dittmer ]
Originally posted by Ulf Dittmer:
No, chars work fine in switch statements. Ask yourself this: Suppose getFace() returns 't', causing "val = 1;" to be executed. Now, what is the next statement that gets executed? And consequently, which value of "val" will be returned from the method?