Feature request: CLOSE ALL
#3
To be more precise, I am seeing this with

Code:
IF OPEN(pathname$, "r") THEN ...

which is a useful way to test for the existence of a file. This seems to be the only variation of OPEN that does not require a stream number. But it still requires the stream to be closed afterwards.

I suppose you could use SYSTEM("test -e " + pathname$) but the less we need to shell out, the better

If I've been careful with my streams, it will grab the first available one, normally #1, and CLOSE#1 will get rid of it. But If you have not been careful, well ...

BTW, when I was writing "Programming with yab", I noticed that our documentation does not explicitly mention how many streams are available, so I started increasing the number until I got an error. I was expecting 9, like in QuickBasic. In fact, it is 124. How insane is that? I'd really hate to maintain the program that had 124 files open.
Reply


Messages In This Thread
Feature request: CLOSE ALL - by clasqm - 04-15-2017, 07:08 AM
RE: Feature request: CLOSE ALL - by bbjimmy - 04-15-2017, 09:22 AM
RE: Feature request: CLOSE ALL - by clasqm - 04-16-2017, 03:46 AM
RE: Feature request: CLOSE ALL - by bbjimmy - 04-17-2017, 08:55 AM
RE: Feature request: CLOSE ALL - by clasqm - 04-18-2017, 12:35 AM
RE: Feature request: CLOSE ALL - by bbjimmy - 07-07-2017, 02:41 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)
Free Web Hosting