===
[/home/jrrs] $ uname -mrpsv
OpenBSD 3.9 GENERIC.MP#690 i386 AMD Athlon(tm) MP 2800+ ("AuthenticAMD" 
686-class, 512KB L2 cache)
[/home/jrrs] $ echo $KSH_VERSION
@(#)PD KSH v5.2.14 99/07/13.2
[/home/jrrs] $ ls -l $(which ksh)
-r-xr-xr-x  3 root  bin  324128 May  1 20:28 /bin/ksh
===

  if i start a new shell ( ie: new screen(1) window ), 
  it almost looks like if i typeset a variable right, 
  ( wrong?  basically use -L1 and 0x0000000[0-9] )
  and set about to make others.

  the name of the next variable gets tainted for the
  duration of that shell's existance (even if i unset
  the one i made with typeset -L1 right after i make it)

  plz let me just show it below:

  ( in specific, i'm puzzled by why when i make something
    an array by doing a VAR[index] assignment, it makes
    the original parameter in the VAR have an index of
    805384193 instead of 0. ).

  if it has any significance, (2**30+2**29)/2 is quite close
  to that 805384193 number.  i took a few stabs at the number
  but didn't unravel it neatly into some 'powers of two' 
  constituents yet 

=======
$ typeset -L1 __A=0x00000009
$ typeset -Ui10 __B=1
$ __B[2]=990
$ integer | grep ^__
__B[805384193]=1
__B[2]=990
$ unset __B
$ typeset -Ui10 __B=1
$ __B[2]=990
$ integer | grep ^__
__B[805384193]=1
__B[2]=990
$ unset __A
$ unset __B
$ typeset -Ui10 __B=1
$ __B[2]=990
$ integer | grep ^__
__B[805384193]=1
__B[2]=990
$ unset __B
$ typeset | grep ^__
$ JOE=9
$ JOE[2]=9
$ set | grep JOE
JOE[0]=9
JOE[2]=9
$ integer
MAILCHECK=600
OPTIND=1
PPID=22746
RANDOM
SECONDS=164
TMOUT=3600
$ typeset -i J=50
$ integer
J=50
MAILCHECK=600
OPTIND=1
PPID=22746
RANDOM
SECONDS=175
TMOUT=3600
$ J[1]=55
$ integer
J[0]=50
J[1]=55
MAILCHECK=600
OPTIND=1
PPID=22746
RANDOM
SECONDS=183
TMOUT=3600
$ typeset -i __B=50
$ __B[2]=55
$ integer
J[0]=50
J[1]=55
MAILCHECK=600
OPTIND=1
PPID=22746
RANDOM
SECONDS=235
TMOUT=3600
__B[805384193]=50
__B[2]=55
==========

  even though i unset the __B and it appears
  it was missing, when made it again, it
  got all ho'd up when i did the array thing

  closed that, started a new shell,
  tried things slightly different, got what seems
  to be same result

=======
$ typeset -L1 A=0x0000000a
$ A='';  B='';  C='';  M=''
$ C[2]=38; B[5]=93; M[9]=aaa; A[3]=ac93u
$ set | grep ^.\\\[
A[0]=' '
A[3]=a
B[805384193]=
B[5]=93
C[0]=
C[2]=38
M[0]=
M[9]=aaa
=======

  duplicated with ssh [EMAIL PROTECTED]:

=======
Terminal type? [screen] vt100
# typeset -L1 P=0x00000008
# typeset -i O=900
# O[2]=83
# integer
MAILCHECK=600
O[805384193]=900
O[2]=83
OPTIND=1
PPID=11522
RANDOM
SECONDS=31
TMOUT=0
=======

  thus far, any time i see something get 805384193'd, that param
  name is toasted and will always keep getting 805384193'd if i 
  make it an array.  unsetting a param that was 8-3'd, assigning
  it as a string and then testing, same.  

  look at this poor bastard.  this was after trying to set the
  param back to string:

=======
$ POOP[1]=lala
$ set  | grep POOP
POOP[805384193]=a
POOP[1]=lala
[/home/jrrs] $ unset POOP
[/home/jrrs] $ set | grep POOP
_=POOP
[/home/jrrs] $ POOP[1]=lala
[/home/jrrs] $ set | grep POOP
POOP[1]=lala
_=POOP
[/home/jrrs] $ POOP=poop
[/home/jrrs] $ set | grep POOP
POOP[805384193]=poop
POOP[1]=lala
_=POOP
=======

  *if* i set it explicltly to something[0]=blahblah, it seems
  that corrects the 0th array index to actually be 0, for that
  and all further instances, but if i don't zero it out, it
  stays at 805blahblah3.

  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.

-- 

  jared

[ openbsd 3.9-current GENERIC ( may  1 ) // i386 ]

Reply via email to