Results 1 to 5 of 5

Thread: String addition problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Location
    Belgium
    Posts
    77

    String addition problem

    Hi,

    Someone can explain me this pls :

    artist = MP3Info.sArtist
    title = MP3Info.sTitle
    space = " - "

    msgbox(artist + space + title) 'it doesn"t work it only show artist

    msgbox(title + space + artist) 'it work fine


    oO

    thanks you

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    It appears that your "artist" variable ends with NULL.

    You can check this by looking at "artist.length".
    If that is greater than you expected it probably means that there are characters with ASCii-code "0" in the end of the string.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Location
    Belgium
    Posts
    77
    Yeah, you are right, the are all 30 char lenght, so I am gonna look in the code of TAG retriever prevent this.

    Thanks

    BTW, do you know how to use the same way that Windows to retrieve all MP3 info cause code I found never work with variable bitrate MP3. And with windows it's always exact.


  4. #4
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    Afraid not. Sorry. But a quick search for ID3 in this forum should produce something.

    I remember seeing quite a few posts about ID3 tags.

    Also, you might wanna have a look in the codebank/utilitybank.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  5. #5
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    Re: String addition problem

    Originally posted by choas
    Hi,

    Someone can explain me this pls :

    artist = MP3Info.sArtist
    title = MP3Info.sTitle
    space = " - "

    msgbox(artist + space + title) 'it doesn"t work it only show artist

    msgbox(title + space + artist) 'it work fine


    oO

    thanks you
    As a matter of practice, it is best not to use variable names which might conflict with reserved names in VB.NET or databases etc. Use strSpace and strTitle.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

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