Re: Mailing to list members
Posted in 1991
> > I recently sent mail out to > > Hermann Hueni, Berne University, Switzerland > Snorri Bergman, Strengur, Iceland Got it! (That is if you mean a copy of ypur lookup-routine). Thanks very much for that. My routine uses a somewhat different approach. I does not use Input Array Without Defaults, but is based on this c-routine: ----snip here----------snip here----------snip here----------snip here------ int n_key(n) int n; { int key; key = rfetchch(); retint(key); return(1); } ----snip here----------snip here----------snip here----------snip here------ Apparantly the "rfetchch()" function waits for input from the keyboard. The user presses ANY key and you can check out what key that was. (E.g. n_key returns 13 for RETURN (enter), 32 for SPACE, 2001 FOR F1 etc.). There are a fey drawbacks however. The CONTROL-R(refresh) won't work while n_key() waits for input. If you ERROR some message then it wont go away when the user presses some key (like it usually does). Check it out: ----snip here----------snip here----------snip here----------snip here------ MAIN DEFINE c CHAR(1), key_pressed INTEGER #The promt stmt is needed because n_key() wont work unless you issue #some i-o stmt from 4gl before PROMPT "Press any key..." FOR CHAR c DISPLAY "Press space bar to terminate" LET key_pressed = n_key(); WHILE key_pressed <> 32 DISPLAY "You pressed:", key_pressed LET key_pressed = n_key(); END WHILE END MAIN ----snip here----------snip here----------snip here----------snip here------ There are quite a few things you can do with this... ------------ Snorri Bergmann | Internet: snorri@strengur.is Strengur Consulting Engineers | Bang: ...!uunet!strengur.is!snorri Storhofdi 15 | Phone: +354 1 685130 112 Reykjavik Iceland | Telefax: +354 1 680628