code generalization

Christopher Wright dhasenan at gmail.com
Mon Jun 8 17:31:12 PDT 2009


Saaa wrote:
> I just finished my array parser but I can't support just any depth because 
> each depth needs its own code the way I am doing it now :(

Recursion?
static if (is (U A : A[])) will give you int[] for int[][], so you can 
recursively call the parsing function with A as the type argument rather 
than U.


More information about the Digitalmars-d-learn mailing list