Roland Mainz
2013-09-10 18:38:26 UTC
Hi!
----
Using arithmetic expressions to calculate a string segment using the
${s:pos:len} operator doesn't work in a namespace with
ast-ksh.2013-09-09 on SuSE 12.3/AMD64/64bit:
-- snip --
$ ksh -c 'set -o nounset ; namespace a.b { function f { integer i=1 ;
typeset s="abcd" ; print "${s:i++:1}" ; } ; f ; }'
/home/test001/bin/ksh: f: line 1: i: parameter not set
-- snip --
AFAIK the correct output would be:
-- snip --
b
-- snip --
----
Bye,
Roland
----
Using arithmetic expressions to calculate a string segment using the
${s:pos:len} operator doesn't work in a namespace with
ast-ksh.2013-09-09 on SuSE 12.3/AMD64/64bit:
-- snip --
$ ksh -c 'set -o nounset ; namespace a.b { function f { integer i=1 ;
typeset s="abcd" ; print "${s:i++:1}" ; } ; f ; }'
/home/test001/bin/ksh: f: line 1: i: parameter not set
-- snip --
AFAIK the correct output would be:
-- snip --
b
-- snip --
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)