[REBOL] Re: object function error??
From: joel:neely:fedex at: 23-Jun-2001 2:16
Hi Raimund,
Raimund Dold wrote:
> REBOL []
>
> book: make object! [
> author:
> title:
> info: none
> print: func []
> [
> print [ author ": " title ]
> ]
> ]
>
...
> ** Internal Error: Stack overflow
> ** Near: print [author ": " title]
>
Colin's diagnosis was correct, and in general it's a good
idea IMHO to avoid names already taken. For the sake of
completeness, I'll mention that you *could* do this
book: make oject! [
author: title: info: none
print: func [] [system/words/print [
author ":" title
]
]
because your redefinition of PRINT is only within the
context of BOOK; it won't interfere with the use of
PRINT outside that context (unless you do something
else to cause *that* effect ;-)
-jn-
--
------------------------------------------------------------
Programming languages: compact, powerful, simple ...
Pick any two!
joel'dot'neely'at'fedex'dot'com