Category talk:J: Difference between revisions

Line 13:
:: Yeah, you're right. I guess I didn't look at enough examples. --[[User:Mwn3d|Mwn3d]] 08:53, 10 December 2007 (MST)
:Definitely not esoteric, though very hard to read unless you have learned the vocabulary and tacit programming idioms. I would encourage folks to annotate the examples here and also contribute well annotated examples to the Literate Programs wiki (see [[Help:Similar Sites]]). --[[User:IanOsgood|IanOsgood]] 13:11, 10 December 2007 (MST)
::: I was curious about that quoted line and so I went and looked it up -- it actually would not work in current versions of J (because <code>x.</code> was replaced with <code>x</code> several years ago when the current version of J was released), unless backwards compatibility is enabled. It's also in a comment. That said, the code in question would take a string like '1.25' or '1.25(25) and return an exact fraction (5 divided by 4 for the first example and 124 divided by 99 for the second). In this context, x. was the numeric base for the conversion (10 by default) and p was the number extracted from the parenthesis, and the above line of code would have dealt with the repeating fraction part of the number. It would have calculated nothing meaningful for '1.25' and for '1.25(25)' its value would have been 25 divided by 99. --[[User:Rdm|Rdm]] 16:11, 22 April 2010 (UTC)
 
== Jers ==
6,951

edits