public static TargetArrayBounds MakeSimpleArray(int length) { TargetArrayBounds bounds = new TargetArrayBounds { Rank = 1 }; bounds.length = length; return(bounds); }
protected void FormatArray(Thread target, TargetArrayObject aobj, TargetArrayBounds bounds, int dimension, int[] indices) { Append ("[ "); indent_level += 3; bool first = true; int[] new_indices = new int [dimension + 1]; indices.CopyTo (new_indices, 0); int lower, upper; if (!bounds.IsMultiDimensional) { lower = 0; upper = bounds.Length - 1; } else { lower = bounds.LowerBounds [dimension]; upper = bounds.UpperBounds [dimension]; } for (int i = lower; i <= upper; i++) { if (!first) { Append (", "); CheckLineWrap (); } first = false; new_indices [dimension] = i; if (dimension + 1 < bounds.Rank) FormatArray (target, aobj, bounds, dimension + 1, new_indices); else { TargetObject eobj = aobj.GetElement (target, new_indices); FormatObjectRecursed (target, eobj, false); } } Append (first ? "]" : " ]"); indent_level -= 3; }
public static TargetArrayBounds MakeSimpleArray(int length) { TargetArrayBounds bounds = new TargetArrayBounds { Rank = 1 }; bounds.length = length; return bounds; }