parse stack overflow
[1/3] from: jmalv::hotmail::com at: 9-Mar-2002 14:34
Can anybody give me any hints why this small script causes stack overflow ?
thanks
Jose
REBOL []
txt-parser: make object! [
text: make string! 30000
html-code: [
["<" thru ">"] |
copy txt to "<" (append text txt)
]
parse: func [source [string!]] [
clear text
parse source [to "<" some html-code ]
text
]
]
;===========================================
page: read %dummy.html
result: make string! 0
result: txt-parser/parse page
print result
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
[2/3] from: rebol:optushome:au at: 10-Mar-2002 0:24
First guess is because you are redefining the Parse function and then
calling it recursively.
Cheers,
Allen K
[3/3] from: jmalv:ho:tmail at: 9-Mar-2002 17:49
Thanks. This is a stupid mistake !