qbasic what is the difference between open "file.dat" for input as #1 or input as #2 -
now on grade 10 , learning open"file.dat" input/output #n once have @ program
cls open "samrat.dat" input #1 input "enter name";n$ write #1,n$ close #1 end
so program save name file use output #n print number. have @ next program
cls open"samrat.dat" input #1 write #1,n$ print n$ close #1 end
so program print or user name. 1 thing confusing me. if use open "samrat.dat" input #5 , change #1 #5 in places output same. dont quite understand how works. if #1 same #1000 need of other number. please tell me
you're right, program work long use same filenumber on places. filenumber token tell different files appart in program.
it possible program access more 1 file @ same time. example read 1 file, process input, , write file.
open infile$ input #1 open outfile$ output #2 input #1, a$ a$ = ucase$(a$) print #2, a$ 'etc.
Comments
Post a Comment