I’m running a program under Momentics that expects text input from the user.
The Console View doesn’t seem to handle this. Is this the expected
behavior, or can I configure it to handle text input properly?
For example…
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
printf(“Welcome to the Momentics IDE\n”);
return EXIT_SUCCESS;
}
…prints “Welcome to the Momentics IDE” in the Console View, as you would
expect.
However, the example…
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("Welcome to the Momentics IDE… ");
while ( getchar() != ‘\n’ ) {
}
return EXIT_SUCCESS;
}
…doesn’t print anything into the Console View. If you try to type
characters in the Console View, it also does nothing. If you run it in a
Terminal Window, it works as expected—it prompts you with the Welcome, and
if you type characters and a CR, the program completes.
What’s up? Can I get the Console View to behave so I can use the debugging
features in Momentics?
Thanks.
– Celia