How to terminate STDIN input in Windows?

R

Robo

I've got a piece of code like this to get multi line input from STDIN:

while (s = gets()) != nil
#whip s till it bleeds
end

When I run it, I'm able to get each line of input I type in, but I can't
figure out how to terminate the input e.g. "OK, I've given you all the
inputs, exit the loop"

In Linux, I think it was done by pressing ^D at the end, but that
doesn't do anything in Windows. Any ideas?

Robo
 
R

Robo

Robo said:
I've got a piece of code like this to get multi line input from STDIN:

while (s = gets()) != nil
#whip s till it bleeds
end

When I run it, I'm able to get each line of input I type in, but I can't
figure out how to terminate the input e.g. "OK, I've given you all the
inputs, exit the loop"

In Linux, I think it was done by pressing ^D at the end, but that
doesn't do anything in Windows. Any ideas?

Robo

Just found out by trying out random combinations, think I got it to work
by pressing ^Z, then [Enter] and the end.

Robo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top