Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ada.calendar.clock_to_string [2012/01/03 21:46]
thomaslocke [A Full Program]
ada.calendar.clock_to_string [2012/01/03 21:48] (current)
thomaslocke [A Full Program]
Line 18: Line 18:
 ===== One Solution ===== ===== One Solution =====
  
-For my experiment I've used the [[http://​libre.adacore.com/​libre/​|GNAT GPL 2010]] compiler, and in this compiler the [[http://​adaic.org/​standards/​05rm/​html/​RM-9-6.html#​I3747|Time]] type is declared as:+In this first solution, we're going to make use of the //'​Address//​ attribute. ​For my experiment I've used the [[http://​libre.adacore.com/​libre/​|GNAT GPL 2010]] compiler, and in this compiler the [[http://​adaic.org/​standards/​05rm/​html/​RM-9-6.html#​I3747|Time]] type is declared as:
  
 <code ada> <code ada>
Line 107: Line 107:
   ​   ​
 You're not going to get that with the first method, and in my humble opinion that warning alone makes it worthwhile to use //​Ada.Unchecked_Conversion//​ instead of the //'​Address//​ attribute used in the first solution. You're not going to get that with the first method, and in my humble opinion that warning alone makes it worthwhile to use //​Ada.Unchecked_Conversion//​ instead of the //'​Address//​ attribute used in the first solution.
-===== Full Program =====+===== The Full Program =====
  
 Lets end with a little program that utilizes both solutions to output the value of //​Ada.Calendar.Clock//:​ Lets end with a little program that utilizes both solutions to output the value of //​Ada.Calendar.Clock//:​

Navigation