Results 1 to 4 of 4

Thread: Input string breaking on ","

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Location
    Near A2, MI
    Posts
    5

    Question

    Hello all,
    I've been working on a prog that has an array of 16 combo boxes. These boxes are automatically filled upon loading with 127 different options. When I started defining a file structure to save my prog within I ran into some trouble. I decided that for ease of use (so I would not have to parse 0), I would take those 16 different settings and convert them to a character (ascii/ansi chr range 0 - 255) and this would take up much less space (one byte instead of a max of 3). However, I've ran into a problem with loading the data back in. It seems that whenever vb encounters a 44 or a "," it breaks off the remainder of the string. I'm just loading the data as a single (somewhat long) string.

    I haven't had much time to look into it, but I was wondering if anyone has had similar problems, and/or knows of a solution to my dilemma?

    (BTW I'm using VB 6.0 Ent)

    Thanks!
    in.nom.i.nate (i-nom'e-nit) adj.

    Def: Having no name; annonymous

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    You may have no name, but there is no code either. Show me a snippet and we'll see what we can do.

    Cheers,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  3. #3
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    You're probably experiencing this because you are using the Input statement. Try Line Input instead.
    It works the same but reads an entire line from the file, as it is (without any parsing).

    If that's not the problem, can you provide a snippet or two of your code?

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Location
    Near A2, MI
    Posts
    5
    Thanks Yonatan, the Line Input statement worked. I thought I had already tried it, but what I had tried was on a totally different function .

    Thanks again!

    [Edited by innominate on 11-15-2000 at 05:07 PM]
    in.nom.i.nate (i-nom'e-nit) adj.

    Def: Having no name; annonymous

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