Glass question (4)

1 Name: Marinus : 2006-07-21 19:57 ID:NBAKPIDH

I needed a function that would accept an argument and store it in variable n. My first attempt was:

[xn=]

Needless to say, it didn't work. By looking at other Glass code, I figured out that this should work:

[xn1=,]

It does, but why? According to the Glass specificatgion, this should assign the value 1 to n, and then drop the argument. What exactly am I doing here? (I'm sorry, but I don't like using code I don't understand).

2 Name: Marinus : 2006-07-22 19:21 ID:NBAKPIDH

never mind, I figured it out :-)

3 Name: Anonymous : 2006-07-23 02:43 ID:t5Iqc4bC

Fill us in, what was wrong?

4 Name: Marinus : 2006-08-02 20:26 ID:NBAKPIDH

I misread the specification, leading me to think that 1 and <1> did the same. They do not, <1> pushes the value 1 to the stack, while 1 pushes the stack element below the topmost stack element to the stack.
Maybe I should get more sleep...

This thread has been closed. You can not post in this thread any longer.