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

[REBOL] Re: [ core ] /local refinement not cleared?!

From: al::bri::xtra::co::nz at: 4-Apr-2002 11:58

Norman wrote:
> I would expect, because of tester: "", that everytime the function gets
executed and the /local tester is set to "" by tester: "" ..which it does not??..or sould it again be me ;-) Shoot me please ;-)
>> testing: func [test-size [integer!] /local tester] [
[ tester: "" [ loop test-size [insert tester " A "] [ tester [ ]
>> testing 5
== " A A A A A "
>> testing 5
== " A A A A A A A A A A "
>> testing 5
== " A A A A A A A A A A A A A A A "
>> source testing
testing: func [test-size [integer!] /local tester][ tester: " A A A A A A A A A A A A A A A " loop test-size [insert tester " A "] tester ] The place where the characters in this string " A " are stored is inside the second value in your function body block, which is the string value just after the set-word! "tester:". The second line in the function should read: tester: make string! 100 ; Or whatever size you prefer. to do what you intend. Andrew Martin ICQ: 26227169 http://valley.150m.com/