MCPcopy Create free account
hub / github.com/Singular/Singular / Typ

Method Typ

Singular/subexpr.cc:1048–1154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1046
1047
1048int sleftv::Typ()
1049{
1050 if (e==NULL)
1051 {
1052 switch (rtyp)
1053 {
1054 case IDHDL:
1055 return IDTYP((idhdl)data);
1056 case ALIAS_CMD:
1057 {
1058 idhdl h=(idhdl)data;
1059 return ((idhdl)h->data.ustring)->typ;
1060 }
1061 case VECHO:
1062 case VPRINTLEVEL:
1063 case VCOLMAX:
1064 case VTIMER:
1065 case VRTIMER:
1066 case VOICE:
1067 case VMAXDEG:
1068 case VMAXMULT:
1069 case TRACE:
1070 case VSHORTOUT:
1071 return INT_CMD;
1072 case VMINPOLY:
1073 data=NULL;
1074 return NUMBER_CMD;
1075 case VNOETHER:
1076 data=NULL;
1077 return POLY_CMD;
1078 //case COMMAND:
1079 // return COMMAND;
1080 default:
1081 return rtyp;
1082 }
1083 }
1084 int r=0;
1085 int t=rtyp;
1086 void *d=data;
1087 if (t==IDHDL) t=IDTYP((idhdl)d);
1088 else if (t==ALIAS_CMD)
1089 { idhdl h=(idhdl)IDDATA((idhdl)data); t=IDTYP(h);d=IDDATA(h); }
1090 switch (t)
1091 {
1092#ifdef SINGULAR_4_2
1093 case CMATRIX_CMD:
1094 {
1095 bigintmat *b=(bigintmat*)d;
1096 if ((currRing!=NULL)&&(currRing->cf==b->basecoeffs()))
1097 return NUMBER_CMD;
1098 else
1099 return CNUMBER_CMD;
1100 }
1101#endif
1102 case INTVEC_CMD:
1103 case INTMAT_CMD:
1104 r=INT_CMD;
1105 break;

Callers 15

jjSYSTEMFunction · 0.45
jjEXTENDED_SYSTEMFunction · 0.45
newstruct_StringFunction · 0.45
newstruct_Assign_userFunction · 0.45
newstruct_Assign_sameFunction · 0.45
newstruct_Op1Function · 0.45
newstruct_AssignFunction · 0.45
newstruct_Op2Function · 0.45
newstruct_OpMFunction · 0.45
newstruct_CheckAssignFunction · 0.45
newstruct_PrintFunction · 0.45
jjNUMBER2_OP2Function · 0.45

Calls 4

getBlackboxStuffFunction · 0.85
WerrorFunction · 0.85
Tok2CmdnameFunction · 0.70
basecoeffsMethod · 0.45

Tested by 2

mainFunction · 0.36
test_argMethod · 0.36