Results 1 to 3 of 3

Thread: How to I access individual characters from a string?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Post

    I am trying to write a Hex(string) to Dec(integer function). The thing is I dont know how to access individual characters from a string. E.G if the string was "9F"

    I want to be able to access the "9" then the "f" e.g

    firstletter= mystring(0)
    secondletter = mystring(1)

    but obviously this does`nt work

    Help!! Any ideas anyone??

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Use the Mid function to extract the individual characters.

    ------------------
    Marty

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Post

    Thanks mate, works a treat now.

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