Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!cyclone02.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!npeersf01.ams.highwinds-media.com!newsfe16.ams2.POSTED!00000000!not-for-mail From: Ian Hamilton Subject: Re: Task Obey madness Newsgroups: comp.sys.acorn.programmer Message-ID: <51edff01b3Ian.Hamilton@AAUG.Net> References: <6353b0ed51.martin@blueyonder.co.uk> <51ede3e23cUCEbin@tiscali.co.uk> <51edf0d282Paul@sprie.nl> <51edfd1bcePaul@sprie.nl> <51edfde787UCEbin@tiscali.co.uk> User-Agent: Pluto/3.04e (RISC-OS/5.16) NewsHound/v1.52-32 Lines: 30 NNTP-Posting-Host: 82.44.196.65 X-Complaints-To: http://netreport.virginmedia.com X-Trace: newsfe16.ams2 1309863840 82.44.196.65 (Tue, 05 Jul 2011 11:04:00 UTC) NNTP-Posting-Date: Tue, 05 Jul 2011 11:04:00 UTC Organization: virginmedia.com Date: Tue, 05 Jul 2011 12:03:52 +0100 Xref: x330-a1.tempe.blueboxinc.net comp.sys.acorn.programmer:512 In article <51edfde787UCEbin@tiscali.co.uk>, John Williams (News) wrote: > In article <51edfd1bcePaul@sprie.nl>, > Paul Sprangers wrote: > > But if the variable IS zeroed, and is called again by a close > > function, wouldn't we have CLOSE#0 in fact again? > Only if you attempt to close it without checking again that it's not > zero. > REM File closing > DEF PROC_Close(handle%) That line should be :- DEF PROC_Close(RETURN handle%) handle% is LOCAL otherwise% > IF handle%<>0 CLOSE#handle% > handle%=0 > ENDPROC > If you used that, it couldn't happen. Ian -- Ian Hamilton (Iyonix RO5) http://www.hamiltoni.pwp.blueyonder.co.uk/