[prev in list] [next in list] [prev in thread] [next in thread]
List: ast-users
Subject: [ast-users] typeset in signal trap ==> compound array contains typeset statements
From: Cedric Blancher <cedric.blancher () gmail ! com>
Date: 2013-08-08 22:42:12
Message-ID: CALXu0UdNNydWfuz0_ri+uZPcA+_ium9d4ia_31j0UxgqwKGNJQ () mail ! gmail ! com
[Download RAW message or body]
Can anyone explain why the following code contains FOUR array elements
instead of two? I'm getting desperate with this. I only want to
declare c.car[index].int as a integer variable (aka typeset -li) but
receive this garbage instead when running it with ast-ksh.20130807:
ksh -c 'set -o nounset ; compound c ; compound -a c.car; integer
c.cari=0; trap "typeset -i c.car[c.cari++].int=\${.sh.sig.value.int}"
RTMIN RTMAX ; kill -q4 -s RTMIN $$ ; true ; kill -q17 -s RTMAX $$ ;
true ; print -v c'
(
typeset -C -a car=(
[0]=(
int=4
)
[1]=(
typeset -i int=0
)
[2]=(
int=17
)
[3]=(
typeset -i int=0
)
)
typeset -l -i cari=4
)
Ced
--
Cedric Blancher <cedric.blancher@gmail.com>
Institute Pasteur
_______________________________________________
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic