Results 1 to 10 of 10

Thread: End of File

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    21

    End of File

    How do you set a character equal to the "end of file" character?

    dim c as char = ?????

  2. #2
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: End of File

    VB Code:
    1. Dim c As Char = Convert.ToChar(0)


  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    21

    Re: End of File

    that is end of line, I need end of file

  4. #4
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: End of File

    Quote Originally Posted by Skydiver78
    that is end of line, I need end of file
    No, it isnt. End of line is char 13 and char 10.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    21

    Re: End of File

    After running

    Dim c As Char = Convert.ToChar(0)

    c is nothing

  6. #6
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: End of File

    VB Code:
    1. debug.print(cstr(convert.toint32(c)))

    edit*

    Why dont you try the code before wasting any more of my time

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    21

    Re: End of File

    I did run the code,

    Dim c As Char = Convert.ToChar(0)

    returned a value of NOTHING for c

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    21

    Re: End of File

    Yep, just ran it again...NOTHING!

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    21

    Re: End of File

    I appreciate you trying however.

  10. #10
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: End of File

    VB Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         Dim c As Char = Convert.ToChar(0)
    3.         Debug.Print(CStr(Convert.ToInt32(c)))
    4.     End Sub

    Look, using this code it will say 0. I assume it converts 0 to nothing, I dont know. It still retains its value of zero. That is the null char that ends a file.

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