Results 1 to 6 of 6

Thread: Open Text File As Binary

  1. #1
    Guest
    Hi!


    Someone can help me?


    I want open text file as binary, read each caracter, search for Line feed Without Carriage Return and replace all Line feed by a carriage return


    Thanks!

    JP III

  2. #2
    Guest
    Where are you kedaman, aren't you suppose to take the floor with this question?

    Code:
    Private Sub Command1_Click()
    Dim buffer As String
    Dim x As String
    Open File For Binary As #1
       buffer = Space(LOF(1))
       Get #1, , buffer
    Close #1
    x = Replace(buffer, vbLf, vbCr)
    End Sub
    Is this what you want JP III?
    I could be...stating the answer differently from what you want (notice: I am never wrong), but I tried .

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Hey Matthew, Kedaman is off for this weekend, he's visiting his mom (and this time I'm NOT wrong!)
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  4. #4
    Addicted Member
    Join Date
    May 2000
    Posts
    247

    Kedaman signature famous code.

    Mako Shark
    Great White

  5. #5
    Guest


    Thanks Matthew!


    JP III

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Back! Hehe, Back to vb-world ;)

    Hey Jop and Matthew, nice to see you two again
    JP III, maybe you wanted to have carriagereturn linefeeds:
    x = Replace(buffer, vbLf, vbCrlf)

    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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