PDA

View Full Version : Assigning particular value to a variable



financecatalyst
- 30th July 2011, 23:13
Could someone please help with a few lines of code explaining how to do the following:

If I have :


ValueBig var WORD
ValueSm Var Byte

ValueBig=5438

I would like to get 54 in ValueSm.

Thanks in advance.

Charles Linquis
- 30th July 2011, 23:34
How about

ValuSM = ValueBig/100

financecatalyst
- 31st July 2011, 00:04
Charles, thanks for the reply. What will happen to ".38". Will that be ignored by the PBP?

SteveB
- 31st July 2011, 00:22
What will happen to ".38". Will that be ignored by the PBP?

Correct. It is integer math.