$0 1
2
$2 3
2
$(2*3) (1+2*3)
|syntax error
| $ (2*3)(1+2*3)
$(2*3),(1+2*3)
2
Unlike the surviving APLs, J doesn't have strand notation:
https://aplwiki.com/wiki/Strand_notation , so separate nouns
that you create need to explicitly appended together.
j=.1
]val=.((2*j),(1+(2*j))) { 'mevema'
ve
You then need extra parens so that the , happens before {
On 2021-04-13 03:14, HH PackRat wrote:
Hello, all!
I'm stumped and need to know why the following "from" problem occurs
and how to do what I'd like to do:
No problem when numeric values are used:
val=. 0 1 { 'mevema'
me
val=. 2 3 { 'mevema'
ve
Problem when formulas are used instead of numeric values:
j=. 0 [or 1 or 2]
val=. (2*j) (1+2*j) { 'mevema'
|syntax error
| val=. (2*j)(1+(2*j)){'mevema'
Why does "from" work with numeric values but not with formulaic
versions of those same values for use inside a "for_j" loop to handle
multiple cases?
What I'm trying to do is to grab 2 letters at a time in sequence
through the 6-character combined planetary abbreviations for 3
planets. Is there another way? (Explicit code only, please, if you
give any examples.)
I just don't understand why one version works and the other doesn't.
Any help appreciated!
Harvey
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm