Changeset 445434a in git
- Timestamp:
- Jun 7, 1999, 7:32:21 PM (24 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- ec0e9d7b985b557f645baaa4179c0a8f4b092e6a
- Parents:
- f937e20ea755161f0ffc5168e6b102697901293d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/inout.lib
rf937e2 r445434a 1 // $Id: inout.lib,v 1. 6 1998-05-14 18:45:07Singular Exp $1 // $Id: inout.lib,v 1.7 1999-06-07 17:32:21 Singular Exp $ 2 2 // system("random",787422842); 3 3 // (GMG/BM, last modified 22.06.96) 4 4 /////////////////////////////////////////////////////////////////////////////// 5 5 6 version="$Id: inout.lib,v 1. 6 1998-05-14 18:45:07Singular Exp $";6 version="$Id: inout.lib,v 1.7 1999-06-07 17:32:21 Singular Exp $"; 7 7 info=" 8 8 LIBRARY: inout.lib PROCEDURES FOR MANIPULATING IN- AND OUTPUT … … 387 387 if ( typeof(id)=="list" ) 388 388 { 389 @@s = tab(@li@)+"// list, "+string(size(id))+" element(s):"; 390 @@s;""; 389 // @@s = tab(@li@)+"// list, "+string(size(id))+" element(s):"; 390 @@s = tab((3*(voice-2)))+"// list, "+string(size(id))+" element(s):"; 391 @@s; 391 392 for ( @ii=1; @ii<=size(id); @ii++ ) 392 393 { … … 394 395 { 395 396 def @id(@ii) = id[@ii]; 396 show(@id(@ii),@li@+3); 397 } 398 else { tab(@li@+2),"//",id[@ii]; } 397 tab(3*(voice-2))+"["+string(@ii)+"]:"; 398 // show(@id(@ii),@li@+3*(voice-1)); 399 show(@id(@ii),3*(voice-1)); 400 } 401 else 402 { 403 "["+string(@ii)+"]:"; 404 tab(@li@+2),"//",id[@ii]; 405 } 399 406 } 400 407 short=@short@; return(); 401 408 } 402 if( defined(@id@)!=voice ) { "// wrong syntax, type help show;"; return(); 409 if( defined(@id@)!=voice ) { "// wrong syntax, type help show;"; return();} 403 410 //-------------------- case: @id@ belongs to any ring ------------------------- 404 411 if( typeof(@id@)=="string" or typeof(@id@)=="int" or typeof(@id@)=="intvec" … … 436 443 } 437 444 if( typeof(@id@)=="matrix") 445 { 446 @@s=@@s + ", "+string(nrows(@id@))+"x"+string(ncols(@id@)); 447 @@s; 448 print(matrix(@id@)); 449 } 450 if( typeof(@id@)=="matrix") 438 451 { 439 452 @@s=@@s + ", "+string(nrows(@id@))+"x"+string(ncols(@id@)); … … 459 472 short=@short@; return(); 460 473 } 461 if( typeof(@id@)=="number" )462 { 463 @@s = tab(@li@)+"// ", typeof(@id@);474 if( typeof(@id@)=="number" or typeof(@id@)=="resolution" ) 475 { 476 @@s = tab(@li@)+"// ", typeof(@id@); 464 477 @@s; 465 478 @id@; short=@short@; return(); … … 485 498 if( typeof(@id@)=="ring" ) 486 499 { 500 kill @id@; 487 501 @@s = tab(@li@)+"// ring:"; @@s,s; 488 502 @@s = tab(@li@)+"// minpoly ="; @@s,minpoly; 503 "// objects belonging to this ring:"; 504 listvar(poly);listvar(ideal); 505 listvar(vector);listvar(module); 506 listvar(map);listvar(matrix); 507 listvar(number);listvar(resolution); 489 508 } 490 509 if( typeof(@id@)=="qring" ) … … 494 513 @@s = tab(@li@)+"// quotient ring from ideal:"; @@s; 495 514 ideal(@id@); 515 listvar(poly);listvar(ideal); 516 listvar(vector);listvar(module); 517 listvar(map);listvar(matrix); 518 listvar(number);listvar(resolution); 496 519 } 497 520 short=@short@; //return(); … … 503 526 show(r); 504 527 ideal i=x^3+y^5-6*z^3,xy,x3-y2; 505 show(i,3); 528 show(i,3); // introduce 3 space tabs before information 506 529 vector v=x*gen(1)+y*gen(3); 507 530 module m=v,2*v+gen(4); … … 515 538 map F=r,a2,b^2,3*c3; 516 539 show(F); 517 // Apply showto i (which does not belong to the basering) by typing540 // Apply 'show' to i (which does not belong to the basering) by typing 518 541 // ring r; ideal i=xy,x3-y2; ring Q; show(r,"i"); 519 542 } … … 557 580 example 558 581 { "EXAMPLE:"; echo=2; 559 ring r=2,( t(1..15),x,y),ds;560 poly f=y+ t(15)*x^2+t(14)*x^3+t(13)*x^2*y^2+t(12)*x*y^3;561 showrecursive(f,x y);562 showrecursive(f,xy," ds");582 ring r=2,(a,b,c,d,x,y),ds; 583 poly f=y+ax2+bx3+cx2y2+dxy3; 584 showrecursive(f,x); 585 showrecursive(f,xy,"lp"); 563 586 } 564 587 ///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.