Changeset 83adc4 in git


Ignore:
Timestamp:
Aug 17, 1999, 11:25:45 AM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
c0f3d7e02a0676a7d38bd1224749eb4848d22c4f
Parents:
f69f4436921e0d441f8eb51518c3f787ce738764
Message:
*hannes: added type check to algfetch


git-svn-id: file:///usr/local/Singular/svn/trunk@3462 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    rf69f44 r83adc4  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.101 1999-08-16 17:53:00 hannes Exp $ */
     4/* $Id: extra.cc,v 1.102 1999-08-17 09:25:45 Singular Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    575575      leftv v = h->next;
    576576      w = r0->idroot->get(v->Name(),myynest);
    577       i0 = IDIDEAL(w);
    578       i1 = idInit(IDELEMS(i0),i0->rank);
    579       for (k=0; k<IDELEMS(i1); k++)
    580       {
    581         i1->m[k] = maAlgpolyFetch(r0, i0->m[k]);
    582       }
    583       res->rtyp = IDEAL_CMD;
    584       res->data = (void*)i1;
    585       return FALSE;
     577      if (w!=NULL)
     578      {
     579        if (IDTYP(w)==IDEAL_CMD)
     580        {
     581          i0 = IDIDEAL(w);
     582          i1 = idInit(IDELEMS(i0),i0->rank);
     583          for (k=0; k<IDELEMS(i1); k++)
     584          {
     585            i1->m[k] = maAlgpolyFetch(r0, i0->m[k]);
     586          }
     587          res->rtyp = IDEAL_CMD;
     588          res->data = (void*)i1;
     589          return FALSE;
     590        }
     591        else if (IDTYP(w)==POLY_CMD)
     592        {
     593          res->rtyp = POLY_CMD;
     594          res->data = (void*)maAlgpolyFetch(r0,IDPOLY(w));
     595          return FALSE;
     596        }
     597        else
     598          WerrorS("`system(\"algfetch\",<ideal>/<poly>)` expected");
     599      }
     600      else
     601        Werror("`%s` not found in `%s`",v->Name(),h->Name());
    586602    }
    587603    else
Note: See TracChangeset for help on using the changeset viewer.