Assigning particular value to a variable


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

    Default Assigning particular value to a variable

    Could someone please help with a few lines of code explaining how to do the following:

    If I have :
    Code:
    ValueBig  var WORD
    ValueSm Var Byte
    
    ValueBig=5438
    I would like to get 54 in ValueSm.

    Thanks in advance.
    ___________________
    WHY things get boring when they work just fine?

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


    Did you find this post helpful? Yes | No

    Default Re: Assigning particular value to a variable

    How about

    ValuSM = ValueBig/100
    Charles Linquist

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Assigning particular value to a variable

    Charles, thanks for the reply. What will happen to ".38". Will that be ignored by the PBP?
    ___________________
    WHY things get boring when they work just fine?

  4. #4
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: Assigning particular value to a variable

    Quote Originally Posted by financecatalyst View Post
    What will happen to ".38". Will that be ignored by the PBP?
    Correct. It is integer math.

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