TIP: Click on subject to list as thread! ANSI
echo: clipper
to: JOOP BUKER
from: DARIO GUZIK
date: 1997-10-13 18:37:00
subject: WHEN - validation in GET`S

Hi Joop Buker, hope you are having a nice day
...Bip...Bip... BE CAREFULl, This message from Joop Buker to All 
   of 02-Oct-97 has been intercepted by ME! Now tell me about WHEN - 
validation in GET'S
 JB> I want to use the WHEN prevalidation. I want that a get is only entered 
 JB> when
 JB> the the previous get was left with the key . I tried this in 
 JB> the
 JB> following way, but that does not work. What is the solution?
 JB> #include "inkey.ch"
 JB> setkey( K_CTRL_ENTER, { || CtrlEnter() } )
 JB> while lastkey() != K_ESC
 JB>    @ 10, 10 say 'A' get cA
 JB>    @ 12, 10 say 'B' get cB when lastkey() ==  K_CTRL_ENTER
 JB>    @ 14, 10 say 'C' get cC
 JB>    read
 JB> enddo
 JB> return
I really don't know what is happening, but You should try using WHEN followed
by a function or a code block.
When this prevalidation didn't work on my programs, I did this and voila'.
Try something like
    @ 12, 10 say 'B' get cB when My_cond()
Static Function My_cod()
return ( lastkey()  ==  K_CTRL_ENTER)
 Read you later...     El Tio Borracho 
 -=> Dario Guzik <=-  Buenos Aires, Argentina -- 
 E-mail: dguzik@dc.uba.ar //  FIDO: 4:900/613.31
... "Transporting really is the safest way to travel." -- Geordi
--- Terminate 3.00/Pro
---------------
* Origin: Hagamos nuestra propia reforma universitaria. !!!!! (4:900/613.31)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.