[futurebasic] Re: [FB] New to the list--Prefs Files

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 1999 : Group Archive : Group : All Groups

From: Rick Brown <rbrown@...>
Date: Mon, 18 Jan 1999 21:23:10 -0600

bcoe@... wrote:

> Hello, all.
> I just got here,

Welcome!

> nowhere in my four books can I find out how to make a file without the
> user specifying the name!

You said you know how to create a file, so I assume that you're doing so by
means of the OPEN statement.  If you execute a statement like this:

   OPEN #1, "O", theFileName$, recLen, vRefNum%

Then the file will be created if it doesn't already exist (note that you have
to use the "O" option to get this behavior).  Often, theFileName$ contains a
name that the user selected (such as a name returned by the FILES$ function),
but that doesn't have to be the case.  You can stick any name into
theFileName$ that you like.  Also, it is NOT necessary to call the FILES$
function before creating a new file.

Hope this helps.  Keep asking, if it doesn't.

- Rick