Bird
0
0

A design review checklist script has this line: 'if missing_connections >= 0 then flag_error = true'. The script flags errors when missing_connections equals zero. What is the likely error?

medium📝 Formula Fix Q6 of 15
PCB Design - Design Review and Testing
A design review checklist script has this line: 'if missing_connections >= 0 then flag_error = true'. The script flags errors when missing_connections equals zero. What is the likely error?
AThe condition should be '>= 0' to flag zero errors
BThe flag_error variable is misspelled
CThe condition should be '> 0' to flag only positive errors
DThe script should check for missing_connections < 0
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the condition logic

    The condition 'missing_connections >= 0' flags errors even when count is zero.
  2. Step 2: Understand zero means no errors

    If missing_connections = 0, no errors exist, so flag should not be true.
  3. Final Answer:

    The condition should be '> 0' to flag only positive errors -> Option C
  4. Quick Check:

    Flag errors only if count > 0 [OK]
Quick Trick: Use '> 0' to flag existing errors, not zero [OK]
Common Mistakes:
MISTAKES
  • Using '>= 0' flags no errors as errors
  • Checking for negative counts which don't exist
  • Misspelling variables causing script failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PCB Design Quizzes