fbpx

First tests with the XS Runtime

More
7 months 3 days ago #1 by Arne Ortlinghaus
First tests with the XS Runtime was created by Arne Ortlinghaus
Hi,
I have made some first tests. But I get some compiler error messages which I do not understand
I have removed the vulcanrt references and I have added the following references manually in the XSPROJ file
<Reference Include="XSharp.Core">
<Name>XSharp.Core</Name>
<AssemblyName>XSharp.Core.DLL</AssemblyName>
</Reference>
<Reference Include="XSharp.VO.dll">
<Name>XSharp.VO.dll</Name>
<AssemblyName>XSharp.VO.dll.DLL</AssemblyName>
</Reference>


Test with arrays

FUNCTION test1() as void
LOCAL n := 5 AS DWORD
local a as array
a := arraynew(n)

I get the error XS1503 Argument 1: cannot convert from 'dword' to 'int'

Test compiling the VOConsole library with references to the new two assemblies

METHOD Write( sMsg )
LOCAL lRet := false AS LOGIC //X# AO 11/2016
LOCAL n AS DWORD

IF ( hConOut != F_ERROR )
n := SLen( sMsg )
lRet := ( FWrite( SELF:hConOut, sMsg, n ) == n )
ENDIF

I get the following error XS0121 The call is ambiguous between the following methods or properties: 'XSharp.Core.Functions.FWrite(System.IntPtr, string, dword)' and 'XSharp.VO.Functions.FWrite(params XSharp.__Usual[])' BaseConsole C:\daten\vulcan\Solutions\BaselibxsrtSln\BaseConsole\Console.prg 242

Arne

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

More
7 months 3 days ago #2 by Robert van der Hulst
Replied by Robert van der Hulst on topic First tests with the XS Runtime
Arne,
These are 2 issues that Wolfgang has also reported.
A fix for this is on its way:
- we will allow any numeric type for array indices
- the compiler will give preference to the strongly typed version of a method when there is ambiguity

I will update the installer and will bring a new version with me next week when I am in South Tirol

Robert

XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.
The following user(s) said Thank You: Arne Ortlinghaus

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