Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#85 Mishandling of zero valued subscripts by $qs.

open
nobody
None
5
2012-12-29
2010-11-28
Bob Isch
No

Lest November pass with no activity at all...

It seems that whenever $qs is called to return a subscript that has a value of zero it will also return one or more following subscripts as well. Actually, it seems to return ALL of the following subscripts.

gtm> w $zv
GT.M V5.4-001 Linux x86_64

gtm> s x="a(0,1)" f i=0:1:$ql(x) w i_":"_$qs(x,i),!
0:a
1:0,1
2:1

gtm> s x="a(0,0,0,0)" f i=0:1:$ql(x) w i_":"_$qs(x,i),!
0:a
1:0,0,0,0
2:0,0,0
3:0,0
4:0

gtm> s x="a(1,1,1,1)" f i=0:1:$ql(x) w i_":"_$qs(x,i),!
0:a
1:1
2:1
3:1
4:1

gtm>

Thanks,
-bi

Discussion