realbasic-nug
[Top] [All Lists]

Re: Easy way to permit numbers exclusively?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Easy way to permit numbers exclusively?
From: Thomas Reed <thomasareed at earthlink dot net>
Date: Wed, 30 Jan 2002 13:08:14 -0600
>  if Asc(Key)>47 and Asc(Key)<58 then
>    return false
>  else
>    return true
>  end if

Note that you can make this a LOT more readable:

  if key < "0" or key > "9" then
    return true
  end if

-Thomas

Personal web page:                 http://home.earthlink.net/~thomasareed/
My shareware:            http://home.earthlink.net/~thomasareed/shareware/
Pixel Pen web pub. guide: http://home.earthlink.net/~thomasareed/pixelpen/

Why do they put Braille dots on the keypad of the drive-up ATM?



<Prev in Thread] Current Thread [Next in Thread>