On Dec 17, 6:01 am, brian.b.mcguinn...@[EMAIL PROTECTED]
wrote:
> The formatting facilities in J appear to be very limited; there is no
> equivalent to APL2 picture format,
> and 8!:n seems to be a small subset of #FMT. In particular, 8!:n
> seems to be designed to format only
> numbers, with no provision for interspersing numbers with text. There
> seem to be no equivalents to the
> A, G<...>, and <...> (insert text) specifiers for #FMT, nor is there a
> Z qualifier for zero padding.
>
> I can display the time of day in a readable form by entering something
> like}.,'r<:00>3.0' (8!:2) <. _3{. 6!:0 ''
>
> but this wouldn't work for, say, an angle in degrees, minutes, and
> seconds since angles can be negative
> and the negative sign would be inserted after the zero background
> padding rather than before it.
>
> I would like to see 8!:n beefed up to include more of the capabilities
> of #FMT in order to simplify the
> task of porting APL code to J.
>
> --- Brian
The 8!: family was modelled pretty closely on []fmt (see definition in
http://www.jsoftware.com/help/dictionary/dx008.htm
). It is a subset
in some respects, a superset in others.
I suggest that you post some examples of your requirements to the J
programming forum.
Chris


|