for what it's worth, in SwiftF
: try begin key? until pad 80 accept ;
try bc def ok
pad 10 dump
46EB07 62 63 20 64 65 66 20 20 20 20 bc def =
ok
That's by typing abc def, the 'a' disappears from the command line.
In Win32F I get the full 'abc def'.
Cheers! Anil
-----Original Message-----
From: Eglenn4511_at_aol.com [mailto:Eglenn4511_at_aol.com]
Sent: Wednesday, May 04, 2005 5:42 PM
To: sftalk_at_forth.com
Subject: [sftalk] Re: unexpected behavior of ACCEPT
=20
In a message dated 5/2/2005 2:37:03 P.M. Mountain Standard Time, =20
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 =20
when key? accepted the first key=20
q2 1234
5652 31 32 33 34 1234 ok
=20
This was most interesting without waiting for the time delay. Nothing =20
appeared until the time delay was over. Then the hex representation of =
the numbers=20
appeared and the cursor sat behind the numbers. I pressed return and =
'1234'=20
appeared at the end of the line. I recognized the other numbers as the =
address=20
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=20
input. It doesn't go to pad because 'if' sees false.
=20
=20
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=20
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 Thu May 05 2005 - 11:08:48 PDT
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 09-Feb-2012. Archive updated nightly.