Subversion Repositories Kolibri OS

Rev

Rev 5975 | Rev 7878 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #define MEMSIZE 4096*120
  2.  
  3. #include "../lib/io.h"
  4. #include "../lib/collection.h"
  5.  
  6.  
  7. void main()
  8. {  
  9.         io.run("/sys/develop/board", "");
  10.         test1();
  11.         test2();
  12. }
  13.  
  14. void test1()
  15.  collection s;
  16.  {
  17.         s.add("Hello");
  18.         s.add("World!");
  19.         debugln(s.get(0)); //-> Hello
  20.         debugln(s.get(1)); //-> World
  21.         s.drop();
  22. }
  23.  
  24. void test2()
  25.  collection_int ci;
  26.  int i;
  27.  {  
  28.         ci.add(0);
  29.         ci.add(1);
  30.         ci.add(2);
  31.         ci.add(3);
  32.         for (i=0; i<ci.count; i++) debugi(ci.get(i)); //-> 0 1 2 3
  33.         ci.count--;
  34.         ci.count--;
  35.         ci.add(4);
  36.         for (i=0; i<ci.count; i++) debugi(ci.get(i)); //-> 0 1 4
  37.         ci.drop();
  38. }