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

[ALLY] Re: Trouble with timers???

From: al:bri:xtra at: 25-Apr-2001 19:29

Terry wrote:
> Thank you, that was very helpful.
No problem.
> But why then does this happen? > > a: [42] > a: [] > empty? a > == true
You've not understood the simplicity of: 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. In this line: a: [42] the value of block is literally (as it is written) in your script, just after the "a: ". In this line: a: [] the value of the block is just after the "a: ". The values in your script, lie literally in your script. The value isn't stored anywhere else. They are not stored inside "a". For example:
>> script: [a: [] append a 1]
== [a: [] append a 1]
>> do script
== [1]
>> probe script
[a: [1] append a 1] == [a: [1] append a 1] Note that the 'probe reveals that the second value in the block referred to by the word 'script now has a "1" inside it. And if we do it again:
>> do script
== [1 1]
>> probe script
[a: [1 1] append a 1] == [a: [1 1] append a 1] See how the 'append is appending the "1" to the second value in the block? There's no "magic" here. Going from left to right in the block refered to by 'script, the first value "a:" means set the word 'a to refer to the following value which is the second value ("[]" or "[1]" or "[1 1]"). I hope that helps! Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/