Hi,
As per BNF, Streaming operators expression can exist in rhs of an
assignment:
variable_assignment ::= variable_lvalue = expression
expression ::=
primary
...
primary ::=
...
| streaming_expression
variable_lvalue ::=
[ implicit_class_handle . | package_scope ]
hierarchical_variable_identifier select
| { variable_lvalue { , variable_lvalue } }
But in page 75, the following e.g. given:
{>>{ a, b, c }} = 23b1; // error: too few bits in stream
{>>{ a, b, c }} = 96b1; // OK: unpack a = 0, b = 0, c = 1
{>>{ a, b, c }} = 100b1; // OK: unpack as above (4 bits unread)
{ >> {p1, p2, p3, p4}} = up; // OK: unpack p1 = up[3], p2 = up[2],
This is wrong by the BNF.
Thanks
Kausik
Received on Mon Oct 18 06:24:19 2004
This archive was generated by hypermail 2.1.8 : Mon Oct 18 2004 - 06:24:43 PDT