loops
hey,
can anyone tell me if i can do an elseif kind of loop...
effectively
if p is 27 then stay at 27
else if p is not 27 then do function...
thanks
t
|
breve: a 3d Simulation Environment for Multi-Agent Simulations and Artificial Life |
|
NavigationUser loginActive forum topicsSearch |
loopshey, can anyone tell me if i can do an elseif kind of loop... effectively if p is 27 then stay at 27 thanks |
Re: loops
thom wrote:if p is 27 then stay at 27
else if p is not 27 then do function
sure you just need to use
shark[/code]
loops
sorry,
that was a pooor example that i made up...
i think i do need an else if kind of statement for this...
thanks
t
loops
can you just not use this. don't understand why the else is needed at all?
shark
loops
ok i think you have a point there shark...
but does anyone know if i can do else if statements? jk, i guess you'll know!
thanks
t
loops
if |a| == 0: a = 0. else if |a| > b: a = b * a/|a|.If you want more than one line:
if |a| == 0: { a = 0. other stuff } else if |a| > b: { a = b * a/|a|. more stuff }loops
thanks PowerMacX, you know wehn you have those days... it all seems so stupidly obvious today.
t