- Timestamp:
- Nov 30, 2011, 8:09:42 PM (12 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 1f2d3b43da540e3165c73bc71f9dd23f9ec5170f
- Parents:
- fa90aa36e4c6456322929d91d473198525dbf299
- Location:
- Singular
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rfa90aa r91ef34 228 228 return pHead(p); 229 229 } 230 231 int iiTokType(int op) 232 { 233 for (int i=0;i<sArithBase.nCmdUsed;i++) 234 { 235 if (sArithBase.sCmds[i].tokval==op) 236 return sArithBase.sCmds[i].toktype; 237 } 238 return 0; 239 } 230 240 231 241 /*=================== operations with 2 args.: static proc =================*/ -
Singular/ipshell.h
rfa90aa r91ef34 183 183 BOOLEAN iiParameter(leftv p); 184 184 BOOLEAN iiAlias(leftv p); 185 186 int iiTokType(int op); 185 187 /* ================================================================== */ 186 188 int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root, -
Singular/subexpr.cc
rfa90aa r91ef34 1643 1643 else nok=TRUE; 1644 1644 } 1645 else if (d->argc==1) 1646 { 1647 nok=d->arg1.Eval(); 1648 nok=nok||iiExprArith1(this,&d->arg1,d->op); 1649 } 1650 else if(d->argc==2) 1651 { 1652 nok=d->arg1.Eval(); 1653 nok=nok||d->arg2.Eval(); 1654 nok=nok||iiExprArith2(this,&d->arg1,d->op,&d->arg2); 1655 } 1656 else if(d->argc==3) 1657 { 1658 nok=d->arg1.Eval(); 1659 nok=nok||d->arg2.Eval(); 1660 nok=nok||d->arg3.Eval(); 1661 nok=nok||iiExprArith3(this,d->op,&d->arg1,&d->arg2,&d->arg3); 1662 } 1663 else if(d->argc!=0) 1664 { 1665 nok=d->arg1.Eval(); 1666 nok=nok||iiExprArithM(this,&d->arg1,d->op); 1667 } 1668 else // d->argc == 0 1669 { 1670 nok = iiExprArithM(this, NULL, d->op); 1645 else 1646 { 1647 int toktype=iiTokType(d->op); 1648 if ((toktype==CMD_M) 1649 ||( toktype==ROOT_DECL_LIST) 1650 ||( toktype==IDEAL_CMD) 1651 ||( toktype==MODUL_CMD)) 1652 { 1653 if (d->argc <=3) 1654 { 1655 if (d->argc>=1) nok=d->arg1.Eval(); 1656 if ((!nok) && (d->argc>=2)) 1657 { nok=d->arg2.Eval(); d->arg1.next=&d->arg2; } 1658 if ((!nok) && (d->argc==3)) 1659 { nok=d->arg3.Eval(); d->arg2.next=&d->arg3; } 1660 if (d->argc==0) 1661 nok=nok||iiExprArithM(this,NULL,d->op); 1662 else 1663 nok=nok||iiExprArithM(this,&d->arg1,d->op); 1664 d->arg1.next=NULL; 1665 d->arg2.next=NULL; 1666 d->arg3.next=NULL; 1667 } 1668 else 1669 { 1670 nok=d->arg1.Eval(); 1671 nok=nok||iiExprArithM(this,&d->arg1,d->op); 1672 } 1673 } 1674 else if (d->argc==1) 1675 { 1676 nok=d->arg1.Eval(); 1677 nok=nok||iiExprArith1(this,&d->arg1,d->op); 1678 } 1679 else if(d->argc==2) 1680 { 1681 nok=d->arg1.Eval(); 1682 nok=nok||d->arg2.Eval(); 1683 nok=nok||iiExprArith2(this,&d->arg1,d->op,&d->arg2); 1684 } 1685 else if(d->argc==3) 1686 { 1687 nok=d->arg1.Eval(); 1688 nok=nok||d->arg2.Eval(); 1689 nok=nok||d->arg3.Eval(); 1690 nok=nok||iiExprArith3(this,d->op,&d->arg1,&d->arg2,&d->arg3); 1691 } 1692 else if(d->argc!=0) 1693 { 1694 nok=d->arg1.Eval(); 1695 nok=nok||iiExprArithM(this,&d->arg1,d->op); 1696 } 1697 else // d->argc == 0 1698 { 1699 nok = iiExprArithM(this, NULL, d->op); 1700 } 1671 1701 } 1672 1702 }
Note: See TracChangeset
for help on using the changeset viewer.