Re: [Elecraft] KCOMM for K3
For what it's worth, I downloaded it, changed the code to accept dates up to 2050, and compiled it in Lazarus successfully under Windows 10. But it didn't run -- runtime exception. I'll have to look into it further. Incidentally, the date validation function is in utils.pas, not main.pas. 73, Victor, 4X6GP Rehovot, Israel CWops #5 Formerly K2VCO https://www.qsl.net/k2vco/ On 31/07/2021 19:18, Paul Evans W4/VP9KF wrote: I downloaded the source code (still available on g4ilo.com). I don't have any Elecraft gear, but you might want to try recompiling after changing this section in the main .pas file (environment is Lazarus/Pascal): function ValidDate(d: string): boolean; begin Result := (Length(d) = 10) and (d[5] = DateSeparator) and (d[8] = DateSeparator) and Between(StrToIntDef(Copy(d,1,4),-1),1950,2020) and Between(StrToIntDef(Copy(d,6,2),-1),1,12) and Between(StrToIntDef(Copy(d,9,2),-1),1,31); end; Don't know why the limit of 2020. It may be a feature of the Pascal function. It may not. The same limit existed in the VOAProp code that Julian G4ILO also wrote. Unfortunately it's some time since he became SK, but somebody with the time and the tools might be able to dig it out to re-compile the code and might succeed. He did hint that it was quite a job under either Linux or Windows (and we're talking about the Windows 7 era, hinted in the source code comments). Any takers!? __ Elecraft mailing list Home: http://mailman.qth.net/mailman/listinfo/elecraft Help: http://mailman.qth.net/mmfaq.htm Post: mailto:Elecraft@mailman.qth.net This list hosted by: http://www.qsl.net Please help support this email list: http://www.qsl.net/donate.html Message delivered to k2vco@gmail.com __ Elecraft mailing list Home: http://mailman.qth.net/mailman/listinfo/elecraft Help: http://mailman.qth.net/mmfaq.htm Post: mailto:Elecraft@mailman.qth.net This list hosted by: http://www.qsl.net Please help support this email list: http://www.qsl.net/donate.html Message delivered to arch...@mail-archive.com
Re: [Elecraft] KCOMM for K3
>function ValidDate(d: string): boolean; >begin > Result := (Length(d) = 10) > and (d[5] = DateSeparator) > and (d[8] = DateSeparator) > and Between(StrToIntDef(Copy(d,1,4),-1),1950,2020) > and Between(StrToIntDef(Copy(d,6,2),-1),1,12) > and Between(StrToIntDef(Copy(d,9,2),-1),1,31); > end; > > Don't know why the limit of 2020. It may be a feature of the Pascal > function. It may not. All of these functions implementing this logic are not date specific functions. 'Copy' is just copying the year out of the string representation of the date.'StrToIntDef' is just converting those 4 characters to an integer (or -1 if the conversion fails).'Between' is just returning 'True' if the integer falls between 1950 and 2020 I think 2020 was just arbitrarily picked as a year. These kind of arbitrary decisions are usually limited to code using 2 digit years.In the day it wasn't uncommon to see logic that turned a two digit year to a 19xx date if the year was greater than something like 30 and 20xx if it was less than 30 or so. Like many programs, this one has obviously outlived its expected longevity. RichardK4KRW __ Elecraft mailing list Home: http://mailman.qth.net/mailman/listinfo/elecraft Help: http://mailman.qth.net/mmfaq.htm Post: mailto:Elecraft@mailman.qth.net This list hosted by: http://www.qsl.net Please help support this email list: http://www.qsl.net/donate.html Message delivered to arch...@mail-archive.com
Re: [Elecraft] KCOMM for K3
__ Elecraft mailing list Home: http://mailman.qth.net/mailman/listinfo/elecraft Help: http://mailman.qth.net/mmfaq.htm Post: mailto:Elecraft@mailman.qth.net This list hosted by: http://www.qsl.net Please help support this email list: http://www.qsl.net/donate.html Message delivered to arch...@mail-archive.com
[Elecraft] KCOMM for K3
I downloaded the source code (still available on g4ilo.com). I don't have any Elecraft gear, but you might want to try recompiling after changing this section in the main .pas file (environment is Lazarus/Pascal): function ValidDate(d: string): boolean; begin Result := (Length(d) = 10) and (d[5] = DateSeparator) and (d[8] = DateSeparator) and Between(StrToIntDef(Copy(d,1,4),-1),1950,2020) and Between(StrToIntDef(Copy(d,6,2),-1),1,12) and Between(StrToIntDef(Copy(d,9,2),-1),1,31); end; Don't know why the limit of 2020. It may be a feature of the Pascal function. It may not. The same limit existed in the VOAProp code that Julian G4ILO also wrote. Unfortunately it's some time since he became SK, but somebody with the time and the tools might be able to dig it out to re-compile the code and might succeed. He did hint that it was quite a job under either Linux or Windows (and we're talking about the Windows 7 era, hinted in the source code comments). Any takers!? __ Elecraft mailing list Home: http://mailman.qth.net/mailman/listinfo/elecraft Help: http://mailman.qth.net/mmfaq.htm Post: mailto:Elecraft@mailman.qth.net This list hosted by: http://www.qsl.net Please help support this email list: http://www.qsl.net/donate.html Message delivered to arch...@mail-archive.com
[Elecraft] KCOMM for K3
Has anyone did a fix for 2121 date. It says that it is invadid Bruce Wade __ Elecraft mailing list Home: http://mailman.qth.net/mailman/listinfo/elecraft Help: http://mailman.qth.net/mmfaq.htm Post: mailto:Elecraft@mailman.qth.net This list hosted by: http://www.qsl.net Please help support this email list: http://www.qsl.net/donate.html Message delivered to arch...@mail-archive.com