use of values stored on STACK

Hi,

  If I am putting 3 values on stack using three different programs and now I want to use these three values in my fourth program. How I will distinguish the values and how to use them ???

 ( I tried to retrieve the value using input statement but it accepts only latest value  :(    )

With three programs you get three stack entries, so you will need three INPUT statements to retrieve all the data.

Typically you stack data on top to make the new entry available to the next INPUT - last in, first out. You could use STACK BOTTOM to return the entries in the “proper” sequence - first in, last out - but for this to work, you must guarantee that no data is on the stack before your first entry is placed there.

If you can’t guarantee the sequence of your three entries on the STACK, due to dynamic program flow, then you need to add control information to each entry to allow you to parse/derive the identification. (e.g. INPUT #TEXT-FIELD and then examine the contents)