on rememberStack
global backTrackStacks
get short name of this stack
if it is not last line of backTrackStacks -- prevent consecutive duplicates
then put it & return after backTrackStacks
end rememberStack
on goBackStack
global backTrackStacks
get backTrackStacks
put last line of it into dest
delete last line of it
if dest is empty then go home else go to stack dest
put it into backTrackStacks -- global changed during go
end goBackStack
This article is adapted from the Claris Tech Info database.