愚蠢的问题:关于right函数的使用

sandorn 2002-06-16 09:24:19
代码如下:
string ls_objects,ls_obj
long ll_pos,ll_left,ll_right
ls_objects = trim(dw_new.Describe('datawindow.Objects'))

do while (pos(ls_objects,"~t") > 0)
ll_pos = pos(ls_objects,"~t")
ll_left = ll_pos - 1
ll_right=len(ls_objects) - ll_pos -1
ls_obj = left(ls_objects,ll_left)
ls_objects = right(ls_objects,ll_right)
messagebox('111',ls_obj)
messagebox('222',ls_objects)
loop

为什么ls_objects只显示初值,ls_objects = right(ls_objects,ll_right)没有动作
...全文
77 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
sandorn 2002-06-16
  • 打赏
  • 举报
回复
谢谢:chinalht(我在,故我思)
问题解决
chinalht 2002-06-16
  • 打赏
  • 举报
回复
string ls_obj[], ls_objects
long k

ls_objects = dw_1.Describe('datawindow.Objects') + '~t'
do
k = pos( ls_objects, '~t' )
if k > 0 then
ls_obj[upperbound(ls_obj) + 1] = left( ls_objects, k - 1 )
ls_objects = mid( ls_objects, k + 1 )
end if
loop while k > 0
tiantianpb 2002-06-16
  • 打赏
  • 举报
回复
看看变量ll_right的值是多少

1,079

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧