Running the Example

Top  Previous  Next

Now build the application by pressing Ctrl+B.

UPCBuild

If you get failures during the build, check the following things before trying again:

•        Did you remember to delete the INPUT_PORT and OUTPUT_PORT statements from both driver.c and upc.c?

•        Did you make driver.c depend on driver.h by dragging and dropping driver.h onto driver.c?

•        Did you make upc.c depend on upc.h by dragging and dropping upc.h onto upc.c?

 

Run the application by clicking the blue run button which can be found towards the top left of the IDE window. The program runs and you can type input into the console window.

 

Dragons003Be aware that Eclipse uses a bizarre convention which leaves the input cursor at the beginning of the last line displayed; it only moves to the start of the next line when you begin typing.

 

You can terminate the program in two ways: by stopping the IDE communication with the application or, in this case, by clicking the EOF button to send End Of File to stdin. Note that an application can continue to execute even if the IDE has stopped communicating with it.

UPCRun