Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Apl > Re: Formatting ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 917 of 1022
Post > Topic >>

Re: Formatting in J

by Gosi <gosinn@[EMAIL PROTECTED] > Dec 17, 2007 at 08:56 AM

On Dec 16, 10:01 pm, 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

There are several utilities that do format.

As examples there are utilities in dates, format, printf that may be
of interest for you.
Examples of printf can be seen using the printf lab.

Verb datefmt may also be of interest to you.

It is helpful to use find in files and look for format in system

The dyadic ": in the dictionary may give you what you want




 5 Posts in Topic:
Formatting in J
brian.b.mcguinness@[EMAIL  2007-12-16 14:01:14 
Re: Formatting in J
Gosi <gosinn@[EMAIL PR  2007-12-17 08:56:45 
Re: Formatting in J
cdburke@[EMAIL PROTECTED]  2007-12-17 17:56:44 
Re: Formatting in J
brian.b.mcguinness@[EMAIL  2007-12-18 17:58:06 
Re: Formatting in J
cdburke@[EMAIL PROTECTED]  2007-12-18 19:13:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 5:43:17 CDT 2008.