i have that code in my program:
[code]
var
v: variant;
i: longint;
begin
//v it's [blue]"unassigned"[/blue]
v := ReadFromActiveX;
// v it's [blue]"variant array of OLE string"[/blue]
for i:=1 to [red](?len(v)?)[/red] do
listbox1.items.add(v[i]);
end;
[/code]
my problem: what lenght has "v"(variant variable), after first instruction.
I already try: [red]VarArrayDimCount[/red]
[code]k := VarArrayDimCount(v);[/code] and k(integer) is 1 allways.
Thank you!
Comments
http://www.gekko-software.nl/Delphi/art08.htm
hth, pritaeas
[code]
var
v: variant;
i: longint;
begin
//v it's [blue]"unassigned"[/blue]
v := ReadFromActiveX;
// v it's [blue]"variant array of OLE string"[/blue]
for i:=1 to [red](?len(v)?)[/red] do
listbox1.items.add(v[i]);
end;
[/code]
:
:
: my problem: what lenght has "v"(variant variable), after first
: instruction.
:
: I already try: [red]VarArrayDimCount[/red]
: [code]k := VarArrayDimCount(v);[/code] and k(integer) is 1 allways.
:
: http://www.gekko-software.nl/Delphi/art08.htm
:
: hth, pritaeas
:
: [code]
: var
: v: variant;
: i: longint;
: begin
: //v it's [blue]"unassigned"[/blue]
: v := ReadFromActiveX;
: // v it's [blue]"variant array of OLE string"[/blue]
:
: for i:=1 to [red](?len(v)?)[/red] do
: listbox1.items.add(v[i]);
: end;
: [/code]
: :
: :
: : my problem: what lenght has "v"(variant variable), after first
: : instruction.
: :
: : I already try: [red]VarArrayDimCount[/red]
: : [code]k := VarArrayDimCount(v);[/code] and k(integer) is 1 allways.
:
:
you should use VarArrayHighBound.
the VarArrayDimCount returns the number of dimensions, which is in your case indeed 1.