Re: Visual Stuido .net question

From: Karl Heinz Buchegger (kbuchegg_at_gascad.at)
Date: 03/12/04


Date: Fri, 12 Mar 2004 17:40:43 +0100

Jenski182 wrote:
>
> You know when you have compliedm linked a program, then you execute it and it
> starts up, how do you set it so it says "Press any key to continue" once the
> programs run before terminating so you can actualy see what it did?

By adding the code to

* output the text "Press any key to continue"
* having the program to wait until 'any key' was pressed.

at the end of main.

Note: the later cannot be done with standard C or standard C++.
You will need platform/compiler specific extensions to do that.
Thus it is often easier to just have the program wait for some
text or a single character to be input. ( even an empty text input
is still a text input. Your user will have to press return. But anyway
this is simpler then having your user call you: The programm tells me
to press the any key. Where is that key located on my keyboard? )

-- 
Karl Heinz Buchegger
kbuchegg@gascad.at


Relevant Pages

  • Re: RfD: FOUND
    ... execute xt returned by C/SEM FOUND in compilation state ... A standard system MUST document the possible flag values other than ... passing the query mode on the stack is preferable to passing it ...
    (comp.lang.forth)
  • Re: C program to automatically press F6 every few seconds
    ... the terminating new-line character on the last line may be optional. ... where in the standard does it state that it implementations may ... >>>prompt overwrites the last line when not so terminated. ...
    (comp.lang.c)
  • Re: FIND
    ... More to the point for a communication standard, ... more existing Forth94 supported implementations in use that have an xt ... with an xt you know what you can do with it (EXECUTE it). ...
    (comp.lang.forth)
  • Re: RfD: FOUND
    ... never execute on some systems and therefore cannot be tested on them. ... That is, you have a Standard System, but you cannot develop standard ... I have noticed that Gforth has some complex code whose only purpose is ... dup immediate-mask and if drop -1 else ...
    (comp.lang.forth)
  • Re: All programs are undefined, Re: Why this works???
    ... line requires a terminating new-line character. ... well-defined programs of that dialect. ... a trailing newline is not required.'' ... The requirement belongs to the C standard, ...
    (comp.lang.c)