[Swift-devel] wishlist: string array initialization in a loop
Ben Clifford
benc at hawaga.org.uk
Mon Apr 30 06:00:03 CDT 2007
On Fri, 27 Apr 2007, Tiberiu Stef-Praun wrote:
> =======
> string nameArray[];
> string channelNo[]= ["1", "2", "3", "4", "5", "6",
> "7", "8", "9", "10", "11", "12", "13", "14",
> foreach string ch, ci in channelNo{
>
> nameArray[ci]=@strcat(trialType,"-",subjectNo,"channel",ch,"_cwt-avgResults.Rdata");
> //print(outputNamesArray[ci]);
> }
> string testName=nameArray[3];
> print(testName);
> // returns something like
> nameArray-6a860c63-62c2-44ce-9fda-6bb43e3c871e-0-0-0-0-0.3
> =======
>
> I also tried moving the loop in a procedure, and doing
> string nameArray[]=loopNamingProcedure();
>
> That did not work either.
> Any suggestions ?
>
> Ben was working on something related, but I still can't do a string
> array initialization in a loop
as far as I can tell, its evaluating this bit:
> string testName=nameArray[3];
before it gets round to executing the foreach loop, rather than picking up
on the data dependency.
hmm.
--
More information about the Swift-devel
mailing list