Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Dumb newbie Rebol question

From: carl::cybercraft::co::nz at: 24-Dec-2003 22:34

Hi Brian, On 05-Sep-03, Brian Parkinson wrote:
> Why > a: copy "" > as opposed to simply > a: "" > I am assuming bad side effects - can someone enlighten me?
Not so much bad effects, as different ones. 'copy creates a new instance of the string, whereas without it REBOL will use the original instance, which may have been modified. Ummm - much easier to show than explain...
>> loop 3 [a: "" append a "cat" print a]
cat catcat catcatcat
>> loop 3 [a: copy "" append a "cat" print a]
cat cat cat
> Thanks, > parki... > ps. I bought Rebol, tthe Official Guide - am I right in assuming > that I need the Core Guide as well? I'm looking more for a > reference, and something that'll get me into some technical details > (esp as regards to dialects).
I find it's the Core Guide I turn to first when I need info I can't get with the Console's help. It's available on the rebol.com site in HTML and PDF, so you can check it out before you buy. It has a chapter on parsing and dialects... http://www.rebol.com/docs/core23/rebolcore-15.html Hope that helps - and welcome to REBOL. -- Carl Read