bpa;483515 Wrote: 
> (i) encode_number is called with various size numbers such as 1,4 and 8
> bytes so the swapDouble should only be done when length is 8.
> 
Isn't it called with any perl number but always returns an 8 byte
string as its always returning the result of pack 'd'? 

> 
> (ii) when decoding swapDoubles should be done after swapbytes so
> decode_number should be
> return unpack('d', swapDoubles(swap( $_[0]) ) );
> 
Not sure I understand how it becomes reversable if this is the case -
should we not be able to encode and decode a number and get back to the
original..?

Anyway I'm possibly not thinking straight so happy to be proved wrong.

Perhaps someone can try it and let me how wrong it is!


-- 
Triode
------------------------------------------------------------------------
Triode's Profile: http://forums.slimdevices.com/member.php?userid=17
View this thread: http://forums.slimdevices.com/showthread.php?t=70812

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to