VFP:3d 数组?
以下不起作用...你能在foxpro中做3d数组吗?
DIMENSION sqlresults[10]
select list_code, count(donor) as ndine FROM cGift group by list_code INTO ARRAY sqlresults[1]
编辑: 啊,谷歌搜索“vfp 多维数组”出现了一些东西(“vfp 3d 数组”没有)
Foxpro 仅支持 2d 数组。我想我必须用一些替代品来伪造它(&)。
The following doesn't work... Can you do 3d arrays in foxpro?
DIMENSION sqlresults[10]
select list_code, count(donor) as ndine FROM cGift group by list_code INTO ARRAY sqlresults[1]
edit:
ah, a google search for "vfp multi-dimensional arrays" turned up something ("vfp 3d arrays" didn't)
Foxpro only supports 2d arrays. Guess i'll have to fake it with some substitution (&).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的代码的唯一问题是您在查询中包含了维度。试试这个:
也就是说,总的来说,最好将查询结果放入游标而不是数组中。
The only problem with your code is that you included a dimension in the query. Try this instead:
That said, on the whole, you're better off putting query results into a cursor than an array.
这样你的数组保存了游标的名称,你可以访问它们的值,例如:
或者使用 eval 或 &
This way your array holds names of the cursors, and you can access their values like:
Or use eval or &