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

Method Print

Singular/subexpr.cc:63–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void sleftv::Print(leftv store, int spaces)
64{
65 int t=Typ();
66 if (errorreported) return;
67#ifdef SIQ
68 if (rtyp==COMMAND)
69 {
70 command c=(command)data;
71 char ch[2];
72 ch[0]=c->op;ch[1]='\0';
73 const char *s=ch;
74 if (c->op>127) s=iiTwoOps(c->op);
75 ::Print("##command %d(%s), %d args\n",
76 c->op, s, c->argc);
77 if (c->argc>0)
78 c->arg1.Print(NULL,spaces+2);
79 if(c->argc<4)
80 {
81 if (c->argc>1)
82 c->arg2.Print(NULL,spaces+2);
83 if (c->argc>2)
84 c->arg3.Print(NULL,spaces+2);
85 }
86 PrintS("##end");
87 }
88 else
89#endif
90 {
91 const char *n=Name();
92 char *s;
93 void *d=Data();
94 if (errorreported) return;
95
96 switch (t /*=Typ()*/)
97 {
98 case CRING_CMD:
99 crPrint((coeffs)d);
100 break;
101#ifdef SINGULAR_4_2
102 case CNUMBER_CMD:
103 n2Print((number2)d);
104 break;
105 case CPOLY_CMD:
106 p2Print((poly2)d);
107 break;
108 case CMATRIX_CMD: // like BIGINTMAT
109#endif
110 case BIGINTMAT_CMD:
111 ((bigintmat *)d)->pprint(colmax);
112 break;
113 case BIGINTVEC_CMD:
114 ((bigintmat *)d)->pprint(4096); // allow longer bigintvec
115 break;
116 case BUCKET_CMD:
117 {
118 sBucket_pt b=(sBucket_pt)d;
119 if ((e==NULL)
120 && (TEST_V_QRING)

Callers 1

StringMethod · 0.45

Calls 15

PrintSFunction · 0.85
DataClass · 0.85
crPrintFunction · 0.85
n2PrintFunction · 0.85
p2PrintFunction · 0.85
sBucketPeekFunction · 0.85
PrintNSpacesFunction · 0.85
pWrite0Function · 0.85
sBucketPrintFunction · 0.85
paPrintFunction · 0.85
rWriteFunction · 0.85
iiWriteMatrixFunction · 0.85

Tested by

no test coverage detected