以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 全局变量怎么顺序赋值 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=189761) |
-- 作者:飞云 -- 发布时间:2023/12/24 16:27:00 -- 全局变量怎么顺序赋值 Public s1 As String Public s2 As String Public s3 As String Public s4 As String Dim s As String = "A-C*B-D" dim i As Integer Dim sps() As Char = {"-", "*"} Dim Names() As String = s.Split(sps) For Each name As String In Names i=i+1 Output.Show(s & i =Name) Next 请问老师全局变量s怎么赋值 想要的结果:s1=A s2=C s3=B [此贴子已经被作者于2023/12/24 17:57:27编辑过]
|
-- 作者:有点蓝 -- 发布时间:2023/12/24 20:19:00 -- 变量名称是不能使用变量替代的。只能按全称使用,比如 Dim Names() As String = s.Split(sps) s1=Names(0) s2=Names(1) ……
|