Hallo,
ich habe mir heute die aktuelle Version von X# installiert und meine Testapps durchcompiliert. Dabei bekomme ich einige Warnings und Fehler gegenüber der alten Version:
SELF:ExecuteCommand(readerName, "00a40804021fff":ToByteArray(), REF response2)
warning XS9071: Parameter 3 needs a(n) 'Out' modifier. This modifier was automatically added
Was muss ich ändern damit die Warning verschwindet?
@@Array.Resize(REF array2, array2:Length + response2:Length - 2)
error XS0176: Member 'System.Array.Copy(System.Array, int, System.Array, int, int)' cannot be accessed with an instance reference; qualify it with a type name instead
Bei den Compiler Errors in der X# Doku steht leider auch nicht mehr dabei.
Und noch eine Frage zu einer ComEnabled DLL:
Wenn ich ein fertiges Com Modul für VO habe und dieses mit einer neuen Compiler Version compiliere, ev. neue Fehler und Warnings ausbessere, muß ich dann die ganze Prozedur zur Erstellung eines Com Moduls wiederholen oder genügt die Compilierung des X' Codes?
LG Franz
Änderungen in X# 2.18.0.4
Moderator: wriedmann
Re: Änderungen in X# 2.18.0.4
Franz,
1st)
2nd)
I think there is a local with the name array in the context of this code.
Try to change it to:
Robert
1st)
Code: Select all
SELF:ExecuteCommand(readerName, "00a40804021fff":ToByteArray(), OUT response2)
Code: Select all
@@Array.Resize(REF array2, array2:Length + response2:Length - 2)
Try to change it to:
Code: Select all
System.Array.Resize(REF array2, array2:Length + response2:Length - 2)
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Änderungen in X# 2.18.0.4
Hallo Franz,
zum COM-Modul: so lange Du nicht die Versionsnummer weitersetzt, ist das für Dein VO-Programm und das System immer dieselbe DLL.
Erst wenn Du die Versionsnummer änderst, musst Du Dein Manifest anpassen.
Wolfgang
zum COM-Modul: so lange Du nicht die Versionsnummer weitersetzt, ist das für Dein VO-Programm und das System immer dieselbe DLL.
Erst wenn Du die Versionsnummer änderst, musst Du Dein Manifest anpassen.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Re: Änderungen in X# 2.18.0.4
Hallo Wolfgang,
danke für die Info! Gibt es eigentlich irgendwo im X# Netz auch eine Doku "Unterschiede X# vs VO"?
Hi Robert,
//SELF:ExecuteCommand(readerName, "00a40804021fff":ToByteArray(), REF response2)
SELF:ExecuteCommand(readerName, "00a40804021fff":ToByteArray(), OUT response2)
Is transfer by reference (REF) obsolete?
ExecuteCommand is defined as
PUBLIC METHOD ExecuteCommand(readerName AS STRING , command AS BYTE[] , response OUT BYTE[] ) AS LOGIC
Should I use IN instead of OUT?
Regards, Franz
danke für die Info! Gibt es eigentlich irgendwo im X# Netz auch eine Doku "Unterschiede X# vs VO"?
Hi Robert,
//SELF:ExecuteCommand(readerName, "00a40804021fff":ToByteArray(), REF response2)
SELF:ExecuteCommand(readerName, "00a40804021fff":ToByteArray(), OUT response2)
Is transfer by reference (REF) obsolete?
ExecuteCommand is defined as
PUBLIC METHOD ExecuteCommand(readerName AS STRING , command AS BYTE[] , response OUT BYTE[] ) AS LOGIC
Should I use IN instead of OUT?
Regards, Franz
Re: Änderungen in X# 2.18.0.4
Hallo Franz,
ich habe das mal probiert zusammenzuschreiben:
https://docs.xsharp.it/doku.php?id=othe ... patibility
Wolfgang
ich habe das mal probiert zusammenzuschreiben:
https://docs.xsharp.it/doku.php?id=othe ... patibility
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Re: Änderungen in X# 2.18.0.4
Danke Wolfgang, ich seh's mir an!
LG Franz
LG Franz
Re: Änderungen in X# 2.18.0.4
Franz,
OUT means that the variable does not have to be initialized. It must be changed inside ExecuteCommand.
IN means that the variable must be initialized and may NOT be changed. It acts like REF (so it passes the value by reference) but the reference is read only.
IN is usefull in scenarios where the variable is of a large valuetype (like a struct). Instead of copying the complete structure, the compiler can pass a pointer to the structure. That could make the code a little bit faster.
Robert
REF means that the variable must have a value before the call. It may be changed (by ExecuteCommand in this case)lagraf wrote: ↑Tue Mar 12, 2024 7:19 am
Hi Robert,
//SELF:ExecuteCommand(readerName, "00a40804021fff":ToByteArray(), REF response2)
SELF:ExecuteCommand(readerName, "00a40804021fff":ToByteArray(), OUT response2)
Is transfer by reference (REF) obsolete?
ExecuteCommand is defined as
PUBLIC METHOD ExecuteCommand(readerName AS STRING , command AS BYTE[] , response OUT BYTE[] ) AS LOGIC
Should I use IN instead of OUT?
OUT means that the variable does not have to be initialized. It must be changed inside ExecuteCommand.
IN means that the variable must be initialized and may NOT be changed. It acts like REF (so it passes the value by reference) but the reference is read only.
IN is usefull in scenarios where the variable is of a large valuetype (like a struct). Instead of copying the complete structure, the compiler can pass a pointer to the structure. That could make the code a little bit faster.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Änderungen in X# 2.18.0.4
Hi Robert,
thanks for info!
Regards, Franz
thanks for info!
Regards, Franz