37 lines
799 B
Plaintext
37 lines
799 B
Plaintext
To run:
|
|
Start up.
|
|
Create a list.
|
|
Write each entry in the list to the console.
|
|
Destroy the list.
|
|
Wait for the escape key.
|
|
Shut down.
|
|
|
|
An entry is a thing with a number.
|
|
|
|
A list is some entries.
|
|
|
|
To add a number to a list:
|
|
Allocate memory for an entry.
|
|
Put the number into the entry's number.
|
|
Append the entry to the list.
|
|
|
|
To create a list:
|
|
Add 1 to the list.
|
|
Add 2 to the list.
|
|
Add 3 to the list.
|
|
Add 6 to the list.
|
|
Add 7 to the list.
|
|
Add 9 to the list.
|
|
|
|
To write an entry to the console:
|
|
Convert the entry's number to a string.
|
|
Write the string to the console.
|
|
|
|
To write each entry in a list to the console:
|
|
Get an entry from the list.
|
|
Loop.
|
|
If the entry is nil, exit.
|
|
Write the entry to the console.
|
|
Put the entry's next into the entry.
|
|
Repeat.
|