On Tuesday 28 April 2009, Tim Johnson wrote: > And that is not a bad thing, once you get used to it. For instance, if > you were to assign a series value to a word in a function, rather than > 'copy'ing the value to the word, the word then retains its value, for > subsequent calls to that function. Like a static datatype in C. > Can be useful at times. Sorry - left out an example. Example below: test: func[/local res][ count: [0] count/1: count/1 + 1 print rejoin["this function has been called " count/1 " times"] ] >> loop 6[test] this function has been called 1 times this function has been called 2 times this function has been called 3 times this function has been called 4 times this function has been called 5 times this function has been called 6 times
;; HTH tim -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
