A computer program statement written to prevent a problem that would never actually occur.
Panic Code is typically written by neophytes who do not have a complete understanding
of fundamental computer programming concepts.
The following is an example of Panic Code.
The last line of code is totally not necessary because there is no operation
that modifies intDogId. The " intDogId == FIDO " only compares the values.
This code may be written by a noob who did not understand the difference
between A == B (compare values) and A = B (assign A the value of B) in the past and had error because of it
integer intDogId = 1;
if ( intDogId == FIDO )
{
GiveFidoBone();
}
// Make sure Dog Id is 1
intDogId = 1;
This bit of jargon has been viewed 6,102 times.