[Haskell-cafe] Basic binary IO

Jamie Love jamie.love at aviarc.com.au
Sun Jan 20 03:35:50 EST 2008


Ah, thanks Don, Brandon,


I looked at this but neglected to read through and understand the 
example enough.

Thanks for the tips, they're a great help.


Don Stewart wrote:
> jamie.love:
>   
>     bmpHeader = runPut $ do
>         put 'B'
>         put 'M'
>         put (0  :: Int32)
>         put (0  :: Int32)
>         put (14 :: Int32)
>
> Yields the lazy bytestring,
>
>     "BM\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\SO"
>   

-- 
Jamie Love
Senior Consultant
Aviarc Australia
Mobile: +61 400 548 048



------------------------------------------------------------ 

This message has been scanned for viruses and dangerous content 
by MailScanner and is believed to be clean.



More information about the Haskell-Cafe mailing list