How to exit an NXC void
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
How to exit an NXC void
How do you exit/stop/end a void in an NXC program?
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: How to exit an NXC void
try "return" with no value.
- Xander
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: How to exit an NXC void
Maybe you are talking about an NXC function or subroutine or procedure that has no return value? For the sake of clarity I encourage you to refer to a function that returns no value as either a "function" or a "procedure" or a "subroutine" rather than a "void". The keyword void is just the type returned by a function that returns no value.
I recommend this wikipedia page: http://en.wikipedia.org/wiki/Void_type. It says:
John Hansen
I recommend this wikipedia page: http://en.wikipedia.org/wiki/Void_type. It says:
That's the standard C mechanism for exiting a function early (as Xander already mentioned). Happy B-day, Xander!!!A function with void result type ends either by reaching the end of the function or by executing a return statement with no returned value.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Who is online
Users browsing this forum: Semrush [Bot] and 0 guests