[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Specifying both a constraint expression and initializer in a field
From: |
Jose E. Marchesi |
Subject: |
Specifying both a constraint expression and initializer in a field |
Date: |
Sat, 13 Mar 2021 18:05:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi people!
I just pushed a fix to both master and maint/poke-1 in order to support
specifying both a constraint expression and a field initializer in the
same field.
Example:
type Foo = struct { byte a = 10 : a in [10, 20, 30]; };
They can be also specified in another order:
type Foo = struct { byte a : a in [10, 20, 30] = 10; };
If only an initializer is specified but not a constraint, then an
implicit constraint is built fromt he initializer, like before.
Salud!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Specifying both a constraint expression and initializer in a field,
Jose E. Marchesi <=