|
-
Jan 26th, 2000, 01:09 AM
#1
Thread Starter
Hyperactive Member
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, 02:20 AM
#2
Chr(10) is line feed, form feed misses a page i think.
Visit my embrionic website...
www.dreamwater.com/tech/wossname/
------------------
Wossname,
Email me: [email protected] 
-
Jan 26th, 2000, 12:56 PM
#3
New Member
I need the code to get my program to count the number of Form Feeds (Chr$(12)) in a file. Can anyone help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|