Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Logic error
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|A bug in a program that causes it to operate incorrectly, but not to terminate abnormally}} {{for|an error in logical reasoning|logical fallacy}} {{More citations needed|date=March 2025}} In [[computer programming]], a '''logic error''' is a [[Software bug|bug]] in a program that causes it to operate incorrectly, but not to terminate abnormally (or [[crash (computing)|crash]]).<ref>{{cite book |last1=Breedlove |first1=Todd W. |last2=Albert |first2=Randal L. |title=C++: An Active Learning Approach |date=22 October 2010 |publisher=Jones & Bartlett Publishers |isbn=978-1-4496-1283-2 |page=44 |url=https://books.google.com/books?id=FgnnQ8Gqx1wC&pg=PA44 |access-date=20 March 2025 |language=en}}</ref> A logic error produces unintended or undesired output or other behaviour, although it may not immediately be recognized as such. Logic errors occur in both [[Compiler|compiled]] and [[Interpreter (computing)|interpreted]] languages. Unlike a program with a [[syntax error]], a program with a logic error is a valid program in the language, though it does not behave as intended. Often the only clue to the existence of logic errors is the production of wrong solutions, though [[Static program analysis|static analysis]] may sometimes spot them.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)