In this case, buz is a 'var' (instead of a 'val'). A 'var' is always
a left-value.

On Sat, Aug 20, 2016 at 12:52 AM, Kiwamu Okabe <[email protected]> wrote:

> Hi Hongwei,
>
> On Sat, Aug 20, 2016 at 1:44 PM, Hongwei Xi <[email protected]> wrote:
> > If you do:
> >
> > val foo = $extval(struct_foo, "foo")
> >
> > the foo is a value (a flat record); it cannot be used as a left-value.
>
> Thanks. It means the answer for following:
>
> > Totally, `$extval` can only maintain viewtype as pointer. Is it right?
>
> However, following code is using flat record with well-typed...
>
> ```
>   var buz: @{ a = int, b = ptr }
>   val () = buz.a := 1
> ```
>
> Best regards,
> --
> Kiwamu Okabe at METASEPI DESIGN
>
> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/ats-lang-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ats-lang-users/CAEvX6dnRibuCXTDgv9gkLoYC92eRz
> 09eoEYi0cu42zBgJWd5mA%40mail.gmail.com.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLrkP_RVYdTbhrw1kPNSLXMJZx1-JEZ03OzJkiehHJEd%3Dg%40mail.gmail.com.

Reply via email to