On Sat, 20 May 2006, jared r r spiegel wrote: > On Sat, May 20, 2006 at 11:28:26AM -0400, jared r r spiegel wrote: > > > > i have half a mind that says otto@/kili@/ckuthe will come down > > and cluestick me about why what i am seeing is expected behaviour, > > but the other half expects this to be not what should be happening.
this looks like a bug, -Otto > > the more i play with this the more it seems like > i'm just not supposed to be using arrays with integers... :/ > > (note weird echo output, but the indices are OK ) > ============== > $ typeset -i F=0 > $ F[1]=1 > $ F[2]=3 > $ F[93]=29389238 > $ echo ${F[*]} > 8 8 8 29389238 > $ set | grep ^F > F[0]=0 > F[1]=1 > F[2]=3 > F[93]=29389238 > ============== > > and in this one, i'm working on some little dinky functions. > the "_d[0]" parameter ,, the '0' is different every time i > run it in a new shell > > ==== > function _dectohex { > typeset -i16 _h='' > typeset -i10 _d='' > while [[ $* != "" ]]; do > _d[++x]=$1 > shift > done > set | grep _d > echo [EMAIL PROTECTED] > } > > _dectohex 99 > ==== > > in the above, if you get rid of the typeset -i16 line, it > seems to become sane. i'd like to be sane again too :P > > -- > > jared > > [ openbsd 3.9-current GENERIC ( may 1 ) // i386 ]