Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| language:interface [2023/04/09 23:01] – [Parameter types] rajit | language:interface [2025/10/06 11:10] (current) – [Interfaces with functions and macros] rajit | ||
|---|---|---|---|
| Line 89: | Line 89: | ||
| Process type ('' | Process type ('' | ||
| + | ==== Interfaces with functions and macros | ||
| + | |||
| + | An interface type can also include function and macro prototypes. | ||
| + | |||
| + | <code act> | ||
| + | export template< | ||
| + | { | ||
| + | methods { | ||
| + | | ||
| + | macro update(int< | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | This defines an interface that exports two methods. Note that, unlike port parameters, method names cannot be changed when a type exports an interface. | ||