Hola estoy practicando con los arrays normales en delphi , no con stringlist ni nada parecido.
Este el codigo que tengo :
Código Delphi
[-]
type
otro_array = array of string;
function clean_array(array1: otro_array): otro_array;
var
array_limpio: otro_array;
i: integer;
begin
For i := Low(array1) to High(array1) do
begin
ShowMessage(array1[i]);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
const
datos: array [1 .. 5] of string = ('test1', 'test2', 'test3',
'test4', 'test5');
var
arrays: Array Of String;
i: integer;
begin
SetLength(arrays, 5);
arrays[0] := 'test1';
arrays[1] := 'test2';
arrays[2] := 'test3';
arrays[3] := 'test4';
arrays[4] := 'test5';
clean_array(datos);
clean_array(arrays);
Iba todo bien haciendolo solo , hasta que me aparecieron dos errores que no se como resolver.
En la linea
me devuelve este error :
Cita:
Incompatible types: 'otro_array' and 'Array'
|
En la linea
me devuelve este error :
Cita:
Incompatible types: 'otro_array' and 'Dynamic array'
|
En tema es que no se como resolverlo , no se si tengo que convertirlo o en realidad no se puede hacer lo que intento con estos dos arrays.
¿ Alguien me podria ayudar ?