Results 1 to 3 of 3

Thread: Changing characters

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    4

    Question Changing characters

    Hi

    I have a file which contains Linefeeds(Lf) as end of line terminators. But I really want to use the vb function Line Input to read upto the end of each line, which I know only reads upto Cr or CrLf. Is there anyway to 'fool' the function into thinking that Lf is Cr?

    I know there are other ways of dealing with these characters, but finding the solution for this would be really useful.

    Thanks

  2. #2
    jim mcnamara
    Guest
    I don't get the problem. Do this:

    Code:
    Dim a as string
    Dim arr() as string
    open "myfile" for input as #1
    a=input(lof(1),1)
    arr=Split(a,Chr(10) )  'oops edit : change 13 to 10
    '  each element of arr now is one line of text.....
    ' just like you had read it it with line input

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    4
    Thanks very much.

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