>Hi hilmar,
>
>>OK, here is one "contest": you have to run three functions one after the other. func2() should only run if func1() is successful, and func3(), again, depends on the successful completion of func2(). Do you see an alternative that is shorter than two nested IFs?
>
>That's too easy,
= Func(1) AND Func(2) AND Func(3)
>
>Or if you want a more structured way in handling failures:
>DO CASE
> CASE !Func(1)
> ** Handle exception here
>
> CASE !Func(2)
> ** Handle exception here
>
> CASE !Func(3)
> ** Handle exception here
>
> OTHERWISE
> ** All functions succeeded
>ENDCASE
I see. I had already thought about case !func1(), etc., but without any code between one CASE and the next.
I was thinking toninght about the unbalanced index - and it seems to me that VFP, and other database systems, must already take at least some provisions to avoid the situation you mentioned. Otherwise, we would be in trouble all the time, since many field values are assigned on a sequential basis. How exactly they do it, I don't know - but they must somehow dynamically move around parts of the tree.
Anyway, it might still help to REINDEX every now and then, to ensure a more balanced tree - but I don't know how significant this is.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)