You can create a WRITE # file.

by (Login burger2227)
R

 

First OPEN a file name to use that does not exist.

OPEN "MyData.TXT" FOR APPEND AS #1   ' FOR OUTPUT erases the file each time

Then you can WRITE a list of string or numerical data to the file:

WRITE #1,  num1, num2, num3, name$

Result in file:  10, 22, 52, "Nick"

CLOSE #1   'always close a file when done or changing to other modes

To read the file OPEN "MyData.TXT" FOR INPUT AS #1  'make sure file is not empty!

INPUT #1, num1, num2, num3, user$

You can then read the data in a loop for more than one line of data.

Also look up the LOF and  EOF functions.

Posted on Aug 6, 2009, 3:31 PM

Respond to this message   

Goto Forum Home

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement