Discussion:
Zonnon/.NET open array compatibility
(too old to reply)
Frank Hrebabetzky
2004-12-01 22:44:45 UTC
Permalink
I don't know whether this is the place for Zonnon questions, but for
lack of alternatives I give it a try.

I want to access command line arguments and tried:
...
import System.Environment as Env,
System.String as Str;
var par: array * of Str;
begin
par:= Env.GetCommandLineArgs();
...
The compiler responds:
Types 'ARRAY[] OF String' and 'String[]' are not assignment
compatible

The result type of Env.GetCommandLineArgs() in C# notation is
public static string[]

So what would be the correct way?

--
Frank
Anes Sadikovic
2004-12-05 04:11:59 UTC
Permalink
Post by Frank Hrebabetzky
I don't know whether this is the place for Zonnon questions, but for
lack of alternatives I give it a try.
...
import System.Environment as Env,
System.String as Str;
var par: array * of Str;
begin
par:= Env.GetCommandLineArgs();
...
Types 'ARRAY[] OF String' and 'String[]' are not assignment
compatible
The result type of Env.GetCommandLineArgs() in C# notation is
public static string[]
So what would be the correct way?
Frank,

I guess that the current version of Zonnon compiler is still not
stable. I had the same result when tried to compile your example.

Then I tried even simpler


module Test;

var a, b: array * of string;

begin
a := b;
end Test.

When I tried to compile this program, I got a message "Internal
compiler error>"

Loading...