首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

PB制定位置字符串替换解决思路

2012-03-15 
PB制定位置字符串替换string ls_qx 000000000000000000000000000000000000000000000000000000000000000

PB制定位置字符串替换
string ls_qx = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
ls_qx共256位,通过数据窗口dw_1中的单选按钮列xzbz,可以设置每一位为1或者0。
do while li_num <= dw_1.rowcount()
ll_xh = dw_1.getitemnumber(li_num,"RoleCode")
if dw_1.getitemnumber(li_num,"xzbz") = 1 then
replace(ls_qx,ll_xh,1,'1')
else
replace(ls_qx,ll_xh,1,'0')
end if
li_num = li_num + 1
loop
执行上述代码后,ls_qx返回值仍然是256个0,请朋友指导,谢谢!

[解决办法]
ls_qx = replace(ls_qx,ll_xh,1,'1')

热点排行