Skybuck Flying schrieb:
Passing real pointers and working with them becomes even more tricky and
requires even more stars/asterixes.
A very bad problem which was easily solved in pascal:
procedure test( var a : integer );
begin
a := 5;
end;
test( a );
^ No stupid symbols needed ! ;) Much user friendly and pretty much does
the same thing.
Why make things more difficult then absolutely necessary huh ?! ;) :) =D
What does above code when called with Nil?
While
test(nil);
may result in a compiler error, the only cure would be to rewrite test as
procedure test(a: ^integer);
But how would you do that, when the converter decided to use
procedure test(var a: integer);
instead?
You'll have to *instruct* the converter to use the pointer form, and
that for *every single* subroutine in the C code.
A converter also cannot determine from a header file, whether the
implementation does something like this:
int test(int* a)
{
return (a)?++*a:42;
}
DoDi
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel