Here are your 50 paths:

paths=: ('/home/user/file', ":, '.pgm'&[)&.> 1+i.50

If you have a verb which reads one file and processes it, and returns
that result, you might use either:

   averb each paths

or

   averb"0 paths

The first version gives your verb an unboxed file name, the second
version gives your verb a boxed file name.

I do not know why you used the word "loop".

I hope this helps.

-- 
Raul

On Mon, Sep 10, 2012 at 11:18 AM, pascha <amirpasha...@gmail.com> wrote:
>
> I want to include path variable for a verb which reads several files in a
> loop
> as an example:
>
> path = '/home/user/file'
> x=: read path,i,'.pgm'
>
> in which "read" is the verb, "i" starts from 1 to 50  and '.pgm' is the file
> extension.
> so in each iteration "i" would replace with number 1-50.
>
> is this possible in J?
> --
> View this message in context: 
> http://old.nabble.com/path-variable-in-loop-tp34413608s24193p34413608.html
> Sent from the J Programming mailing list archive at Nabble.com.
>
> ----------------------------------------------------------------------
> 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