/* DEC *FindMaximumDecimalArray(pDst, pSrc, size) * * ARGUMENT * DEC *pSrc[]; * DEC *pDst; * int size; * * DESCRIPTION * Given size DEC pointers stored in the array pSrc, finds the maximum * element and stores that value in pDst. * * SIDE EFFECTS * None. * * RETURNS * Returns GM_NULL on error, otherwise pDst. * * POSSIBLE ERROR CODES * * GM_NULLPOINTER * GM_ARGVAL (when size is 0) * * AUTHOR * AA 9-8-87 10:45 * Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved. * * MODIFICATIONS * * */ #include #include "gm.h" #include "gmsystem.h" DEC *FindMaximumDecimalArray(pDst, pSrc, size) DEC *pSrc[]; DEC *pDst; int size; { int i,wRetVal,max; DEC *pm; _MacStart(GM_MAXARR); _MacOutVarD(pDst); if (!pSrc) { _MacErr(GM_NULLPOINTER); _MacRet(GM_NULL); } if (size<=0) { _MacErr(GM_ARGVAL); _MacRet(GM_NULL); } for (i=0; i