Hello, this little pice of code gives two internal errors:
namespace Unbenannt;
interface
implementation
function ReadCardinal(bytes:array of byte;var pos:integer):cardinal;
begin
end;
procedure Test;
var Signatur;HashVersion:cardinal;
pos:integer;
Names:array of byte;
begin
Signatur:=ReadCardinal(Names,var pos);
end;
end.
Happy Easter to all of you
mh
(marc hoffman)
March 28, 2024, 11:45am
2
Indeed. very strange, looks simple enough…
it seems to happen because Signature is “untyped”
changing it to
var Signatur, HashVersion:Cardinal;
which was probably your intention, works. Not sure if var Signatur;
is valid as an untyped var
declaration (or useful). I know untyped parameters are allowed in method signatures, but I never quite saw the point…
Yes, your right that was a typo in the first place.
I wonder that untyped locals (not a parameters) is allowed.
Maybe only with initializers ?
mh
(marc hoffman)
March 28, 2024, 12:18pm
5
It’s a bug that this didn’t fail right then and there at the declaration, yes.
bugs://E26935 was closed as fixed.