sub form1_load open "words.data" for input as #1 dim word as string while eof(1)=0 input #1,word if left(word,1)="a" then print word end if wend close #1 end sub
open words.data for input as #1 do while not eof(1) line input #1,tempstr if left(tempstr,1)="a" then str=str+tempstr+vbcrlf end if loop close #1 label1.caption=str
急求vb程序编写!!在顺序文件words.dat 中有一批英文单词,将他们以a打 ... open "words.data" for input as #1 dim word as string while eof(1)=0 input #1,word if left(word,1)="a" then print word end if wend close #1 end sub