Community Server

The platform that enables you to build rich, interactive communities
Welcome to Community Server Sign in | Join | Help

Possible bug in REMOVE command

  •  03-07-2010, 4:47 AM

    Possible bug in REMOVE command

    Hello John,

    It's been a few days I haven't harassed you (!), so here's a new one:
    REMOVE command is very unhappy when the position vector is empty. This is odd because the TAKE command works fine in the same conditions. Try the code below using:
    - List =0,10 (no problem)
    - List = 1,10 (crash on REMOVE)

    PS: it would be worth mentioning in the help that not only TAKE and REMOVE are complements of each other, but also if one is concerned with execution speed, AND looking at a very small subset of a much bigger array, one should choose wisely whether to use TAKE or REMOVE as the execution time can vary by orders of magnitude (TAKE / REMOVE a small vector, but don't TAKE / REMOVE a very large vector).

    Rgds
    Gus
    ----------------sample code to crash REMOVE---------------
    CLEAROUTPUT
    DATA 1,10 List
    TAGS List = 0 NulList
    SIZE NulList SNL
    PRINT SNL
    TAKE List NulList List_A
    PRINT List_A
    REMOVE List NulList List_B
    PRINT List_B
    -----------------------------------------------------------
View Complete Thread
Powered by Community Server, by Telligent Systems