Of course you can!

by (Login burger2227)
R

 

filename$ = "testfile.dat"

x = 1: y = 2: z$ = "Three"

OPEN filename$ FOR OUTPUT AS #1 'opens and clears an existing file or creates new empty file

WRITE #1, x, y, z$

CLOSE #1

PRINT "File created with data. Press a key!"

K$ = INPUT$(1) 'press a key

OPEN filename$ FOR INPUT AS #2 'opens a file to read it

INPUT #2, a, b, c$

CLOSE #2

PRINT a, b, c$

END



    
This message has been edited by burger2227 on Jun 4, 2012 1:34 PM
This message has been edited by burger2227 on Jun 4, 2012 1:33 PM

Posted on Jun 4, 2012, 1:11 PM

Respond to this message   

Return to Index

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