> I'm sidestepping the issue of Ada string handling, which can get complicated: you have fixed-size, bounded, and unbounded strings. Usually you have to read in exactly the amount of characters in the fixed string (in this case three), but with this particular version of Get_Line you can read anything up to the maximum length, while the rest is left alone. That is why I initialize Guess to three blank spaces. Once we start actually reading numbers this will become a non-issue (or a different issue).<p>One easy way around this (and is often used when parsing a file line-by-line) is to take advantage of Ada's scoping of new variables.<p>For example:<p><pre><code> loop
Put_Line ("Please enter a line.");
declare
New_Data : constant String := Get_Line;
begin
Put_Line ("You said " & New_Data);
exit when New_Data = "quit";
end;
end loop;
</code></pre>
This insures that you are only using variables to the specific scope that you need (and I tend to declare that has constant unless you plan on modifying them).<p>Also, for anyone interested in getting into Ada, something I mentioned in a previous comment: yes easier than ever to get into Ada these days. There's a bunch of tutorials on Adacore's website [1] with a playground/sandbox that you can mess with. With Alire[2] (which is to Ada what Cargo is to Rust), you can get the toolchain and any packages with a simple command. If you're on linux or mac, you can also use GetAda[3] that will automatically install Alire for you.<p>[1] <a href="https://learn.adacore.com/" rel="nofollow noreferrer">https://learn.adacore.com/</a><p>[2] <a href="https://alire.ada.dev/docs/#first-steps" rel="nofollow noreferrer">https://alire.ada.dev/docs/#first-steps</a><p>[3] <a href="https://github.com/AJ-Ianozi/getada/tree/main">https://github.com/AJ-Ianozi/getada/tree/main</a>