[英]processing 2 dimension array
我正在使用經典ASP; 使用getRows獲取行和列的多維數組。
在迭代的同時; 我想將單行傳遞給另一個函數以構建列布局。
使用C#,我可以這樣做:
obj[][] multiDimArray = FunctionCall_To_InitializeArray_4X16();
for (int rowId = 0 ; rowId < 4 ; rowId++)
{
FunctionCall_to_ProcessSingleRow(multiDimArray[rowId][]);
//this function only accept single dimension array
}
我該怎么做是asp classic / vbscript:
1. I have a function that accept single dimension array as parameter.
2. Call that function and pass 1 part of 2 dimension array.
謝謝
我認為您將需要使用要處理的單個維度填充新的數組或字典對象。
這是工作代碼的一部分,應該可以幫助您。
aResults = oRst.Getrows
oRst.Close
Set oRst = Nothing
Call SubCloseDatabaseOracle
iRows = UBound(aResults, 2)
iCols = UBound(aResults, 1)
row = 1 'first row
line = ""
separator = ""
FOR col = 0 TO iCols
line = line & separator & cStr(aResults(col,row))
separator = ";"
NEXT
aSingleDimensionArray = split(line,";")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.