Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: User Defined Function Subroutine Input Parameter Limit Limitation 16 UDF UDS Syntax Error
Basically, instead of doing:
; Doesn't work - 17 parameters #DefineFunction udfFoo(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) #EndFunctionYou do:
#DefineFunction udfFoo(arrA) #EndFunctionAnd then call it something like this:
arrA = ArrDimension(17) For I = 0 To 16 arrA[I] = Something... Next udfFoo(arrA)Note that arrays are "magic" in two ways, as function parameters. First, as above, they can be used to send arbitrary length data. Second, they are "call by reference" - changes made in the function are passed back to the caller's array. This can be a way to get around the variable scoping rules that WinBatch imposes on functions, as well as providing a way to return multiple values (i.e., besides the main function return value).
Article ID: W18337
Filename: UDF UDS Parameter Limit.txt
File Created: 2011:09:29:08:21:34
Last Updated: 2011:09:29:08:21:34