Hi guys, I have a simple question. I tried recently to fix a small graphic bug with my command line program I am coding. After I ask a question to the user, the program is waiting for a yes or no from it. It just need to type y | yes | n | no basically.
But how can I avoid gets to make a new line return ? I tried to enable the chomp, but change nothing
Infortunately no. When I press enter, the program continue to make new line.
This is my code portion:
def getUserAgreement : Bool
userInput = ""
userAgreement = false
userInput = gets
if userInput == ISM::Default::CommandLine::YesReplyOption
if userInput == ISM::Default::CommandLine::NoReplyOption