Search found 155 matches

by Frank Maraite
Tue Nov 14, 2017 7:33 pm
Forum: Product
Topic: Some forms of ARRAY do not get their bases set to 0/1 as in Project settings !?
Replies: 13
Views: 4160

Some forms of ARRAY do not get their bases set to 0/1 as in Project settings !?

<r>Hi Chris,<br/>
<br/>
but looking at real code: do you really have code like this? I think in most situations we have loops where it doesn't matter. Or we do what we should do: hide the internal representation. In your example I would have a method like<br/>

<CODE><s>[code]</s>METHOD ...
by Frank Maraite
Tue Nov 14, 2017 5:23 pm
Forum: Product
Topic: Some forms of ARRAY do not get their bases set to 0/1 as in Project settings !?
Replies: 13
Views: 4160

Some forms of ARRAY do not get their bases set to 0/1 as in Project settings !?

<t>Hi Phil,<br/>
<br/>
it's quit simple: .NET doesn't know anything about /az, __ARRAYBASE__ or things like that.<br/>
<br/>
This is a workaround to use 1-based arrays but only has effect to X# code. Everything inside .NET is 0-based. Everything behind every language is at least 0-based. The first ...
by Frank Maraite
Sun Nov 12, 2017 5:16 pm
Forum: Product
Topic: Zero / One based arrays - finding out which !?
Replies: 13
Views: 4475

Zero / One based arrays - finding out which !?

<t>Phil,<br/>
Wolfgang<br/>
<br/>
as long as you have your unit tests working there is nothing dangerous.<br/>
<br/>
Phil, during the time your are searching a solution you could have changed hundreds or thousands lines of code to the zero based approach. I bet in most cases it is from<br/>
for i ...
by Frank Maraite
Sun Nov 12, 2017 8:53 am
Forum: Product
Topic: Zero / One based arrays - finding out which !?
Replies: 13
Views: 4475

Zero / One based arrays - finding out which !?

Wolfgang,

cool!

Frank
by Frank Maraite
Sat Nov 11, 2017 12:02 pm
Forum: Product
Topic: 2D 'matrix' .NET arrays - HELP syntax !!!
Replies: 8
Views: 3406

2D 'matrix' .NET arrays - HELP syntax !!!

<t>Hi Phil,<br/>
<br/>
look what I found in old code:<br/>
<br/>
LOCAL avals AS Double[][]<br/>
avals := <Double[]>{<Double>{1.0, 4.0, 7.0, 10.0}, <Double>{2.0, 5.0, 8.0, 11.0}, <Double>{3.0, 6.0, 9.0, 12.0}}<br/>
<br/>
But realise: Double[][] is not the same as Double[,]. It is an one dimensional ...
by Frank Maraite
Sat Nov 11, 2017 11:53 am
Forum: Product
Topic: Zero / One based arrays - finding out which !?
Replies: 13
Views: 4475

Zero / One based arrays - finding out which !?

Hi Phil,

are you sure you have X#/core ?
Oh: Write __ARRAYBASE__:ToString()

With '.' the compiler is searching for a class __ARRAYBASE__ with static method ToString().

Frank
by Frank Maraite
Sat Nov 11, 2017 11:49 am
Forum: Product
Topic: Zero / One based arrays - finding out which !?
Replies: 13
Views: 4475

Zero / One based arrays - finding out which !?

<t>Hi Phil,<br/>
<br/>
for your second question: In my opinion it does not make sense to mix thing. It confuses our thinking. One of the first things I did when switchung to Vulcan: I set /az on and changed all array access to zero based. Nowadays my nit tests prevents me doing it wrong.<br/>
In ...
by Frank Maraite
Sat Nov 11, 2017 11:34 am
Forum: Product
Topic: Zero / One based arrays - finding out which !?
Replies: 13
Views: 4475

Zero / One based arrays - finding out which !?

Hi Phil,

checkout __ARRAYBASE__. It should be 0 or 1.

Frank
by Frank Maraite
Sat Nov 11, 2017 10:24 am
Forum: Product
Topic: XIDE and /doc
Replies: 2
Views: 2505

XIDE and /doc

<r>Hi Chris,<br/>
<br/>
since X# supports /doc it's crying for the code documentation comments (CDC) (XS1591). Of course I have many but now it's time to have support for them in XIDE too.<br/>
<br/>
CDC's have to be just before the entity, for example:<br/>

<CODE><s>[code]</s>/// <summary ...
by Frank Maraite
Thu Nov 09, 2017 9:28 pm
Forum: Product
Topic: 2D 'matrix' .NET arrays - HELP syntax !!!
Replies: 8
Views: 3406

2D 'matrix' .NET arrays - HELP syntax !!!

<r>Hi Phil, Chris,<br/>
<br/>
this works
<CODE><s>[code]</s> LOCAL numbersOne AS INT[]
numbersOne := <INT>{1,2,3,4,5,6}
<e>[/code]</e></CODE>
but this
<CODE><s>[code]</s> LOCAL numbersTwo AS INT[,]
numbersTwo := {{1,2},{3,4},{5,6}}
<e>[/code]</e></CODE>
gives XS9008 Untyped arrays are not ...