use record in bit syntax

Carsten Schultz <>
Fri Oct 1 01:03:52 CEST 2004


On Thu, Sep 30, 2004 at 03:04:16PM -0700, Stephen Han wrote:
> Why can't I use record in the bit syntax?
> 
> ex)
> 
> -record( date, { month, day } ).
> 
> test() ->
>     A = #date{month = 1, day = 20 },
>     << A#date.month/8, A#date.day/8 >>.
> 

It's << (A#date.month):8, (A#date.day):8>>.   

Greetings,

Carsten

-- 
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers, 
fingerprint on my home page.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20041001/28577dea/attachment.bin>


More information about the erlang-questions mailing list