xsharp.eu • Type Conversion from Vulcan.__Array to XSharp.__Array
Page 1 of 1

Type Conversion from Vulcan.__Array to XSharp.__Array

Posted: Wed Mar 16, 2022 8:09 am
by frankP
Hello,

is there a way to convert a Vulcan.__Array to an XSharp.__Array in XSharp?

I tried:

Code: Select all

xs_array := (ARRAY)vn_array
but that results in a compiler error
Cannot convert type 'Vulcan.__Array' to 'ARRAY'

Thanks for any suggestions.

Type Conversion from Vulcan.__Array to XSharp.__Array

Posted: Wed Mar 16, 2022 8:32 am
by Chris
Well, you could write a function that creates a new X# array and simply copies the elements of the vulcan array to the X# one, but is it really necessary to do all this? Can you tell us why you need to mix both array types? Maybe we could suggest a better way to do what you need to achieve.

.

Type Conversion from Vulcan.__Array to XSharp.__Array

Posted: Wed Mar 16, 2022 9:24 am
by frankP
Thank you, Chris.

We are about to migrate a project from Vulcan to XSharp. We are using Vn2Ado, but Vn2Ado is using Vulcan.__Array. So we are getting a lot of compiler errors now. e.g:

Code: Select all

Cannot apply indexing with [] to an expression of type 'Vulcan.__Array'
We are also getting further errors, because array functions like ALen() and so on are referring to Xsharp Alen() functions and would have to be rewritten as VulcanRtFuncs.Functions.Alen() to refer to the corresponding Vulcan function.

Type Conversion from Vulcan.__Array to XSharp.__Array

Posted: Wed Mar 16, 2022 9:40 am
by Chris
I think it will be way less complicated, if you just use the X# version of Robert's tool instead. I'm sure he will step in here or you can contact him directly for a X# license.

..

Type Conversion from Vulcan.__Array to XSharp.__Array

Posted: Wed Mar 16, 2022 1:31 pm
by robert
Frank,
You already have download rights to the Xs2Ado installers on this website.
I recommend that you download Xs2Ado instead of Vn2Ado from this location:
https://www.xsharp.eu/itm-downloads?fol ... 252Fxs2ado
Version 5.0.5 is the recommended version.

Robert