Thanks. The APL code looks fine here: omega, divide, rho.
One more: can you assign a name to a dynamic fn?
f is {(+/⍵)÷⍴⍵}
----- Original Message -----
From: Devon McCormick <[EMAIL PROTECTED]>
Date: Thursday, October 25, 2007 17:15
Subject: Re: [Jprogramming] Puzzle from "The Early Years"
To: Programming forum <[email protected]>
> The first one is RANK ERROR, the latter three are all SYNTAX
> ERROR. The
> six-space indent for user input looks odd now that I'm so used
> to J.
>
> Hey - I can cut and paste the APL code and it looks ok in my outgoing
> message - how does it look to everyone else?
>
> {(+/⍵)÷⍴⍵}a
> RANK ERROR
> {(+/⍵)÷⍴⍵}a
> ∧
> {(+/⍵)÷⍴⍵}[0]a
> SYNTAX ERROR
> {(+/⍵)÷⍴⍵}[0]a
> ∧
> {(+/⍵)÷⍴⍵}[1]a
> SYNTAX ERROR
> {(+/⍵)÷⍴⍵}[1]a
> ∧
> {(+/⍵)÷⍴⍵}[2]a
> SYNTAX ERROR
> {(+/⍵)÷⍴⍵}[2]a
> ∧
>
>
> On 10/25/07, Roger Hui <[EMAIL PROTECTED]> wrote:
> >
> > The Vector front page says that the Dyalog function
> > {(+/omega)divide rho omega}
> > is the same as the J tacit verb
> > (+/%#)
> > They are not the same. One difference comes from
> > the difference between # and rho; another difference
> > is between +/ in J and +/ in APL (+/ in J is + slashbar
> > in APL); another is the difference in the way they are
> > used in operator expressions. (e.g. (+/%#)"r a).
> >
> > Can someone with access to Dyalog APL tell me
> > what the following does? (index origin 0)
> >
> > a {is} ? 3 5 7 {rho} 100
> > {(+/omega) divide rho omega} a
> > {(+/omega) divide rho omega}[0] a
> > {(+/omega) divide rho omega}[1] a
> > {(+/omega) divide rho omega}[2] a
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm