Comma ending file reading, how do I disable? - Programmers Heaven

Howdy, Stranger!

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

Categories

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.