[hpsdr] Herman DL3HVH's problem with decimal separator

george byrkit ghbyrkit at chartermi.net
Sat Jan 2 09:24:35 PST 2010


Dear All,
Herman DL3HVH and I have had a brief dialog, and we've cured the problem
that he reported below.  The problem was due to the Convert.ToDecimal() call
in OnKeyDown in form1.cs of KISS.  The problem was cured by adding ",nfi"
(without the double quote marks) at the end, inside the quotes, so that it
reads: Convert.ToDecimal(KeypadFrequency,nfi);

This causes the conversion to decimal to use the 'invariant' culture, which
is required since Phil uses the '.' character for the decimal separator on
the display.  Doing so requires that some English culture (like the
'invariant culture') be used to convert a string with a period in it to a
floating point number.  Sorry about the majority of the world there, but
it's finally right!  Just so that  you know, the current count on bugs fixed
in the OnKeyDown function alone this week is 4.  As my hero, Bullwinkle J
Moose (from the 'Rocky & Bullwinkle cartoon show') said, "this time for
sure, Rocky", when pulling a rhinoceros rather than a rabbit from a hat...

Programming is not easy.  Programming robustly across multiple cultures is
even less easy.  This is not meant as an excuse, just as a fact.
Eventually, with you help in reporting these things, and patience while we
understand the actual problem, these things get fixed.

Vy 73,
George K9TRV

--------------------------------------------------------------------------
George,
yes I have a German Win7 version. Unfortunately I only have Win7
Professional - not Ultimate - where you can switch language on the
fly.

If I enter "14" I get "000 14.000". I cannot enter "14.300", which
always led to "000 14.000". Some issue with the decimal point here
(which in the German version is "," not ".") ?

73 de Hermann

DL3HVH
 

__________ Information from ESET Smart Security, version of virus signature
database 4738 (20100102) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 




More information about the Hpsdr mailing list