Singly-linked list/Element definition: Difference between revisions
Content deleted Content added
→{{header|PureBasic}}: Added PureBasic |
Added an ActionScript version. |
||
Line 1: | Line 1: | ||
{{task|Data Structures}}Define the data structure for a [[singly-linked list]] element. Said element should contain a data member capable of holding a numeric value, and the link to the next element should be mutable. |
{{task|Data Structures}}Define the data structure for a [[singly-linked list]] element. Said element should contain a data member capable of holding a numeric value, and the link to the next element should be mutable. |
||
=={{header|ActionScript}}== |
|||
<lang ActionScript>package |
|||
{ |
|||
public class Node |
|||
{ |
|||
public var data:Object = null; |
|||
public var link:Node = null; |
|||
public function Node(obj:Object) |
|||
{ |
|||
data = obj; |
|||
} |
|||
} |
|||
}</lang> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |
||