Metropoli BBS
VIEWER: matchget.c MODE: TEXT (ASCII)
/*Copyright (C) 1992, 1995 by Thomas Glen Smith.  All Rights Reserved.*/
/* matchget APL2 V1.0.0 ************************************************
* Called from matchoks when it is time to replace an empty variable    *
* with one of a different type.                                        *
***********************************************************************/
#define INCLUDES APLCB
#include "includes.h"
Aplcb matchget(old,newtype)
Aplcb old;
int newtype;
{
	Endoper; Getcb; Intcopy;
	Aplcb out;
	int *ip,rank;

	out = getcb(NULL,0,newtype+APLTEMP,(rank = old->aplrank),NULL);
	if (out == NULL)
		return(NULL); /* error - probably out of storage */
	if (rank > 1) /* copy dimensions? */
		ip = intcopy(out->apldim,old->apldim,rank,1);
	endoper(old); /* old is empty */
	return(out);
}
[ RETURN TO DIRECTORY ]