英语翻译
Quiteoften,thedatethatauserneedstoworkwithcan’tallbecontainedwithinoneprogram.Thinkofwordprocessingforexample.MicrosoftWordisapowerfulprogramwithathremendousnumberoffeatures(manymorethanmostuserseveruse,orevenknowabout).MicrosoftWord,however,isonlytheshell—thetool—withwhichausercancreateotherdocument.Thedocumentsthattheusercreatesdon'tresidewithinWord,butratherarewrittenasstandaloneentitiestotheuser’sharddrive,ortoafloppydisk.
Thewordfilesarewrittenwithanextensionof.DOC,toindicatethattheyaredoucumentoriginallycreatedwithwordandcapableofbeingreadandeditedbyword.Fileextensionsarebothcluesandmapstotheprogramsthatcreatedthemandtotheprogramswithwhichtheycanberead.
ThesimplesttypeoffileintheWindowsenvironmentistheASCIItextfile-typicallyindicatebya.TXTextension.ASCIItextfilescanbecreatedandreadbyWordPad,NotePad,theEditutilityinDOS,anyhigher-levealeditor,andmanyotherprogrames.Inshort,almostanyprogramcanreadASCIItextfilesand,conversely,almostanyprogramcanwritetoASCIItextfiles,iftheirdefaultfiletypeischanged.
VisualBasichasthecapabilitytoreadandwritetoASCIIfilesthatarebuiltintoit.TheexamplesinthischaptershowhowtoreadexistingASCIIfiles(usingtheexamplesonthecompanionCD),createnewfiles,modifycontens(edit),printsaveandsoforth.Bytheendofthischapter,youwillunderstandthebasicsofinteractingwithASCIIfiles,whichisagoodintroductiontothetopicofinteractingwithalltypesoffiles,thetopicofChapter11.