Results 1 to 3 of 3

Thread: Form Feeds

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    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.

  2. #2
    Guest

    Post

    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]

  3. #3
    New Member
    Join Date
    Jan 2000
    Location
    Galloway, OH, US
    Posts
    13

    Post

    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
  •  



Click Here to Expand Forum to Full Width