[ALLY] Re: Trouble with timers???
From: tbrownell:ya:hoo at: 24-Apr-2001 19:43
Thank you, that was very helpful. But why then does this happen?
a: [42]
a: []
empty? a
== true
Andrew Martin <[Al--Bri--xtra--co--nz]> wrote:
Terry wrote:
> If you click "Start" "Stop" "Finish" "Clear".. continuously, the sum
grows and grows... it seems the blk is not clearing?
That's right. You're not 'clear-ing the block, merely assigning it to a
block. See:
button "Clear" [blk: [] d: 0 y/text: "00:00:00" show y ]
Note that the block! that 'blk is referring to, isn't 'clear-ed at all.
To remove all the values in 'blk, do:
clear blk
Note that in Rebol, the words:
blk: []
mean set the word 'blk to the value []. In otherwords, in your program,
here:
blk: [] d:
the block between "blk:" and " d: " is where the value of the block is.
The block is not "in" 'blk. It's literally in your script.
Rebol words act like pointers or references do in other languages.
Andrew Martin
ICQ: 26227169 http://members.nbci.com/AndrewMartin/