gettingstarted
[Top] [All Lists]

Re: PC code and Mac code different?

To: gettingstarted at lists dot realsoftware dot com
Subject: Re: PC code and Mac code different?
From: "Lennox Jacob" <lenpartico at hotmail dot com>
Date: Mon, 28 Feb 2005 01:32:54 +0000
Delivered-to: gettingstarted at lists dot realsoftware dot com
Hi Terry,
I think this is it
If (asc(Key) > 31 and asc(Key )< 48) or (asc(Key )> 57) then
Beep
Return true
end if

space (32) is not accepted but the other nonprintables from (0-31) and numbers 0 to 9 (47 to 58) are.

Got it.
It works.
Thanks again.
Lennox.

From: Terry Ford <tmford at shaw dot ca>
Reply-To: Getting Started <gettingstarted at lists dot realsoftware dot com>
To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: PC code and Mac code different?
Date: Sun, 27 Feb 2005 15:10:15 -0800

Bad news. Double checked my code. Totally wrong. Back to the drawing board.

Sigh :-(

Terry

Ignore the expression. It's still wrong.

Sort of works. though.


On 27-Feb-05, at 2:44 PM, Terry Ford wrote:


On 27-Feb-05, at 1:25 PM, Lennox Jacob wrote:

Thanks Terry,
Worked flawlessly.
Would really appreciate some help with PC printing too.

I'll look into it later. Bedtime now.

BTW, do you understand *how* the following expression works?

 If (asc(Key)<32 and asc(Key)>48) or asc(Key)>57 then
      Beep
      Return True
   End if

It's really quite important that you do for things like this.

In this case, you only want the allowed ranges of Chr(0) to Chr(31) [Control Keys] and Chr(48) to Chr(57) [Numbers].

Hint: If you read it from left to right, it really shouldn't work.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

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