From: Jean-Julien Fleck Date: 2010-04-14T23:07:58+09:00 Subject: Re: Method to groom a string to floating point representation Hello Alex, > Yes, there has to be some additional logic to allow a trailing 'e' with > the assumption that the user will next enter a valid character > afterward.  That's what makes it a little complicated (and fun) to > figure out.  The goal is, as the user is entering data, to not allow > them to enter anything that is obviously not going to work as a floating > point representation. Sure, fun it is :o) But that's exactly the kind of software that could drive me mad (as a user). You assume that your user is making a typo but what if he is not ? What if he truly believe what he is writing is a perfectly correct float ? He will retry again, and again and again untill he decide that the whole software is just a fraud :o) So IMHO, it is more efficient to let your user know what kind of error he is (possibly repetitively) doing and propose an alternative rather than erase what he believe could be right. Cheers, -- JJ Fleck PCSI1 Lycée Kléber