[fpc-pascal] Problem with array of const
Darius Blaszyk
dhkblaszyk at zeelandnet.nl
Sun Oct 29 00:59:36 CEST 2017
Consider the application below. When I run it I do get the following
output:
name
rg��������name�F&{00000000-0000-0000-C000-000000000046}
In other words I lose the first character (a) from the arguments
supplied and the string returns with a lot of garbage. What am I doing
wrong here?
Rgds, Darius
program test_args;
procedure test(name: string; args: array of const);
begin
writeln(name);
writeln(args[0].VString^);
end;
begin
test('name', ['arg']);
end.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20171029/17f441d3/attachment.html>
More information about the fpc-pascal
mailing list