Hi, I’m new to Ada.
I’m reading the book by John Barnes and tried to run an example from it, but I keep getting a “file not found” error.
I’d really appreciate it if anyone has time to help.
This is not true. The GNAT compiler, by default, expects units to be in files named as you described. There are ways to tell GNAT that units are in files with different names, such as the gnatname tool. Most other compilers, such as ObjectAda, always accept units in files with any names.
As the OP is clearly using GNAT, your response was helpful at this time, but might become confusing if the OP uses another compiler. It’s important to distinguish between the language and the idiosyncrasies of specific tools.