Hmmm.. interesting points, Jack.

I can easily understand how you can define a boolean system of proofs to decide that an empty set (or sequence) is always in every set (or sequence), so you would return a value of "YES" (or 1) to validate that one sequence intersects another. However, (implied from what you said) you can have an infinite number of empty sequences before or after a defined sequence, so these empty sets could be indexed to infinity in one direction or the other....

The only problem with this theory is that INSTR is defined by calculating first IF a string exists in another string AND the index of that string as defined by numbering the characters in the string. Because the empty sequences before and after the characters that exist are not defined, it would be impossible to define an empty sequence using one of the numbers that already defines a starting point that does exist in the string.

For example:
INSTR("abc","A") = INSTR("abc","") = 1 should NOT be true.

If indeed INSTR("abc","d") = INSTR("abc","")=0 should not be true either because the two conditions are not identical, then two different return codes should be chosen for each case UNLESS it is unnecessary to distinguish between the two situations. Perhaps the easiest way to solve this problem would be to let:

INSTR("abc","d") = 0 with @error = 0
and
INSTR("abc","") = 0 with @error = something(1, or -1)

The 0 represents that the 2nd string has no index in the first. The @error represents whether or not the 2nd string is an empty set.

This way people that don't care to distinguish between the 2 latter evaluations would have to write no additional code to handle them. Those of us that may at some point wish to handle them will have an alternative to do so.

Brian

[ 13 June 2002, 14:24: Message edited by: BrianTX ]