From: "Kontra, Gergely" Date: 2002-07-09T23:19:05+09:00 Subject: Re: for ... else ... end For the keyword war: (silly, dummy example) cnt=0 for i in anArray do break if i<0 res=19*i+4-i puts res cnt+=res else puts "Empty array" on_exit puts "The result is #{cnt}" on_break # or on_abort # ok, I admit it is like an exception... puts "Invalid negative element found in the array!" end So, in any kind of loop: else : code block is not executed on_exit : code block is executed, and terminated normally on_break / on_abort : code block executed and exited via 'break' These modifiers are in connection with the whole loop, not one iteration, so perhaps another arrangement will be better. Gergo +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ | Email: kgergely@mcl.hu, kgergely@turul.eet.bme.hu | | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 | +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+ . Magyar php mirror es magyar php dokumentacio: http://hu.php.net