[comp.lang.pascal] Code needed to find stack permutations

thollowe@oucsace.cs.OHIOU.EDU (Tom Hollowell) (01/26/89)

I don't know if there is a simple way to do it, but does anybody have
a procedure that prints out the possible permutaions of set of numbers,
say 1 to n, using a stack.  I need something like this for a train
simulation I am working on, as it is a simple way to devise which trains
come and go through certain gates.  Turbo or regular pascal would be great, or 
just the algorithim if you have one laying around.  Please e-mail as I doubt anyone would be interested in such a thing .