Changeset 71f6706 in git for Singular/LIB/standard.lib
- Timestamp:
- Apr 22, 1999, 10:35:12 AM (25 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 25ea20d6d662e7545fe93d42f9d3e76d73f44beb
- Parents:
- 8dd3ac7f1579c1f59cd86191b12b185a2ab8dab0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/standard.lib
r8dd3ac r71f6706 1 // $Id: standard.lib,v 1.2 8 1999-04-19 13:20:02 obachman Exp $1 // $Id: standard.lib,v 1.29 1999-04-22 08:35:12 obachman Exp $ 2 2 ////////////////////////////////////////////////////////////////////////////// 3 3 4 version="$Id: standard.lib,v 1.2 8 1999-04-19 13:20:02 obachman Exp $";4 version="$Id: standard.lib,v 1.29 1999-04-22 08:35:12 obachman Exp $"; 5 5 info=" 6 6 LIBRARY: standard.lib PROCEDURES WHICH ARE ALWAYS LOADED AT START-UP … … 735 735 except that the string may contain conversion specifications. Do 736 736 'help print:' for a listing of valid conversion specifications. 737 As an addition to the conversions of 'print', the '%n' and '%2' 738 conversion specification does not consume an additional argument, 739 but simply generates a newline character. 737 740 NOTE: If one of the additional arguments is a list, then it should be 738 741 enclosed once more into a list() command, since passing a list … … 748 751 int next, l, nnext; 749 752 string ret; 750 list formats = "%l", "%s", "%2l", "%2s", "%t", "%;", "%p", "%b" ;753 list formats = "%l", "%s", "%2l", "%2s", "%t", "%;", "%p", "%b", "%n", "%2"; 751 754 while (1) 752 755 { … … 777 780 return (ret + fmt); 778 781 } 779 ret = ret + fmt[1, next - 1] + print(#[1], formats[l]); 782 if (formats[l] != "%2" && formats[l] != "%n") 783 { 784 ret = ret + fmt[1, next - 1] + print(#[1], formats[l]); 785 # = delete(#, 1); 786 } 787 else 788 { 789 ret = ret + fmt[1, next - 1] + print("", "%2s"); 790 } 780 791 if (size(fmt) <= (next + size(formats[l]) - 1)) 781 792 { 782 793 return (ret); 783 794 } 784 # = delete(#, 1);785 795 fmt = fmt[next + size(formats[l]), size(fmt)-next-size(formats[l]) + 1]; 786 796 } … … 792 802 intmat M=betti(mres(m,0)); 793 803 list l = r, m, M; 794 string s = sprintf("s:%s, l:%l", 1, 2); s;795 s = sprintf("s:% s", l); s;796 s = sprintf("s:% s", list(l)); s;797 s = sprintf("2l:% 2l", list(l)); s;804 string s = sprintf("s:%s,%n l:%l", 1, 2); s; 805 s = sprintf("s:%n%s", l); s; 806 s = sprintf("s:%2%s", list(l)); s; 807 s = sprintf("2l:%n%2l", list(l)); s; 798 808 s = sprintf("%p", list(l)); s; 799 809 s = sprintf("%;", list(l)); s; … … 812 822 string may contain conversion specifications. 813 823 Do 'help print:' for a listing of valid conversion specifications. 824 As an addition to the conversions of 'print', the '%n' and '%2' 825 conversion specification does not consume an additional argument, 826 but simply generates a newline character. 814 827 815 828 NOTE: If one of the additional arguments is a list, then it should be … … 849 862 string may contain conversion specifications. 850 863 Do 'help print:' for a listing of valid conversion specifications. 864 As an addition to the conversions of 'print', the '%n' and '%2' 865 conversion specification does not consume an additional argument, 866 but simply generates a newline character. 851 867 852 868 NOTE: If one of the additional arguments is a list, then it should be
Note: See TracChangeset
for help on using the changeset viewer.