| View previous topic :: View next topic |
| Author |
Message |
LarryJ Guest
|
Posted: Sun Feb 05, 2006 9:00 pm Post subject: Off Topic DOS question |
|
|
I have an old DOS program that calculates the position of a planet for a
given date. When I run the program on a computer with a modern OS such as
WindowsXP Home the program makes all the calculations and then automatically
exits so I can never see the results. Does anyone know how I can make the
program pause before exiting?
Thanks
Larry Johnson. |
|
| Back to top |
|
 |
Anders Ohlsson (Borland) Guest
|
Posted: Sun Feb 05, 2006 9:00 pm Post subject: Re: Off Topic DOS question |
|
|
| Quote: | I have an old DOS program that calculates the position of a planet for a
given date. When I run the program on a computer with a modern OS such as
WindowsXP Home the program makes all the calculations and then automatically
exits so I can never see the results. Does anyone know how I can make the
program pause before exiting?
|
Just run it from the command line, instead of double clicking on it.
--
Anders Ohlsson - http://blogs.borland.com/ao/
http://homepages.borland.com/aohlsson/blog_beta/#disclaimer |
|
| Back to top |
|
 |
Rudy Velthuis [TeamB] Guest
|
Posted: Sun Feb 05, 2006 9:00 pm Post subject: Re: Off Topic DOS question |
|
|
At 21:27:25, 05.02.2006, Duane Hebert wrote:
| Quote: | Just run it from the command line, instead of double clicking on it.
Or put a getch() (from conio.h) in the last line of the main()
function.
Or put system("pause").
|
Hmmm...
FWIW, and more a reply to Anders' message: there are a few utilities I
love. One of them is "Open Command Line Here" from the Microsoft
PowerToys for XP. It appears in the context menu of every directory, and
opens a command line with that directory as the current one.
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
--
Rudy Velthuis [TeamB] http://rvelthuis.de/
"I find that the harder I work, the more luck I seem to have."
- Thomas Jefferson (1743-1826) |
|
| Back to top |
|
 |
Duane Hebert Guest
|
Posted: Sun Feb 05, 2006 9:00 pm Post subject: Re: Off Topic DOS question |
|
|
"Rudy Velthuis [TeamB]" <velthuis (AT) gmail (DOT) com> wrote in message
news:xn0ei4qrtm44rsq01b-velthuis (AT) www (DOT) teamb.com...
| Quote: | At 21:14:24, 05.02.2006, Anders Ohlsson (Borland) wrote:
I have an old DOS program that calculates the position of a planet
for a given date. When I run the program on a computer with a modern
OS such as WindowsXP Home the program makes all the calculations and
then automatically exits so I can never see the results. Does anyone
know how I can make the program pause before exiting?
Just run it from the command line, instead of double clicking on it.
Or put a getch() (from conio.h) in the last line of the main() function.
|
Or put system("pause"). |
|
| Back to top |
|
 |
Rudy Velthuis [TeamB] Guest
|
Posted: Sun Feb 05, 2006 9:00 pm Post subject: Re: Off Topic DOS question |
|
|
At 21:14:24, 05.02.2006, Anders Ohlsson (Borland) wrote:
| Quote: |
I have an old DOS program that calculates the position of a planet
for a given date. When I run the program on a computer with a modern
OS such as WindowsXP Home the program makes all the calculations and
then automatically exits so I can never see the results. Does anyone
know how I can make the program pause before exiting?
Just run it from the command line, instead of double clicking on it.
|
Or put a getch() (from conio.h) in the last line of the main() function.
--
Rudy Velthuis [TeamB] http://rvelthuis.de/
"Testing proves the presence, not the absence, of bugs."
-- Edsger Dijkstra |
|
| Back to top |
|
 |
Ed Mulroy Guest
|
Posted: Sun Feb 05, 2006 11:01 pm Post subject: Re: Off Topic DOS question |
|
|
------------------------
int main(...
...
printf("Press Enter ..."); /* Added */
getchar(); /* Added */
return 0;
}
------------------------
.. Ed
| Quote: | LarryJ wrote in message
news:43e65b2d$1 (AT) newsgroups (DOT) borland.com...
I have an old DOS program that calculates the position of a planet for a
given date. When I run the program on a computer with a modern OS such as
WindowsXP Home the program makes all the calculations and then
automatically exits so I can never see the results. Does anyone know how I
can make the program pause before exiting? |
|
|
| Back to top |
|
 |
Alisdair Meredith[TeamB] Guest
|
Posted: Sun Feb 05, 2006 11:01 pm Post subject: Re: Off Topic DOS question |
|
|
LarryJ wrote:
| Quote: | I have an old DOS program that calculates the position of a planet
for a given date. When I run the program on a computer with a modern
OS such as WindowsXP Home the program makes all the calculations and
then automatically exits so I can never see the results. Does anyone
know how I can make the program pause before exiting?
|
I see the problem all the time when running test cases - console apps
just don't hang around!
The traditional answer is to add some code to demand a user input
before quitting.
Personally, I just put a break-point on the closing brace of main() and
run through the debugger.
CBuilderX used to display the output from console apps in the Message
window of the IDE, and it would be a REALLY nice feature to have in
BDS...
--
AlisdairM(TeamB) |
|
| Back to top |
|
 |
roman modic Guest
|
Posted: Mon Feb 06, 2006 12:01 am Post subject: Re: Off Topic DOS question |
|
|
Hello!
"LarryJ" <LarryJ33 (AT) ev1 (DOT) net> wrote in message news:43e65b2d$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I have an old DOS program that calculates the position of a planet for a given date. When I run the program on a computer with a
modern OS such as WindowsXP Home the program makes all the calculations and then automatically exits so I can never see the
results. Does anyone know how I can make the program pause before exiting?
|
Right-click on program icon, select "Properties", click on tab named "Program"
and remove the tick from "Close on exit"
Servus, Roman |
|
| Back to top |
|
 |
David Dean Guest
|
Posted: Mon Feb 06, 2006 2:01 am Post subject: Re: Off Topic DOS question |
|
|
In article <43e67718$1 (AT) newsgroups (DOT) borland.com>,
"Alisdair Meredith[TeamB]"
<alisdair.meredith@no-spam-splease (AT) uk (DOT) renaultf1.com> wrote:
| Quote: | CBuilderX used to display the output from console apps in the Message
window of the IDE, and it would be a REALLY nice feature to have in
BDS...
|
Is this in QC? If it is, I'll move at least one vote to it.
--
-David
Nihil curo de ista tua stulta superstitione. |
|
| Back to top |
|
 |
Michael Gillen Guest
|
Posted: Mon Feb 06, 2006 3:01 pm Post subject: Re: Off Topic DOS question |
|
|
roman modic wrote:
| Quote: | Hello!
"LarryJ" <LarryJ33 (AT) ev1 (DOT) net> wrote in message news:43e65b2d$1 (AT) newsgroups (DOT) borland.com...
I have an old DOS program that calculates the position of a planet for a given date. When I run
the program on a computer with a modern OS such as WindowsXP Home the program makes all the
calculations and then automatically exits so I can never see the results. Does anyone know how
I can make the program pause before exiting?
Right-click on program icon, select "Properties", click on tab named "Program"
and remove the tick from "Close on exit"
Servus, Roman
|
Or call it from a batch file and put "pause" as the final command.
--
-Michael Gillen |
|
| Back to top |
|
 |
Tim Del Chiaro (Borland) Guest
|
Posted: Mon Feb 06, 2006 8:01 pm Post subject: Re: Off Topic DOS question |
|
|
Very nice. Thanks for the tip.
Tim
"Rudy Velthuis [TeamB]" <velthuis (AT) gmail (DOT) com> wrote in message
news:xn0ei4rbqm4xmwq01c-velthuis (AT) www (DOT) teamb.com...
|
|
| Back to top |
|
 |
Alisdair Meredith[TeamB] Guest
|
Posted: Wed Feb 08, 2006 2:01 am Post subject: Re: Off Topic DOS question |
|
|
David Dean wrote:
| Quote: | Is this in QC? If it is, I'll move at least one vote to it.
|
QC24623, it is there now ;?)
I'm storing my own votes up for compiler fixes though - useful as this
would be.
--
AlisdairM(TeamB) |
|
| Back to top |
|
 |
David Dean Guest
|
Posted: Wed Feb 08, 2006 6:02 pm Post subject: Re: Off Topic DOS question |
|
|
In article <43e9403d$1 (AT) newsgroups (DOT) borland.com>,
"Alisdair Meredith[TeamB]"
<alisdair.meredith@no-spam-splease (AT) uk (DOT) renaultf1.com> wrote:
| Quote: | QC24623, it is there now ;?)
I'm storing my own votes up for compiler fixes though - useful as this
would be.
|
I have one vote that is for feature requests, one vote for a boost
fix, one for fixing the C++/VCL exception handling, one for the
debugger, and one for .hpp file generation. There just are too many
areas to split my votes between.
--
-David
Nihil curo de ista tua stulta superstitione. |
|
| Back to top |
|
 |
Mark Jacobs Guest
|
Posted: Tue Feb 14, 2006 2:03 pm Post subject: Re: Off Topic DOS question |
|
|
LarryJ wrote:
| Quote: | I have an old DOS program that calculates the position of a planet for a
given date. When I run the program on a computer with a modern OS such as
WindowsXP Home the program makes all the calculations and then automatically
exits so I can never see the results. Does anyone know how I can make the
program pause before exiting?
|
Perhaps this was a joke post. The OP has not replied to any of the suggestions. Larry,
have you been hospitalised? Is your mum ill? Please reply.
--
Mark Jacobs
http://www.dkcomputing.co.uk |
|
| Back to top |
|
 |
roman modic Guest
|
Posted: Tue Feb 14, 2006 3:03 pm Post subject: Re: Off Topic DOS question |
|
|
Hello!
"Mark Jacobs" <markj (AT) critical (DOT) co.uk> wrote in message news:43f1dc32$1 (AT) newsgroups (DOT) borland.com...
| Quote: | LarryJ wrote:
I have an old DOS program that calculates the position of a planet for a given date. When I run the program on a computer with a
modern OS such as WindowsXP Home the program makes all the calculations and then automatically exits so I can never see the
results. Does anyone know how I can make the program pause before exiting?
Perhaps this was a joke post. The OP has not replied to any of the suggestions. Larry, have you been hospitalised? Is your mum
ill? Please reply.
|
Probably not. Maybe he is not a frequent visitor of this group:
http://groups.google.com/groups/profile?enc_user=PXBBDRAAAAC6Ep_PJGXxMZDogEO8U4xX
Roman |
|
| Back to top |
|
 |
|