Spaghetti code (original) (raw)

Spaghetti code is a pejorative term for code with a complex and tangled control structure, especially one using many GOTOs, exceptions, or other "unstructured" branching constructs. It is named such because program flow tends to look like a bowl of spaghetti, i.e. twisted and tangled. Nowadays it is preferable to use so-called structured programming.

Also called kangaroo code because such code has so many jumps in it.


This article (or an earlier version of it) contains material from FOLDOC, used with permission.