?NF ERROR

Radio Shack TRS-80

Severity: Minor

What it means

NF is short for NEXT without FOR.
Radio Shack's Level II BASIC manual: NEXT is used without a matching FOR statement. This error may also occur if NEXT variable statements are reversed in a nested loop.

Affected Models

  • TRS-80 Model I with Level II BASIC

How to Fix It

  1. LIST the program and pair each NEXT with its FOR.

    In nested loops the inner one closes first: FOR I ... FOR J ... NEXT J ... NEXT I.

  2. Look for a GOTO that jumps into the middle of a loop, past its FOR.