First tests with the XS Runtime

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
ArneOrtlinghaus
Posts: 412
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

First tests with the XS Runtime

Post by ArneOrtlinghaus »

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:datenvulcanSolutionsBaselibxsrtSlnBaseConsoleConsole.prg 242

Arne
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

First tests with the XS Runtime

Post by robert »

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
robert@xsharp.eu
Post Reply