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

TOPIC: First tests with the XS Runtime

First tests with the XS Runtime 1 year 6 hours ago #5070

  ArneOrtlinghaus's Avatar Topic Author ArneOrtlinghaus Offline Posts: 126
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.

First tests with the XS Runtime 1 year 5 hours ago #5071

  robert's Avatar robert Offline Posts: 969
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.

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

  • Page:
  • 1