Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!news-server.csri.toronto.edu!rpi!think.com!ames!decwrl!netcomsv!feustel
From: feustel@netcom.COM (David Feustel)
Subject: Re: Programming in J (long)
Message-ID: <1991Nov14.131623.19665feustel@netcom.COM>
Date: Thu, 14 Nov 91 13:16:23 GMT
Organization: DAFCO - An OS/2 Oasis
Keywords: J
References: <1991Nov13.221530.2496@apollo.hp.com>

keil@apollo.hp.com (Mark Keil) writes:

> Roger Hui  writes
> >The following are a few examples of "control structures".  
> >(u and v are verbs; m and n are nouns.)
> > 
> > 
> >u^:n
> >Apply u to the argument n times.  (u^:_ is the limit of the application
> >of u.)  This is a DO loop in C or Fortran.

I think I understand this. An example would probably drive it home.

> > 
> >u&v and u@v
> >Compose u and v.  These are the {} and s0;s1;s2; constructs in C.
> > 
> >u0`u1`u2` ... `un @. v
> >Apply one of the verbs u to the argument(s), according to the index
> >computed by applying v to the argument(s).  For example,
> >   fac =. 1:`(* fac@<:) @. *
> >defines the factorial function.  This is the if-then-else and
> >switch-case constructs in C.
> > 

This is exactly what I was hoping to get to clear up my confusion.
This text with examples added would go a long way toward making J
easier for people with programming background easier to grasp.

Now, about those tacit(?) definitions...
-- 
David Feustel N9MYI, DAFCO, 1930 Curdes Ave, Fort Wayne, IN 46805.
(219)482-9631 EMAIL: feustel@netcom.com
