| | |
Simple Programming Errors
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
There are two types of computer programming errors ...
Compile-Time
One type is a compile time error. If there is a syntax error in the code, the compiler will detect the error and the program won't even compile. At this point, the programmer is unable to form an executable that a user can run until the error is fixed. Forgetting a semi-colon at the end of a statement, for example, is a compile-time error. It's something the compiler can detect as an error.
Run-Time
The second type is a run-time error. Compilers aren't perfect and so can't catch all errors at compile time. This is especially true for logic errors such as infinite loops. For example, the actual syntax of the code looks okay. But when you follow the code's logic, the same piece of code keeps executing over and over again infinitely so that it loops. In such a case, compilers aren't really smart enough to catch all of these types of errors at compile-time. Therefore, the program compiles fine into an executable file. However, and unfortunately, when the end-user runs the program, the program (or even their whole computer) freezes up due to an infinite loop. Other types of run-time errors are when an incorrect value is computed, the wrong thing happens, etc. Basically, a run-time error is anything that goes wrong in a program. It's any error or problem with the program that slipped by the compiler's error checker.
Compile-Time
One type is a compile time error. If there is a syntax error in the code, the compiler will detect the error and the program won't even compile. At this point, the programmer is unable to form an executable that a user can run until the error is fixed. Forgetting a semi-colon at the end of a statement, for example, is a compile-time error. It's something the compiler can detect as an error.
Run-Time
The second type is a run-time error. Compilers aren't perfect and so can't catch all errors at compile time. This is especially true for logic errors such as infinite loops. For example, the actual syntax of the code looks okay. But when you follow the code's logic, the same piece of code keeps executing over and over again infinitely so that it loops. In such a case, compilers aren't really smart enough to catch all of these types of errors at compile-time. Therefore, the program compiles fine into an executable file. However, and unfortunately, when the end-user runs the program, the program (or even their whole computer) freezes up due to an infinite loop. Other types of run-time errors are when an incorrect value is computed, the wrong thing happens, etc. Basically, a run-time error is anything that goes wrong in a program. It's any error or problem with the program that slipped by the compiler's error checker.
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
•
•
•
•
Originally Posted by cscgal
There are two types of computer programming errors ...
The original author didn't comment, used crappy and inconsistent code style, and obfuscated because it made him/her feel clever. So now when the system needs updating, the new team of coders takes one look at the codebase and flees screaming into the night.
The Beer-Time Error
The program will probably compile, and will probably even do what you want it to do. However, you may have some difficulty in determining just what you were thinking, later on.
The Out-Of-Time Error
Procrastination leads to panic. Panic leads to all-nighters. All-nighters lead to lack of sleep. Lack of sleep leads to incomprehension. Incomprehension leads to failure to understand what's wrong with C statements like if(3 = a) { ... . Failure to understand what's wrong with C statements like if(3 = a) { ... leads to frustration. Frustration leads to anger. Anger leads to hatred.
And we all know that hatred leads to the Dark Side.
>There are two types of computer programming errors ...
It depends on the language and what you consider compile-time. Compilation usually consists of two distinct steps: compilation and linking. Both of those steps may have errors that are unique to the step. Therefore, I would say that there are three types of errors for compiled languages: compile-time, link-time, and run-time. Link-time and run-time errors are by far the most frustrating.
For interpreted languages there's no such thing as compile-time, and all errors are run-time whether they're syntax errors or logical errors.
It depends on the language and what you consider compile-time. Compilation usually consists of two distinct steps: compilation and linking. Both of those steps may have errors that are unique to the step. Therefore, I would say that there are three types of errors for compiled languages: compile-time, link-time, and run-time. Link-time and run-time errors are by far the most frustrating.
For interpreted languages there's no such thing as compile-time, and all errors are run-time whether they're syntax errors or logical errors. I'm here to prove you wrong.
![]() |
Similar Threads
- News Story: Are You Vulnerable to These Top 25 Coding Errors? (Network Security)
- Errors in Java programming (Java)
- Simple Programming for Desktop Application (IT Professionals' Lounge)
- Help with simple programming... (Python)
- need help with error (C++)
- VC++ 6.0 errors (C++)
Other Threads in the Computer Science Forum
- Previous Thread: Math/computerscience Log Problem- Helpppp
- Next Thread: A discrete math problem
| Thread Tools | Search this Thread |
ai algorithm algorithms amazon assignment assignmenthelp assignments automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business cern codebreaker compiler computer computers computerscience computertrackingsoftware conversion csc data dataanalysis dataintepretation development dfa dissertation dissertations dissertationthesis dissertationtopic ebook employment energy extensions floatingpoint foreclosuresoftware fuel gadgets geeks givemetehcodez government graphics hardware history homeowners homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod itcontracts jobs kindle laser laws lsmeans mainframes marketing mining mobileapplication netbeans networking news os p2p piracy piratebay programming rasterizer research sas science security sex simulation software spying sql study supercomputer supercomputing sweden technology textfield turing turingtest two'scompliment uk virus warehouse ww2






