Program copyarr;
Type
Tar = Array Of Byte;
Var
a, b, c : Tar;
x : Byte;
Begin
setLength(a, 5);
setLength(b, 5);
For x := 0 To 4 Do
Begin
a[x] := x * x + 1;
b[x] := x + 1;
End;
writeln(a[2]) ;
c := copy(a, low(a), high(a));
writeln(c[2]);
End.
Compiles and works in FPC
in Blaise :
$ ./blaise --source copyarr.pas --output arr
Semantic error: Type mismatch in assignment: expected 'array of Byte' but got 'string' at line 22 col 3 in copyarr
Compiles and works in FPC
in Blaise :