|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Program ends to quickly
Just for an example:
#!/usr/bin/ruby print "Hello World\n" It makes a black window appear, the words "Hello World" Pop up and the screen disappears almost to quickly to see it. How do I make it stay up until I tell it to end (i.e. Hit the enter key to close?) I appreciate any help I can get. |
|
#2
|
|||
|
|||
|
What you wrote is a console program, so you ideally you should open a command line and run it from there. Get used to doing so, as many of the programs and tools you will use will be command line programs.
But if you want to create a kludge and keep the window open, ask for user input. Doing something like kludge = gets at the end of the program will do the trick. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Ruby Programming > Program ends to quickly |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|