binaryDecode

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
brentj84062
Posts: 18
Joined: Wed Jul 12, 2006 4:40 am

binaryDecode

Post by brentj84062 » Tue Mar 06, 2007 2:35 am

I have a string of binary characters from a helper app that I need to convert into ten different numbers. The first two numbers are in int32 format and the remaining eight are in float32. I've been fighting with binaryDecode all day and I'm not getting anywhere. Here is the base 64 encoded version of my data. If anyone can point me to extracting this data properly, I'd be forever grateful.

Base 64 encoded binary: AAAAAj9b6Lo+qptlQJfA8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHA==

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Mar 06, 2007 6:17 pm

Hi brentj84062,

The base64() function will give you the binary version of your data, but I have no idea what you need to do with the result. Maybe I can help more if you tell us which helper app you are using.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

brentj84062
Posts: 18
Joined: Wed Jul 12, 2006 4:40 am

Worked it out

Post by brentj84062 » Tue Mar 06, 2007 9:40 pm

Hello.

Sorry about being so vague. I've figured out the problem, however. The issue was that the float32s were being sent in reverse order. Once I had flipflopped them appropriately, binaryDecode worked perfectly using N2f8 for the dataTypes. Thanks for the reply, anyway.

Thanks,
Brent Anderson

Post Reply