Category talk:J: Difference between revisions

m
clear up some things that bothered me on re-reading
m (clear up some things that bothered me on re-reading)
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> in 1996 when the currentJ version of J6 was released), - unless backwards compatibility is enabled, you should use <code>x</code> instead of <code>x.</code> to It'srefer to the left argument. (That line of code was also incommented aout, commenton the [http://code.jsoftware.com/wiki/Phrases/Arith source page].) That said, the code inthis questionwas extracted from 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 - treating the part in parenthesis as repeating infinitely). In this context, <code>x.</code> 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)
 
== Jedi (was Jers) ==
6,951

edits