Content added Content deleted
|
|
Line 469: |
Line 469: |
|
}</lang> |
|
}</lang> |
|
|
|
|
⚫ |
|
|
⚫ |
<lang freebasic>' FB 1.05.0 Win64 |
|
|
|
|
⚫ |
' FB does not currently support multiple inheritance. Composition has to be used instead if one wants |
|
⚫ |
' to (effectively) inherit from more than one class. In some cases, this might arguably be a better |
|
⚫ |
|
|
|
|
|
⚫ |
Type Camera Extends Object ' if virtual methods etc needed |
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
Type Phone Extends Object |
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
Type CameraPhone Extends Phone ' single inheritance |
|
⚫ |
cam As Camera ' using composition here |
|
⚫ |
|
|
⚫ |
|
|
|
|
|
|
|
=={{header|Forth}}== |
|
=={{header|Forth}}== |
Line 533: |
Line 514: |
|
camera phone |
|
camera phone |
|
</lang> |
|
</lang> |
|
|
|
|
⚫ |
|
|
⚫ |
<lang freebasic>' FB 1.05.0 Win64 |
|
|
|
|
⚫ |
' FB does not currently support multiple inheritance. Composition has to be used instead if one wants |
|
⚫ |
' to (effectively) inherit from more than one class. In some cases, this might arguably be a better |
|
⚫ |
|
|
|
|
|
⚫ |
Type Camera Extends Object ' if virtual methods etc needed |
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
Type Phone Extends Object |
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
Type CameraPhone Extends Phone ' single inheritance |
|
⚫ |
cam As Camera ' using composition here |
|
⚫ |
|
|
⚫ |
|
|
|
|
|
|
=={{header|Go}}== |
|
=={{header|Go}}== |