Created
December 25, 2011 16:54
-
-
Save ainame/1519491 to your computer and use it in GitHub Desktop.
do〜while in ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # C言語では こんな感じなのが | |
| # | |
| # int flag = 0 | |
| # do{ | |
| # flag = hoge ? 1 : 0; | |
| # } while (flag); | |
| # | |
| # Rubyでは | |
| flag = false | |
| begin | |
| flag = hoge ? true : false | |
| end while flag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment