<

Question: Tabs - or lining up columns

Hi Am trying to tidy up a printout of two columns in M version 7, such that the second column is lined up. Using the tab character \t in the printf statement does not seem to work - it just shifts a fixed number of spces, rather than go to a tab stop position. The following Maple code is very klutzy: however its redeeming feature is that it does work. Sample Maple code: #Create a long string of spaces (26 spaces between " ") aspac:=CharacterMap( "ABCDEFGHIJKLMNOPQRSTUVWXYZ", " ", cat(a,a) ); #NB a is the first 'word' - see output below #spac is a string of spaces to ensure alignment spac:=substring(aspac,1..21-length(a)); printf("%s %s %s\n",a,spac,a2); Maple output is of the first 'word' a, followed by a string spac of spaces, then the second word OBSOLESCENCE SOLE OBSOLESCENT SOLE OBSOLETELY SOLE OCCULTIST CULT Is there an easier way of performing this? Thanks David
Please Wait...