Manipulating Digits


Closed Thread
Results 1 to 3 of 3
  1. #1

    Unhappy Manipulating Digits

    Greetings all,

    I'm trying to manipulate some data but i'm stuck because i ran out of ideas on how to do it.

    Basically, i have 3 variables ( V1,V2 and V3 - byte sized ) and their values are only from decimal 0 to decimal 9.

    I have another variable ( R - word sized ) and it's value will be from decimal 0 to 999.

    What i'm trying to do is to make R's value to be a combination of all V's.

    I was trying something like ( but i get a sintax error ):

    R dig 0 = V1
    R dig 1 = V2
    R dig 2 = V3

    How can i do this ?

    Thanks

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Manipulating Digits

    R = Byte3*100 + Byte2*10 + Byte1
    Charles Linquist

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Manipulating Digits

    Thank you for the help Charles,

    Cant believe how obvious and simple the solution is.

    My best regards

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts