Jawa / Говнокод #13041 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
public class Tree {
    
    ...

    public static int treeDepth;

    ...

    public static void runDepthTree(Node start, String method) {
//        System.out.println("looking at " + start);
        ++treeDepth;
        Statement statement = buildStatement(start, method);
        try {
            statement.execute();
        }
        catch (Exception e) { 
            String msg = start + " ERROR at tree depth= " + treeDepth;
            
            System.out.println(); 
        }
        Node[] nodes = start.getChildren();
        if (nodes != null) {
            int count = start.getComponentCount();
            for (int i = 0; i<count; i++)  {
                runDepthTree((Node)nodes[i], method); // recurse
            }
        }
        --treeDepth;
    }

    ...

}

Я бы не точно догадался

Запостил: myzone myzone, (Updated )

Комментарии (3) RSS

Добавить комментарий

Где здесь C++, guest?!

    А не использовать ли нам bbcode?


    8