Abstract type: Difference between revisions
Content added Content deleted
imported>Regattaguru |
Alextretyak (talk | contribs) m (→{{header|11l}}: Void) |
||
Line 18: | Line 18: | ||
You can declare a virtual function to not have an implementation by using <code>F.virtual.abstract</code> keyword. A type containing at least one abstract virtual function cannot be instantiated. |
You can declare a virtual function to not have an implementation by using <code>F.virtual.abstract</code> keyword. A type containing at least one abstract virtual function cannot be instantiated. |
||
<syntaxhighlight lang="11l">T AbstractQueue |
<syntaxhighlight lang="11l">T AbstractQueue |
||
F.virtual.abstract enqueue(Int item) -> |
F.virtual.abstract enqueue(Int item) -> Void |
||
T PrintQueue(AbstractQueue) |
T PrintQueue(AbstractQueue) |
||
F.virtual.assign enqueue(Int item) -> |
F.virtual.assign enqueue(Int item) -> Void |
||
print(item)</syntaxhighlight> |
print(item)</syntaxhighlight> |
||