在以逗号分隔的项目进度列表上运行循环4GL [英] running a loop on a comma delimited list of items progress 4GL

查看:77
本文介绍了在以逗号分隔的项目进度列表上运行循环4GL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

def var cList as char no-undo.
assign cList = "one,two,three,four".
<Loop> cList
logic...
</Loop>

循环遍历char变量中以逗号分隔的列表的最佳方法是什么,因此在本示例中,我将得到一个然后两个然后三个然后四个.

What's the best way to loop through a comma delimited list in a char variable so that in this example I would get one then two then three then four.

推荐答案

大声笑我仍然记得我认为的一些进步.

Lol I still remember a bit of Progress I think.

DEF VAR i AS INT NO-UNDO.
&SCOPED-DEFINE LIST "one,two,three,four"

DO i=1 TO NUM-ENTRIES({&LIST}):
  MESSAGE SUBSTITUTE("LIST[&1] is &2", i, ENTRY(i, {&LIST})).
END.

这篇关于在以逗号分隔的项目进度列表上运行循环4GL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆