I am quite unfamiliar with the concept of loop in J.
what I meant about loop was the traditional "for loop" as in other
languages, I even don't know if such a thing exists

I'd like to apply two path variables (one for reading and one for writing)
and one other table (these 3 have the array size) in such a way that I can
extract the elements one by one and do some computation till all the arrays
taken care of.
in other words I have 3 inputs for the verb (input path, output path, a
table). 
could you give some hints how can I create such a verb (or loop)?



Raul Miller-4 wrote:
> 
> 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
> 
> 
-- 
View this message in context: 
http://old.nabble.com/path-variable-in-loop-tp34413608s24193p34414328.html
Sent from the J Programming mailing list archive at Nabble.com.

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

Reply via email to