Metropoli BBS
VIEWER: popnesu.c MODE: TEXT (ASCII)
/* Copyright (C) 1992 by Thomas Glen Smith.  All Rights Reserved. */
/* popnesu APL2 V1.0.0 *************************************************
* Popnesu is called from popnest when the result is to be a nested or  *
* mixed data type array.                                               *
***********************************************************************/
#define INCLUDES APLCB+APLTOKEN
#include "includes.h"
Apltoken popnesu(hdr,out)
void *hdr; /* operand stack */
Aplcb out; /* new output operand */
{
     Aplcopy; Endoper; Execgetp; Perm; Pop;
     extern int aplerr;
     Aplcb *op,wrk;
     int datacnt;

     op = out->aplptr.aplapl;
     datacnt = out->aplcount;
     while( datacnt-- ) {
          if (aplerr) wrk = NULL;
          else {
               wrk = execgetp(pop(hdr)); /* pop token, get aplcb ptr */
               if (aplerr == 0)
                    if (aplerr == 0 && !(wrk->aplflags & APLTEMP))
                         wrk = aplcopy(wrk);
                    else wrk = perm(wrk);
          }
          *op++ = wrk;
     }
}
[ RETURN TO DIRECTORY ]