... | ... | @@ -171,10 +171,13 @@ |
|
|
> }
|
|
|
> });
|
|
|
> ```
|
|
|
> In order to make the program terminate we use the System.exit(int code) method with the int code being 0. At first we did not know what the ‘int code’ does, and the API gives no answer. We solved the problem by looking at other code examples on the web [4] and found out that we should use the value ‘0’.
|
|
|
|
|
|
This will make the program terminate no matter where in the loops it is running.
|
|
|
>
|
|
|
>
|
|
|
> In order to make the program terminate we use the System.exit(int code) method with the int code being 0. At first
|
|
|
> we did not know what the ‘int code’ does, and the API gives no answer. We solved the problem by looking at other
|
|
|
> code examples on the web [4] and found out that we should use the value ‘0’. This will make the program terminate
|
|
|
> no matter where in the loops it is running.
|
|
|
>
|
|
|
> ---
|
|
|
> ## Exercise 5 - Clap Controlled Car
|
|
|
>
|
... | ... | @@ -286,6 +289,6 @@ This will make the program terminate no matter where in the loops it is running. |
|
|
> Code:
|
|
|
> https://drive.google.com/folderview?id=0B7MCCWb4fFztfkhLdElnem8xclFsLWp1WnVhRGdGU25CbHRUTVRIUDFaSG5tVDdLUXNSQ2M&usp=sharing
|
|
|
>
|
|
|
> [3] - link til tutorial 4 leJos
|
|
|
> [3] - [link til leJos tutorial:] (http://www.lejos.org/nxt/nxj/tutorial/ListenersAndEvents/Listeners_Events.htm)
|
|
|
>
|
|
|
> [4] [leJos terminate program example:](http://lejos.sourceforge.net/forum/viewtopic.php?t=3267) |
|
|
\ No newline at end of file |