all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
include c:\cxpl\codes; \intrinsic 'code' declarations
|
||||
def IntSize=4; \number of bytes in an integer
|
||||
def Size=10; \number of nodes in this linked list
|
||||
int Link, List, Node;
|
||||
[Link:= 0; \build linked list, starting at the end
|
||||
for Node:= 0 to Size-1 do
|
||||
[List:= Reserve(IntSize*2); \get some memory to hold link and data
|
||||
List(0):= Link;
|
||||
List(1):= Node*Node; \insert example data
|
||||
Link:= List; \Link now points to newly created node
|
||||
];
|
||||
Node:= List; \traverse the linked list
|
||||
repeat IntOut(0, Node(1)); CrLf(0); \display the example data
|
||||
Node:= Node(0); \move to next node
|
||||
until Node=0; \end of the list
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue