![]() |
How to stop command prompt from closing after running a program!
Hi I'm learning ruby, I just started and when I save and run a .rb file, it opens up in cmd, it does what it's supposed to do but then shuts down immediately after getting the results of the thing it's supposed to do.
It's really really nooby/beginner but I just started learning, Code:
puts 10+20Example - You can enter Code:
pauseIf you can help me it would be very greatly appreciated seeing as I can't really move on and it's frustrating me. Thanks, Sam. :) |
I use
Code:
gets # halts console for inputCode:
sleep(5) # pause for 5 seconds |
| All times are GMT +1. The time now is 02:10 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.