Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
goto is a keyword to jump to a label.
Prefer not to use goto [1,2], except when
breaking out of multiple loops [1].
- Joint Strike Fighter Air Vehicle C++ Coding Standards for the System Development and Demonstration Program. Document Number 2RDU00001 Rev C. December 2005. AV Rule 189 (MISRA Rule 56): 'The goto statement shall not be used.' and 'Exception: A goto may be used to break out of multiple nested loops provided the alternative would obscure or otherwise significantly complicate the control logic.'
- Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 9.8. Advice. page 240: '[7] Avoid goto'
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
