Like others pointed out here, J does not have strand notation. A literal numeric list can have spaces in it, and so can a quoted literal character list. But both of those are single "words" in J. Once you have multiple words, you need to do something to tell J to put them together. (I didn't see anyone else here mention the word formation issue, so I thought that that might be of interest to you.)
As for your proposed problem, here's an approach which might interest you: abbrv=: 'mevema' seqof2=: 2 ]\ abbrv seqof2 me ev ve em ma ... Ah, oops, I see that that approach has already been mentioned. Oh well, ... maybe some repetition would not be a bad thing. Take care, -- Raul On Tue, Apr 13, 2021 at 4:14 AM HH PackRat <[email protected]> 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
