There are two open issues with printf: 0. Handling of 0-fill (eg %2.2d) is not standard (%02d). (Oleg found a POSIX standard and it is different from what I was going by)
1. It's slow, slow enough to matter sometimes. I think the main source of slowness is in splitting the format string into fields, and I think that rewriting that part using dyad ;: would fix it. These are low enough on my priority list that I encourage others to jump in and make the changes. Henry Rich On 2/20/2011 1:45 PM, Ian Clark wrote: > Since learning recently about printf in J (...an old friend from C > days) I find it solves a lot of problems I've developed ad-hoc > solutions to. > > Result: I've abandoned my ad-hoc solutions. > > If it's not much used (by the system) maybe it ought to be? > > That's just by-the-by. I'm using it heavily in some middleware I'm > developing. If it takes off it'll dragalong printf (...into the > system?) > > > On Sun, Feb 20, 2011 at 6:10 AM, Ric Sherlock<[email protected]> wrote: >> In J602 (and before) the printf.ijs script was available as part of >> the system library >> fexist jpath '~system/main/printf.ijs' >> 1 >> >> So far it is not available in J701 (as part of the base system library >> or as an addon). >> >> My preference would for it to be included as part of the base system >> library as ~system/util/printf.ijs (like pacman.ijs) that way other >> utils can depend on the fact that it is available to the user. >> >> Do others agree? Any other points of view? >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
