Hi,
Please see the following example:
/***
* PrintArray(aR, cTitle)
* *
* aR[] - -Array to print
* cTitle - -The heading
*
* Recursive routine to print an array
*/
FUNCTION PrintArray(aR, cTitle)
LOCAL i := 0, cHeading
cTitle := iif(cTitle # NIL,cTitle,"a")
// Step through every array element. If the element is
// itself an array, recurse to print the subarray,
// just print the element name and subscript.
AEval(aR, {|elem| ;
i++, ;
cHeading := cTitle + "[" + Ltrim(Str(i)) + "]", ;
Iif(ValType(elem) = "A", ;
PrintArray(elem, cHeading), ;
iif(valtype(elem) == "B",Qout(cHeading,"{||...}"),Qout(cHeading, elem))) ;
})
RETURN NIL
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.