Two questions on 6.90

HARRY

Active Member
Licensed User
Longtime User
Hi,

Previous code won't compile anymore.

1) In a program I have the following code:

In Globals: Dim Type (TagCode,TagType,TagCount,TagOffset) Tags(0)

In a sub:

Dim Tags(NumberOfTags)


For i = 0 To NumberOfTags-1
Tags(i).TagCode =GetValue(22 + (i*12),2)
etc

This worked fine with the previuos compiler, but now I get an error message at compilation on the statement Dim Tags(Numberof Tags): CS0029 Can not implicitely convert type string [] to string [*,*]. (Translated message from dutch)

Was the code already wrong for the previous compiler but did he accept it?
How to dimension that array of the type Tag?

2) In a module of that program, which I did not write myself, a number of variables were declared in a sub belonging to that module:
Dim am, ha, ar, di, x, y, tg, rh, gh

Moreover the name of two of these variables were used in a type declaration in Globals:
Public Type (xZone, X, yZone, Y) UTM As double

This gave no problems with the previous compiler, but now I get the error message: Regular global variables cannot be redeclared.

Is this correct?

Harry
 

HARRY

Active Member
Licensed User
Longtime User
Sorry, my explanation was incorrect.

The x and y variables referred to were not the problem. Another variable was declared in Globals and in a sub.

That was the reason of the compiler message.

Harry
 
Top