/**  Stack Manipulation Warnings  **/
/*A: K McIsaac*/
/*S: University of Western Australia, Nedlands 6009, Australia*/
/*D: January, 1988 */
/*K: Stack, Push, Pop, Top, Warnings */
/*QV: XStack */

<<XPrW
<<XStack

Push[$expr, $stack_=If[~Listp[$stack],PrW["Push: Bad stack format"]]] :: \
	Push[$expr, $stack]

Pop[$stack_= If[~Listp[$stack],PrW["Pop: Bad stack format"]]] :: \
	Pop[$stack]
Pop[$stack_=If[Listp[$stack]&Len[$stack]=0,PrW["Pop: Stack empty"]]]:: \
	Pop[$stack]

Top[$stack_= If[~Listp[$stack],PrW["Top: Bad stack format"]]] :: \
	Top[$stack]
Top[$stack_=If[Listp[$stack]&Len[$stack]=0,PrW["Top: Stack empty"]]]:: \
	Top[$stack]

