PDA

Click to See Complete Forum and Search --> : Form Feeds


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.

Jan 26th, 2000, 01:20 AM
Chr(10) is line feed, form feed misses a page i think.


Visit my embrionic website...
www.dreamwater.com/tech/wossname/ (http://www.dreamwater.com/tech/wossname/)

------------------

Wossname,
Email me: wossnamex@talk21.com :)

mgifford
Jan 26th, 2000, 11:56 AM
I need the code to get my program to count the number of Form Feeds (Chr$(12)) in a file. Can anyone help?