Here is a useful example of self-modifying code. This function will hold
a list of links to be retrieved, and retain it even if an error occurs.
To resume processing all you need to do is run the function again. If you
want to see how many links are left to be processed it's easy, just type
source get-linked-pages. The self-modification is really quite trivial, and
easily read by humans.
get-linked-pages: func [
{retrieve information from the web}
/local links link
][
links: []
if tail? links [
parse read join some-url-path some-file-name [
some [ thru {<A HREF="} copy link to {"}
(append links link)
]
]
]
while [ not tail? links ] [
link: first links
save to file link read join some-url-path link
remove links
]
]
Eric