Re: isnumberic check



On Aug 28, 11:07 pm, "Richard Maher" <maher...@xxxxxxxxxxxxxxxxxx>
wrote:
Hi Rob,

That must be the worst way to go about it. It has many usability
issues, including preventing decimal numbers, scientific notation,
signs, and so on.

Maybe you're right, maybe Eggie did want scientific notation and was
calculating pie to infinity with a reverse Polish calculator.

The requirement was to check if a string is a number, attempting to
prevent keyboard entry of characters other than 0 to 9 is a bad way to
achieve that.


[...]
Either way, who gives a toss?

The OP, and anyone who discovers this thread looking for something
like "check string is number".

If you present a solution that you know has limitations, best to spell
them out rather than leave it for others to discover by trial and
error. It will often be their users who will need to submit to the
trial and endure the errors.


All I did was offer Egmont an extensible alternative for what he was trying
to do.

Extensible? By adding more character codes I guess. But simply
restricting the characters that can be entered does not ensure a
number will result. If you allow decimal points for decimal numbers,
then 1.2.3 is likely not considered a "number" by most but will be
allowed by your solution.

Your "solution" also prevents the use of backspace or delete to remove
incorrect entries - more keycodes to add. And maybe the user wants to
use the cursor keys too, hey more keycodes. Maybe they also like to
use tab to move to the next field... how many keycodes do you think
you will end up adding just to allow integers and floats?

And at the end of if all, users can completely bypass your scheme by
using copy and paste.


If you choose to censor the material available to him in his fact
gathering

Censor? I don't have the power to do that, and wouldn't if I did.


then I'm obliged to float the possibility that your prejudice and
myopia have you once again talking out of your arse.

Try to get beyond grade 6. Perhaps you'd like to explain your
solution for the usability issues raised above?


--
Rob

.



Relevant Pages

  • Re: isnumberic check
    ... maybe Eggie did want scientific notation and was ... calculating pie to infinity with a reverse Polish calculator. ... "We shall not cease from exploration, and the end of all our ...
    (comp.lang.javascript)
  • Re: VBA Code - Dividing Numbers
    ... Note the last four characters -- E-02. ... but you have an implicit conversion from ... double to string that isn't cooperating with you. ... This way will avoid scientific notation in all cases. ...
    (microsoft.public.access.modulesdaovba)
  • Proposal for an Improved Scientific Notation
    ... Proposal for an Improved Scientific Notation ... simplified system of units of measure that we would ... characters for the small number, ... the streamlined notation and talk ...
    (sci.physics)
  • Re: VAL Function Error
    ... if it is 8 characters it ... FORTRAN class I learned the "scientific notation" syntax where 6240E10 was ... Access still has Float and Double number datatypes, ... The reason you're getting an error is that a Double number has a range up to ...
    (microsoft.public.access.queries)
  • How parse out characters from long string?
    ... Am having problems parsing out characters from a long string I have ... the Excel keeps converting the data to the scientific notation format ...
    (microsoft.public.excel.programming)

Loading