Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Comma ending file reading, how do I disable?

mp3guymp3guy Posts: 24Member
I'm using this simple code to read from a text file:

[code]
Private Sub Command5_Click()
Dim data As String

Open "C:coords.txt" For Input As #1
Input #1, data
Close #1
Text1.Text = data
End Sub
[/code]

what it's reading from the file is this:

Form1.PSet (3000, 3000), RGB(0, 0, 255)

In Text1.Text all that appears is:

Form1.PSet (3000

It's cutting it off, or ending at the comma, is there a way to override this? Or replace the comma with a different symbol then change it back?

Comments

  • JonathanJonathan Posts: 2,914Member
    : I'm using this simple code to read from a text file:
    :
    : [code]
    : Private Sub Command5_Click()
    : Dim data As String
    :
    : Open "C:coords.txt" For Input As #1
    : Input #1, data
    : Close #1
    : Text1.Text = data
    : End Sub
    : [/code]
    :
    : what it's reading from the file is this:
    :
    : Form1.PSet (3000, 3000), RGB(0, 0, 255)
    :
    : In Text1.Text all that appears is:
    :
    : Form1.PSet (3000
    :
    : It's cutting it off, or ending at the comma, is there a way to override this? Or replace the comma with a different symbol then change it back?
    :
    Use "Line Input" to read an entire line instead.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • mp3guymp3guy Posts: 24Member
    I can't use line input, I need it to read that string as a whole, and many more in succession. Is there a way I can tell it to read 39 characters at a time?
  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    : I can't use line input, I need it to read that string as a whole, and many more in succession. Is there a way I can tell it to read 39 characters at a time?
    :

    Open it for Binary Access and use something that looks like this:
    sMyString = Space$(39)
    Get #1, , sMyString

    Or something like that
    Greets...
    Richard

Sign In or Register to comment.