Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ames!ucsd!sdcc6!sdcc13!wernst From: wernst@sdcc13.ucsd.edu (WarDoggie woof woof..) Newsgroups: comp.sys.atari.st Subject: Re: GFA Basic timeout INP possible ? Keywords: GFA Message-ID: <21046@sdcc6.ucsd.edu> Date: 28 Jun 91 16:38:47 GMT References: <035236.9564@timbuk.cray.com> Sender: news@sdcc6.ucsd.edu Organization: University of California, San Diego Lines: 21 In article <035236.9564@timbuk.cray.com> mpj@sequoia.cray.com (M. P. Johnson) writes: > >Does anyone know if GFA Basic will allow [timeouts]? Apparently not; >so far my programs hang on the INP if there is no more input. Check if there's anything waiting for you with INP?(#channel). It'll return a TRUE if there is, a FALSE if there ain't. If you want to time input, say with a FOR loop: FUNCTION get_input FOR i%=1 TO 1000 IF INP?(#1)=TRUE THEN RETURN INP(#1) ENDIF NEXT i% RETURN 0 ! Or whatever ENDFUNC (I assume you're using GFA 3.x, too. I don't know about 2.x...) -- Greg Knauss, on a friend's account...