\\% Printing with fixed width. \\ Author: Joerg Arndt \\ License: GPL version 3 or later \\ online at http://www.jjj.de/pari/ \\ version: 2011-May-15 (18:42) print1w(bla="", n, w, psq=0)= { /* print the string bla and the number n (n with width w) when psq!=0 then positive signs are printed */ local(str, len, s, ss); s = +1; if ( psq, s = sign(n); if ( s<0, n=-n ); ); str = Str(n); ss = ""; if ( s<0, ss="-"); if ( s>0 && psq, ss="+"); str = concat(ss, str); len = length(str); for (j=1, w-len, str=concat(" ",str)); print1(bla, str); } /* ------- */ \\ same with newline: printw(bla="", n, w, psq=0) = { print1w(bla,n,w,psq); print(); } \\ ==== end of file ====