?SYNTAX ERROR
Commodore Commodore 64
Severity: MinorWhat Does This Error Mean?
?SYNTAX ERROR means the Commodore 64 BASIC interpreter could not understand the line you typed. You have either misspelled a BASIC keyword, used punctuation incorrectly, or written a command in a way BASIC does not recognise. Type LIST to review the offending line and look for the mistake.
Affected Models
- Commodore 64
- Commodore 64C
- Commodore 128 (C64 mode)
- VICE emulator (C64)
Common Causes
- Misspelled BASIC keyword (e.g. PRITN instead of PRINT)
- Missing or misplaced punctuation — brackets, quotes, or commas in the wrong place
- Using a variable name that conflicts with a BASIC keyword
- Typing a command that does not exist in Commodore BASIC V2
- Accidentally pressing a key mid-line that inserted a non-printable character
How to Fix It
-
Type LIST and press RETURN to see the line that caused the error.
BASIC shows the line number next to the error. LIST lets you read the full line and spot the typo or formatting mistake.
-
Look for misspelled keywords — BASIC V2 has no autocomplete.
Common mistakes: PRITN for PRINT, INPTU for INPUT, GOTO written as GO TO (space not allowed in C64 BASIC). Keywords must be spelled exactly.
-
Check that all quotes and brackets are correctly matched.
Every opening quote must have a closing quote. Every opening bracket ( must have a closing bracket ). A PRINT statement missing its closing quote is one of the most common C64 syntax errors.
-
Retype the line from scratch using its line number.
Type the line number followed by the corrected statement and press RETURN. The new version replaces the old one in memory. For example: 10 PRINT "HELLO WORLD"
-
On VICE emulator, check for invisible characters pasted from a modern text editor.
Copying code from a website or document into VICE can paste invisible Unicode characters that look like spaces but cause syntax errors. Retype the line manually rather than pasting.
Frequently Asked Questions
Why does the Commodore 64 show a ? before the error message?
The ? is Commodore BASIC V2's way of indicating a runtime or syntax error. It was a design choice carried over from Microsoft BASIC, which Commodore licensed for the C64.
Can I use BASIC keywords as variable names on the C64?
No. If a variable name starts with or contains a BASIC keyword, C64 BASIC will try to parse it as a command. For example, a variable called PRINT1 will confuse the interpreter because it starts with PRINT.