fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Beta 8: DIM... AS STRING Array

Beta 8: DIM... AS STRING Array 2 months 4 weeks ago #1

  Thomas's Avatar Topic Author Thomas Offline Posts: 15
Hi All,

with change to X#-Compiler version 2.0.0.8 (Bandol Beta 8 ) we get a new warning regarding DIM arrays that we didn't get with version 2.0.0.7 (Vulcan.Net dialect) .
We have enabled X# Compiler Option /vo2 (initialize all variables and fields of type STRING and all elements of DIM ... AS STRING arrays to an empty string) for VO/Vulcan compatibility.

CLASS Test
PROTECT DIM aDimArray[3] AS STRING


produces now a warning (for line of class definition):
XS0029: Cannot implicitly convert type 'string' to 'string[]'

Is this warning intended or is this a bug?

If you declare the DIM array in a method it seems ok:
PRIVATE METHOD Test(i AS INT) AS STRING
LOCAL DIM aDimArray2[3] AS STRING

...

Thanks
Thomas

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 4 weeks ago #2

  Chris's Avatar Chris Offline Posts: 1052
Hi Thomas,

This looks like a bug, but I cannot reproduce it here, no matter the combination of compiler options I tried, I do not get such a warning for neither the PROTECT or LOCAL DIM declaration.

Possibly the existence of something else of something else in the code triggers this, can you please send a compilable sample that reproduces this?

TIA,
Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 4 weeks ago #3

  Thomas's Avatar Topic Author Thomas Offline Posts: 15
Hi Chris,

I've attached a sample for you. Hopefully that helps to find the bug!

Regards
Thomas
Attachments:

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 4 weeks ago #4

  Chris's Avatar Chris Offline Posts: 1052
Hi Thomas,

Thanks for the sample, but unfortunately I still cannot reproduce it! I am using a newer version of the compiler, but reverted to the old Beta 8 one and still cannot see it. Can somebody else please do a quick test with the Solution Thomas posted and tell me if you do get the "Cannot implicitly convert type..." warning?

Thomas, can you please post a screenshot of the warning you get? It might give an idea on what's causing it.

(Edit: Now that I am thinking about it, could it be not a regular warning in the Errors window that you are seeing, but an "Assertion failed" popup dialog window instead?)

TIA,

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Last edit: by Chris.

Beta 8: DIM... AS STRING Array 2 months 4 weeks ago #5

  Thomas's Avatar Topic Author Thomas Offline Posts: 15
Hi Chris,

you're right, it's not a warning but an error. I thought it's a warning because I had enabled option "warnings as errors" at first.
Sorry for that!

I added a screenshot with the error for you.
Can I check anything else? Dll versions, ...

Regards
Thomas
Attachments:

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 4 weeks ago #6

  Chris's Avatar Chris Offline Posts: 1052
Sorry Thomas, you are right of course, I thought I had reverted to the original Beta 8 compiler version but apparently I didn't, my backup was of a newer version. I completely installed back the Beta 8 and I can now easily reproduce the problem, apparently Robert fixed this after the release.

I can send you an updated compiler version, which runtime are you using in your apps, the vulcan or the X# one?
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 4 weeks ago #7

  Thomas's Avatar Topic Author Thomas Offline Posts: 15
Hi Chris, thanks for your help!

We use the X# runtime.

Regards
Thomas

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 3 weeks ago #8

  Thomas's Avatar Topic Author Thomas Offline Posts: 15
Hi Chris, could you please send me an updated compiler version? That would be very helpful.

Thanks
Thomas

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 3 weeks ago #9

  Chris's Avatar Chris Offline Posts: 1052
Hi Thomas,

I apologize, should had contacted you earlier about this, but unfortunately I still do not have a stable new version available to send you. For now, please use the Beta 7 version and as soon as Robert has a newer version ready, I will send it to you.

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 3 weeks ago #10

  Thomas's Avatar Topic Author Thomas Offline Posts: 15
Hi Chris, that's ok.

Thomas

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 2 weeks ago #11

  Thomas's Avatar Topic Author Thomas Offline Posts: 15
Hi Chris,
I've just made a test with the new version 2.0.0.9 and it works fine!

Thanks
Thomas

Please Log in or Create an account to join the conversation.

Beta 8: DIM... AS STRING Array 2 months 2 weeks ago #12

  Chris's Avatar Chris Offline Posts: 1052
Hi Thomas,

Great to hear, just a warning though, I just saw there's still an issue with LOCAL DIM arrays, those do not get initialized to empty strings when /vo2 is enabled. I have logged it for Robert to fix it, but in the meantime please check if you are using any in your code. Class DIM arrays (single-dimenion) work fine.

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

  • Page:
  • 1