主题:  怎样从外部文本读取单词并逐个追加到文本域中?

清清水

职务:普通成员
等级:1
金币:0.0
发贴:23
注册:2001/10/11 15:09:43
#12001/10/24 18:10:38
外部文本是由空格隔开,但我想读入后在各个单词之间插入回车,所以想逐个追加到文本域中.以便在后面插入回车.DR中有追加文本的命令函数吗? ADD 和APPEND 好象都不行.
或者将空格转换成回车也行.
请高手救命!!!!



D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#22001/10/25 9:32:57
put zqenptext&retun after member("aa")



清清水

职务:普通成员
等级:1
金币:0.0
发贴:23
注册:2001/10/11 15:09:43
#32001/10/25 11:35:47
多谢54zq,问题解决了,我是这样做的:

repeat while TRUE
put offset("/", thefile) into x --遇到/回车
-- put x
put char 1 to x-1 of theFile into myword
delete char 1 to x of thefile
put myword &return after field num -- display the text in a field

-- put length(field num)& y
if length(field num)>y then
exit repeat
end if

end repeat

不知道DR能不能自动生成FIELD,这样最轻松了.我现在还要自己先建立许多空的FIELD,然后用程序加文本,请高手指教.



D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#42001/10/25 11:45:43
set newmember=new(#field)
set newmember.name="54zq"



threem

职务:普通成员
等级:2
金币:1.0
发贴:338
注册:2001/6/14 13:52:15
#52001/10/25 11:52:57

以下语句建立新member:
new(#field,member(n))
-- “n”为新演员的编号!

OK!TRY IT NOW!:)