version 0.6 moved to branches/ directory
authorxchaos <xchaos@4bb87942-c103-4e5a-b51c-0ebff58f8515>
Tue, 18 Mar 2008 11:49:05 +0000 (11:49 +0000)
committerxchaos <xchaos@4bb87942-c103-4e5a-b51c-0ebff58f8515>
Tue, 18 Mar 2008 11:49:05 +0000 (11:49 +0000)
git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@62 4bb87942-c103-4e5a-b51c-0ebff58f8515

demos/trees.c

index d08bc15acbc1e2720e192ac381efd1e3f3bb7ba6..e216d0c32543e9333f672826d23857b7ccbb0f06 100644 (file)
@@ -9,20 +9,21 @@ def_mem(Leaf)
 program
 { 
  Leaf leaf,root=NULL;
+ int newkey;
 
- for_ints(i,  8,1,-2,745,-32,-64,27,4 ) printf(" [%d]",i)
+ for_ints(newkey,  8,1,-2,745,-32,-64,27,4 ) printf(" [%d]",i)
  {
   leaf=get_mem(Leaf);
 
   //init
   leaf->__next=NULL;
   leaf->__seek=NULL;
-  leaf->__key=i;
+  leaf->__key=newkey;
 
   //grow tree
-  for(leaf=root; leaf && leaf->__key >= i ; leaf=leaf->__next)
+  for(leaf=root; leaf && leaf->__key <= newkey ; leaf=leaf->__next)
   {
-  if(leaf->__seek->key >=)
+   if(leaf->__seek->key <= newkey)
   }
  
  
This page took 0.122955 seconds and 4 git commands to generate.