When defining the verb centigrade to convert its argument from a Fahrenheit to a centigrade, the code in the book 'J Primer' is:
centigrade =. 3 : 0
t1 =. y. - 32
t2 =. t1 * 5
t3 =. t2 % 9
)
However, I had the spelling error in 'y.' part. But when I type 'y' instead of 'y.' in the definition, it works.
centigrade =. 3 : 0
t1 =. y - 32
t2 =. t1 * 5
t3 =. t2 % 9
)
Why is that? Thanks!
Originally, the J language used
x.
andy.
for the internal arguments to an explicit verb. You can reset to allow fory.
orx.
if you want to use legacy code by using the foreign conjunction9!:49
9!:49 [ 0
for not acceptingy.
9!:49 [ 1
for acceptingy.
9!:48 ''
gives the current status of the flag. http://www.jsoftware.com/help/dictionary/dx009.htm (bottom of page)