Changeset c35d87 in git


Ignore:
Timestamp:
Apr 3, 2003, 3:22:00 PM (21 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
48d7c9636f8b5c6edaa03cf850cf8e868e5eb605
Parents:
56216bbcb77c03ae9c5eb9842cc2e37d779e319b
Message:
*hannes: ALLOW_PLURAL chnages


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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r56216b rc35d87  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.294 2003-03-31 12:27:00 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.295 2003-04-03 13:22:00 Singular Exp $ */
    55
    66/*
     
    6060#define ALLOW_PLURAL    ,1
    6161#define NO_PLURAL       ,0
     62#define COMM_PLURAL     ,2
    6263#else
    6364#define ALLOW_PLURAL
    64 #define NO_PLURAL 
     65#define NO_PLURAL
     66#define COMM_PLURAL
    6567#endif
    6668
     
    8385  short res;
    8486  short arg;
    85 #ifdef HAVE_PLURAL 
     87#ifdef HAVE_PLURAL
    8688  short valid_for_plural;
    87 #endif 
     89#endif
    8890};
    8991
     
    9698  short arg1;
    9799  short arg2;
    98 #ifdef HAVE_PLURAL 
     100#ifdef HAVE_PLURAL
    99101  short valid_for_plural;
    100 #endif 
     102#endif
    101103};
    102104
     
    110112  short arg2;
    111113  short arg3;
    112 #ifdef HAVE_PLURAL 
     114#ifdef HAVE_PLURAL
    113115  short valid_for_plural;
    114 #endif 
     116#endif
    115117};
    116118struct sValCmdM
     
    120122  short res;
    121123  short number_of_args; /* -1: any, -2: any >0, .. */
    122 #ifdef HAVE_PLURAL 
     124#ifdef HAVE_PLURAL
    123125  short valid_for_plural;
    124 #endif 
     126#endif
    125127};
    126128#endif
     
    740742          v->name = omStrDup(v->name);
    741743        }
    742         v->req_packhdl=IDPACKAGE(packhdl);
    743         v->packhdl=IDPACKAGE(packhdl);
     744        v->req_packhdl=IDPACKAGE(packhdl);
     745        v->packhdl=IDPACKAGE(packhdl);
    744746        syMake(v, v->name, packhdl);
    745747        memcpy(res, v, sizeof(sleftv));
     
    58355837      {
    58365838        res->rtyp=dArith2[i].res;
     5839        #ifdef HAVE_PLURAL
     5840        if ((currRing!=NULL) && (rIsPluralRing(currRing)))
     5841        {
     5842          if (dArith2[i].valid_for_plural==NO_PLURAL)
     5843          {
     5844            Werror("not implemented for non-commutative rings");
     5845            break;
     5846          }
     5847          else if (dArith2[i].valid_for_plural==COMM_PLURAL)
     5848          {
     5849            Warn("assume commutative subalgebra for cmd `%s`,Tok2Cmdname(i));
     5850          }
     5851          /* else ALLOW_PLURAL */
     5852        }
     5853        #endif
    58375854        if (dArith2[i].p(res,a,b))
    58385855        {
     
    58635880          {
    58645881            res->rtyp=dArith2[i].res;
     5882            #ifdef HAVE_PLURAL
     5883            if ((currRing!=NULL) && (rIsPluralRing(currRing)))
     5884            {
     5885              if (dArith2[i].valid_for_plural==NO_PLURAL)
     5886              {
     5887                Werror("not implemented for non-commutative rings");
     5888                break;
     5889              }
     5890              else if (dArith2[i].valid_for_plural==COMM_PLURAL)
     5891              {
     5892                Warn("assume commutative subalgebra for cmd `%s`,
     5893                      Tok2Cmdname(i));
     5894              }
     5895              /* else ALLOW_PLURAL */
     5896            }
     5897            #endif
    58655898            failed= ((iiConvert(at,dArith2[i].arg1,ai,a,an))
    58665899            || (iiConvert(bt,dArith2[i].arg2,bi,b,bn))
     
    59816014      {
    59826015        int r=res->rtyp=dArith1[i].res;
    5983         #ifdef HAVE_PLURAL
    5984         if ((currRing!=NULL) && (rIsPluralRing(currRing)) && (dArith1[i].valid_for_plural==0))
    5985         {
    5986           Werror("not implemented for non-commutative rings");
    5987           break;
    5988         }
    5989         #endif
     6016        #ifdef HAVE_PLURAL
     6017        if ((currRing!=NULL) && (rIsPluralRing(currRing)))
     6018        {
     6019          if (dArith1[i].valid_for_plural==NO_PLURAL)
     6020          {
     6021            Werror("not implemented for non-commutative rings");
     6022            break;
     6023          }
     6024          else if (dArith1[i].valid_for_plural==COMM_PLURAL)
     6025          {
     6026            Warn("assume commutative subalgebra for cmd `%s`,Tok2Cmdname(i));
     6027          }
     6028          /* else ALLOW_PLURAL */
     6029        }
     6030        #endif
    59906031        if (r<0)
    59916032        {
     
    60246065        {
    60256066          int r=res->rtyp=dArith1[i].res;
    6026           #ifdef HAVE_PLURAL
    6027           if ((currRing!=NULL) && (rIsPluralRing(currRing)) && (dArith1[i].valid_for_plural==0))
    6028           {
    6029             Werror("not implemented for non-commutative rings");
    6030             break;
    6031           }
    6032           #endif
     6067          #ifdef HAVE_PLURAL
     6068          if ((currRing!=NULL) && (rIsPluralRing(currRing)))
     6069          {
     6070            if (dArith1[i].valid_for_plural==NO_PLURAL)
     6071            {
     6072              Werror("not implemented for non-commutative rings");
     6073              break;
     6074            }
     6075            else if (dArith1[i].valid_for_plural==COMM_PLURAL)
     6076            {
     6077              Warn("assume commutative subalgebra for cmd `%s`,Tok2Cmdname(i));
     6078            }
     6079            /* else ALLOW_PLURAL */
     6080          }
     6081          #endif
    60336082          if (r<0)
    60346083          {
     
    61456194      {
    61466195        res->rtyp=dArith3[i].res;
    6147         #ifdef HAVE_PLURAL
    6148         if ((currRing!=NULL) && (rIsPluralRing(currRing)) && (dArith3[i].valid_for_plural==0))
    6149         {
    6150           Werror("not implemented for non-commutative rings");
    6151           break;
    6152         }
    6153         #endif
     6196        #ifdef HAVE_PLURAL
     6197        if ((currRing!=NULL) && (rIsPluralRing(currRing)))
     6198        {
     6199            if (dArith3[i].valid_for_plural==NO_PLURAL)
     6200            {
     6201              Werror("not implemented for non-commutative rings");
     6202              break;
     6203            }
     6204            else if (dArith3[i].valid_for_plural==COMM_PLURAL)
     6205            {
     6206              Warn("assume commutative subalgebra for cmd `%s`,Tok2Cmdname(i));
     6207            }
     6208            /* else ALLOW_PLURAL */
     6209        }
     6210        #endif
    61546211        if (dArith3[i].p(res,a,b,c))
    61556212        {
     
    61826239            {
    61836240              res->rtyp=dArith3[i].res;
    6184               #ifdef HAVE_PLURAL
    6185               if ((currRing!=NULL)
    6186               && (rIsPluralRing(currRing))
    6187               && (dArith3[i].valid_for_plural==0))
    6188               {
    6189                 Werror("not implemented for non-commutative rings");
    6190                 break;
    6191               }
    6192               #endif
     6241              #ifdef HAVE_PLURAL
     6242              if ((currRing!=NULL)
     6243              && (rIsPluralRing(currRing)))
     6244              {
     6245                if (dArith3[i].valid_for_plural==NO_PLURAL)
     6246                {
     6247                   Werror("not implemented for non-commutative rings");
     6248                   break;
     6249                 }
     6250                 else if (dArith3[i].valid_for_plural==COMM_PLURAL)
     6251                 {
     6252                   Warn("assume commutative subalgebra for cmd `%s`,Tok2Cmdname(i));
     6253                 }
     6254                 /* else ALLOW_PLURAL */
     6255              }
     6256              #endif
    61936257              failed= ((iiConvert(at,dArith3[i].arg1,ai,a,an))
    61946258                || (iiConvert(bt,dArith3[i].arg2,bi,b,bn))
     
    63256389            a->next->next->name=NULL;
    63266390            a->next->next->attribute=NULL;
    6327             /* no break */
     6391            /* no break */
    63286392          case 2:
    63296393            memcpy(&d->arg2,a->next,sizeof(sleftv));
     
    63336397            a->next->attribute=NULL;
    63346398            d->arg2.next=NULL;
    6335             /* no break */
     6399            /* no break */
    63366400          case 1:
    63376401            d->arg1.next=NULL;
     
    63616425      {
    63626426        res->rtyp=dArithM[i].res;
    6363         #ifdef HAVE_PLURAL
    6364         if ((currRing!=NULL)
    6365         && (rIsPluralRing(currRing))
    6366         && (dArithM[i].valid_for_plural==0))
    6367         {
    6368           Werror("not implemented for non-commutative rings");
    6369           break;
    6370         }
    6371         #endif
     6427        #ifdef HAVE_PLURAL
     6428        if ((currRing!=NULL)
     6429        && (rIsPluralRing(currRing)))
     6430        {
     6431          if (dArithM[i].valid_for_plural==NO_PLURAL)
     6432          {
     6433            Werror("not implemented for non-commutative rings");
     6434            break;
     6435          }
     6436          else if (dArithM[i].valid_for_plural==COMM_PLURAL)
     6437          {
     6438            Warn("assume commutative subalgebra for cmd `%s`,Tok2Cmdname(i));
     6439          }
     6440          /* else ALLOW_PLURAL */
     6441        }
     6442        #endif
    63726443        if (dArithM[i].p(res,a))
    63736444        {
Note: See TracChangeset for help on using the changeset viewer.