(a)算法的PASCAL語言過程描述(編者略)
typedef struct glistnode
{int tag;
struct glistnode *next;
union{char data;
struct{struct glistnode *hp
}val;
}*glist
glist reverse(p)
glist p;
{glist q
if(p==NULL) q=NULL;
else
{if__(
q
else {__(
if __(
{t=reverse(p
while(s
s
s=s
s
else {q=(glist)malloc(sizeof(gnode));q
q
}
}
return(q);
}【上海大學
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/22782.html