Of course you can!

by Clippy (Login burger2227)


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$


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$


PRINT a, b, c$


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

Posted on Jun 4, 2012, 1:11 PM

Respond to this message   

Return to Index

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