|
|
| Author |
Message |
|
| Qrilka |
Posted: Sun Jul 22, 2007 10:22 am |
|
|
|
User
Joined: 21 Sep 2006
Posts: 141
|
Is there some 'normal' way to split integer (32 bits) into bytes?
Right now I do this using
|
|
|
| Back to top |
|
| Guest |
Posted: Sun Jul 22, 2007 10:41 am |
|
|
|
Guest
|
<<B4:8, B3:8, B2:8, B1:8>> = <<NUMBER:32>>.
--
dda
On 7/22/07, Kirill Zaborski <qrilka@gmail.com> wrote:
> Is there some 'normal' way to split integer (32 bits) into bytes?
> Right now I do this using
> [ X band 255,
> (X band (255 bsl ) bsr 8,
> (X band (255 bsl 16)) bsr 16,
> (X band (255 bsl 24)) bsr 24]
>
>
> Regard,
> Kirill.
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|