Melanie and her "one line wonders" of code made me curious. In what order does PBP actually calculate and do things?
Let's use her latest code as an example:
Code:
DecimalByte=(BCDByte>>4)*10+(BCDByte & $0F)
Obviously the BCDByte is shifted right by 4 and the top 4 bits are made to 0. After the >>4 the data in BCDByte is "broken" and only the 4 low bits are valid.
Will
Code:
DecimalByte=(BCDByte & $0F)+((BCDByte>>4)*10)
give the same results?
When does the shift command actually change the data in BCDByte?
Bookmarks