pike.git / lib / modules / Array.pmod

version» Context lines:

pike.git/lib/modules/Array.pmod:533:    a0=b0="";    sscanf(a,"%[^ \t]%*[ \t](%*[^)])%*[ \t]%s",a,a0);    sscanf(b,"%[^ \t]%*[ \t](%*[^)])%*[ \t]%s",b,b0);    if (a>b) return 1;    if (a<b) return 0;    if (a0==b0) return 0;    return lyskom_sort_func(a0,b0);   }      //! Flatten a multi-dimensional array to a one-dimensional array. + //! @note + //! There is no safeguard against flattening a cyclic array; + //! trying to do so may result in an infinite loop.   array flatten(array a)   {    array ret=({});    foreach(a, mixed b) ret+=arrayp(b)?flatten([array]b):({b});    return ret;   }      //! Sum the elements of an array using `+   mixed sum(array a)   {