Singly-linked list/Element definition: Difference between revisions
Content added Content deleted
(add task to ARM64 assembly Raspberry Pi) |
No edit summary |
||
Line 866: | Line 866: | ||
Data: INTEGER |
Data: INTEGER |
||
END;</lang> |
END;</lang> |
||
=={{header|Nanoquery}}== |
|||
The simplest version in Nanoquery is similar to the C version: |
|||
<lang nanoquery>class link |
|||
declare data |
|||
declare next |
|||
end</lang> |
|||
Like Java, it is possible to add a constructor that allows us to set the values on initialization. |
|||
<lang nanoquery>class link |
|||
declare data |
|||
declare next |
|||
def link(data, next) |
|||
this.data = data |
|||
this.next = next |
|||
end |
|||
end</lang> |
|||
=={{header|Nim}}== |
=={{header|Nim}}== |