On this page
B1001: name not declared or not visible
Catalog status: active. Default severity: error. Stable name: undefined-name. Family: Names and declarations.
No declaration of this name is visible here. Verada suggests a similarly spelled visible name; when the name is declared in a library package, it says which one and offers to add the with clause (or to qualify the name when the package is withed but not used).
Example (Vada)
procedure Main is
Count : Integer := 0;
begin
Cuont := Count + 1; -- did you mean `Count`?
Put_Line ("done"); -- declared in `Ada.Text_IO`
end Main;Example (Varc)
fn main() {
var count: Integer = 0;
cuont = count + 1; // did you mean `count`?
Put_Line("done"); // declared in `Ada.Text_IO`
}
What to do (Vada)
Fix the spelling, or make the declaration visible: with Ada.Text_IO; and then Ada.Text_IO.Put_Line or use Ada.Text_IO;.
What to do (Varc)
Fix the spelling, or make the declaration visible: import Ada.Text_IO; and then Ada.Text_IO.Put_Line or use Ada.Text_IO;.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See names and declarations, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.