Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共11 条记录, 每页显示 10 条, 页签: [1] [2]
[浏览完整版]

标题:求助 数组转换

1楼
jackyfashion 发表于:2025/2/16 18:19:00
老师:您好!

 dim x as i t r i n g = "2 3 5 "
    x  = x  .Replace(" ","+")   
ms g b o x(x)   显法为 2+3+5
请教老师,怎么写代码求的 "x" 和 是10?
请老师指教!!!
谢谢!!!
 


2楼
有点蓝 发表于:2025/2/16 20:30:00
参考:http://www.foxtable.com/webhelp/topics/1277.htm
3楼
jackyfashion 发表于:2025/2/16 20:38:00
谢谢老师!!!
谢谢!!!
4楼
jackyfashion 发表于:2025/2/16 22:19:00
老师:您 好!

图片点击可在新窗口打开查看此主题相关图片如下:aa.png
图片点击可在新窗口打开查看
dim a as  s i t r i n g = "S M L"
dim x as  s i t r i n g = "2 2 1 "
然后有4行,
4行 * 2   = S
4行 * 2  = M
4行 * 1 = L
请老师指教!!!
谢谢!!!



5楼
有点蓝 发表于:2025/2/16 22:39:00
没看懂。
6楼
jackyfashion 发表于:2025/2/17 12:17:00
谢谢老师!
我再动动脑筋想想怎么搞,
谢谢!!!
7楼
y2287958 发表于:2025/2/17 12:43:00
Dim a As String = "S M L"
Dim x As String = "2 2 1 "
For i As Integer = 0 To a.Split(" ").count - 1
    DataTables("表A").AddNew(x.Split(" ")(i) * 4)
    DataTables("表A").ReplaceFor ("尺码", a.Split(" ")(i), "尺码 is null")
Next 
[此贴子已经被作者于2025/2/17 14:29:21编辑过]
8楼
jackyfashion 发表于:2025/2/17 22:00:00
帅哥哟,离线,有人找我吗?
y2287958老师:您 好!谢谢!
9楼
jackyfashion 发表于:2025/2/17 22:08:00
帅哥哟,离线,有人找我吗?
y2287958老师:您 好!测试显示:编译错误:"count"不是"System.Array"的成员.错误代码:For i As Integer = 0 To a.Split(" ").count - 1谢谢老师!请指教!谢谢!!!
10楼
y2287958 发表于:2025/2/17 22:17:00
那用Length试试
[此贴子已经被作者于2025/2/17 22:17:25编辑过]
共11 条记录, 每页显示 10 条, 页签: [1] [2]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03125 s, 2 queries.