mob
var
A = 1
B = 2
verb
SwitchTest()
switch(TestProc())
if(0)
world<<"Zero"
else
world<<"The result is... [?]"
//How do I make this pass the result of TestProc without calling TestProc again?
proc
TestProc()
return A + B
Problem description:
Basically as above - If a switch is taking the return from a procedure, how can I pass that evaluated expression on to the "if" statements?
(My workaround is just to set var/Temp = TestProc(), then evaluate Temp in the switch)
or you could do