Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,17 @@
def \Node\ Link, Data; \linked list element definition
int Node, List, N;
def IntSize = 4; \number of bytes in an integer
[List:= 0; \List is initially empty
for N:= 1 to 10 do \build linked list, starting at the end
[Node:= Reserve(IntSize*2); \get some memory to store Link and Data
Node(Link):= List;
Node(Data):= N*N; \insert example data
List:= Node; \List now points to newly created node
];
Node:= List; \traverse the linked list
while Node # 0 do
[IntOut(0, Node(Data)); \display the example data
ChOut(0, ^ );
Node:= Node(Link); \move to next node
];
]