fork(1) download
  1. program ideone;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. type
  6. TNode = record
  7. SubNodes: array of TNode;
  8. end;
  9.  
  10. function Node(ASubNodes: array of TNode): TNode;
  11. var
  12. intNodeIdx: Integer;
  13. begin
  14. SetLength(Result.SubNodes, Length(ASubNodes));
  15.  
  16. for intNodeIdx := 0 to High(ASubNodes) do
  17. Result.SubNodes[intNodeIdx] := ASubNodes[intNodeIdx];
  18. end;
  19.  
  20. var
  21. nodeRoot: TNode;
  22. begin
  23. nodeRoot := Node([
  24. Node([
  25. Node([
  26. Node([
  27. Node([
  28. Node([
  29. Node([
  30. Node([
  31. Node([
  32. ])
  33. ])
  34. ])
  35. ])
  36. ])
  37. ])
  38. ])
  39. ])
  40. ]);
  41. end.
Success #stdin #stdout 0s 284KB
stdin
Standard input is empty
stdout
Standard output is empty