Named fields in viewtypes?

20 views
Skip to first unread message

Shea Levy

unread,
Sep 11, 2014, 10:44:01 PM9/11/14
to ats-lan...@googlegroups.com
Hi all,

From [1], I see that the view and type of a viewtype can be access with
.0 and .1, respectively. Is there a way to name these like a record?

Thanks,
Shea

[1]: http://www.ats-lang.org/DOCUMENT/INT2PROGINATS/HTML/x3321.html

gmhwxi

unread,
Sep 11, 2014, 11:28:43 PM9/11/14
to ats-lan...@googlegroups.com

vtypedef tptr (a:t@ype, l:addr) = (a @ l | ptr l)

can also be defined as follows:

vypedef tptr (a:t@ype, l:addr) = @{ tptr_pf= a @ l | tptr_ptr= ptr l}

Shea Levy

unread,
Sep 12, 2014, 4:49:27 AM9/12/14
to ats-lan...@googlegroups.com
Ah ha, thanks!

~Shea
> --
> 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 ats-lang-user...@googlegroups.com.
> To post to this group, send email to ats-lan...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ats-lang-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/a7f3d264-4aa2-4810-8a39-a0bedac1f5cf%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages