now only a simple variable must be copied
*pvalue = (*ps).stackarray[(*ps).top];