date member in VOStruct

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

date member in VOStruct

Post by wriedmann »

Hi Robert,
in code I have to migrate I have found a VOStruct that has a date member.
The X# compiler gives me a

Code: Select all

error XS9027: VoStruct member type must be one of the following: bool, byte, short, int, long, char, sbyte, ushort, uint, ulong, float, double, ptr, psz or vostruct
This structure is used in a lot of places so it is not easy to replace.
And since this is not my code, please don't ask me why there was not used a class instead of a struct.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

date member in VOStruct

Post by robert »

Wolfgang,
I am not sure what the DATE is used for, but you can probably replace it with a DWORD and then when reading / writing cast the DATE to a DWORD or back.
I'll see if we can add support for DATE members in the next build.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

date member in VOStruct

Post by Chris »

Robert,

I asked Wolfgang to post this question here. I had also faced this issue and thought about using a DWORD, but at the end simply replaced the VOSTRUCT with a normal .Net structure. But I see this issue is more common that I thought, so I was also wondering if it is even possible to make the compiler allow DATEs. Since you say this is a possibility, I will log this as feature request.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

date member in VOStruct

Post by wriedmann »

Hi Robert, hi Chris,
thank you very much for all your efforts!
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply