Doubly-linked list/Element definition: Difference between revisions
Content added Content deleted
(Add swift) |
m (→{{header|Phix}}: replaced "notonline" tag with a comment.) |
||
Line 674: | Line 674: | ||
=={{header|Phix}}== |
=={{header|Phix}}== |
||
In Phix, types are used for validation and debugging rather than specification purposes. For extensive run-time checking you could use |
In Phix, types are used for validation and debugging rather than specification purposes. For extensive run-time checking you could use |
||
<!--<lang Phix> |
<!--<lang Phix>--> |
||
<span style="color: #008080;">enum</span> <span style="color: #000000;">NEXT</span><span style="color: #0000FF;">,</span><span style="color: #000000;">PREV</span><span style="color: #0000FF;">,</span><span style="color: #000000;">DATA</span> |
<span style="color: #008080;">enum</span> <span style="color: #000000;">NEXT</span><span style="color: #0000FF;">,</span><span style="color: #000000;">PREV</span><span style="color: #0000FF;">,</span><span style="color: #000000;">DATA</span> |
||
<span style="color: #008080;">type</span> <span style="color: #000000;">slnode</span><span style="color: #0000FF;">(</span><span style="color: #004080;">object</span> <span style="color: #000000;">x</span><span style="color: #0000FF;">)</span> |
<span style="color: #008080;">type</span> <span style="color: #000000;">slnode</span><span style="color: #0000FF;">(</span><span style="color: #004080;">object</span> <span style="color: #000000;">x</span><span style="color: #0000FF;">)</span> |
||
Line 683: | Line 683: | ||
Memory is automatically reclaimed the moment items are no longer needed. |
Memory is automatically reclaimed the moment items are no longer needed. |
||
Note that automatic typechecking does not occur under pwa/p2js, that is desktop/Phix only (for the debugging stage) but you can invoke a type such as the above explicitly. |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |