Ruby/Statement/loop
Материал из Wiki.crossplatform.ru
Версия от 18:00, 13 сентября 2010; ViGOur (Обсуждение | вклад)
The loop Method
# The loop method comes from Kernel. # It lets you run a loop continuously like running for(;;) until you or the program does something to break out of the loop. loop do print "Type something: " line = gets break if line =~ /q|Q/ puts line end