Abstract type: Difference between revisions
Content added Content deleted
(→{{header|Genyris}}: F# added) |
m (→{{header|F Sharp|F#}}: typo) |
||
Line 358: | Line 358: | ||
}</lang> |
}</lang> |
||
=={{header|F Sharp|F#}}== |
=={{header|F Sharp|F#}}== |
||
A type with only abstract members and without constructors is an '''interface''' (when not marked with the <code>AbstractClass</code> |
A type with only abstract members and without constructors is an '''interface''' (when not marked with the <code>AbstractClass</code> attribute). Example: |
||
<lang fsharp>type Shape = |
<lang fsharp>type Shape = |
||
abstract Perimeter: unit -> float |
abstract Perimeter: unit -> float |