I'm trying to convert a series of specialized APL functions in a book I
have to equivalent J versions. I have a programming background, but
I'm a newbie at both languages (I have several APL books, but nowhere
near as much for J), so it's initially slow going. (But it sure gives
a lot of practice in learning J, though!)
Anyway, I've encountered two things so far that have stumped me:
(1) I can't figure out how to convert the APL lamination (the [_0.5])
in the following line to J code:
Z<-R,[_0.5](0#ATTK)/ATTK<-+/[0] Z
(I used J's underscore for APL's "high minus" to indicate negative and
the # to indicate APL's not equal)
How would it look if it were a positive [1.5] instead?
Additionally, how is "+/[0] Z" converted?
(2) How does one get input from a user in J without having to use a
GUI? For example, in typical APL sequences, you might have:
'ENTER TOTAL TIME'
T<-[]
and
'ENTER K VALUE'
K<-[']
(where [] and ['] are the APL quad and quote-quad characters)
What are the J equivalents for these two sequences?
I'd appreciate any help or guidance that you all can give me. Thanks!
Harvey
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm