Changeset 445434a in git for Singular/LIB/inout.lib


Ignore:
Timestamp:
Jun 7, 1999, 7:32:21 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
ec0e9d7b985b557f645baaa4179c0a8f4b092e6a
Parents:
f937e20ea755161f0ffc5168e6b102697901293d
Message:
*greuel: show extended


git-svn-id: file:///usr/local/Singular/svn/trunk@3098 2c84dea3-7e68-4137-9b89-c4e89433aadc
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:07 Singular Exp $
     1// $Id: inout.lib,v 1.7 1999-06-07 17:32:21 Singular Exp $
    22// system("random",787422842);
    33// (GMG/BM, last modified 22.06.96)
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: inout.lib,v 1.6 1998-05-14 18:45:07 Singular Exp $";
     6version="$Id: inout.lib,v 1.7 1999-06-07 17:32:21 Singular Exp $";
    77info="
    88LIBRARY:  inout.lib     PROCEDURES FOR MANIPULATING IN- AND OUTPUT
     
    387387   if ( typeof(id)=="list" )
    388388   {
    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;
    391392      for ( @ii=1; @ii<=size(id); @ii++ )
    392393      {
     
    394395         {
    395396            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         }
    399406      }
    400407      short=@short@; return();
    401408    }
    402    if( defined(@id@)!=voice ) { "// wrong syntax, type help show;";  return(); }
     409   if( defined(@id@)!=voice ) { "// wrong syntax, type help show;";  return();}
    403410//-------------------- case: @id@ belongs to any ring -------------------------
    404411   if( typeof(@id@)=="string" or typeof(@id@)=="int" or typeof(@id@)=="intvec"
     
    436443      }
    437444      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")
    438451      {
    439452         @@s=@@s + ", "+string(nrows(@id@))+"x"+string(ncols(@id@));
     
    459472      short=@short@; return();
    460473   }
    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@);
    464477      @@s;
    465478      @id@; short=@short@; return();
     
    485498      if( typeof(@id@)=="ring" )
    486499      {
     500         kill @id@;
    487501         @@s = tab(@li@)+"// ring:"; @@s,s;
    488502         @@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);
    489508      }
    490509      if( typeof(@id@)=="qring" )
     
    494513         @@s = tab(@li@)+"// quotient ring from ideal:"; @@s;
    495514         ideal(@id@);
     515         listvar(poly);listvar(ideal);
     516         listvar(vector);listvar(module);
     517         listvar(map);listvar(matrix);
     518         listvar(number);listvar(resolution);
    496519      }
    497520      short=@short@; //return();
     
    503526    show(r);
    504527    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
    506529    vector v=x*gen(1)+y*gen(3);
    507530    module m=v,2*v+gen(4);
     
    515538    map F=r,a2,b^2,3*c3;
    516539    show(F);
    517 // Apply show to i (which does not belong to the basering) by typing
     540// Apply 'show' to i (which does not belong to the basering) by typing
    518541// ring r; ideal i=xy,x3-y2; ring Q; show(r,"i");
    519542}
     
    557580example
    558581{ "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,xy);
    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");
    563586}
    564587///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.