From: gwtmp01@... Date: 2007-01-23T13:45:26+09:00 Subject: Re: If-Then and "End" On Jan 22, 2007, at 11:32 PM, Sam C. wrote: > I am making a program with various commands. One of them is "Exit" > which > is supposed to exit the program. Here is my code: > > if uinput = "EXIT" then > end > end > > The problem is that the ruby compiler thinks that the first "end" > is the > end to the If-Then statement, instead of the "end" that ends the > program. How do I work around this? I think you are looking for 'exit' as the method to call to terminate a program. Also you aren't doing a comparison in your if condition, you are doing an assignment. So you want something like: if uinput == "EXIT" then exit else # do something else end Gary Wright