DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B0901: obsolescent replacement character

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

Ada RM Annex J.2 still allows replacement characters from the days of limited character sets: ! for |, : for # in based literals, and % as a string delimiter. Verada rejects historical forms with a fix-it to the modern one (see the Language Reference).

Example (Vada)

   Mask : constant := 16:FF:;
   Name : constant String := %Verada%;
   when 1 ! 2 => null;

What to do

   Mask : constant := 16#FF#;
   Name : constant String := "Verada";
   when 1 | 2 => null;

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.