Program Input, Errors And Fixes — How To Use The Output Panel
Program Input, Errors and Fixes
Most programs ask you for something: a name, a number, a password. This article explains how input works in the new compiler, how to read errors, and what to do when something goes wrong.
Open the CONNECT SRMAP Compiler: https://oursrmap.purlyedit.in/compiler/index.php
1. How Input Works
You do not need to prepare anything before you press Run.
Press Run.
When your program asks a question, the run pauses at that point and an input box appears right under the question in the Output tab.
Type your answer and press Enter (or tap Send).
The program runs again from the start with your answer, and your answer appears right after the question, just like a real terminal.
If the program asks again, the box appears again.
Press Done to close the box.
Each Enter sends one line, and every run uses all the lines typed so far. That is why the program restarts each time.
Status messages:
Input needed (amber): the program is waiting for you. This is not an error.
Done (green): the program finished.
Failed (red): the program stopped with a real error.
2. Preparing Input in Advance (optional)
Open the Input tab, type your values one per line, and press Run. The program uses them in order, with no questions asked. A blue dot on the Input tab shows that your program reads input.
This is useful when you want to test the same values again and again.
| Language | How exact the detection is |
|---|---|
| Python, Java | Exact: the editor knows precisely when the program wants more, and shows the typed answers after each question |
| C, C++, PHP | Estimated: the box appears when the program seems to need input. An Input used line under the output lists what was sent |
| JavaScript, TypeScript | Instant, in your browser: prompt() questions appear in the output, answered from the Input tab |
3. Reading Errors
When a program fails, the Output panel shows:
the error message in red,
clickable line references. Tap one and the editor jumps to that line, with the line highlighted,
a red marker on the bad line and an error count in the status bar.
Common examples
| Message | Usual cause |
|---|---|
SyntaxError / expected ';' | A missing bracket, colon or semicolon near the line shown |
NameError / cannot find symbol | A misspelled variable or a missing import |
ZeroDivisionError / ArithmeticException | Dividing by zero |
InputMismatchException / ValueError | The program expected a number but got text |
NoSuchElementException / EOFError | The program asked for input that was not given. Type it in the input box |
IndexOutOfBounds / segmentation fault | Using a position outside an array or list |
4. Fix with AI
After a failed run, the Fix with AI button appears under the output.
The AI reads your code and the error, then suggests a corrected version.
You choose whether to apply it to the editor. Nothing changes until you accept.
Use Ctrl + Z to undo an applied fix.
The AI is available after a 10-day login streak, and it only discusses the file you have open.
5. Java Specifics
Your class can have any name. The compiler handles the
Mainclass requirement for you.Several classes in one file work.
ScannerandBufferedReaderinput work with the input box.Java is compiled before running, so it can take longer than other languages.
6. Tips for Clean Output
Print a clear question before reading input, for example
Enter your age:. The question becomes the label of the input box.Use Copy in the output toolbar to copy the whole result, and the bin icon to clear it.
If a run seems stuck, look for a loop that never ends. A cloud run is stopped automatically after about 55 seconds.
Frequently Asked Questions
Q1. Why does my program start again every time I type an answer?
Each answer is sent together with all earlier answers, and the program runs again from the start. The typed answers are shown in the output, so it reads like one continuous session.
Q2. The input box did not appear. What now?
Open the Input tab, type your values one per line, and press Run. This always works.
Q3. My program printed a wrong result with no error. Why?
The program may have asked for more input than was given. Give the missing values and run again. Check the Input tab to see what was sent.
Q4. What does "Input needed" mean?
The program reached a question and is waiting for you. Type your answer in the box below the output.
Q5. Can I paste several values at once?
Yes. Put them in the Input tab, one per line.
Q6. The red line marker will not go away.
Run the program again. Markers are cleared on every run.
Need Help?
Email: connectsrmap@purlyedit.in
Help Center: https://oursrmap.purlyedit.in/guide/help_center
PAGE URL: https://oursrmap.purlyedit.in/compiler/index.php