V4MD Noob: VOID instead of Vset with zero records?

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Apr 22 00:10:04 CDT 2008


On 4/22/08 7:45 AM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:

> Hi Marc,
> 
> well it has been a few years since I left behind Director (or did it
> left me behind?) but the case you are describing seems to be something
> along the lines of
> -- pseudocode
> myVSet  = BuildVSet()
> if not objectP(myVSet) (or if VoidP(myVSet)) then
>    --return an empty VSet
>   myVSet =  new VSet() --zero records set
> end if
> return myVSet
> 
> or maybe I am missing your point ?

Okay, and now lets really consider some examples.

What is logic of your code?
For example in C++ we usually have such code:

    BitSet_Ptr pSet = fld.Findsomething()

    if( pSet == NULL) // it is empty
    {
        do something for empty case
    }
    else // we have found some records
    {
        ulong Count = pSet->get_Count();
        for( ulong i = 1; i <= Count ; ++i )
        {
            // iterate records
        }     
    }


I do not see reasons why you need substitute VOID/NIL object by an empty Set
in the Lingo ... Why you need EMPTY set object ? Why Lingo code cannot looks
like above C++ code?

    VBitSet pSet = fld.Findsomething()

    if( not objectP(myVSet) (or if VoidP(myVSet) ) // it is empty
    {
        do something for empty case
    }
    else // we have found some records
    {
        ulong Count = pSet->get_Count();
        for( ulong i = 1; i <= Count ; ++i )
        {
            // iterate records
        }     
    }


----------------------------------------
P.S.

What is difference between
    objectP(myVSet) and VoidP(myVSet)
?

If you know that it can be only VOID then may be enough just single?


----------------------------------------
P.S.  You have told in prev letter that NIL object is better for you than
VOID, can you explain why it is better and what difference between VOID and
NIL in the Lingo?  Does NIL preserve original type of object ??


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list