Console Apps.

Discussion in 'C++' started by TheIntelkid, Oct 2, 2004.

  1. TheIntelkid

    TheIntelkid Guest

    Is there an equivalent for SYSTEM("PAUSE") for borland c++ builder 6?
     
    TheIntelkid, Oct 2, 2004
    #1
    1. Advertising

  2. TheIntelkid

    Mike Wahler Guest

    "TheIntelkid" <> wrote in message
    news:...
    > 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
     
    Mike Wahler, Oct 2, 2004
    #2
    1. Advertising

  3. In article <W5o7d.673$>,
    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.
     
    Michael Bruschkewitz, Oct 2, 2004
    #3
  4. Michael Bruschkewitz wrote:

    > In article <W5o7d.673$>,
    > 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
     
    David Lindauer, Oct 2, 2004
    #4
  5. 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
     
    Thomas Matthews, Oct 2, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tom
    Replies:
    2
    Views:
    604
    Thomas Weidenfeller
    Jul 21, 2005
  2. Ben Finney
    Replies:
    2
    Views:
    996
    Egor Bolonev
    Jun 30, 2003
  3. aph
    Replies:
    4
    Views:
    415
    Peter Hansen
    Jan 14, 2006
  4. anonymous

    Call windows apps from web apps

    anonymous, Feb 22, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    224
    anonymous
    Feb 28, 2005
  5. Richard Choate

    Web enabled apps/Thin client apps

    Richard Choate, Jul 23, 2003, in forum: ASP General
    Replies:
    2
    Views:
    300
    Chris Barber
    Jul 23, 2003
Loading...

Share This Page