Shop OBEX P1 Docs P2 Docs Learn Events
How to convert a LONG into a BYTE? — Parallax Forums

How to convert a LONG into a BYTE?

ElectricAyeElectricAye Posts: 4,561
edited 2010-10-05 08:37 in Propeller 1
I've been trying to get the setdate function in FSRW to work properly and I think the reason it's not working for me is because my Real Time Clock object (DS1307) is returning a LONG, but I think FSRW's setdate requires a WORD or a BYTE - I'm not really sure yet. But how do you easily convert a LONG variable into something you can stuff into a BYTE or WORD-sized position? I don't know enough about all these bit shifting techniques going on in FSRW to make any sense of it.

Is there a simple way to fix this problem? :(
Sign In or Register to comment.