See e.g. Henry Rich's J for C programmers:   *http://tinyurl.com/6xcqyj*
    Extracting Variable-Length Fields Using ^:a: ...

  5(<[EMAIL PROTECTED]:a:)1000
1000 200 40 8 1 0


BTW here's a collection of the trailing zero verbs from the thread I mentioned:


NB. Roger Hui
m10rh=: [: +/ <[EMAIL PROTECTED]&5^:(>:@i.@>.@(5&^.)`])

NB. John Randall
m10jr=:[: +/ 5 = [: , [: q: [: >: i.

NB. Henry Rich
m10hr =: +/[EMAIL PROTECTED]:&.(5&#.^:_1)

NB. Raul Miller
ftz=: 5 +/@:=  1 ,@:q:@:+ i.
G=: [:+/]<[EMAIL PROTECTED] >:@i.@<.&.(5x&^.)

NB. RE Boss
m10b=:[:{. [:([(+,]) ]<[EMAIL PROTECTED]:)/^:_ (0,])

(I hope I didn't forget someone)


=@@i

Geoff Canyon schreef:
I looked in the docs and I can't find anything on using ^:a:

Based on my experiments, it's like ^:_ only it returns the full set of results, rather than just the final result. Is that accurate?

regards,

Geoff

On Apr 13, 2008, at 11:59 PM, Arie Groeneveld wrote:
+/@}.@(<[EMAIL PROTECTED]:a:)

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to