netSurfer
Jan 26th, 2000, 12:09 AM
I thought formfeed was chr(10)? Anyway, this may be a little messy but. it works
dim intFreeFile as integer,intI as integer, intJ as integer, strLine as string, intCount as integer
intfreefile = freefile
open "filename.txt" for input as #intfreefile
do until EOF(intfreefile)
Line Input #intFreeFile, strLine 'dumps first line from file into strline
for inti = 1 to len(strline)
intJ = InStr(strLine, chr(12))
if intJ <> 0 then
intCount = intCount + 1
strLine = Mid$(strLine, intJ + 1)
inti = intj
else
exit for
end if
next intI
loop
'that would go through each line looking for the chr(12). IF it finds it, drops off the first part, adds 1 to counter and continues through line at the new location. if it Doesn't find it, exits for that line. Then it load the next line and continues.
I haven't tried it yet but I know the basic structure works.
dim intFreeFile as integer,intI as integer, intJ as integer, strLine as string, intCount as integer
intfreefile = freefile
open "filename.txt" for input as #intfreefile
do until EOF(intfreefile)
Line Input #intFreeFile, strLine 'dumps first line from file into strline
for inti = 1 to len(strline)
intJ = InStr(strLine, chr(12))
if intJ <> 0 then
intCount = intCount + 1
strLine = Mid$(strLine, intJ + 1)
inti = intj
else
exit for
end if
next intI
loop
'that would go through each line looking for the chr(12). IF it finds it, drops off the first part, adds 1 to counter and continues through line at the new location. if it Doesn't find it, exits for that line. Then it load the next line and continues.
I haven't tried it yet but I know the basic structure works.