AFNI Message Board

History of AFNI updates  

|
April 14, 2021 05:23PM
Ok so I have a bit of an update, although I'm not sure if it means much. I have changed my sublist text file to be a string so it looks like this:

001 002 003 ...

I've also added a few more printf commands (thanks for that tip) to get an idea of what it's doing. It looks like it now can read the sublist_string.txt correctly, but now I get new errors on the foreach line for the following options:

foreach sub (${sublist})
foreach sub ${sublist}
foreach sub $sublist

error - foreach: words not parenthesized

foreach (sub) ${sublist}
foreach (sub) $sublist
foreach (sub ${sublist})
foreach (sub $sublist)

error - foreach: variable name must begin with a letter.

So I apparently need to both use parentheses and not use parentheses? How does that work?
Subject Author Posted

foreach loop errors

kyrieamara April 13, 2021 03:44PM

Re: foreach loop errors

ptaylor April 13, 2021 04:38PM

Re: foreach loop errors

kyrieamara April 13, 2021 05:15PM

Re: foreach loop errors

ptaylor April 14, 2021 09:05AM

Re: foreach loop errors

kyrieamara April 14, 2021 02:37PM

Re: foreach loop errors

kyrieamara April 14, 2021 05:23PM

Re: foreach loop errors

ptaylor April 14, 2021 05:39PM

Re: foreach loop errors

ptaylor April 14, 2021 05:37PM

Re: foreach loop errors

kyrieamara April 14, 2021 05:45PM

Re: foreach loop errors

Pawel April 14, 2021 11:54AM

Re: foreach loop errors

kyrieamara April 14, 2021 02:40PM



Sorry, only registered users may post in this forum.

Click here to login