Results 1 to 4 of 4

Thread: Outputting LineFeed and Binary Zero

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736

    Question Outputting LineFeed and Binary Zero

    Hi again,

    I am using the following code to output a string to a file.
    Code:
        intFileNum = FreeFile
        Open dlnPath For Output As #intFileNum
        transactContents = finPath & "\orig\" & _
                           Right$(inputDLN, 4) & vbLf & _
                           tifList2 & "^" & inputDLN & "^1"
        Print #intFileNum, transactContents
        Close #intFileNum
    At the end of the string, when I print out the ASC values of the string, I am getting 10 0 13 10 0. A linefeed, binary zero, cursor return, linefeed and binary zero.

    I need only 10 0 to be output, a linefeed and binary zero.

    Any ideas?

    Thanks.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    Anyone at all ?

    The Print command appears to place chr(13) chr(10) and chr(0) at the end of the output line.

    I tried using a TextStream object to write out the line, but it puts the same characters.

    I need to get rid of the chr(13).

    Thanks.

  3. #3
    Guest
    Suggestion--instead of vbLf, try using vbCrLf ?

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    The vbLf that I have in the middle of the string is OK. At the end of my output string I am not putting in any line feeds or carriage returns. It looks like the Print command does that automatically.

    I have tried every combination I can think of at the end of the string, but VB still puts in a carriage return.

    Just wondering if there is a way to over-ride what VB is doing for me. I just need the linefeed (chr(10)) and binary 0 (chr(0)).

    Thanks.

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