Charlie Ca wrote: > Hello World, > I am new to programming and am writing a program in ruby that serves as > a tutorial for absolute beginners. It's heavily reliant on if & else. I > was wondering if there is a method for exiting a program. Here is the > Context; > > puts ' If you would like to begin, press enter.' > confirm1 = gets.chomp > if confirm1 == '' > puts 'OK, Lets begin!' > else > puts 'Try pressing enter this time.' > gets.chomp > if gets.chomp == '' > puts 'Press enter twice' > else > puts 'Next time press enter ;( ' > end > end > puts ' If you are reading this you have already downloaded' > puts ' the interactive ruby console with the' #... > > > When they don't press enter the 2nd time, I would like to exit the > program. Thanks, Charlie If you need to ask the mailing list a question like this, then you are not ready to be writing Ruby tutorials. Sorry, but that's the way it is. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen / marnen.org -- Posted via http://www.ruby-forum.com/.