I’ve written a short article on how to output the Ada.Calendar.Clock return value as a String.
It’s not exactly a big problem, and the solution is only a few lines of Ada, but it does touch on a few interesting things:
- pragma Assert
- ‘Address attribute
- ‘Size attribute
- An address definition clause
All in a measly 10 lines!
Before tackling this little problem, I had only read about the “for A’Address use B’Address” clause. Now I’ve actually used it and I have this problem and the advice of Jacob Sparre to thank for it.
As usual a big thanks goes to Dwight Scott Miller for proofreading the article and clearing out the worst of my mistakes.