Just a generic funct
Simba Code:function name( arr: array of string):array;
var
I : integer;
begin;
for i := 0 to Len - 1 do
result[i] := arr[i];
end;
Just a generic funct
Simba Code:function name( arr: array of string):array;
var
I : integer;
begin;
for i := 0 to Len - 1 do
result[i] := arr[i];
end;
Last edited by Lima Bean; 11-06-2011 at 02:15 PM.
You always have to specify a type. "Array" itself wont do. Of course, this type could be a generic type. Generic types still have to be specialized before use, though.
I guess my question was too broad, let me narrow some. Will the "I" still output to "result[i]". I know the scope is local to the procedure
I don't think I really understand your question
Btw, this is not a trick question . The code is from mufasatypesutil.pas file
Simba Code:function ConvArr(Arr: array of String): TStringArray; overload;
var
Len : Integer;
I : integer;
begin;
Len := Length(Arr);
SetLength(Result, Len);
for i := 0 to Len - 1 do
result[i] := arr[i];
end;
What is the question?
Will the I result to result[i]=arr[i]? Am thinking about inconsistent variables.... Beans are primitive that way
The language is case insensitive, so I is the same as i.
:-)
Ty, just had to check to make sure.
There are currently 1 users browsing this thread. (0 members and 1 guests)