About the author
So, I found two friends who are willing to test “My RSS Reader” for me.
Thanks to Jeremy North and David Clegg are due here.
In designing “My RSS Reader”, I've written a new Delphi module (aka unit) that converts between various date/time formats found in blogs.
Due to these diverse formats, and the fact that the date/time routines in Delphi can't handle them properly, I've written my own date/time conversion routines.
In order to ensure that my date/time conversion routines are correct, during runtime, I convert between a few formats, and using Delphi's Assert statement, ensured that my assumptions are correct and will not be violated.
Jeremy and David got “My RSS Reader” from me, and when they ran it...
KABOOM!
The program blew up. My assumptions were wrong. Within minutes of receiving feedback, I fixed the problem. The problem turns out to be a comparison between two TDateTime values. I did a comparison like so: DT1=DT2. Internally, TDateTime is actually a typed alias to the Double type. Julian Bucknall actually wrote something about this (precision arithmetic), and I was going to refer to it via a link, unfortunately, I can't find his article and link right now.
And the solution is simple: Instead of comparing using DT1=DT2, I changed the comparison to SameDateTime(DT1, DT2) which solved the problem Jeremy and David faced.
Thanks, guys!
Article brought to you courtesy of a Solaris 10 x86 workstation
Learn the command line used to compile System.pas in Delphi