Doubly-linked list/Element definition: Difference between revisions

m
→‎{{header|Phix}}: replaced "notonline" tag with a comment.
(Add swift)
m (→‎{{header|Phix}}: replaced "notonline" tag with a comment.)
Line 674:
=={{header|Phix}}==
In Phix, types are used for validation and debugging rather than specification purposes. For extensive run-time checking you could use
<!--<lang Phix>(notonline)-->
<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>
Line 683:
 
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}}==
7,818

edits