Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Console Apps.

Reply
Thread Tools

Console Apps.

 
 
TheIntelkid
Guest
Posts: n/a
 
      10-02-2004
Is there an equivalent for SYSTEM("PAUSE") for borland c++ builder 6?
 
Reply With Quote
 
 
 
 
Mike Wahler
Guest
Posts: n/a
 
      10-02-2004

"TheIntelkid" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there an equivalent for SYSTEM("PAUSE") for borland c++ builder 6?


Note that C++ is case sensitive. The function's
name is 'system()'. The 'equivalent' is to use
exactly the same thing:

system("PAUSE");

(Assuming your host platform provides a "PAUSE"
command, and that it does what you need.).

'system()' is a standard function. Its argument
is platform-dependent, not standardized.

-Mike


 
Reply With Quote
 
 
 
 
Michael Bruschkewitz
Guest
Posts: n/a
 
      10-02-2004
In article <W5o7d.673$(E-Mail Removed) t>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> system("PAUSE");
>
> (Assuming your host platform provides a "PAUSE"
> command, and that it does what you need.).

That's the point. But this is an OS-issue, so it's sligthly off-topic
here.
Anyway, although system() is required to pass the parameter to the
command interpreter (at least, msvc-help and solaris-manpage says this),
I already experienced problems with implementations where system() tried
to execute the command as executable, what fails if command is an
internal one (as "PAUSE" is). But I can't remember which OS this was.

But I don't know why system("pause") should be necessary.

Regards,
Michael B.
 
Reply With Quote
 
David Lindauer
Guest
Posts: n/a
 
      10-02-2004


Michael Bruschkewitz wrote:

> In article <W5o7d.673$(E-Mail Removed) t>,
> (E-Mail Removed) says...
> > system("PAUSE");
> >
> > (Assuming your host platform provides a "PAUSE"
> > command, and that it does what you need.).

> That's the point. But this is an OS-issue, so it's sligthly off-topic
> here.
> Anyway, although system() is required to pass the parameter to the
> command interpreter (at least, msvc-help and solaris-manpage says this),
> I already experienced problems with implementations where system() tried
> to execute the command as executable, what fails if command is an
> internal one (as "PAUSE" is). But I can't remember which OS this was.


as the other poster pointered out, just *having* a system function is
required, but what it does is implementation defined. So while on that OS
it doesn't seem that it does the most useful thing, it is
within its bounds to do it that way.

David
 
Reply With Quote
 
Thomas Matthews
Guest
Posts: n/a
 
      10-02-2004
TheIntelkid wrote:
> Is there an equivalent for SYSTEM("PAUSE") for borland c++ builder 6?


There are other alternatives:
cout << "Paused, press ENTER to continue." << endl;
cin.ignore(10000, '\n');

But these alternatives depend on what you want the program
to do while "pausing". Some operating systems provide some
sleeping calls so that you can have your program sleep until
some event happens, such as expiration of some time duration
or an external event such as a keyboard press. All these are
system dependent and best discussed in a newsgroup about
your operating system.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading console output and writing to console jan.rebada@gmail.com C++ 5 03-04-2008 09:00 AM
Preventing the console window from closing when writing a console program in C++ Miktor C++ 7 08-09-2005 09:22 PM
Re: console mp3->wav decoder for $indows or GUI one which supports console Serge Terekhoff Python 0 06-30-2003 12:36 PM
Re: console mp3->wav decoder for $indows or GUI one which supports console Egor Bolonev Python 0 06-30-2003 10:43 AM
Re: console mp3->wav decoder for $indows or GUI one which supports console Ben Finney Python 2 06-30-2003 05:43 AM



Advertisments