Ad Space — Top Banner

Nonsense in BASIC (Error C)

Sinclair ZX Spectrum

Severity: Minor

What Does This Error Mean?

Error C — Nonsense in BASIC — means the interpreter found a keyword or expression it cannot parse. Usually happens with a malformed expression, especially after a PRINT, IF, or assignment statement.

Affected Models

  • ZX Spectrum 16K
  • ZX Spectrum 48K
  • ZX Spectrum+
  • ZX Spectrum 128K
  • ZX Spectrum +2
  • ZX Spectrum +3

Common Causes

  • Invalid expression after PRINT, LET, or IF
  • Attempting to use a function with the wrong number of arguments
  • Typo in a keyword that the Spectrum interpreted differently
  • Using an expression where the Spectrum expects a variable name

How to Fix It

  1. LIST the offending line and read it carefully.

    The Spectrum shows the line number where it stopped. Type LIST and look at that line for any obvious malformed expression.

  2. Check every IF statement has a THEN.

    IF condition THEN action is required. Missing THEN causes Nonsense in BASIC on the IF line.

  3. Check your PRINT expressions.

    PRINT expressions must be valid: PRINT A, PRINT A+B, PRINT "text". Nested expressions with unbalanced parentheses cause Error C.

  4. Re-enter the line from scratch.

    Sometimes a corrupted entry (especially after a tape load) leaves invisible characters. Delete the line (type its number then Enter) and retype it.

Frequently Asked Questions

What is the difference between Syntax Error and Nonsense in BASIC?

Syntax Error is caught as you type a line — the Spectrum won't even let you enter a line with a syntax error. Nonsense in BASIC (Error C) happens at run time, when the interpreter reaches something it cannot evaluate as an expression. They feel similar but are different stages of parsing.