DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B0001: invalid character

Catalog status: active. Default severity: error. Stable name: invalid-character. Family: Syntax and source text.

The source contains a character that is not part of Ada's syntax outside comments, string literals and character literals: for example $, ?, { or `. The lexer skips it and carries on.

Example (Vada)

   $ X := 1;

Example (Varc)

    $ x = 1;

What to do (Vada)

Delete the character. If it was meant to be text, put it in a string or character literal; if it was meant to be a comment, start the comment with --.

What to do (Varc)

Delete the character. If it was meant to be text, put it in a string or character literal; if it was meant to be a comment, start the comment with //.

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See syntax and source text, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.