1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ARRAY enhancements

Discussion in 'Support' started by Steve Fabian, Jun 9, 2010.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    It would be useful to have an enhanced version of the commands which load
    data into arrays to include defintion of the arrays of "just the right
    size", e.g.

    echo %@makefilearray[array,file]

    would be equivalent to:

    unsetarray array
    setarray array[%@lines[file]]
    echo %@filearray[array,file]

    and similar functionality for @EXECARRAY (which is harder to emulate with
    commands).

    @EXECARRAY should return the number of array elements it filled in the same
    manner as @FILEARRAY does.

    There ought to be a conditional expression
    ISARRAY array
    which would allow simpler testing for existence of arrays then the hard to
    understand but available
    %@arrayinfo[array] NE -1

    BTW, all but ISARRAY could be implemented via plugins.
    --
    Steve
     

Share This Page