EKEY>CHAR in Win32Forth 
Author Message
 EKEY>CHAR in Win32Forth


Quote:
>I define in Win32Forth:

>: EVENT ( -- u flag )  EKEY EKEY>CHAR ;

I think the use of the word event in this way can be a bit confusing.
In the win32 programmers reference is the following text:

"An event object is a synchronization object whose state can be explicitly
set to signaled by use of the SetEvent or PulseEvent function."

EKEY does not use SetEvent or PulseEvent.

See multithr.f at http://www.*-*-*.com/ ~josv for the use of SetEvent.
Jos.



Sat, 04 Aug 2001 03:00:00 GMT  
 EKEY>CHAR in Win32Forth

Quote:

> I don't think K_UP is a character. If you read the rationale for EKEY, the
> "implementation-defined character set" is an extension of the standard ANS
> Forth character set to include, for instance, characters with bit 7 set.

> I think EKEY>CHAR should return TRUE if it represents a character event, ie
> something that you could pass to EMIT and see on the display (including
> control characters). But not mouse events and shift, cursor and function
> keys.

> Andrew

I can confirm that Andrew's view of the intent is correct.  The theory is
that EKEY should be able to detect _everything_, whereas KEY is limited
to 7-bit ASCII.  Somewhere in between are additional characters as well
as "events" which aren't really characters, such as mouse events and shift,
cursor and function keys.  The purpose of EKEY>CHAR is to distinguish
between "real" characters and "events".  The former could, for example,
be put into a string, whereas the latter might more appropriately be fed
to a CASE statement.

Technically, Tom can evade the ANSI police with his interpretation, since
he can elect to have his "implementation-defined character set" include
everything, but that is not the intent.

Cheers,
Elizabeth

--
===============================================
Elizabeth D. Rather  (US & Canada) 800-55-FORTH
FORTH Inc.                      +1 310-372-8493
111 N. Sepulveda Blvd.     Fax: +1 310-318-7130
Manhattan Beach, CA 90266
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
===============================================



Sat, 04 Aug 2001 03:00:00 GMT  
 EKEY>CHAR in Win32Forth

Quote:

> I can confirm that Andrew's view of the intent is correct.  The theory is
> that EKEY should be able to detect _everything_, whereas KEY is limited
> to 7-bit ASCII.  Somewhere in between are additional characters as well
> as "events" which aren't really characters, such as mouse events and shift,
> cursor and function keys.  The purpose of EKEY>CHAR is to distinguish
> between "real" characters and "events".  The former could, for example,
> be put into a string, whereas the latter might more appropriately be fed
> to a CASE statement.

> Technically, Tom can evade the ANSI police with his interpretation, since
> he can elect to have his "implementation-defined character set" include
> everything, but that is not the intent.

> Cheers,
> Elizabeth

Ok...,  You got me.  I'll add that to my list of things to correct.

Tom Zimmer



Sat, 04 Aug 2001 03:00:00 GMT  
 EKEY>CHAR in Win32Forth

Quote:

> Technically, Tom can evade the ANSI police with his interpretation, since
> he can elect to have his "implementation-defined character set" include
> everything....


Win32Forth.

Leo Wong
--

http://www.albany.net/~hello/



Sat, 04 Aug 2001 03:00:00 GMT  
 EKEY>CHAR in Win32Forth


Quote:

>Sorry, I wasn't writing for win32, just using Win32Forth.  Please
>make the appropriate corrections.

Oeps, naming a definition isn't always easy. Perhaps: KEY-PRESSED?
Jos.


Mon, 06 Aug 2001 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. KEY , EKEY , AND EKEY>CHAR

2. Extended-char -> Standard-char

3. Q: simple example of read file->convert char(s)->write file needed

4. Float -> String in Win32Forth

5. Win32Forth <-> LPT (Windows NT)

6. >R in Win32Forth

7. Win32Forth d>f

8. ??? on CHAR -> INT -> CHAR conversion problem

9. HELP>>>>>>>Fortran-Pascal Linking

10. >>>>>>>FROM SMTK TO C++

11. inserting <CR> every n chars

12. RIP char >127? help

 

 
Powered by phpBB® Forum Software