3.7. Walking Along the Stack

[<<<] [>>>]

Examine the variable a again.

#R 11
 34 23 1 * *
-----------------------------------------------------
  009. print " ",t
  010. if t > 1 then MyFunction t-1
 >011. print " *"
  012. end sub
  013.

----------------------------------------------------- #? a undef #_

This is undef because now we examine the local variable. Issue the command u and examine the variable again.

#u
done
#?a
3
#_

Issuing the command u we stepped one level up in the call stack. At that point the variable a is global and has value. That is actually a different variable that happens to have the same name.

Issue the command l to see where we are.

#l

----------------------------------------------------- 012. end sub 013. >014. MyFunction a 015. 016. a = a + 2

----------------------------------------------------- #

To get one level deeper in the stack issue the command d.

#d
done
#l

----------------------------------------------------- 009. print " ",t 010. if t > 1 then MyFunction t-1 >011. print " *" 012. end sub 013.

----------------------------------------------------- #_

If you stepped several levels up in the stack you should issue that many commands d or just one D to go to the bottom of the stack.


[<<<] [>>>]