Accessing command line parameters in Island

The following program does not produce any output when I call it from the command line with parameters like “1 2 3”.

...
class method Main(args: array of String): Int32;
begin
  writeLn (String.Format ('Args = {0}', [args.Length]));

  for iIndex: Int32 := 0 to args.Length - 1 do
    writeLn (String.Format ('Args [{0}] = {1}', [iIndex, args [iIndex]]));
end;
...

The expected output should be:

Args = 3
Args [0] = 1
Args [1] = 2
Args [2] = 3

I am using the Island compiler with Elements v9.3.103.2211.

Regards, Olaf

Thanks, logged as bugs://79018

bugs://79018 got closed with status fixed.

Y:\>console.exe  1 2 3 4
Args = 5
Args [0] = Y:\console.exe
Args [1] = 1
Args [2] = 2
Args [3] = 3
Args [4] = 4

Excellent. Now: Will this bugfix make it into a future release of Elements v9 or only v10?
Can you please provide me with a release date?

Thanks, Olaf

Hi,

V10 already has it. There currently are no plans for a new V9 build, however you could just grab the master branch of:

This matches the v9 build, except for the addition of the fix. Alternative, you can use the code we added:

In your main method.

@ck Last time I tried to build the master branch, it didn’t build with v9.x
It uses things like lifetimestrategy, that I think are only present in v10

The lockdown branch should work @joseasl.

1 Like

Yeah, island master is up to date for v10, and wont build for v9 anymore, sorry.

As a customer I would very much appreciate it if you could keep the Island RTL compatible with Elements v9 until v10 has been officially released in the “Stable” channel.

Regards, Olaf

Well, it is. just not the newer developments that are for v10.

I meant the source code in the master branch on GitHub in case that bugs relevant to users of Elements v9 get fixed.

We have the lockdown branch for v9 compatible fixes.