急求vb程序编写!!在顺序文件words.dat 中有一批英文单词,将他们以a打头的单词输出

如题所述

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
温馨提示:内容为网友见解,仅供参考
第1个回答  2009-01-10
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

相似回答
大家正在搜