From: Bill Atkins Date: 2005-08-12T23:22:12+09:00 Subject: Re: Another newbie question STDOUT.sync = true isn't necessary in that snippet. Even though you haven't output a newline, the outbuffer will get flushed as soon as you call gets. Bill On 8/12/05, daz wrote: > > len wrote: > > > > How do I request input from the user such as: > > > > >>Please enter dollar amount: > > > > I would like the prompt to display and the user to be able to enter the > > data after the prompt. I thought "gets" would do it but I don't > > understand how to get the prompt to display. > > > > > STDOUT.sync=true > print '>> Please enter amount: $' > resp = STDIN.gets.chomp > puts resp # echo input > puts "\nYour acount balance is below $" << resp << " :-?" > > #-> Please enter amount: $12 > #-> > #-> Your acount balance is below $12 :-? > > > daz > > > > > -- Bill Atkins