programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: unexpected behavior of ACCEPT

From: Leon Wagner <leon_at_forth.com>
Date: Wed, 4 May 2005 14:59:55 -0700

Try doing another KEY at the end. (Not sure - just a guess.)

> -----Original Message-----
> From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com]On Behalf
> Of Eglenn4511_at_aol.com
> Sent: Wednesday, May 04, 2005 14:42
> To: sftalk_at_forth.com
> Subject: [sftalk] Re: unexpected behavior of ACCEPT
>
>
>
> In a message dated 5/2/2005 2:37:03 P.M. Mountain Standard Time,
> kbutterfield_at_lanl.gov writes:
>
> : q1 1000 ms key? key emit ;
>
> : q2 10000 ms key? if pad 10 accept pad swap dump then ;
>
> q1 (immediatly type 1) returns 1
> q2 (immediately type 1234) returns 234
> q2 (wait 20 seconds type 1234) returns 1234
>
> Where does the leading character go?
>
> Ken B
>
>
>
> Very interesting. Here is what I got.using win32forth
> the 0 left on the stack came from somewhere ... I suspect I
> stopped typing
> when key? accepted the first key
> q2 1234
> 5652 31 32 33 34 1234 ok
>
> This was most interesting without waiting for the time delay. Nothing
> appeared until the time delay was over. Then the hex
> representation of the numbers
> appeared and the cursor sat behind the numbers. I pressed return
> and '1234'
> appeared at the end of the line. I recognized the other numbers
> as the address
> for pad. I 'typed' the contents of pad and as expected found 1234
> as below.
> 5652 4 type 1234 ok
> I didn't do the third part because I knew it would be accepted
> as a numeric
> input. It doesn't go to pad because 'if' sees false.
>
>
> Charlie
>
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and bug
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Wed May 04 2005 - 15:02:34 PDT

This archive was generated by hypermail 2.2.0 : Thu Dec 04 2008 - 03:04:20 PST