<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Jed,<br>
<br>
That works (or at least it's taking ages to error :-) )<br>
<br>
<br>
Jed Brown wrote:
<blockquote cite="mid:87odbbmlzj.fsf@59A2.org" type="cite">
<pre wrap="">On 24 Jan 2008, <a class="moz-txt-link-abbreviated" href="mailto:jamie.love@aviarc.com.au">jamie.love@aviarc.com.au</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi there
I have a list of ints, with values between 0 and 255 and I need to print them
out in little endian form to a file.
I've been using Data.Binary for single values, e.g.
runPut $ do
put 'B'
put (0 :: Int32)
</pre>
</blockquote>
<pre wrap=""><!---->
This will be big endian by default. If it needs to be little endian,
use Data.Binary.Put.putWord32le and relatives. With a list, you could
do something like:
runPut $ mapM_ (putWord32le . fromIntegral) listOfInts
I hope this helps.
Jed
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jamie Love
Senior Consultant
Aviarc Australia
Mobile: +61 400 548 048
</pre>
</body>
<br />--
<br />This message has been scanned for viruses and dangerous content
<br>by
<a href="http://www.mailscanner.info"><b>MailScanner</b></a> and is believed to be clean.
</html>