digitalmars.D.learn - foreach loop + counter iter + Phobos range
- bioinfornatics (14/14) Nov 20 2012 hi why whith this code : http://dpaste.dzfl.pl/474dd9f6
- bearophile (5/7) Nov 20 2012 See:
- bioinfornatics (2/9) Nov 20 2012 thanks i vote up for your request is really a need
- bioinfornatics (12/24) Nov 20 2012 I try to use :
- bioinfornatics (22/22) Nov 20 2012 foreach( size_t index, Fastq data; parallel(
- bearophile (5/7) Nov 20 2012 Try to minimize the code that produces this problem, so if it's a
- bearophile (6/7) Nov 20 2012 Generally if you want to help who gives help you have to show the
hi why whith this code : http://dpaste.dzfl.pl/474dd9f6 i get these errors: parser/fasta.d(171): Error: cannot infer argument types parser/fasta.d(176): Error: undefined identifier index, did you mean template indexed(Source,Indices)? parser/fasta.d(177): Error: undefined identifier index, did you mean template indexed(Source,Indices)? parser/fasta.d(179): Error: undefined identifier index, did you mean template indexed(Source,Indices)? parser/fasta.d(180): Error: undefined identifier index, did you mean template indexed(Source,Indices)? parser/fasta.d(183): Error: undefined identifier 'header' what is wrong at line 171 ? i am explicit i said i want a counter iterator and a Fasta struct!
Nov 20 2012
bioinfornatics:what is wrong at line 171 ? i am explicit i said i want a counter iterator and a Fasta struct!See: http://d.puremagic.com/issues/show_bug.cgi?id=5550 Bye, bearophile
Nov 20 2012
On Tuesday, 20 November 2012 at 11:33:23 UTC, bearophile wrote:bioinfornatics:thanks i vote up for your request is really a needwhat is wrong at line 171 ? i am explicit i said i want a counter iterator and a Fasta struct!See: http://d.puremagic.com/issues/show_bug.cgi?id=5550 Bye, bearophile
Nov 20 2012
On Tuesday, 20 November 2012 at 12:32:45 UTC, bioinfornatics wrote:On Tuesday, 20 November 2012 at 11:33:23 UTC, bearophile wrote:I try to use : property Tuple!(size_t, Fastq) front(){ Tuple!(size_t, Fastq) result; result[0] = _i; result[1] = _extract( _sections[0] ); _i++; return result; } but it seem is not aggregate by the foreach loop :-(bioinfornatics:thanks i vote up for your request is really a needwhat is wrong at line 171 ? i am explicit i said i want a counter iterator and a Fasta struct!See: http://d.puremagic.com/issues/show_bug.cgi?id=5550 Bye, bearophile
Nov 20 2012
foreach( size_t index, Fastq data; parallel( fastqFile.byFastq() ) ){ assert(data.header == fastqList[index].header , text( "Error fastq n°", index, " do not have the right header" ) ); assert(data.sequence == fastqList[index].sequence, text( "Error fastq n°", index, " do not have the right sequence" ) ); ----- /usr/include/d/std/parallelism.d(3831): Error: delegate dg (Tuple!(ulong,Fastq)) is not callable using argument types (Fastq) /usr/include/d/std/parallelism.d(3839): Error: delegate dg (ulong, Tuple!(ulong,Fastq)) is not callable using argument types (ulong,Fastq) /usr/include/d/std/parallelism.d(3317): Error: template instance std.parallelism.ParallelForeach!(byFastq) error instantiating instantiatied in ../src/parser/fastq.d(237): parallel!(byFastq) ../src/parser/fastq.d(237): Error: template instance std.parallelism.parallel!(byFastq) error instantiating ../src/parser/fastq.d(237): Error: cannot uniquely infer foreach argument types fastqFile.byFastq() return a Tuple!(ulong,Fastq) in this case foreach fail to aggregate correctly
Nov 20 2012
bioinfornatics:fastqFile.byFastq() return a Tuple!(ulong,Fastq) in this case foreach fail to aggregate correctlyTry to minimize the code that produces this problem, so if it's a real problem it becomes fodder for Bugzilla. Bye, bearophile
Nov 20 2012
bioinfornatics:but it seem is not aggregate by the foreach loop :-(Generally if you want to help who gives help you have to show the full code (or its compilable reduction) and copy&paste the error you get... Bye, bearophile
Nov 20 2012