IonicWind Snippit Manager 2.xx Released! Install it on a memory stick and take it with you! With or without IWBasic!
Started by GWS, July 21, 2009, 08:33:33 am
0 Members and 1 Guest are viewing this topic.
OPENCONSOLEdef myfile: BFILE' try this ..def name1,name2:string' and then this ..'def name1,name2:istring' and then try changing the file type from Binary BFILE to just an ASCII FILE ..' change the file to a suitable location for your own machine ..IF(OPENFILE(myfile,"F:\filetest\CBASICTEST.TXT","W") = 0) name1 = "Sam" name2 = "Tom" WRITE myfile,name1 WRITE myfile,name2 CLOSEFILE myfile PRINT "File created successfully"ELSE PRINT "File could not be created"ENDIFopenfile(myfile,"F:\filetest\CBASICTEST.TXT","R")print len(myfile)closefile myfilePRINT "Press Any Key To Close"DO:UNTIL INKEY$ <> ""CLOSECONSOLEEND
QuoteIn a binary file all data is written in raw form andwill occupy the full size of the dimensioned variable.