After a little chat I realized that the problem was not his code, but rather how he viewed the stack. He was used to high-level versions of stacks, which in most cases are just lists storing arbitrary sized data - so he was looking at the stack as a TList expecting similar behavior.
Weiterlesen...