
September 30th, 2010, 07:09 PM
|
|
Registered User
|
|
Join Date: Sep 2010
Posts: 1
Time spent in forums: 1 h 30 m 49 sec
Reputation Power: 0
|
|
Hello everyone! + tiny question with case statement
Hi everyone,
I join this community in the spirit that hopefully I can help (at least where I can) and learn. I feel a bit like a noob not knowing the actual formalities when joining a forum such as this but basically I started learning ruby this semester and I have found it strangely addictive.
Oh, with the tiny question...
I have a script that is basically as such:
#used to readjust dates when months are days are added to it
def function(x,y,z)
valid = false
until var == true
case z
when 1
#do something
when 2
#do something
else
var = true
end
end
The point I am really trying to get across is:
when the 'when' is satisfied, does it go to the next 'when' then 'else'
If it is appropriate I can post the code... it isn't excessive in length.
Any thoughts or input would be appreciated.
[edit] Apologies all, just my logic playing tricks on me
Last edited by andrewbriscoe87 : September 30th, 2010 at 07:45 PM.
Reason: solved the tiny question
|