以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 代码求助 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=177291) |
-- 作者:rongping -- 发布时间:2022/5/16 16:41:00 -- 代码求助 我想用一个数字变量做一个函数,功能是: 当数字变量的值是3,可以传回这样一个字符串集合,这个怎么实现? "(3-12)","(13-22)","(23-32)","(33-42)","(43-52)","(53-62)","(63-72)","(73-82)","(83-92)","(93-102)","(103-112)",
|
-- 作者:有点蓝 -- 发布时间:2022/5/16 16:47:00 -- dim i as integer = 3 dim lst as new list(of string)
for k as integer = 0 to 11 dim m as integer = k*10+i lst.add("(" & m & "-" & m+9 & ")") next |
-- 作者:rongping -- 发布时间:2022/5/16 18:05:00 -- 非常感谢! 如果我再加一个数字参数,如果这个值是3,结果要像这样,怎么实现? "(93-102)","(103-112)","(3-12)","(13-22)","(23-32)","(33-42)","(43-52)","(53-62)","(63-72)","(73-82)","(83-92)"
|
-- 作者:有点蓝 -- 发布时间:2022/5/16 20:38:00 -- 正常生成,在把后面2个插入前面:http://www.foxtable.com/webhelp/topics/0217.htm |