Ad Space — Top Banner

S Syntax error

Sinclair ZX Spectrum

Severity: Minor

What Does This Error Mean?

S Syntax error on the ZX Spectrum means the BASIC interpreter could not understand the line you typed. The cursor will be positioned near the problem — look at the character just after the cursor position and correct the mistake.

Affected Models

  • Sinclair ZX Spectrum 48K
  • Sinclair ZX Spectrum 128K
  • Spectrum+
  • Spectrum +2
  • Spectrum +3
  • ZX Spectrum Next
  • Fuse emulator
  • ZEsarUX emulator

Common Causes

  • Misspelled BASIC keyword — though most keywords are entered via single keystrokes on real hardware
  • Missing or extra punctuation — brackets, colons, or commas in wrong positions
  • Typing keywords letter-by-letter instead of using the keyword entry system
  • Invalid characters in a string or expression

How to Fix It

  1. Look at where the cursor stops on the error line — the error is at or just before that position.

    The Spectrum positions the cursor at the point where it failed to understand the line, which narrows down the error significantly.

  2. On real hardware, use the keyword entry system — do not type keywords letter by letter.

    On the 48K Spectrum, BASIC keywords are entered with single key presses in keyword mode. For example, pressing P in the correct mode enters the entire word PRINT, not just the letter P. Typing P-R-I-N-T individually is wrong and produces unexpected results.

  3. Check brackets and quote marks are correctly balanced.

    Every PRINT "text" needs matching quotes. Every function call with ( needs a closing ).

  4. On emulators: retype the line using proper Spectrum keyword entry.

    Emulators like Fuse and ZEsarUX support real Spectrum keyboard mapping. In emulation, keyword entry depends on the current keyboard mode shown in the bottom border.

Frequently Asked Questions

Why does the ZX Spectrum use a letter code instead of just saying SYNTAX ERROR?

Sinclair used a single letter plus a short description to keep error messages compact and fast to display. The letter S with the description 'Syntax error' was Sinclair's minimalist approach — fitting the Spectrum's philosophy of doing a lot with very little.

How is ZX Spectrum BASIC different from Commodore 64 BASIC?

Both are based on Microsoft BASIC but with important differences. Spectrum BASIC uses line-by-line keyword entry via single keypresses on real hardware, has a different set of built-in functions, and uses a unique error display format with letter codes rather than the C64's full-word error messages.